PageSourceSearch

https://app.aieasypic.com/_next/static/chunks/8945-b91d130ca3a50ec7.js

js aieasypic.com collected 2026-10-04 13:25:25 UTC 5,210 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8945],{28945:(e,i,l)=>{l.d(i,{A:()=>U});var s=l(6029),r=l(66659),a=l(69943),n=l(63887),d=l(50433),o=l(13692),t=l(74536),c=l(37948),u=l(13445),p=l(56266),x=l(26500),h=l(11471),m=l(99690),g=l(84335),j=l(56233),v=l(12638),f=l(18090),b=l(50016),w=l(26312),y=l(34417),E=l(1751),I=l(82108),P=l(78138),z=l(82203),C=l.n(z),_=l(55729),k=l(12756);let R=e=>{var i;let{imageData:l,images:t,setImages:c,type:u}=e;return(0,s.jsx)(r.F,{h:200,offsetScrollbars:!0,children:(0,s.jsx)(a.x,{gutter:3,children:null==l||null==(i=l.results)?void 0:i.map(e=>(0,s.jsx)(n.f,{span:4,sm:3,children:(0,s.jsx)(d.a,{sx:{position:"relative",cursor:"pointer",transition:"all 0.1s ease",border:t[u].uploadedId===e.id?"5px solid #06c":"5px solid #fff",borderRadius:10},onClick:()=>{c(i=>({...i,[u]:{...i[u],uploaded:!0,preview:e.image||"",uploadedId:e.id,url:e.image||""}}))},children:(0,s.jsx)(o._,{radius:5,src:(0,I.lv)({url:e.image||"",width:200,imaginaryHost:"imaginary.aieasypic.com"}),alt:"Public Image",height:100,onClick:()=>{c(i=>({...i,[u]:{...i[u],uploaded:!0,uploadedId:e.id,url:e.image||""}}))}},e.id)})},e.id))})})},U=e=>{var i,l,r;let{type:a,setImages:n,images:z,description:U,setProcessedImageUrl:B,imageHeight:T=200,imageWidth:Y}=e,F=(0,E.wrX)(),{observe:M,inView:S}=(0,k.W)({unobserveOnEnter:!0,rootMargin:"100px"}),{data:q}=(0,y.P)(),{data:A,refetch:D,isRefetching:W}=(0,E.sg5)({itemsPerPage:20,ordering:"-created_at",is_public:!0},{query:{enabled:S}}),{data:H,refetch:J,isRefetching:L}=(0,E.sg5)({itemsPerPage:40,only_owned:!0,ordering:"-created_at"},{query:{enabled:S}}),[O,N]=(0,_.useState)("upload"),$=(0,_.useMemo)(()=>{var e,i,l,s;return(null==z||null==(e=z[a])?void 0:e.preview)?(null==z||null==(i=z[a])?void 0:i.preview)instanceof Blob?URL.createObjectURL(null==z||null==(s=z[a])?void 0:s.preview):(0,I.lv)({url:null==z||null==(l=z[a])?void 0:l.preview,width:300,imaginaryHost:"imaginary.aieasypic.com"}):""},[null==z||null==(i=z[a])?void 0:i.preview]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(t.Z,{shadow:"sm",p:10,children:[(0,s.jsx)(c.E,{size:"xs",color:"dimmed",ta:"center",my:5,children:U}),(0,s.jsxs)(u.B,{ref:M,children:[z[a].preview&&(0,s.jsxs)(d.a,{sx:{position:"relative",padding:"15px 50px"},children:[(0,s.jsx)(o._,{src:$,alt:"Target Image",height:T,width:Y,withPlaceholder:!0,sx:{filter:"brightness(60%)"}}),(0,s.jsx)(d.a,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:(null==(l=z[a])?void 0:l.uploaded)?(0,s.jsxs)(u.B,{justify:"center",align:"center",children:[(0,s.jsx)(w.A,{}),(0,s.jsx)(c.E,{size:"sm",color:"green",children:"Uploaded"})]}):(null==(r=z[a])?void 0:r.uploading)&&(0,s.jsxs)(u.B,{justify:"center",align:"center",children:[(0,s.jsx)(p.a,{size:"md",color:"green"}),(0,s.jsx)(c.E,{size:"sm",color:"green",children:"Uploading..."})]})}),(0,s.jsx)(x.M,{sx:{position:"absolute",top:"0px",right:"0px"},variant:"filled",color:"red",onClick:()=>{n(e=>({...e,[a]:{preview:null,uploaded:!1,uploadedId:"",type:""}}))},children:(0,s.jsx)(b.raE,{style:{transform:"scale(1.5)"}})})]}),(0,s.jsxs)(h.t,{defaultValue:"upload",variant:"outline",value:O,onTabChange:e=>N(e),children:[(0,s.jsxs)(h.t.List,{grow:!0,children:[(0,s.jsx)(h.t.Tab,{value:"upload",icon:(0,s.jsx)(b.JMY,{scale:1.2}),children:(0,s.jsx)(c.E,{children:"Upload"})}),(0,s.jsx)(h.t.Tab,{value:"public",icon:(0,s.jsx)(b.xfq,{scale:1.2}),children:(0,s.jsx)(c.E,{children:"Public"})}),(0,s.jsx)(h.t.Tab,{value:"own-images",icon:(0,s.jsx)(b.hSU,{scale:1.2}),children:(0,s.jsx)(c.E,{children:"Uploaded"})})]}),(0,s.jsx)(h.t.Panel,{value:"upload",children:(0,s.jsx)(j.mR,{onDrop:(e=>async i=>{let l=i[0];n(i=>({...i,[e]:{...i[e],preview:l,uploading:!0,uploaded:!1}})),B(null);try{let{id:i}=await F.mutateAsync({data:{image:l}},{onSuccess:l=>{n(s=>({...s,[e]:{...s[e],uploaded:!0,uploading:!1,url:(null==l?void 0:l.image)||"",uploadedId:i}}))}})}catch(e){(0,f.Ds)({title:"Error",message:"Failed to upload image",color:"red"})}n(i=>({...i,[e]:{...i[e],uploading:!1}}))})(a),accept:v.Oq,maxSize:4194304,my:10,py:20,children:(0,s.jsxs)(m.Y,{noWrap:!0,position:"center",children:[(0,s.jsx)(b.JMY,{}),(0,s.jsx)(c.E,{children:"Click Here To Upload Image (max 4mb)"})]})})}),(0,s.jsx)(h.t.Panel,{value:"public",pt:"xs",children:(0,s.jsxs)(u.B,{children:[(0,s.jsx)(m.Y,{noWrap:!0,position:"apart",children:(0,s.jsx)(c.E,{size:"sm",color:"dimmed",children:"Choose from public images"})}),(0,s.jsx)(R,{imageData:A,images:z,setImages:n,type:a})]})}),(0,s.jsx)(h.t.Panel,{value:"own-images",pt:"xs",children:(0,s.jsx)(u.B,{children:(null==q?void 0:q.email)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(m.Y,{noWrap:!0,position:"apart",children:[(0,s.jsx)(c.E,{size:"sm",color:"dimmed",children:"Choose from your own images"}),(0,s.jsx)(g.$,{size:"xs",leftIcon:(0,s.jsx)(b.dAw,{}),onClick:()=>J(),loading:L,children:"Refresh"})]}),(0,s.jsx)(R,{imageData:H,images:z,setImages:n,type:a})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.E,{size:"sm",color:"dimmed",children:"You need to be logged in to see your images"}),(0,s.jsx)(g.$,{component:C(),href:P.J.common.register,size:"sm",color:"blue",children:"Register"})]})})})]})]})]})})}}}]);

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.