InvokeAI/invokeai/frontend/web/dist/assets/App-891779fc.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

170 lines
820 KiB
JavaScript
Raw Normal View History

2023-07-18 16:45:47 +00:00
import{t as Ug,r as fE,i as pE,a as hu,b as f4,S as p4,c as h4,d as m4,e as Gg,f as g4,g as qg,h as hE,j as mE,k as gE,l as vE,m as yE,n as bE,o as xE,p as wE,q as SE,s as f,u as tt,v as a,I as go,w as ur,x as Wn,y as He,z as Ot,A as mu,B as gt,C as gu,D as ws,E as lo,F as co,G as wr,H as CE,J as _E,K as Ua,L as Wc,M as zi,N as sn,O as Sa,P as Vp,Q as nv,R as wl,T as rv,U as vu,_ as Qn,V as kE,W as z,X as v4,Y as y4,Z as Lb,$ as b4,a0 as Up,a1 as ov,a2 as ql,a3 as PE,a4 as jE,a5 as IE,a6 as EE,a7 as x4,a8 as w4,a9 as Gp,aa as xf,ab as OE,ac as RE,ad as Vm,ae as Bb,af as ME,ag as S4,ah as C4,ai as Kl,aj as Fb,ak as Hb,al as DE,am as TE,an as AE,ao as NE,ap as $E,aq as Um,ar as nl,as as Gm,at as zE,au as LE,av as BE,aw as sv,ax as qp,ay as wf,az as FE,aA as _4,aB as k4,aC as HE,aD as yu,aE as av,aF as WE,aG as VE,aH as UE,aI as GE,aJ as qE,aK as KE,aL as YE,aM as Wb,aN as ze,aO as F,aP as sa,aQ as ve,aR as Mo,aS as dr,aT as te,aU as $,aV as Yl,aW as le,aX as P4,aY as j4,aZ as Ql,a_ as Do,a$ as We,b0 as _n,b1 as Sf,b2 as QE,b3 as Ga,b4 as iv,b5 as Cf,b6 as I4,b7 as lv,b8 as Rt,b9 as cv,ba as XE,bb as JE,bc as ZE,bd as rl,be as gs,bf as E4,bg as e8,bh as t8,bi as bu,bj as at,bk as uv,bl as qa,bm as Vb,bn as n8,bo as r8,bp as o8,bq as _d,br as kd,bs as Vc,bt as Uc,bu as Ub,bv as _f,bw as Gb,bx as kf,by as qb,bz as Kg,bA as Kb,bB as Yg,bC as Yb,bD as Pf,bE as Qb,bF as Dl,bG as Xb,bH as Tl,bI as Jb,bJ as jf,bK as s8,bL as If,bM as O4,bN as dv,bO as fv,bP as a8,bQ as R4,bR as M4,bS as D4,bT as Kp,bU as xi,bV as i8,bW as ff,bX as je,bY as l8,bZ as c8,b_ as u8,b$ as Ef,c0 as Xl,c1 as T4,c2 as d8,c3 as A4,c4 as Zb,c5 as ex,c6 as f8,c7 as pa,c8 as tx,c9 as ht,ca as Of,cb as p8,cc as N4,cd as Jr,ce as h8,cf as Xn,cg as Yt,ch as Qg,ci as Ws,cj as Ss,ck as vs,cl as $4,cm as m8,cn as z4,co as nx,cp as g8,cq as v8,cr as y8,cs as b8,ct as br,cu as L4,cv as x8,cw as w8,cx as S8,cy as C8,cz as _8,cA as pv,cB as qo,cC as B4,cD as F4,cE as k8,cF as rx,cG as P8,cH as j8,cI as I8,cJ as E8,cK as O8,cL as R8,cM as M8,cN as H4,cO as D8,cP as T8,cQ as A8,cR as N8,cS as $8,cT as z8,cU as L8,cV as ox,cW as sx,cX as ax,cY as ix,cZ as B8,c_ as F8,c$ as H8,d0 as lx,d1 as W8,d2 as V8,d3 as U8,d4 as G8,d5 as q8,d6 as K8,d7 as Y8,d8 as Q8,d9 as W4,da as Yo,db as X8,dc as J8,dd as Z8,de as Yp,df as e7,dg as Vr,dh as hv,di as V4,dj as t7,dk as n7,dl as r7,dm as Qo,dn as o7,dp as cx,dq as ux,dr as Sl,ds as s7,dt as a7,du as i7,dv as l7,dw as c7,dx as u7,dy as d7,dz as f7,dA as p7,dB as h7,dC as m7,dD as mv,dE as gv,dF as g7,dG as dx,dH as v7,dI as fx,dJ as Xo,dK as y7,dL as b7,dM as px,dN as hx,dO as x7,dP as mx,dQ as w7,dR as S7,dS as C7,dT as _7,dU as k7,dV as P7,dW as U4,dX as G4,dY as q4,dZ as K4,d_ as Y4,d$ as xu,e0 as gx,e1 as j7,e2 as Ei,e3 as I7,e4 as Q4,e5 as vx,e6 as E7,e7 as cs,e8 as O7,e9 as R7,ea as X4,eb as J4,ec as M7,ed as Z4,ee as e3,ef as rr,eg as or,eh as wu,ei as t3,ej as n3,ek as yx,el as D7,em as bx,en as T7,eo as r3,ep as A7,eq as Qp,er as xx,es as o3,et as N7,eu as wx,ev as s3,ew as Ko,ex as $7,ey as z7,ez as a3,eA as L7,eB as B7,eC as F7,eD as H7,eE as W7,eF as V7,eG as U7,eH as G7,eI as q7,eJ as K7,eK as Y7,eL as Q7,eM as X7,eN as J7,eO as Z7,eP as eO,eQ as tO,eR as nO,eS as rO,eT as Sx,eU as oO,eV as Cx,eW as pf,eX as sO,eY as en,eZ as Rf,e_ as i3,e$ as eu,f0 as aO,f1 as iO,f2 as Hs,f3 as l3,f4 as vv,f5 as Su,f6 as lO,f7 as cO,f8 as uO,f9 as ha,fa as c3,fb as dO,fc as fO,fd as u3,fe as pO,ff as hO,fg as mO,fh as gO,fi as vO,fj as yO,fk as bO,fl as xO,fm as wO,fn as SO,fo as CO,fp as _x,fq as _O,fr as kO,fs as PO,ft as jO,fu as IO,fv as EO,fw as qm,fx as Bs,fy as Pd,fz as Km,fA as Ym,fB as jd,fC as kx,fD as Xg,fE as OO,fF as RO,fG as MO,fH as DO,fI as TO,fJ as Mf,fK as d3,fL as f3,fM as AO,fN as NO,fO as p3,fP as h3,fQ as m3,fR as g3,fS as v3,fT as y3,fU as b3,fV as x3,fW as Cl,fX as _l,fY as w3,fZ as S3,f_ as $O,f$ as C3,g0 as _3,g1 as k3,g2 as P3,g3 as j3,g4 as I3,g5 as E3,g6 as yv,g7 as zO,g8 as LO,g9 as Px,ga as BO,gb as FO,gc as Df,gd as jx,ge as Ix,gf as Ex,gg as Ox,gh as HO,gi as WO,gj as VO,gk as UO,gl as GO,gm as qO,gn as K
2023-07-18 12:12:41 +00:00
`})}function W9(e){gu({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nc(e){const{isOpen:t,isDisabled:n}=wv(),{reduceMotion:r}=Sv(),o=Ot("chakra-accordion__icon",e.className),s=Xp(),i={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return a.jsx(go,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i,...e,children:a.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Nc.displayName="AccordionIcon";var $c=tt(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=L9(t),d={...Xp().container,overflowAnchor:"none"},p=f.useMemo(()=>i,[i]);return a.jsx(D9,{value:p,children:a.jsx(He.div,{ref:n,...s,className:Ot("chakra-accordion__item",o),__css:d,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});$c.displayName="AccordionItem";var wi={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},kc={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function Zg(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return kc.slideRight;case"left":return kc.slideLeft;case"bottom":return kc.slideDown;case"top":return kc.slideUp;default:return kc.slideRight}}var Ci={enter:{duration:.2,ease:wi.easeOut},exit:{duration:.1,ease:wi.easeIn}},us={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},V9=e=>e!=null&&parseInt(e.toString(),10)>0,$x={exit:{height:{duration:.2,ease:wi.ease},opacity:{duration:.3,ease:wi.ease}},enter:{height:{duration:.3,ease:wi.ease},opacity:{duration:.4,ease:wi.ease}}},U9={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:V9(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:us.exit($x.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(s=n==null?void 0:n.enter)!=null?s:us.enter($x.enter,o)}}},Jp=f.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:u,className:d,transition:p,transitionEnd:h,...g}=e,[v,b]=f.useState(!1);f.useEffect(()=>{const k=setTimeout(()=>{b(!0)});return()=>clearTimeout(k)},[]),gu({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(s.toString())>0,w={startingHeight:s,endingHeight:i,animateOpacity:o,transition:v?p:{enter:{duration:0}},transitionEnd:{enter:h==null?void 0:h.enter,exit:r?h==null?void 0:h.exit:{...h==null?void 0:h.exit,display:S?"block":"none"}}},C=r?n:!0,_=n||r?"enter":"exit";return a.jsx(ws,{initial:!1,custom:w,children:C&&a.jsx(lo.div,{ref:t,...g,className:Ot("chakra-collapse",d),style:{overflow:"hidden",display:"block",...u},custom:w,variants:U9,initial:r?"exit":!1,animate:_,exit:"exit"})})});Jp.displayName="Collapse";var G9={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:us.enter(Ci.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:us.exit(Ci.exit,n),transitionEnd:t==null?void 0:t.exi
.`.concat(VD,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(u,"px ").concat(r,`;
}
body {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(s,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(u,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(mf,` {
right: `).concat(u,"px ").concat(r,`;
}
.`).concat(gf,` {
margin-right: `).concat(u,"px ").concat(r,`;
}
.`).concat(mf," .").concat(mf,` {
right: 0 `).concat(r,`;
}
.`).concat(gf," .").concat(gf,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(UD,": ").concat(u,`px;
}
`)},rT=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=f.useMemo(function(){return eT(o)},[o]);return f.createElement(tT,{styles:nT(s,!t,o,n?"":"!important")})},u0=!1;if(typeof window<"u")try{var Od=Object.defineProperty({},"passive",{get:function(){return u0=!0,!0}});window.addEventListener("test",Od,Od),window.removeEventListener("test",Od,Od)}catch{u0=!1}var il=u0?{passive:!1}:!1,oT=function(e){return e.tagName==="TEXTAREA"},Y6=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!oT(e)&&n[t]==="visible")},sT=function(e){return Y6(e,"overflowY")},aT=function(e){return Y6(e,"overflowX")},e2=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Q6(e,r);if(o){var s=X6(e,r),i=s[1],u=s[2];if(i>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},iT=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},lT=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Q6=function(e,t){return e==="v"?sT(t):aT(t)},X6=function(e,t){return e==="v"?iT(t):lT(t)},cT=function(e,t){return e==="h"&&t==="rtl"?-1:1},uT=function(e,t,n,r,o){var s=cT(e,window.getComputedStyle(t).direction),i=s*r,u=n.target,d=t.contains(u),p=!1,h=i>0,g=0,v=0;do{var b=X6(e,u),S=b[0],w=b[1],C=b[2],_=w-C-s*S;(S||_)&&Q6(e,u)&&(g+=_,v+=S),u=u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(h&&(o&&g===0||!o&&i>g)||!h&&(o&&v===0||!o&&-i>v))&&(p=!0),p},Rd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},t2=function(e){return[e.deltaX,e.deltaY]},n2=function(e){return e&&"current"in e?e.current:e},dT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fT=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},pT=0,ll=[];function hT(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(pT++)[0],s=f.useState(K6)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=o0([e.lockRef.current],(e.shards||[]).map(n2),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=f.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!i.current.allowPinchZoom;var _=Rd(w),k=n.current,j="deltaX"in w?w.deltaX:k[0]-_[0],E="deltaY"in w?w.deltaY:k[1]-_[1],I,O=w.target,M=Math.abs(j)>Math.abs(E)?"h":"v";if("touches"in w&&M==="h"&&O.type==="range")return!1;var R=e2(M,O);if(!R)return!0;if(R?I=M:(I=M==="v"?"h":"v",R=e2(M,O)),!R)return!1;if(!r.current&&"changedTouches"in w&&(j||E)&&(r.current=I),!I)return!0;var A=r.current||I;return uT(A,C,w,A==="h"?j:E,!0)},[]),d=f.useCallback(function(w){var C=w;if(!(!ll.length||ll[ll.length-1]!==s)){var _="deltaY"in C?t2(C):Rd(C),k=t.current.filter(function(I){return I.name===C.type&&I.target===C.target&&dT(I.delta,_)})[0];if(k&&k.should){C.cancelable&&C.preventDefault();return}if(!k){var j=(i.current.shards||[]).map(n2).filter(Boolean).filter(function(I){return I.contains(C.target)}),E=j.length>0?u(C,j[0]):!i.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),p=f.useCallback(function(w,C,_,k){var j={name:w,delta:C,target:_,should:k};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(E){return E!==j})},1)},[]),h=f.useCallback(function(w){n.current=Rd(w),r.current=void 0},[]),g=f.useCallback(function(w){p(w.type,t2(w),w.target,u(w,e.lockRef.current))},[]),v=f.useCallback(function(w){p(w.type,Rd(w),w.target,u(w,e.lockRef.current))},[]);f.useEffect(function(){return ll.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",d,il),document.addEventListener("touchmove",d,il),document.addEventListener("touchstart",h,il),function(){ll=ll.filter(function(w){return w!==s}),document.removeEventListener("wheel",d,il),document.removeEventListener("touchmove",d,il),document.removeEventListener("touchstart",h,il)}},[]);var b=e.removeScrollBar,S=e.inert;return f.createElement(f.Fragment,null,S?f.createElement(s,{styles:fT(o)}):null,b?f.createElement(rT,{gapMode:e.gapMode}):null)}const mT=BR(q6,hT);var J6=f.forwardRef(function(e,t){return f.createElement(rh,Ls({},e,{ref:t,sideCar:mT}))});J6.classNames=rh.classNames;const gT=J6;function vT(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:u,returnFocusOnClose:d,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:g}=Mi(),[v,b]=OE();f.useEffect(()=>{!v&&b&&setTimeout(b)},[v,b]);const S=U6(r,g);return a.jsx(R6,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:u,restoreFocus:d,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(gT,{removeScrollBar:!p,allowPinchZoom:i,enabled:S===1&&s,forwardProps:!0,children:e.children})})}var su=tt((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:u,getDialogContainerProps:d}=Mi(),p=u(i,t),h=d(o),g=Ot("chakra-modal__content",n),v=tc(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{motionPreset:w}=Mi();return a.jsx(vT,{children:a.jsx(He.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S,children:a.jsx(V6,{preset:w,motionProps:s,className:g,...p,__css:b,children:r})})})});su.displayName="ModalContent";function Ou(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(ou,{...n,initialFocusRef:t})}var Ru=tt((e,t)=>a.jsx(su,{ref:t,role:"alertdialog",...e})),ma=tt((e,t)=>{const{className:
M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fill:d,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})]})})}m5.displayName="MiniMap";var wA=f.memo(m5),ds;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ds||(ds={}));function SA({color:e,dimensions:t,lineWidth:n}){return a.jsx("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function CA({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const _A={[ds.Dots]:"#91919a",[ds.Lines]:"#eee",[ds.Cross]:"#e2e2e2"},kA={[ds.Dots]:1,[ds.Lines]:1,[ds.Cross]:6},PA=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function g5({id:e,variant:t=ds.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:u,className:d}){const p=f.useRef(null),{transform:h,patternId:g}=wf(PA,av),v=i||_A[t],b=r||kA[t],S=t===ds.Dots,w=t===ds.Cross,C=Array.isArray(n)?n:[n,n],_=[C[0]*h[2]||1,C[1]*h[2]||1],k=b*h[2],j=w?[k,k]:_,E=S?[k/s,k/s]:[j[0]/s,j[1]/s];return a.jsxs("svg",{className:qp(["react-flow__background",d]),style:{...u,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background",children:[a.jsx("pattern",{id:g+e,x:h[0]%_[0],y:h[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:S?a.jsx(CA,{color:v,radius:k/s}):a.jsx(SA,{dimensions:j,color:v,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${g+e})`})]})}g5.displayName="Background";var jA=f.memo(g5),Gc;(function(e){e.Line="line",e.Handle="handle"})(Gc||(Gc={}));function IA({width:e,prevWidth:t,height:n,prevHeight:r,invertX:o,invertY:s}){const i=e-t,u=n-r,d=[i>0?1:i<0?-1:0,u>0?1:u<0?-1:0];return i&&o&&(d[0]=d[0]*-1),u&&s&&(d[1]=d[1]*-1),d}const v5={width:0,height:0,x:0,y:0},EA={...v5,pointerX:0,pointerY:0,aspectRatio:1};function OA({nodeId:e,position:t,variant:n=Gc.Handle,className:r,style:o={},children:s,color:i,minWidth:u=10,minHeight:d=10,maxWidth:p=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:g=!1,shouldResize:v,onResizeStart:b,onResize:S,onResizeEnd:w}){const C=qE(),_=typeof e=="string"?e:C,k=_4(),j=f.useRef(null),E=f.useRef(EA),I=f.useRef(v5),O=KE(),M=n===Gc.Line?"right":"bottom-right",R=t??M;f.useEffect(()=>{if(!j.current||!_)return;const Z=k4(j.current),B=R.includes("right")||R.includes("left"),H=R.includes("bottom")||R.includes("top"),G=R.includes("left"),q=R.includes("top"),D=YE().on("start",U=>{const V=k.getState().nodeInternals.get(_),{xSnapped:J,ySnapped:ie}=O(U);I.current={width:(V==null?void 0:V.width)??0,height:(V==null?void 0:V.height)??0,x:(V==null?void 0:V.position.x)??0,y:(V==null?void 0:V.position.y)??0},E.current={...I.current,pointerX:J,pointerY:ie,aspectRatio:I.current.width/I.current.height},b==null||b(U,{...I.current})}).on("drag",U=>{const{nodeInternals:V,triggerNodeChanges:J}=k.getState(),{xSnapped:ie,ySnapped:ye}=O(U),he=V.get(_);if(he){const ae=[],{pointerX:ee,pointerY:W,width:re,height:pe,x:ne,y:ge,aspectRatio:de}=E.current,{x:Ce,y:Me,width:me,height:_e}=I.current,Ve=Math.floor(B?ie-ee:0),Le=Math.floor(H?ye-W:0);let Ue=Wb(re+(G?-Ve:Ve),u,p),kt=Wb(pe+(q?-Le:Le),d,h);if(g){const Te=Ue/kt,It=B&&H,Ft=B&&!H,Wt=H&&!B;Ue=Te<=de&&It||Wt?kt*de:Ue,kt=Te>de&&It||Ft?Ue/de:kt,Ue>=p?(Ue=p,kt=p/de):Ue<=u&&(Ue=u,kt=u/de),kt>=h?(kt=h,Ue=h*de):kt<=d&&(kt=d,Ue=d*de)}const vt=Ue!==me,jn=kt!==_e;if(G||q){const Te=G?ne-(Ue-re):ne,It=q?ge-(kt-pe):ge,Ft=Te!==Ce&&vt,Wt=It!==Me&&jn;if(Ft||Wt){const Cn={id:he.id,type:"position",position:{x:Ft?Te:Ce,y:Wt?It:Me}};ae.push(Cn),I.current.x=Cn.position.x,I.current.y=Cn.position.y}}if(vt||jn){const Te={id:_,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:Ue,height:kt}};ae.push(Te),I.current.width=Ue,I.current.height=kt}if(ae.length===0)return;const Pt=IA({width:I.current.width,prevWidth:me,height:I.current.height,prevHeight:_e,invertX:G,invertY:q}),bt={...I.current,direction:Pt};if((v==null?void 0:v(U,bt))===!1)return;S==null||S(U,bt),J(ae)}}).on("end",U=>{const V={id:_,type:"dimensions",resizing:!1};w==null||w(U,{...I.current}),k.getState().tr
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GA(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qA(e){if(Array.isArray(e))return m0(e)}function l2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function c2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(n),!0).forEach(function(r){x5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function x5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function au(e,t){return QA(e)||YA(e,t)||w5(e,t)||KA()}function KA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w5(e,t){if(e){if(typeof e=="string")return m0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m0(e,t)}}function m0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YA(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,u;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(d){s=!0,u=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw u}}return r}}function QA(e){if(Array.isArray(e))return e}var XA="file-invalid-type",JA="file-too-large",ZA="file-too-small",eN="too-many-files",tN=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:XA,message:"File type must be ".concat(n)}},u2=function(t){return{code:JA,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},d2=function(t){return{code:ZA,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},nN={code:eN,message:"Too many files"};function S5(e,t){var n=e.type==="application/x-moz-file"||VA(e,t);return[n,n?null:tN(t)]}function C5(e,t,n){if(yi(e.size))if(yi(t)&&yi(n)){if(e.size>n)return[!1,u2(n)];if(e.size<t)return[!1,d2(t)]}else{if(yi(t)&&e.size<t)return[!1,d2(t)];if(yi(n)&&e.size>n)return[!1,u2(n)]}return[!0,null]}function yi(e){return e!=null}function rN(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,u=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(d){var p=S5(d,n),h=au(p,1),g=h[0],v=C5(d,r,o),b=au(v,1),S=b[0],w=u?u(d):null;return g&&S&&!w})}function Bf(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Md(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function f2(e){e.preventDefault()}function oN(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function sN(e){return e.indexOf("Edge/")!==-1}function aN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return oN(e)||sN(e)}function As(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(u){return!Bf(r)&&u&&u.apply(void 0,[r].concat(s)),Bf(r)})}}function iN(){return"showOpenFilePicker"in window}function lN(e){if(yi(e)){var t=Object.entries(e).filter(function(n){var r=au(n,2),o=r[0],s=r[1],i=!0;return _5(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(k5))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=au(r,2),s=o[0],i=o[1];return c2(c2({},n),{},x5({},s,i))},{});return[{description:"Files",accept:t}]}return e}function cN(e){if(yi(e))return Object.entries(e).reduce(function(t,n){var r=au(n,2),o=r[0],s=r[1];return[].concat(i2(t),[o],i2(s))},[]).filter(function(t){return _5(t)||k5(t)}).join(",")}function uN(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function dN(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function _5(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function k5(e){return/^.*\.[\w]+$/.test(e)}var fN=["children"],pN=["open"],hN=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDr
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bN(e){if(Array.isArray(e))return g0(e)}function dg(e,t){return SN(e)||wN(e,t)||P5(e,t)||xN()}function xN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P5(e,t){if(e){if(typeof e=="string")return g0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g0(e,t)}}function g0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wN(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,u;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(d){s=!0,u=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw u}}return r}}function SN(e){if(Array.isArray(e))return e}function p2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function er(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(n),!0).forEach(function(r){v0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function v0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ff(e,t){if(e==null)return{};var n=CN(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Uv=f.forwardRef(function(e,t){var n=e.children,r=Ff(e,fN),o=Gv(r),s=o.open,i=Ff(o,pN);return f.useImperativeHandle(t,function(){return{open:s}},[s]),z.createElement(f.Fragment,null,n(er(er({},i),{},{open:s})))});Uv.displayName="Dropzone";var j5={disabled:!1,getFilesFromEvent:AA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Uv.defaultProps=j5;Uv.propTypes={children:Tn.func,accept:Tn.objectOf(Tn.arrayOf(Tn.string)),multiple:Tn.bool,preventDropOnDocument:Tn.bool,noClick:Tn.bool,noKeyboard:Tn.bool,noDrag:Tn.bool,noDragEventsBubbling:Tn.bool,minSize:Tn.number,maxSize:Tn.number,maxFiles:Tn.number,disabled:Tn.bool,getFilesFromEvent:Tn.func,onFileDialogCancel:Tn.func,onFileDialogOpen:Tn.func,useFsAccessApi:Tn.bool,autoFocus:Tn.bool,onDragEnter:Tn.func,onDragLeave:Tn.func,onDragOver:Tn.func,onDrop:Tn.func,onDropAccepted:Tn.func,onDropRejected:Tn.func,onError:Tn.func,validator:Tn.func};var y0={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Gv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=er(er({},j5),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,u=t.multiple,d=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,v=t.onDrop,b=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,C=t.onFileDialogOpen,_=t.useFsAccessApi,k=t.autoFocus,j=t.preventDropOnDocument,E=t.noClick,I=t.noKeyboard,O=t.noDrag,M=t.noDragEventsBubbling,R=t.onError,A=t.validator,L=f.useMemo(function(){return cN(n)},[n]),N=f.useMemo(function(){return lN(n)},[n]),Z=f.useMemo(function(){return typeof C=="function"?C:h2},[C]),B=f.useMemo(function(){return typeof w=="function"?w:h2},[w]),H=f.useRef(null),G=f.useRef(null),q=f.useReducer(_N,y0),D=dg(q,2),U=D[0],V=D[1],J=U.isFocused,ie=U.isFileDialogActive,ye=f.useRef(typeof window<"u"&&window.isSecureContext&&_&&iN()),he=function(){!ye.current&&ie&&setTimeout(function(){if(G.current){var Te=G.current.files;Te.length||(V({type:"closeDialog"}),B())}},300)};f.useEffect(functi
`),status:"error"})},[i,s]),g=f.useCallback(async E=>{n(P4({file:E,image_category:"user",is_intermediate:!1,postUploadAction:{type:"TOAST_UPLOADED"}}))},[n]),v=f.useCallback((E,I)=>{if(I.length>1){s({title:i("toast.uploadFailed"),description:i("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}I.forEach(O=>{h(O)}),E.forEach(O=>{g(O)})},[i,s,g,h]),{getRootProps:b,getInputProps:S,isDragAccept:w,isDragReject:C,isDragActive:_,inputRef:k,open:j}=Gv({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>d(!0),disabled:r,multiple:!1});return f.useEffect(()=>{const E=async I=>{var O,M;k.current&&(O=I.clipboardData)!=null&&O.files&&(k.current.files=I.clipboardData.files,(M=k.current)==null||M.dispatchEvent(new Event("change",{bubbles:!0})))};return p(j),document.addEventListener("paste",E),()=>{document.removeEventListener("paste",E),p(()=>{})}},[k,j,p]),a.jsxs(ze,{...b({style:{}}),onKeyDown:E=>{E.key},children:[a.jsx("input",{...S()}),t,_&&u&&a.jsx(zN,{isDragAccept:w,isDragReject:C,setIsHandlingUpload:d})]})},FN=f.memo(BN),HN=a9(e=>{e(j4(!0))},300),so=()=>(e,t)=>{dr(t())==="unifiedCanvas"&&HN(e)};var WN=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xr=globalThis&&globalThis.__assign||function(){return xr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},xr.apply(this,arguments)},g2={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},v2={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Dd={width:"20px",height:"20px",position:"absolute"},VN={top:xr(xr({},g2),{top:"-5px"}),right:xr(xr({},v2),{left:void 0,right:"-5px"}),bottom:xr(xr({},g2),{top:void 0,bottom:"-5px"}),left:xr(xr({},v2),{left:"-5px"}),topRight:xr(xr({},Dd),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:xr(xr({},Dd),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:xr(xr({},Dd),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:xr(xr({},Dd),{left:"-10px",top:"-10px",cursor:"nw-resize"})},UN=function(e){WN(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return f.createElement("div",{className:this.props.className||"",style:xr(xr({position:"absolute",userSelect:"none"},VN[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(f.PureComponent),GN=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ns=globalThis&&globalThis.__assign||function(){return Ns=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ns.apply(this,arguments)},qN={width:"auto",height:"auto"},Td=function(e,t,n){return Math.max(Math.min(e,n),t)},y2=function(e,t){return Math.round(e/t)*t},ul=function(e,t){return new RegExp(e,"i").test(t)},Ad=function(e){return!!(e.touches&&e.touches.length)},KN=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},b2=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(s,i,u){return Math.abs(i-e)<Math.abs(t[s]-e)?u:s},0),o=Math.abs(t[r]-e);return n===
* OverlayScrollbars
* Version: 2.2.1
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
*/function gn(e,t){if(gh(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&gn(Object.keys(e),n=>t(e[n],n,e));return e}function Xr(e,t){const n=oi(t);if(bs(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?k2(e,s,t):t.reduce((i,u)=>(i[u]=k2(e,s,u),i),o)}return o}e&&gn(Ro(t),o=>cz(e,o,t[o]))}const is=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const u=(h,g)=>{const v=s,b=h,S=g||(r?!r(v,b):v!==b);return(S||o)&&(s=b,i=v),[s,S,i]};return[t?h=>u(t(s,i),h):u,h=>[s,!!h,i]]},Nu=()=>typeof window<"u",Y5=Nu()&&Node.ELEMENT_NODE,{toString:K$,hasOwnProperty:mg}=Object.prototype,_a=e=>e===void 0,mh=e=>e===null,Y$=e=>_a(e)||mh(e)?`${e}`:K$.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Ya=e=>typeof e=="number",oi=e=>typeof e=="string",e1=e=>typeof e=="boolean",ys=e=>typeof e=="function",bs=e=>Array.isArray(e),iu=e=>typeof e=="object"&&!bs(e)&&!mh(e),gh=e=>{const t=!!e&&e.length,n=Ya(t)&&t>-1&&t%1==0;return bs(e)||!ys(e)&&n?t>0&&iu(e)?t-1 in e:!0:!1},x0=e=>{if(!e||!iu(e)||Y$(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=mg.call(e,n),i=o&&mg.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return _a(t)||mg.call(e,t)},Hf=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===Y5:!1},vh=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===Y5:!1},t1=(e,t,n)=>e.indexOf(t,n),In=(e,t,n)=>(!n&&!oi(t)&&gh(t)?Array.prototype.push.apply(e,t):e.push(t),e),Di=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{In(n,r)}):gn(e,r=>{In(n,r)}),n)},n1=e=>!!e&&e.length===0,Ks=(e,t,n)=>{gn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},yh=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ro=e=>e?Object.keys(e):[],nr=(e,t,n,r,o,s,i)=>{const u=[t,n,r,o,s,i];return(typeof e!="object"||mh(e))&&!ys(e)&&(e={}),gn(u,d=>{gn(Ro(d),p=>{const h=d[p];if(e===h)return!0;const g=bs(h);if(h&&(x0(h)||g)){const v=e[p];let b=v;g&&!bs(v)?b=[]:!g&&!x0(v)&&(b={}),e[p]=nr(b,h)}else e[p]=h})}),e},r1=e=>{for(const t in e)return!1;return!0},Q5=(e,t,n,r)=>{if(_a(r))return n?n[e]:t;n&&(oi(r)||Ya(r))&&(n[e]=r)},Qr=(e,t,n)=>{if(_a(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},mo=(e,t)=>{e&&e.removeAttribute(t)},_i=(e,t,n,r)=>{if(n){const o=Qr(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const i=Di(s).join(" ").trim();Qr(e,t,i)}},Q$=(e,t,n)=>{const r=Qr(e,t)||"";return new Set(r.split(" ")).has(n)},fs=(e,t)=>Q5("scrollLeft",0,e,t),la=(e,t)=>Q5("scrollTop",0,e,t),w0=Nu()&&Element.prototype,X5=(e,t)=>{const n=[],r=t?vh(t)?t:null:document;return r?In(n,r.querySelectorAll(e)):n},X$=(e,t)=>{const n=t?vh(t)?t:null:document;return n?n.querySelector(e):null},Wf=(e,t)=>vh(e)?(w0.matches||w0.msMatchesSelector).call(e,t):!1,o1=e=>e?Di(e.childNodes):[],ba=e=>e?e.parentElement:null,vl=(e,t)=>{if(vh(e)){const n=w0.closest;if(n)return n.call(e,t);do{if(Wf(e,t))return e;e=ba(e)}while(e)}return null},J$=(e,t,n)=>{const r=e&&vl(e,t),o=e&&X$(n,r),s=vl(o,t)===r;return r&&o?r===e||o===e||s&&vl(vl(e,n),t)!==r:!1},s1=(e,t,n)=>{if(n&&e){let r=t,o;gh(n)?(o=document.createDocumentFragment(),gn(n,s=>{s===r&&(r=s.previousSibling),o.appendChild(s)})):o=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(o,r||null)}},Uo=(e,t)=>{s1(e,null,t)},Z$=(e,t)=>{s1(ba(e),e,t)},S2=(e,t)=>{s1(ba(e),e&&e.nextSibling,t)},Vs=e=>{if(gh(e))gn(Di(e),t=>Vs(t));else if(e){const t=ba(e);t&&t.removeChild(e)}},ki=e=>{const t=document.createElement("div");return e&&Qr(t,"class",e),t},J5=e=>{const t=ki();return t.innerHTML=e.trim(),gn(o1(t),n=>Vs(n))},S0=e=>e.charAt(0).toUpperCase()+e.slice(1),ez=()=>ki().style,tz=["-webkit-","-moz-","-o-","-ms-"],nz=["WebKit","Moz","O","MS","webkit","moz","o","ms"],gg={},vg={},rz=e=>{let t=vg[e];if(yh(vg,e))return t;const n=S0(e),r=ez();return gn(tz,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,S0(s)+n].find(u=>r[u]!==void 0))}),vg[e]=t||""},$u=e=>{if(Nu()){let t=gg[e]||window[e];return yh(gg,e)||(gn(nz,n=>(t=t||window[n+S0(e)],!t)),gg[e]=t),t}},oz=$u("MutationObserver"),C2=$u("IntersectionObserver"),yl=$u("ResizeObserver"),Z5=$u("cancelAnimationFrame"),e
Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.
2023-07-18 16:45:47 +00:00
See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}}}({queryThunk:Fe,mutationThunk:mt,api:K,serializeQueryArgs:et,context:ce}),Cr=Xt.buildInitiateQuery,Vn=Xt.buildInitiateMutation;return Dr(K.util,{getRunningOperationPromises:Xt.getRunningOperationPromises,getRunningOperationPromise:Xt.removalWarning,getRunningMutationThunk:Xt.getRunningMutationThunk,getRunningMutationsThunk:Xt.getRunningMutationsThunk,getRunningQueryThunk:Xt.getRunningQueryThunk,getRunningQueriesThunk:Xt.getRunningQueriesThunk}),{name:ts,injectEndpoint:function(yt,wn){var kn,Un=K;(kn=Un.endpoints)[yt]!=null||(kn[yt]={}),ne(wn)?Dr(Un.endpoints[yt],{name:yt,select:zt(yt,wn),initiate:Cr(yt,wn)},Gt(Fe,yt)):wn.type===W.mutation&&Dr(Un.endpoints[yt],{name:yt,select:tn(),initiate:Vn(yt)},Gt(mt,yt))}}}}},js=Ye(Qs())})(j_);P_.exports=j_;var Go=P_.exports;const I_=f.memo(({board:e,isSelected:t})=>{const n=te(),{currentData:r}=gs(e.cover_image_name??Go.skipToken),{colorMode:o}=Do(),{board_name:s,board_id:i}=e,{onClickDeleteBoardImages:u}=f.useContext(E4),d=f.useCallback(()=>{n(lv(i))},[i,n]),[p,{isLoading:h}]=e8(),[g,{isLoading:v}]=t8(),b=k=>{p({board_id:i,changes:{board_name:k}})},S=f.useCallback(()=>{g(i)},[i,g]),w=f.useCallback(()=>{},[]),C=f.useCallback(()=>{u(e)},[e,u]),_=f.useMemo(()=>({id:i,actionType:"MOVE_BOARD",context:{boardId:i}}),[i]);return a.jsx(ze,{sx:{touchAction:"none",height:"full"},children:a.jsx(k_,{menuProps:{size:"sm",isLazy:!0},renderMenu:()=>a.jsxs(ec,{sx:{visibility:"visible !important"},children:[e.image_count>0&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{isDisabled:!e.image_count,icon:a.jsx(W5,{}),onClickCapture:w,children:"Add Board to Batch"}),a.jsx(jr,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(yo,{}),onClickCapture:C,children:"Delete Board and Images"})]}),a.jsx(jr,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(yo,{}),onClickCapture:S,children:"Delete Board"})]}),children:k=>a.jsxs(F,{userSelect:"none",ref:k,sx:{flexDir:"column",justifyContent:"space-between",alignItems:"center",cursor:"pointer",w:"full",h:"full"},children:[a.jsxs(F,{onClick:d,sx:{position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",w:"full",aspectRatio:"1/1",overflow:"hidden",shadow:t?"selected.light":void 0,_dark:{shadow:t?"selected.dark":void 0},flexShrink:0},children:[e.cover_image_name&&(r==null?void 0:r.image_url)&&a.jsx(bu,{src:r==null?void 0:r.image_url,draggable:!1}),!(e.cover_image_name&&(r!=null&&r.image_url))&&a.jsx(Bi,{boxSize:8,icon:qc,sx:{border:"2px solid var(--invokeai-colors-base-200)",_dark:{border:"2px solid var(--invokeai-colors-base-800)"}}}),a.jsx(F,{sx:{position:"absolute",insetInlineEnd:0,top:0,p:1},children:a.jsx(Xa,{variant:"solid",children:e.image_count})}),a.jsx(g1,{data:_})]}),a.jsx(F,{sx:{width:"full",height:"full",justifyContent:"center",alignItems:"center"},children:a.jsxs(K3,{defaultValue:s,submitOnBlur:!1,onSubmit:j=>{b(j)},children:[a.jsx(U3,{sx:{color:t?ke("base.900","base.50")(o):ke("base.700","base.200")(o),fontWeight:t?600:void 0,fontSize:"xs",textAlign:"center",p:0},noOfLines:1}),a.jsx(V3,{sx:{color:ke("base.900","base.50")(o),fontSize:"xs",borderColor:ke("base.500","base.500")(o),p:0,outline:0}})]})})]},i)})})});I_.displayName="HoverableBoard";const sr=e=>{const t=$(i=>i.config.disabledTabs),n=$(i=>i.config.disabledFeatures),r=$(i=>i.config.disabledSDFeatures),o=f.useMemo(()=>n.includes(e)||r.includes(e)||t.includes(e),[n,r,t,e]),s=f.useMemo(()=>!(n.includes(e)||r.includes(e)||t.includes(e)),[n,r,t,e]);return{isFeatureDisabled:o,isFeatureEnabled:s}},CL=ve([Rt],({boards:e,gallery:t})=>{const{searchText:n}=e,{selectedBoardId:r}=t;return{selectedBoardId:r,searchText:n}},at),_L=e=>{const{isOpen:t}=e,n=te(),{selectedBoardId:r,searchText:o}=$(CL),{data:s}=uv(),i=sr("batches").isFeatureEnabled,u=o?s==null?void 0:s.filter(v=>v.board_name.toLowerCase().includes(o.toLowerCase())):s,[d,p]=f.useState(!1),h=v=>{p(v.length>0),n(Vb(v))},g=()=>{p(!1),n(Vb(""))};return a.jsx(Jp,{in:t,animateOpacity:!0,children:a.jsxs(F,{layerStyle
2023-07-18 12:12:41 +00:00
* @license React
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xte=function(t){var n={},r=f,o=pf,s=Object.assign;function i(l){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+l,m=1;m<arguments.length;m++)c+="&args[]="+encodeURIComponent(arguments[m]);return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,d=Symbol.for("react.element"),p=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),S=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),I=Symbol.iterator;function O(l){return l===null||typeof l!="object"?null:(l=I&&l[I]||l["@@iterator"],typeof l=="function"?l:null)}function M(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case h:return"Fragment";case p:return"Portal";case v:return"Profiler";case g:return"StrictMode";case C:return"Suspense";case _:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case S:return(l.displayName||"Context")+".Consumer";case b:return(l._context.displayName||"Context")+".Provider";case w:var c=l.render;return l=l.displayName,l||(l=c.displayName||c.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case k:return c=l.displayName||null,c!==null?c:M(l.type)||"Memo";case j:c=l._payload,l=l._init;try{return M(l(c))}catch{}}return null}function R(l){var c=l.type;switch(l.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=c.render,l=l.displayName||l.name||"",c.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return M(c);case 8:return c===g?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function A(l){var c=l,m=l;if(l.alternate)for(;c.return;)c=c.return;else{l=c;do c=l,c.flags&4098&&(m=c.return),l=c.return;while(l)}return c.tag===3?m:null}function L(l){if(A(l)!==l)throw Error(i(188))}function N(l){var c=l.alternate;if(!c){if(c=A(l),c===null)throw Error(i(188));return c!==l?null:l}for(var m=l,y=c;;){var x=m.return;if(x===null)break;var P=x.alternate;if(P===null){if(y=x.return,y!==null){m=y;continue}break}if(x.child===P.child){for(P=x.child;P;){if(P===m)return L(x),l;if(P===y)return L(x),c;P=P.sibling}throw Error(i(188))}if(m.return!==y.return)m=x,y=P;else{for(var T=!1,Y=x.child;Y;){if(Y===m){T=!0,m=x,y=P;break}if(Y===y){T=!0,y=x,m=P;break}Y=Y.sibling}if(!T){for(Y=P.child;Y;){if(Y===m){T=!0,m=P,y=x;break}if(Y===y){T=!0,y=P,m=x;break}Y=Y.sibling}if(!T)throw Error(i(189))}}if(m.alternate!==y)throw Error(i(190))}if(m.tag!==3)throw Error(i(188));return m.stateNode.current===m?l:c}function Z(l){return l=N(l),l!==null?B(l):null}function B(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var c=B(l);if(c!==null)return c;l=l.sibling}return null}function H(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){if(l.tag!==4){var c=H(l);if(c!==null)return c}l=l.sibling}return null}var G=Array.isArray,q=t.getPublicInstance,D=t.getRootHostContext,U=t.getChildHostContext,V=t.prepareForCommit,J=t.resetAfterCommit,ie=t.createInstance,ye=t.appendInitialChild,he=t.finalizeInitialChildren,ae=t.prepareUpdate,ee=t.shouldSetTextContent,W=t.createTextInstance,re=t.scheduleTimeout,pe=t.cancelTimeout,ne=t.noTimeout,ge=t.isPrimaryRenderer,de=t.supportsMutation,Ce=t.supportsPersistence,Me=t.supportsHydration,me=t.
`+xt+l}var Lt=!1;function qt(l,c){if(!l||Lt)return"";Lt=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(Oe){var y=Oe}Reflect.construct(l,[],c)}else{try{c.call()}catch(Oe){y=Oe}l.call(c.prototype)}else{try{throw Error()}catch(Oe){y=Oe}l()}}catch(Oe){if(Oe&&y&&typeof Oe.stack=="string"){for(var x=Oe.stack.split(`
`),P=y.stack.split(`
`),T=x.length-1,Y=P.length-1;1<=T&&0<=Y&&x[T]!==P[Y];)Y--;for(;1<=T&&0<=Y;T--,Y--)if(x[T]!==P[Y]){if(T!==1||Y!==1)do if(T--,Y--,0>Y||x[T]!==P[Y]){var se=`
`+x[T].replace(" at new "," at ");return l.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",l.displayName)),se}while(1<=T&&0<=Y);break}}}finally{Lt=!1,Error.prepareStackTrace=m}return(l=l?l.displayName||l.name:"")?Et(l):""}var Gt=Object.prototype.hasOwnProperty,$t=[],Re=-1;function ut(l){return{current:l}}function Ct(l){0>Re||(l.current=$t[Re],$t[Re]=null,Re--)}function Tt(l,c){Re++,$t[Re]=l.current,l.current=c}var xn={},zt=ut(xn),tn=ut(!1),Xt=xn;function Cr(l,c){var m=l.type.contextTypes;if(!m)return xn;var y=l.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===c)return y.__reactInternalMemoizedMaskedChildContext;var x={},P;for(P in m)x[P]=c[P];return y&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=c,l.__reactInternalMemoizedMaskedChildContext=x),x}function Vn(l){return l=l.childContextTypes,l!=null}function yt(){Ct(tn),Ct(zt)}function wn(l,c,m){if(zt.current!==xn)throw Error(i(168));Tt(zt,c),Tt(tn,m)}function kn(l,c,m){var y=l.stateNode;if(c=c.childContextTypes,typeof y.getChildContext!="function")return m;y=y.getChildContext();for(var x in y)if(!(x in c))throw Error(i(108,R(l)||"Unknown",x));return s({},m,y)}function Un(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||xn,Xt=zt.current,Tt(zt,l),Tt(tn,tn.current),!0}function ir(l,c,m){var y=l.stateNode;if(!y)throw Error(i(169));m?(l=kn(l,c,Xt),y.__reactInternalMemoizedMergedChildContext=l,Ct(tn),Ct(zt),Tt(zt,l)):Ct(tn),Tt(tn,m)}var On=Math.clz32?Math.clz32:pn,Rn=Math.log,nn=Math.LN2;function pn(l){return l>>>=0,l===0?32:31-(Rn(l)/nn|0)|0}var Sn=64,cn=4194304;function un(l){switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Be(l,c){var m=l.pendingLanes;if(m===0)return 0;var y=0,x=l.suspendedLanes,P=l.pingedLanes,T=m&268435455;if(T!==0){var Y=T&~x;Y!==0?y=un(Y):(P&=T,P!==0&&(y=un(P)))}else T=m&~x,T!==0?y=un(T):P!==0&&(y=un(P));if(y===0)return 0;if(c!==0&&c!==y&&!(c&x)&&(x=y&-y,P=c&-c,x>=P||x===16&&(P&4194240)!==0))return c;if(y&4&&(y|=m&16),c=l.entangledLanes,c!==0)for(l=l.entanglements,c&=y;0<c;)m=31-On(c),x=1<<m,y|=l[m],c&=~x;return y}function wt(l,c){switch(l){case 1:case 2:case 4:return c+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pt(l,c){for(var m=l.suspendedLanes,y=l.pingedLanes,x=l.expirationTimes,P=l.pendingLanes;0<P;){var T=31-On(P),Y=1<<T,se=x[T];se===-1?(!(Y&m)||Y&y)&&(x[T]=wt(Y,c)):se<=c&&(l.expiredLanes|=Y),P&=~Y}}function Xe(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function ft(){var l=Sn;return Sn<<=1,!(Sn&4194240)&&(Sn=64),l}function Mt(l){for(var c=[],m=0;31>m;m++)c.push(l);return c}function lt(l,c,m){l.pendingLanes|=c,c!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,c=31-On(c),l[c]=m}function Ke(l,c){var m=l.pendingLanes&~c;l.pendingLanes=c,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=c,l.mutableReadLanes&=c,l.entangledLanes&=c,c=l.entanglements;var y=l.eventTimes;for(l=l.expirationTimes;0<m;){var x=31-On(m),P=1<<x;c[x]=0,y[x]=-1,l[x]=-1,m&=~P}}function Pe(l,c){var m=l.entangledLanes|=c;for(l=l.entanglements;m;){var y=31-On(m),x=1<<y;x&c|l[y]&c&&(l[y]|=c),m&=~x}}var Se=0;function Ie(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var Ae=o.unstable_scheduleCallback,Ge=o.unstable_cancelCallback,_t=o.unsta
Error generating stack: `+P.message+`
`+P.stack}return{value:l,source:c,stack:x,digest:null}}function hm(l,c,m){return{value:l,source:null,stack:m??null,digest:c??null}}function mm(l,c){try{console.error(c.value)}catch(m){setTimeout(function(){throw m})}}var WI=typeof WeakMap=="function"?WeakMap:Map;function Yy(l,c,m){m=Zs(-1,m),m.tag=3,m.payload={element:null};var y=c.value;return m.callback=function(){md||(md=!0,Am=y),mm(l,c)},m}function Qy(l,c,m){m=Zs(-1,m),m.tag=3;var y=l.type.getDerivedStateFromError;if(typeof y=="function"){var x=c.value;m.payload=function(){return y(x)},m.callback=function(){mm(l,c)}}var P=l.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(m.callback=function(){mm(l,c),typeof y!="function"&&(Ea===null?Ea=new Set([this]):Ea.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})}),m}function Xy(l,c,m){var y=l.pingCache;if(y===null){y=l.pingCache=new WI;var x=new Set;y.set(c,x)}else x=y.get(c),x===void 0&&(x=new Set,y.set(c,x));x.has(m)||(x.add(m),l=rE.bind(null,l,c,m),c.then(l,l))}function Jy(l){do{var c;if((c=l.tag===13)&&(c=l.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return l;l=l.return}while(l!==null);return null}function Zy(l,c,m,y,x){return l.mode&1?(l.flags|=65536,l.lanes=x,l):(l===c?l.flags|=65536:(l.flags|=128,m.flags|=131072,m.flags&=-52805,m.tag===1&&(m.alternate===null?m.tag=17:(c=Zs(-1,1),c.tag=2,Ia(m,c,1))),m.lanes|=1),l)}var VI=u.ReactCurrentOwner,uo=!1;function oo(l,c,m,y){c.child=l===null?Py(c,null,m,y):Yi(c,l.child,m,y)}function eb(l,c,m,y,x){m=m.render;var P=c.ref;return Ki(c,x),y=lm(l,c,m,y,P,x),m=cm(),l!==null&&!uo?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~x,ea(l,c,x)):(Gn&&m&&Wh(c),c.flags|=1,oo(l,c,y,x),c.child)}function tb(l,c,m,y,x){if(l===null){var P=m.type;return typeof P=="function"&&!Fm(P)&&P.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(c.tag=15,c.type=P,nb(l,c,P,y,x)):(l=wd(m.type,null,y,c,c.mode,x),l.ref=c.ref,l.return=c,c.child=l)}if(P=l.child,!(l.lanes&x)){var T=P.memoizedProps;if(m=m.compare,m=m!==null?m:Wu,m(T,y)&&l.ref===c.ref)return ea(l,c,x)}return c.flags|=1,l=Da(P,y),l.ref=c.ref,l.return=c,c.child=l}function nb(l,c,m,y,x){if(l!==null){var P=l.memoizedProps;if(Wu(P,y)&&l.ref===c.ref)if(uo=!1,c.pendingProps=y=P,(l.lanes&x)!==0)l.flags&131072&&(uo=!0);else return c.lanes=l.lanes,ea(l,c,x)}return gm(l,c,m,y,x)}function rb(l,c,m){var y=c.pendingProps,x=y.children,P=l!==null?l.memoizedState:null;if(y.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(el,jo),jo|=m;else{if(!(m&1073741824))return l=P!==null?P.baseLanes|m:m,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:l,cachePool:null,transitions:null},c.updateQueue=null,Tt(el,jo),jo|=l,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=P!==null?P.baseLanes:m,Tt(el,jo),jo|=y}else P!==null?(y=P.baseLanes|m,c.memoizedState=null):y=m,Tt(el,jo),jo|=y;return oo(l,c,x,m),c.child}function ob(l,c){var m=c.ref;(l===null&&m!==null||l!==null&&l.ref!==m)&&(c.flags|=512,c.flags|=2097152)}function gm(l,c,m,y,x){var P=Vn(m)?Xt:zt.current;return P=Cr(c,P),Ki(c,x),m=lm(l,c,m,y,P,x),y=cm(),l!==null&&!uo?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~x,ea(l,c,x)):(Gn&&y&&Wh(c),c.flags|=1,oo(l,c,m,x),c.child)}function sb(l,c,m,y,x){if(Vn(m)){var P=!0;Un(c)}else P=!1;if(Ki(c,x),c.stateNode===null)rd(l,c),Sy(c,m,y),tm(c,m,y,x),y=!0;else if(l===null){var T=c.stateNode,Y=c.memoizedProps;T.props=Y;var se=T.context,Oe=m.contextType;typeof Oe=="object"&&Oe!==null?Oe=No(Oe):(Oe=Vn(m)?Xt:zt.current,Oe=Cr(c,Oe));var ct=m.getDerivedStateFromProps,Vt=typeof ct=="function"||typeof T.getSnapshotBeforeUpdate=="function";Vt||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(Y!==y||se!==Oe)&&Cy(c,T,y,Oe),ja=!1;var Je=c.memoizedState;T.state=Je,qu(c,y,T,x),se=c.memoizedState,Y!==y||Je!==se||tn.current||ja?(typeof ct=="function"&&(em(c,m,ct,y),se=c.memoizedState),(Y=ja||wy(c,m,Y,y,Je,se,Oe))?(Vt||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMo
`+(y.join(" > ")+`
No matching component was found for:
`)+l.join(" > ")}return null},n.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return q(l.child.stateNode);default:return l.child.stateNode}},n.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:u.ReactCurrentDispatcher,findHostInstanceByFiber:cE,findFiberByHostInstance:l.findFiberByHostInstance||uE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)l=!0;else{try{Fn=c.inject(l),an=c}catch{}l=!!c.checkDCE}}return l},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(l,c,m,y){if(!vt)throw Error(i(363));l=Om(l,c);var x=Ft(l,m,y).disconnect;return{disconnect:function(){x()}}},n.registerMutableSourceForHydration=function(l,c){var m=c._getVersion;m=m(c._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[c,m]:l.mutableSourceEagerHydrationData.push(c,m)},n.runWithPriority=function(l,c){var m=Se;try{return Se=l,c()}finally{Se=m}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(l,c,m,y){var x=c.current,P=Yr(),T=Ra(x);return m=Nb(m),c.context===null?c.context=m:c.pendingContext=m,c=Zs(P,T),c.payload={element:l},y=y===void 0?null:y,y!==null&&(c.callback=y),l=Ia(x,c,T),l!==null&&(Lo(l,x,T,P),Gu(l,x,T)),T},n};gI.exports=xte;var wte=gI.exports;const Ste=vu(wte);var vI={exports:{}},Ui={};/**
* @license React
* react-reconciler-constants.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/Ui.ConcurrentRoot=1;Ui.ContinuousEventPriority=4;Ui.DefaultEventPriority=16;Ui.DiscreteEventPriority=1;Ui.IdleEventPriority=536870912;Ui.LegacyRoot=0;vI.exports=Ui;var yI=vI.exports;const e4={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let t4=!1,n4=!1;const iy=".react-konva-event",Cte=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
Consider to add onDragMove or onDragEnd events.
For more info see: https://github.com/konvajs/react-konva/issues/256
`,_te=`ReactKonva: You are using "zIndex" attribute for a Konva node.
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
For more info see: https://github.com/konvajs/react-konva/issues/194
`,kte={};function Hh(e,t,n=kte){if(!t4&&"zIndex"in t&&(console.warn(_te),t4=!0),!n4&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(Cte),n4=!0)}for(var s in n)if(!e4[s]){var i=s.slice(0,2)==="on",u=n[s]!==t[s];if(i&&u){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),e.off(d,n[s])}var p=!t.hasOwnProperty(s);p&&e.setAttr(s,void 0)}var h=t._useStrictMode,g={},v=!1;const b={};for(var s in t)if(!e4[s]){var i=s.slice(0,2)==="on",S=n[s]!==t[s];if(i&&S){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),t[s]&&(b[d]=t[s])}!i&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(v=!0,g[s]=t[s])}v&&(e.setAttrs(g),ii(e));for(var d in b)e.on(d+iy,b[d])}function ii(e){if(!sO.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const bI={},Pte={};pu.Node.prototype._applyProps=Hh;function jte(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),ii(e)}function Ite(e,t,n){let r=pu[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=pu.Group);const o={},s={};for(var i in t){var u=i.slice(0,2)==="on";u?s[i]=t[i]:o[i]=t[i]}const d=new r(o);return Hh(d,s),d}function Ete(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Ote(e,t,n){return!1}function Rte(e){return e}function Mte(){return null}function Dte(){return null}function Tte(e,t,n,r){return Pte}function Ate(){}function Nte(e){}function $te(e,t){return!1}function zte(){return bI}function Lte(){return bI}const Bte=setTimeout,Fte=clearTimeout,Hte=-1;function Wte(e,t){return!1}const Vte=!1,Ute=!0,Gte=!0;function qte(e,t){t.parent===e?t.moveToTop():e.add(t),ii(e)}function Kte(e,t){t.parent===e?t.moveToTop():e.add(t),ii(e)}function xI(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),ii(e)}function Yte(e,t,n){xI(e,t,n)}function Qte(e,t){t.destroy(),t.off(iy),ii(e)}function Xte(e,t){t.destroy(),t.off(iy),ii(e)}function Jte(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Zte(e,t,n){}function ene(e,t,n,r,o){Hh(e,o,r)}function tne(e){e.hide(),ii(e)}function nne(e){}function rne(e,t){(t.visible==null||t.visible)&&e.show()}function one(e,t){}function sne(e){}function ane(){}const ine=()=>yI.DefaultEventPriority,lne=Object.freeze(Object.defineProperty({__proto__:null,appendChild:qte,appendChildToContainer:Kte,appendInitialChild:jte,cancelTimeout:Fte,clearContainer:sne,commitMount:Zte,commitTextUpdate:Jte,commitUpdate:ene,createInstance:Ite,createTextInstance:Ete,detachDeletedInstance:ane,finalizeInitialChildren:Ote,getChildHostContext:Lte,getCurrentEventPriority:ine,getPublicInstance:Rte,getRootHostContext:zte,hideInstance:tne,hideTextInstance:nne,idlePriority:pf.unstable_IdlePriority,insertBefore:xI,insertInContainerBefore:Yte,isPrimaryRenderer:Vte,noTimeout:Hte,now:pf.unstable_now,prepareForCommit:Mte,preparePortalMount:Dte,prepareUpdate:Tte,removeChild:Qte,removeChildFromContainer:Xte,resetAfterCommit:Ate,resetTextContent:Nte,run:pf.unstable_runWithPriority,scheduleTimeout:Bte,shouldDeprioritizeSubtree:$te,shouldSetTextContent:Wte,supportsMutation:Gte,unhideInstance:rne,unhideTextInstance:one,warnsIfNotActing:Ute},Symbol.toStringTag,{value:"Module"}));var cne=Object.defineProperty,une=Object.defineProperties,dne=Object.getOwnPropertyDescriptors,r4=Object.getOwnPropertySymbols,fne=Object.prototype.hasOwnProperty,pne=Object.prototype.propertyIsEnumerable,o4=(e,t,n)=>t in e?cne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s4=(e,t)=>{for(var n in t||(t={}))fne.call(t,n)&&o4(e,n,t[n]);if(r4)for(var n of r4(t))pne.cal
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g transform="matrix(0.5,0,0,0.5,0,0)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
</svg>`.replaceAll("black",e),Hne=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=$(Fne),[i,u]=f.useState(null),[d,p]=f.useState(0),h=f.useRef(null),g=f.useCallback(()=>{p(d+1),setTimeout(g,500)},[d]);return f.useEffect(()=>{if(i)return;const v=new Image;v.onload=()=>{u(v)},v.src=l4(n)},[i,n]),f.useEffect(()=>{i&&(i.src=l4(n))},[i,n]),f.useEffect(()=>{const v=setInterval(()=>p(b=>(b+1)%5),50);return()=>clearInterval(v)},[]),!i||!ol(r.x)||!ol(r.y)||!ol(s)||!ol(o.width)||!ol(o.height)?null:a.jsx(Gs,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:ol(d)?d:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Wne=ve([en],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Yt}}),Vne=e=>{const{...t}=e,{objects:n}=$(Wne);return a.jsx(wa,{listening:!1,...t,children:n.filter(yO).map((r,o)=>a.jsx(Hp,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},o))})};var vi=f,Une=function(t,n,r){const o=vi.useRef("loading"),s=vi.useRef(),[i,u]=vi.useState(0),d=vi.useRef(),p=vi.useRef(),h=vi.useRef();return(d.current!==t||p.current!==n||h.current!==r)&&(o.current="loading",s.current=void 0,d.current=t,p.current=n,h.current=r),vi.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function v(){o.current="loaded",s.current=g,u(Math.random())}function b(){o.current="failed",s.current=void 0,u(Math.random())}return g.addEventListener("load",v),g.addEventListener("error",b),n&&(g.crossOrigin=n),r&&(g.referrerPolicy=r),g.src=t,function(){g.removeEventListener("load",v),g.removeEventListener("error",b)}},[t,n,r]),[s.current,o.current]};const Gne=vu(Une),PI=e=>{const{width:t,height:n,x:r,y:o,imageName:s}=e.canvasImage,{currentData:i,isError:u}=gs(s??Go.skipToken),[d]=Gne((i==null?void 0:i.image_url)??"",bO.get()?"use-credentials":"anonymous");return u?a.jsx(Gs,{x:r,y:o,width:t,height:n,fill:"red"}):a.jsx(_I,{x:r,y:o,image:d,listening:!1})},qne=ve([en],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Yt}}),Kne=()=>{const{objects:e}=$(qne);return e?a.jsx(wa,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(xO(t))return a.jsx(PI,{canvasImage:t},n);if(wO(t)){const r=a.jsx(Hp,{points:t.points,stroke:t.color?Ii(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?a.jsx(wa,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(SO(t))return a.jsx(Gs,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Ii(t.color)},n);if(CO(t))return a.jsx(Gs,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Yne=ve([en],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:{x:o,y:s},boundingBoxDimensions:{width:i,height:u}}=e,{selectedImageIndex:d,images:p}=t.stagingArea;return{currentStagingAreaImage:p.length>0&&d!==void 0?p[d]:void 0,isOnFirstImage:d===0,isOnLastImage:d===p.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:o,y:s,width:i,height:u}},{memoizeOptions:{resultEqualityCheck:Yt}}),Qne=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:i,width:u,height:d}=$(Yne);return a.jsxs(wa,{...t,children:[r&&n&&a.jsx(PI,{canvasImage:n}),o&&a.jsxs(wa,{children:[a.jsx(Gs,{x:s,y:i,width:u,height:d,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),a.jsx(Gs,{x:s,y:i,width:u,height:d,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},Xne=ve([en],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n,sessionId:r}},shouldShowSta