PageSourceSearch

https://imgmanager.vercel.app/_next/static/chunks/app/page-5cae089276bcac21.js

js imgmanager.vercel.app collected 2026-10-04 07:07:00 UTC 14,998 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{1964:function(e,n,t){Promise.resolve().then(t.bind(t,9296)),Promise.resolve().then(t.bind(t,8947)),Promise.resolve().then(t.bind(t,3180)),Promise.resolve().then(t.bind(t,9681)),Promise.resolve().then(t.t.bind(t,8960,23)),Promise.resolve().then(t.t.bind(t,2359,23)),Promise.resolve().then(t.bind(t,7652)),Promise.resolve().then(t.t.bind(t,7971,23)),Promise.resolve().then(t.bind(t,2769))},9296:function(e,n,t){"use strict";t.r(n),t.d(n,{ClientClerkProvider:function(){return p}});var r=t(9480),i=t(4587),l=t(2123);let o=l.createContext(void 0);o.displayName="ClerkNextOptionsCtx";let a=e=>{let{children:n,options:t}=e;return l.createElement(o.Provider,{value:{value:t}},n)},s="undefined"!=typeof window?l.useLayoutEffect:l.useEffect;var u=t(6021);t(2884);var c=t(6561),d=t(7290),f=t(2078);f.env.NEXT_PUBLIC_CLERK_JS_VERSION,f.env.NEXT_PUBLIC_CLERK_JS_URL,f.env.CLERK_API_VERSION,f.env.CLERK_SECRET_KEY,f.env.CLERK_API_URL||(e=>{let n=c.nQ(e)?.frontendApi;return d.iF.some(e=>n?.endsWith(e))?d.Fo:d.cM.some(e=>n?.endsWith(e))?d.Iq:d.Xv})("pk_test_d2FybS1jaG93LTYzLmNsZXJrLmFjY291bnRzLmRldiQ"),f.env.NEXT_PUBLIC_CLERK_DOMAIN,f.env.NEXT_PUBLIC_CLERK_PROXY_URL,(0,u.fQ)(f.env.NEXT_PUBLIC_CLERK_IS_SATELLITE),f.env.NEXT_PUBLIC_CLERK_SIGN_IN_URL,f.env.NEXT_PUBLIC_CLERK_SIGN_UP_URL;let v={name:"@clerk/nextjs",version:"5.0.0-beta.35",environment:"production"};(0,u.fQ)(f.env.NEXT_PUBLIC_CLERK_TELEMETRY_DISABLED),(0,u.fQ)(f.env.NEXT_PUBLIC_CLERK_TELEMETRY_DEBUG);var _=t(2078);let m=e=>({...e,publishableKey:e.publishableKey||"pk_test_d2FybS1jaG93LTYzLmNsZXJrLmFjY291bnRzLmRldiQ",clerkJSUrl:e.clerkJSUrl||_.env.NEXT_PUBLIC_CLERK_JS_URL,clerkJSVersion:e.clerkJSVersion||_.env.NEXT_PUBLIC_CLERK_JS_VERSION,proxyUrl:e.proxyUrl||_.env.NEXT_PUBLIC_CLERK_PROXY_URL||"",domain:e.domain||_.env.NEXT_PUBLIC_CLERK_DOMAIN||"",isSatellite:e.isSatellite||(0,u.fQ)(_.env.NEXT_PUBLIC_CLERK_IS_SATELLITE),signInUrl:e.signInUrl||_.env.NEXT_PUBLIC_CLERK_SIGN_IN_URL||"",signUpUrl:e.signUpUrl||_.env.NEXT_PUBLIC_CLERK_SIGN_UP_URL||"",afterSignInUrl:e.afterSignInUrl||_.env.NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL||"",afterSignUpUrl:e.afterSignUpUrl||_.env.NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL||"",telemetry:e.telemetry??{disabled:(0,u.fQ)(_.env.NEXT_PUBLIC_CLERK_TELEMETRY_DISABLED),debug:(0,u.fQ)(_.env.NEXT_PUBLIC_CLERK_TELEMETRY_DEBUG)},sdkMetadata:v}),g=()=>{let e=(0,i.useRouter)(),n=(0,i.usePathname)(),[t,r]=(0,l.useTransition)();"undefined"!=typeof window&&(window.__clerk_internal_navFun=(n,t)=>new Promise(i=>{window.__clerk_internal_navPromisesBuffer||(window.__clerk_internal_navPromisesBuffer=[]),window.__clerk_internal_navPromisesBuffer.push(i),r(()=>{var r,i,l;if((null==t?void 0:null===(r=t.__internal_metadata)||void 0===r?void 0:r.navigationType)==="internal"){let e=(null!==(l=null===(i=window.next)||void 0===i?void 0:i.version)&&void 0!==l?l:"")<"14.1.0"?history.state:null;window.history.pushState(e,"",n)}else e.push(n)})}));let o=()=>{var e;null===(e=window.__clerk_internal_navPromisesBuffer)||void 0===e||e.forEach(e=>e()),window.__clerk_internal_navPromisesBuffer=[]};return(0,l.useEffect)(()=>(o(),o),[]),(0,l.useEffect)(()=>{t||o()},[n,t]),(0,l.useCallback)(e=>window.__clerk_internal_navFun(e),[])},p=e=>{let{__unstable_invokeMiddlewareOnAuthStateChange:n=!0,children:t}=e,o=(0,i.useRouter)(),u=g(),[c,d]=(0,l.useTransition)();(0,l.useEffect)(()=>{if(!c){var e,n;null===(e=(n=window).__clerk_internal_invalidateCachePromise)||void 0===e||e.call(n)}},[c]),s(()=>{window.__unstable__onBeforeSetActive=()=>new Promise(e=>{window.__clerk_internal_invalidateCachePromise=e,d(()=>{o.refresh()})}),window.__unstable__onAfterSetActive=()=>{if(n)return o.refresh()}},[]);let f=m({...e,routerPush:u,routerReplace:e=>o.replace(e)});return l.createElement(a,{options:f},l.createElement(r.El,{...f},t))}},8947:function(e,n,t){"use strict";t.r(n),t.d(n,{AuthenticateWithRedirectCallback:function(){return r.vn},ClerkLoaded:function(){return r.a7},ClerkLoading:function(){return r.qI},MultisessionAppSupport:function(){return i.KM},Protect:function(){return r.Cv},RedirectToCreateOrganization:function(){return r.gM},RedirectToOrganizationProfile:function(){return r.yB}
1,RedirectToSignIn:function(){return r.N1},RedirectToSignUp:function(){return r.C2},RedirectToUserProfile:function(){return r.sO},SignedIn:function(){return r.CH},SignedOut:function(){return r.tj}});var r=t(9480),i=t(9920)},3180:function(e,n,t){"use strict";t.r(n),t.d(n,{EmailLinkErrorCode:function(){return i._L},isClerkAPIResponseError:function(){return i.kD},isEmailLinkError:function(){return i.G1},isKnownError:function(){return i.sZ},isMetamaskError:function(){return i.ZC},useAuth:function(){return r.aC},useClerk:function(){return r.ll},useEmailLink:function(){return r.E2},useOrganization:function(){return r.o8},useOrganizationList:function(){return r.eW},useSession:function(){return r.kP},useSessionList:function(){return r.xo},useSignIn:function(){return r.zq},useSignUp:function(){return r.QS},useUser:function(){return r.aF}});var r=t(9480),i=t(7244)},9681:function(e,n,t){"use strict";t.r(n),t.d(n,{CreateOrganization:function(){return u},OrganizationList:function(){return r.Bg},OrganizationProfile:function(){return c},OrganizationSwitcher:function(){return r.Li},SignIn:function(){return d},SignInButton:function(){return r.$d},SignInWithMetamaskButton:function(){return r.qu},SignOutButton:function(){return r.AM},SignUp:function(){return f},SignUpButton:function(){return r.gX},UserButton:function(){return r.l8},UserProfile:function(){return s}});var r=t(9480),i=t(9920),l=t(2123),o=t(6091);let a=()=>{let e=l.useRef(),n=(0,o.useRouter)();if(n)return e.current||(e.current=n.pathname.replace(/\/\[\[\.\.\..*/,"")),e.current;let r=t(4587).usePathname,i=t(4587).useParams,a=(r()||"").split("/").filter(Boolean),s=Object.values(i()||{}).filter(e=>Array.isArray(e)).flat(1/0);return e.current||(e.current=`/${a.slice(0,a.length-s.length).join("/")}`),e.current},s=Object.assign(e=>{let n=a();return l.createElement(r.Iw,{...(0,i.EJ)("UserProfile",e,{path:n})})},{...r.Iw}),u=e=>{let n=a();return l.createElement(r.Gp,{...(0,i.EJ)("CreateOrganization",e,{path:n})})},c=Object.assign(e=>{let n=a();return l.createElement(r.A,{...(0,i.EJ)("OrganizationProfile",e,{path:n})})},{...r.A}),d=e=>{let n=a();return l.createElement(r.cL,{...(0,i.EJ)("SignIn",e,{path:n})})},f=e=>{let n=a();return l.createElement(r.Mo,{...(0,i.EJ)("SignUp",e,{path:n})})}},6091:function(e,n,t){e.exports=t(3356)},3356:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useRouter",{enumerable:!0,get:function(){return l}});let r=t(2123),i=t(6639);function l(){return(0,r.useContext)(i.RouterContext)}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),e.exports=n.default)},2769:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return k}});var r=t(8754),i=t(2123);let l=e=>{let[n,t]=i.useState(!1),r=i.useRef(0),l=i.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),o=i.useCallback(e=>{var n,i;e.preventDefault(),e.stopPropagation(),r.current++,(null===(n=e.dataTransfer)||void 0===n?void 0:n.items)&&(null===(i=e.dataTransfer)||void 0===i?void 0:i.items.length)>0&&t(!0)},[]),a=i.useCallback(e=>{e.preventDefault(),e.stopPropagation(),r.current--,r.current>0||t(!1)},[]),s=i.useCallback(n=>{var i,l;n.preventDefault(),n.stopPropagation(),t(!1),(null===(i=n.dataTransfer)||void 0===i?void 0:i.files)&&(null===(l=n.dataTransfer)||void 0===l?void 0:l.files.length)>0&&(r.current=0,console.log(n.dataTransfer.files),e(Array.from(n.dataTransfer.files)),n.dataTransfer.clearData())},[]);return i.useEffect(()=>(window.addEventListener("dragenter",o),window.addEventListener("dragleave",a),window.addEventListener("dragover",l),window.addEventListener("drop",s),function(){window.removeEventListener("dragenter",o),window.removeEventListener("dragleave",a),window.removeEventListener("dragover",l),window.removeEventListener("drop",s)})),{isDragging:n}};var o=t(2052),a=t(5711),s=t(4587),u=t(8661);let c=()=>(0,r.jsx)("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status",children:(0,r.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})}),d=(0,t(631).Ue)()(e=>({selectedIds:[],toggleIdSelection:n=>e(e=>e.selectedIds.includes(n)?{selectedIds:e.selectedIds.filter(e=>e!==n)}:{selectedIds:[...e.selectedIds,n]}),clearAll:()=>e({selectedIds:[]})})),f=e=>{let n=d(e=>e.toggleIdSelection);return{toggle:()=>n(e),isSelected:d(n=>n.selectedIds.includes(e))}};
1var v=t(9480);async function _(e){if(console.log("dc image",e),!navigator.clipboard){console.error("Clipboard API not supported in this browser.");return}try{let n=await new Promise(n=>{let t=new Image;t.crossOrigin="anonymous",t.onload=()=>n(t),t.src=e}),t=document.createElement("canvas"),r=t.getContext("2d");if(t.width=n.width,t.height=n.height,!r)throw Error("Could not get canvas context.");r.drawImage(n,0,0);let i=await new Promise(e=>{t.toBlob(n=>n&&e(n))});await navigator.clipboard.write([new ClipboardItem({[i.type]:i})]),console.log("Image copied to clipboard.")}catch(e){console.error("Error copying image to clipboard:",e)}}let m=e=>{var n,t;let{image:l}=e,{isSignedIn:o}=(0,v.aC)(),[s,d]=(0,i.useState)(!1),[m,g]=(0,i.useState)(!1),{toggle:p,isSelected:h}=f(l.fileKey);return(0,r.jsxs)("div",{className:"group relative flex w-full flex-col items-center justify-center hover:bg-gray-700/40 hover:opacity-80",children:[o&&(0,r.jsx)("input",{type:"checkbox",className:(0,a.Z)("absolute right-0 top-0 z-10 m-4 hidden h-4 w-4 group-hover:block"),style:h?{display:"block"}:{},checked:h,onChange:p}),(0,r.jsx)("div",{className:"relative h-48 w-full",onClick:()=>{var e,n;console.log("copying image",l),d(!0),_(null!==(n=null!==(e=l.removedBgUrl)&&void 0!==e?e:l.originalUrl)&&void 0!==n?n:"").then(()=>{d(!1),g(!0),setTimeout(()=>{g(!1)},1e3)})},children:(0,r.jsx)(u.default,{src:null!==(t=null!==(n=l.removedBgUrl)&&void 0!==n?n:l.originalUrl)&&void 0!==t?t:"",alt:l.originalName,className:"object-contain",fill:!0,sizes:"192px"})}),s&&(0,r.jsx)("div",{className:"absolute",children:(0,r.jsx)(c,{})}),m&&(0,r.jsx)("div",{className:"absolute",children:(0,r.jsx)("div",{className:"text-2xl font-bold text-white",children:"Copied!"})}),(0,r.jsx)("div",{children:l.originalName})]})};var g=t(9271),p=t.n(g),h=t(4526),E=t.n(h),L=t(3266),x=t.n(L),w=t(8590),b=t.n(w);let C=e=>e.reduce((e,n)=>{let t=new Date(n.createdAt).toDateString();return e[t]||(e[t]=[]),e[t].push(n),e},{});p().extend(E()),p().extend(x()),p().extend(b());let I=e=>{let n=p()(e);return n.isToday()?"Today":n.isYesterday()?"Yesterday":n.toDate().toLocaleDateString()},R=e=>(0,r.jsx)("div",{className:"grid h-full grid-cols-fluid justify-items-center",children:e.children});function P(e){let n=(0,i.useMemo)(()=>C(e.images),[e.images]);return(0,r.jsx)(r.Fragment,{children:Object.keys(n).map(e=>(0,r.jsxs)(i.Fragment,{children:[(0,r.jsxs)("div",{className:"flex w-full items-center px-4 py-8",children:[(0,r.jsx)("div",{className:"mx-4 h-0 w-12 border-b border-slate-300"}),(0,r.jsx)("h3",{className:"text-2xl text-slate-300",children:I(e)}),(0,r.jsx)("div",{className:"mx-4 h-0 flex-grow border-b border-slate-300"})]}),(0,r.jsx)(R,{children:n[e].map(e=>(0,r.jsx)(m,{image:e},e.id))})]},e))})}t(46);var U=t(4754),N=(0,U.$)("e61771d8ed2022ad7ea91819405fef77e022d529"),j=(0,U.$)("9de9813046b5440d1aa894c22c1444f7bcfa4a4e");let{uploadFiles:S}=(0,o.$)(),T=()=>{let e=d(),{refresh:n}=(0,s.useRouter)();return 0===e.selectedIds.length?null:(0,r.jsx)("div",{className:"absolute bottom-0 right-0 z-50 flex w-full items-center justify-center p-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-4 bg-gray-800 px-4 py-2",children:[(0,r.jsxs)("div",{children:[e.selectedIds.length," selected"]}),(0,r.jsx)("button",{onClick:()=>N(e.selectedIds).then(t=>{console.log("response?",t),e.clearAll(),n()}),className:"rounded-xl bg-red-800 px-2",children:"Delete"}),(0,r.jsx)("button",{onClick:()=>j(e.selectedIds).then(t=>{console.log("response?",t),e.clearAll(),n()}),className:"rounded-xl bg-green-800 px-2",children:"Reprocess"})]})})},y=e=>{let{refresh:n}=(0,s.useRouter)(),[,t]=(0,i.useTransition)();return(0,i.useEffect)(()=>{let r=!1;if(e.upload){console.log("PLAN: ",e.file.name);let i=setTimeout(()=>{if(r){console.log("cancelled upload for...",e.file.name);return}console.log("START: ",e.file.name),S("imageUploader",{files:[e.file],skipPolling:!0}).then(()=>{console.log("done uploading",e.file.name),t(()=>{e.removeImage(),n()})})},400);return()=>{r=!0,clearTimeout(i)}}},[e.file.name,e.upload]),(0,i.useEffect)(()=>()=>{console.log("unrendering",e.file.name)},[]),(0,r.jsxs)("div",{className:"relative flex w-full flex-col items-center justify-center hover:bg-gray-700/40 hover:opacity-80",children:[(0,r.jsx)("div",{className:"relative h-48 w-full",children:(0,r.jsx)("img",{alt:e.file.name+" is uploading...",src:URL.createObjectURL(e.file),className:(0,a.Z)(["absolute h-full w-full object-contain",{"animate-pulse":e.upload,"opacity-50":!e.upload}])})}),(0,r.jsx)("div",{children:e.file.name})]})};function k(e){let[n,t]=(0,i.useState)([]);(0,i.useEffect)(()=>{0!==n.length&&console.log("Files",n)},[n]);let{isDragging:o}=l(e=>t(n=>[...n,...e]));return(0,r.jsx)("div",{className:(0,a.Z)(["w-full"],{"bg-slate-700/20":o}),children:0===e.images.length&&0===n.length?(0,r.jsx)("div",{className:"w-full py-8 text-center text-2xl",children:"Upload something"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex h-full w-full animate-fade-in-down flex-col overflow-y-scroll",children:[n.length>0&&(0,r.jsx)("h3",{className:"p-4 text-2xl font-bold",children:"Uploading..."}),(0,r.jsx)(T,{}),(0,r.jsx)(R,{children:n.map((e,i)=>(0,r.jsx)(y,{file:e,upload:n.length-i<4,removeImage:()=>t(n=>n.filter(n=>n.name!==e.name))},e.name+"-uploading"))}),(0,r.jsx)(P,{images:e.images})]}),o&&(0,r.jsx)("div",{className:"absolute right-0 top-0 z-20 flex h-screen w-full bg-slate-600/50 p-4",children:(0,r.jsx)("div",{className:"sticky top-0 flex h-full w-full items-center justify-center rounded border-2 border-dashed border-white bg-slate-600 text-2xl",children:"UPLOAD FILES"})})]})})}},9920:function(e,n,t){"use strict";t.d(n,{EJ:function(){return i},KM:function(){return r.KM}});var r=t(4540);function i(e,n,t){let i=n.path||t?.path;return"path"===(n.routing||t?.routing||"path")?i?{...t,...n,routing:"path"}:r.RM.throw((0,r.Gv)(e)):n.path?r.RM.throw((0,r.RE)(e)):{...t,...n,path:void 0}}}},function(e){e.O(0,[818,0,146,705,744],function(){return e(e.s=1964)}),_N_E=e.O()}]);

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.