InvokeAI/invokeai/frontend/web/dist/assets/App-6440ab3b.js

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

172 lines
1008 KiB
JavaScript
Raw Normal View History

2023-11-20 07:48:17 +00:00
import{a as Ou,b as vI,S as bI,c as xI,d as yI,e as G1,f as CI,i as q1,g as KR,h as wI,j as SI,k as QR,l as Ix,m as XR,n as YR,o as zw,p as kI,t as JR,q as ZR,r as eD,s as tD,u as nD,v as l,R as z,w as Px,x as Bh,y as rD,z as oD,A as sD,B as aD,P as iD,C as Ex,D as lD,E as cD,F as uD,G as dD,H as De,I as a,J as Gr,K as Un,L as Ae,M as kt,N as vr,O as ot,Q as wf,T as So,U as Ar,V as no,W as lr,X as Ci,Y as cl,Z as Vt,_ as Ms,$ as Yc,a0 as wi,a1 as Si,a2 as pg,a3 as Mx,a4 as Sf,a5 as K1,a6 as fD,a7 as Fw,a8 as pD,a9 as jI,aa as Q1,ab as kf,ac as Au,ad as hD,ae as _I,af as II,ag as PI,ah as ea,ai as mD,aj as me,ak as we,al as Nn,am as H,an as gD,ao as Bw,ap as vD,aq as bD,ar as xD,as as ki,at as Le,au as N,av as yo,aw as lo,ax as Ie,ay as Zl,az as Q,aA as EI,aB as yD,aC as CD,aD as wD,aE as SD,aF as ls,aG as Ox,aH as ji,aI as le,aJ as Qo,aK as jf,aL as kD,aM as jD,aN as Hw,aO as Ax,aP as je,aQ as ta,aR as _D,aS as MI,aT as OI,aU as Ww,aV as ID,aW as PD,aX as ED,aY as _i,aZ as Rx,a_ as fn,a$ as MD,b0 as OD,b1 as Ha,b2 as AI,b3 as RI,b4 as Ht,b5 as hg,b6 as AD,b7 as Vw,b8 as DI,b9 as RD,ba as DD,bb as TD,bc as ND,bd as $D,be as LD,bf as zD,bg as TI,bh as FD,bi as BD,bj as HD,bk as WD,bl as VD,bm as fu,bn as Dx,bo as UD,bp as GD,bq as qD,br as wc,bs as KD,bt as QD,bu as XD,bv as YD,bw as Uw,bx as JD,by as ZD,bz as Jc,bA as NI,bB as $I,bC as mg,bD as Tx,bE as Nx,bF as Rs,bG as LI,bH as e7,bI as Hl,bJ as Pd,bK as Gw,bL as t7,bM as n7,bN as r7,bO as Wp,bP as Vp,bQ as md,bR as Bv,bS as $d,bT as Ld,bU as zd,bV as Fd,bW as qw,bX as Hh,bY as Hv,bZ as Wh,b_ as Kw,b$ as X1,c0 as Wv,c1 as Y1,c2 as Qw,c3 as Vc,c4 as Vv,c5 as Vh,c6 as Xw,c7 as Wl,c8 as Yw,c9 as Vl,ca as Up,cb as Uh,cc as Jw,cd as J1,ce as Gh,cf as Zw,cg as Z1,ch as _f,ci as zI,cj as o7,ck as eS,cl as $x,cm as qh,cn as FI,co as Do,cp as gd,cq as Sc,cr as Lx,cs as BI,ct as Gp,cu as zx,cv as s7,cw as HI,cx as Uv,cy as gg,cz as a7,cA as WI,cB as eb,cC as tb,cD as VI,cE as i7,cF as nb,cG as l7,cH as rb,cI as c7,cJ as ob,cK as u7,cL as UI,cM as d7,cN as GI,cO as qI,cP as f7,cQ as KI,cR as Fx,cS as Bx,cT as Hx,cU as Wx,cV as vg,cW as Vx,cX as ni,cY as QI,cZ as XI,c_ as Ux,c$ as YI,d0 as p7,d1 as vd,d2 as di,d3 as JI,d4 as ZI,d5 as tS,d6 as Gx,d7 as eP,d8 as qx,d9 as Kx,da as tP,db as Rr,dc as h7,dd as to,de as m7,df as Ru,dg as bg,dh as Qx,di as nP,dj as rP,dk as g7,dl as v7,dm as b7,dn as Kh,dp as oP,dq as sP,dr as x7,ds as y7,dt as C7,du as w7,dv as S7,dw as k7,dx as j7,dy as _7,dz as nS,dA as Xx,dB as I7,dC as P7,dD as If,dE as E7,dF as M7,dG as xg,dH as O7,dI as A7,dJ as R7,dK as D7,dL as xr,dM as T7,dN as N7,dO as $7,dP as L7,dQ as z7,dR as F7,dS as rr,dT as Jd,dU as rS,dV as aa,dW as aP,dX as B7,dY as Yx,dZ as H7,d_ as oS,d$ as W7,e0 as V7,e1 as U7,e2 as iP,e3 as G7,e4 as q7,e5 as K7,e6 as Q7,e7 as X7,e8 as Y7,e9 as lP,ea as J7,eb as Z7,ec as sS,ed as eT,ee as tT,ef as nT,eg as rT,eh as oT,ei as sT,ej as aT,ek as cP,el as iT,em as lT,en as cT,eo as aS,ep as qp,eq as Fs,er as uT,es as dT,et as fT,eu as pT,ev as hT,ew as mT,ex as na,ey as gT,ez as vT,eA as bT,eB as xT,eC as yT,eD as CT,eE as wT,eF as ST,eG as kT,eH as jT,eI as _T,eJ as IT,eK as PT,eL as ET,eM as MT,eN as OT,eO as AT,eP as RT,eQ as DT,eR as TT,eS as NT,eT as $T,eU as LT,eV as zT,eW as FT,eX as iS,eY as uP,eZ as BT,e_ as Ys,e$ as Zd,f0 as Ro,f1 as HT,f2 as WT,f3 as dP,f4 as fP,f5 as VT,f6 as lS,f7 as UT,f8 as cS,f9 as uS,fa as dS,fb as GT,fc as qT,fd as fS,fe as pS,ff as KT,fg as QT,fh as Qh,fi as XT,fj as hS,fk as mS,fl as YT,fm as JT,fn as pP,fo as ZT,fp as eN,fq as hP,fr as tN,fs as nN,ft as gS,fu as rN,fv as vS,fw as oN,fx as sN,fy as mP,fz as gP,fA as Pf,fB as vP,fC as Al,fD as bP,fE as bS,fF as aN,fG as iN,fH as xP,fI as lN,fJ as cN,fK as uN,fL as dN,fM as fN,fN as Jx,fO as sb,fP as pN,fQ as hN,fR as mN,fS as yP,fT as Zx,fU as CP,fV as ey,fW as wP,fX as gN,fY as oi,fZ as vN,f_ as SP,f$ as Du,g0 as bN,g1 as ty,g2 as kP,g3 as xN,g4 as yN,g5 as CN,g6 as wN,g7 as SN,g8 as kN,g9 as Ed,ga as Uc,gb as xS,gc as jN,gd as _N,ge as IN,gf as PN,gg as EN,gh as MN,gi as ON,gj as yS,gk as AN,gl as RN,gm as DN,gn as TN
M${A.x},${A.y}h${A.width}v${A.height}h${-A.width}z`,fill:d,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})))}RP.displayName="MiniMap";var U$=l.memo(RP),ra;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ra||(ra={}));function G$({color:e,dimensions:t,lineWidth:n}){return z.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function q$({color:e,radius:t}){return z.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const K$={[ra.Dots]:"#91919a",[ra.Lines]:"#eee",[ra.Cross]:"#e2e2e2"},Q$={[ra.Dots]:1,[ra.Lines]:1,[ra.Cross]:6},X$=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function DP({id:e,variant:t=ra.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:c,className:d}){const p=l.useRef(null),{transform:h,patternId:m}=Bh(X$,Ex),g=i||K$[t],b=r||Q$[t],y=t===ra.Dots,x=t===ra.Cross,w=Array.isArray(n)?n:[n,n],S=[w[0]*h[2]||1,w[1]*h[2]||1],j=b*h[2],I=x?[j,j]:S,_=y?[j/s,j/s]:[I[0]/s,I[1]/s];return z.createElement("svg",{className:Px(["react-flow__background",d]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background"},z.createElement("pattern",{id:m+e,x:h[0]%S[0],y:h[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`},y?z.createElement(q$,{color:g,radius:j/s}):z.createElement(G$,{dimensions:I,color:g,lineWidth:o})),z.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`}))}DP.displayName="Background";var Y$=l.memo(DP);function J$(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Z$=J$();const TP=1/60*1e3,eL=typeof performance<"u"?()=>performance.now():()=>Date.now(),NP=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(eL()),TP);function tL(e){let t=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,c={schedule:(d,p=!1,h=!1)=>{const m=h&&o,g=m?t:n;return p&&i.add(d),g.indexOf(d)===-1&&(g.push(d),m&&o&&(r=t.length)),d},cancel:d=>{const p=n.indexOf(d);p!==-1&&n.splice(p,1),i.delete(d)},process:d=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let p=0;p<r;p++){const h=t[p];h(d),i.has(h)&&(c.schedule(h),e())}o=!1,s&&(s=!1,c.process(d))}};return c}const nL=40;let lb=!0,ef=!1,cb=!1;const eu={delta:0,timestamp:0},Mf=["read","update","preRender","render","postRender"],yg=Mf.reduce((e,t)=>(e[t]=tL(()=>ef=!0),e),{}),rL=Mf.reduce((e,t)=>{const n=yg[t];return e[t]=(r,o=!1,s=!1)=>(ef||aL(),n.schedule(r,o,s)),e},{}),oL=Mf.reduce((e,t)=>(e[t]=yg[t].cancel,e),{});Mf.reduce((e,t)=>(e[t]=()=>yg[t].process(eu),e),{});const sL=e=>yg[e].process(eu),$P=e=>{ef=!1,eu.delta=lb?TP:Math.max(Math.min(e-eu.timestamp,nL),1),eu.timestamp=e,cb=!0,Mf.forEach(sL),cb=!1,ef&&(lb=!1,NP($P))},aL=()=>{ef=!0,lb=!0,cb||NP($P)},AS=()=>eu;function Cg(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=l.Children.toArray(e.path),i=De((c,d)=>a.jsx(Gr,{ref:d,viewBox:t,...o,...c,children:s.length?s:a.jsx("path",{fill:"currentColor",d:n})}));return i.displayName=r,i}var iL=Object.defineProperty,lL=(e,t,n)=>t in e?iL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mr=(e,t,n)=>(lL(e,typeof t!="symbol"?t+"":t,n),n);function RS(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var cL=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function DS(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function TS(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var ub=typeof window<"u"?l.useLayoutEffect:l.useEffect,Jh=e=>e,uL=class{constructor(){Mr(this,"descendants",new Map),Mr(this,"register",e=>{if(e!=null)return cL(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Mr(this,"unregister",e=>{this.descendants.delete(e);const t=RS
`})}function IL(e){wf({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function $c(e){const{isOpen:t,isDisabled:n}=oy(),{reduceMotion:r}=sy(),o=kt("chakra-accordion__icon",e.className),s=wg(),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(Gr,{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"})})}$c.displayName="AccordionIcon";var Lc=De(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=SL(t),d={...wg().container,overflowAnchor:"none"},p=l.useMemo(()=>i,[i]);return a.jsx(vL,{value:p,children:a.jsx(Ae.div,{ref:n,...s,className:kt("chakra-accordion__item",o),__css:d,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});Lc.displayName="AccordionItem";var Gc={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Tl={enter:{duration:.2,ease:Gc.easeOut},exit:{duration:.1,ease:Gc.easeIn}},ii={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})},PL=e=>e!=null&&parseInt(e.toString(),10)>0,NS={exit:{height:{duration:.2,ease:Gc.ease},opacity:{duration:.3,ease:Gc.ease}},enter:{height:{duration:.3,ease:Gc.ease},opacity:{duration:.4,ease:Gc.ease}}},EL={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:PL(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:ii.exit(NS.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:ii.enter(NS.enter,o)}}},Af=l.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:c,className:d,transition:p,transitionEnd:h,...m}=e,[g,b]=l.useState(!1);l.useEffect(()=>{const j=setTimeout(()=>{b(!0)});return()=>clearTimeout(j)},[]),wf({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(s.toString())>0,x={startingHeight:s,endingHeight:i,animateOpacity:o,transition:g?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:y?"block":"none"}}},w=r?n:!0,S=n||r?"enter":"exit";return a.jsx(So,{initial:!1,custom:x,children:w&&a.jsx(Ar.div,{ref:t,...m,className:kt("chakra-collapse",d),style:{overflow:"hidden",display:"block",...c},custom:x,variants:EL,initial:r?"exit":!1,animate:S,exit:"exit"})})});Af.displayName="Collapse";var ML={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:ii.enter(Tl.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:ii.exit(Tl.exit,n),transitionEnd:t==null?void 0:t.exit}}},zP={initial:"exit",animate:"enter",exit:"exit",variants:ML},OL=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:i,transitionEnd:c,delay:d,...p}=t,h=o||r?"enter":"exit",m=r?o&&r:!0,g={transition:i,transitionEnd:c,delay:d};return a.jsx(So,{custom:g,children:m&&a.jsx(Ar.div,{ref:n,className:kt("chakra-fade",s),custom:g,...zP,animate:h,...p})})});OL.displayName="Fade";var AL={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(s=n==null?void 0:n.exit)!=null?s:ii.exit(Tl.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:ii.enter(Tl.enter,n),transitionEnd:e==null?void 0:e.enter}}},FP={initial:"exit",animate
.`.concat(iW,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(c,"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(c,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Eh,` {
right: `).concat(c,"px ").concat(r,`;
}
.`).concat(Mh,` {
margin-right: `).concat(c,"px ").concat(r,`;
}
.`).concat(Eh," .").concat(Eh,` {
right: 0 `).concat(r,`;
}
.`).concat(Mh," .").concat(Mh,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(lW,": ").concat(c,`px;
}
`)},yW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=l.useMemo(function(){return vW(o)},[o]);return l.createElement(bW,{styles:xW(s,!t,o,n?"":"!important")})},_b=!1;if(typeof window<"u")try{var Zp=Object.defineProperty({},"passive",{get:function(){return _b=!0,!0}});window.addEventListener("test",Zp,Zp),window.removeEventListener("test",Zp,Zp)}catch{_b=!1}var Pc=_b?{passive:!1}:!1,CW=function(e){return e.tagName==="TEXTAREA"},m3=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!CW(e)&&n[t]==="visible")},wW=function(e){return m3(e,"overflowY")},SW=function(e){return m3(e,"overflowX")},uk=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=g3(e,r);if(o){var s=v3(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kW=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},jW=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},g3=function(e,t){return e==="v"?wW(t):SW(t)},v3=function(e,t){return e==="v"?kW(t):jW(t)},_W=function(e,t){return e==="h"&&t==="rtl"?-1:1},IW=function(e,t,n,r,o){var s=_W(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,d=t.contains(c),p=!1,h=i>0,m=0,g=0;do{var b=v3(e,c),y=b[0],x=b[1],w=b[2],S=x-w-s*y;(y||S)&&g3(e,c)&&(m+=S,g+=y),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(h&&(o&&Math.abs(m)<1||!o&&i>m)||!h&&(o&&Math.abs(g)<1||!o&&-i>g))&&(p=!0),p},eh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dk=function(e){return[e.deltaX,e.deltaY]},fk=function(e){return e&&"current"in e?e.current:e},PW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},EW=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},MW=0,Ec=[];function OW(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(MW++)[0],s=l.useState(h3)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=Az([e.lockRef.current],(e.shards||[]).map(fk),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(x,w){if("touches"in x&&x.touches.length===2)return!i.current.allowPinchZoom;var S=eh(x),j=n.current,I="deltaX"in x?x.deltaX:j[0]-S[0],_="deltaY"in x?x.deltaY:j[1]-S[1],M,E=x.target,A=Math.abs(I)>Math.abs(_)?"h":"v";if("touches"in x&&A==="h"&&E.type==="range")return!1;var R=uk(A,E);if(!R)return!0;if(R?M=A:(M=A==="v"?"h":"v",R=uk(A,E)),!R)return!1;if(!r.current&&"changedTouches"in x&&(I||_)&&(r.current=M),!M)return!0;var D=r.current||M;return IW(D,w,x,D==="h"?I:_,!0)},[]),d=l.useCallback(function(x){var w=x;if(!(!Ec.length||Ec[Ec.length-1]!==s)){var S="deltaY"in w?dk(w):eh(w),j=t.current.filter(function(M){return M.name===w.type&&(M.target===w.target||w.target===M.shadowParent)&&PW(M.delta,S)})[0];if(j&&j.should){w.cancelable&&w.preventDefault();return}if(!j){var I=(i.current.shards||[]).map(fk).filter(Boolean).filter(function(M){return M.contains(w.target)}),_=I.length>0?c(w,I[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),p=l.useCallback(function(x,w,S,j){var I={name:x,delta:w,target:S,should:j,shadowParent:AW(S)};t.current.push(I),setTimeout(function(){t.current=t.current.filter(function(_){return _!==I})},1)},[]),h=l.useCallback(function(x){n.current=eh(x),r.current=void 0},[]),m=l.useCallback(function(x){p(x.type,dk(x),x.target,c(x,e.lockRef.current))},[]),g=l.useCallback(function(x){p(x.type,eh(x),x.target,c(x,e.lockRef.current))},[]);l.useEffect(function(){return Ec.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Pc),document.addEventListener("touchmove",d,Pc),document.addEventListener("touchstart",h,Pc),function(){Ec=Ec.filter(function(x){return x!==s}),document.removeEventListener("wheel",d,Pc),document.removeEventListener("touchmove",d,Pc),document.removeEventListener("touchstart",h,Pc)}},[]);var b=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(s,{styles:EW(o)}):null,b?l.createElement(yW,{gapMode:e.gapMode}):null)}function AW(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const RW=Rz(p3,OW);var b3=l.forwardRef(function(e,t){return l.createElement(Ag,wa({},e,{ref:t,sideCar:RW}))});b3.classNames=Ag.classNames;const DW=b3;function TW(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:c,returnFocusOnClose:d,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:m}=Kl(),[g,b]=hD();l.useEffect(()=>{!g&&b&&setTimeout(b)},[g,b]);const y=d3(r,m);return a.jsx(F5,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:c,restoreFocus:d,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(DW,{removeScrollBar:!p,allowPinchZoom:i,enabled:y===1&&s,forwardProps:!0,children:e.children})})}var bu=De((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:c,getDialogContainerProps:d}=Kl(),p=c(i,t),h=d(o),m=kt("chakra-modal__content",n),g=Nu(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...g.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...g.dialogContainer},{motionPreset:x}=Kl();return a.jsx(TW,{children:a.jsx(Ae.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:y,children:a.jsx(u3,{preset:x,motionProps:s,className:m,...p,__css:b,children:r})})})});bu.displayName="ModalContent";function Wf(e){const{least
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $U(e){if(Array.isArray(e))return Db(e)}function Sk(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 kk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sk(Object(n),!0).forEach(function(r){J3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lf(e,t){return FU(e)||zU(e,t)||Z3(e,t)||LU()}function LU(){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 Z3(e,t){if(e){if(typeof e=="string")return Db(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 Db(e,t)}}function Db(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 zU(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,c;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,c=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function FU(e){if(Array.isArray(e))return e}var BU="file-invalid-type",HU="file-too-large",WU="file-too-small",VU="too-many-files",UU=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:BU,message:"File type must be ".concat(n)}},jk=function(t){return{code:HU,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},_k=function(t){return{code:WU,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},GU={code:VU,message:"Too many files"};function e6(e,t){var n=e.type==="application/x-moz-file"||DU(e,t);return[n,n?null:UU(t)]}function t6(e,t,n){if(Ml(e.size))if(Ml(t)&&Ml(n)){if(e.size>n)return[!1,jk(n)];if(e.size<t)return[!1,_k(t)]}else{if(Ml(t)&&e.size<t)return[!1,_k(t)];if(Ml(n)&&e.size>n)return[!1,jk(n)]}return[!0,null]}function Ml(e){return e!=null}function qU(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,c=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(d){var p=e6(d,n),h=lf(p,1),m=h[0],g=t6(d,r,o),b=lf(g,1),y=b[0],x=c?c(d):null;return m&&y&&!x})}function am(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function nh(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 Ik(e){e.preventDefault()}function KU(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function QU(e){return e.indexOf("Edge/")!==-1}function XU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return KU(e)||QU(e)}function ya(){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(c){return!am(r)&&c&&c.apply(void 0,[r].concat(s)),am(r)})}}function YU(){return"showOpenFilePicker"in window}function JU(e){if(Ml(e)){var t=Object.entries(e).filter(function(n){var r=lf(n,2),o=r[0],s=r[1],i=!0;return n6(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(r6))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=lf(r,2),s=o[0],i=o[1];return kk(kk({},n),{},J3({},s,i))},{});return[{description:"Files",accept:t}]}return e}function ZU(e){if(Ml(e))return Object.entries(e).reduce(function(t,n){var r=lf(n,2),o=r[0],s=r[1];return[].concat(wk(t),[o],wk(s))},[]).filter(function(t){return n6(t)||r6(t)}).join(",")}function eG(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function tG(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function n6(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function r6(e){return/^.*\.[\w]+$/.test(e)}var nG=["children"],rG=["open"],oG=["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 lG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cG(e){if(Array.isArray(e))return Tb(e)}function f1(e,t){return fG(e)||dG(e,t)||o6(e,t)||uG()}function uG(){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 o6(e,t){if(e){if(typeof e=="string")return Tb(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 Tb(e,t)}}function Tb(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 dG(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,c;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,c=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function fG(e){if(Array.isArray(e))return e}function Pk(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 kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pk(Object(n),!0).forEach(function(r){Nb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function im(e,t){if(e==null)return{};var n=pG(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 pG(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 By=l.forwardRef(function(e,t){var n=e.children,r=im(e,nG),o=Hy(r),s=o.open,i=im(o,rG);return l.useImperativeHandle(t,function(){return{open:s}},[s]),z.createElement(l.Fragment,null,n(kr(kr({},i),{},{open:s})))});By.displayName="Dropzone";var s6={disabled:!1,getFilesFromEvent:jU,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};By.defaultProps=s6;By.propTypes={children:nr.func,accept:nr.objectOf(nr.arrayOf(nr.string)),multiple:nr.bool,preventDropOnDocument:nr.bool,noClick:nr.bool,noKeyboard:nr.bool,noDrag:nr.bool,noDragEventsBubbling:nr.bool,minSize:nr.number,maxSize:nr.number,maxFiles:nr.number,disabled:nr.bool,getFilesFromEvent:nr.func,onFileDialogCancel:nr.func,onFileDialogOpen:nr.func,useFsAccessApi:nr.bool,autoFocus:nr.bool,onDragEnter:nr.func,onDragLeave:nr.func,onDragOver:nr.func,onDrop:nr.func,onDropAccepted:nr.func,onDropRejected:nr.func,onError:nr.func,validator:nr.func};var $b={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Hy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=kr(kr({},s6),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,c=t.multiple,d=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,g=t.onDrop,b=t.onDropAccepted,y=t.onDropRejected,x=t.onFileDialogCancel,w=t.onFileDialogOpen,S=t.useFsAccessApi,j=t.autoFocus,I=t.preventDropOnDocument,_=t.noClick,M=t.noKeyboard,E=t.noDrag,A=t.noDragEventsBubbling,R=t.onError,D=t.validator,O=l.useMemo(function(){return ZU(n)},[n]),T=l.useMemo(function(){return JU(n)},[n]),K=l.useMemo(function(){return typeof w=="function"?w:Ek},[w]),G=l.useMemo(function(){return typeof x=="function"?x:Ek},[x]),X=l.useRef(null),Z=l.useRef(null),te=l.useReducer(hG,$b),V=f1(te,2),oe=V[0],ne=V[1],se=oe.isFocused,re=oe.isFileDialogActive,ae=l.useRef(typeof window<"u"&&window.isSecureContext&&S&&YU()),B=function(){!ae.current&&re&&setTimeout(function(){if(Z.current){var Fe=Z.current.files;Fe.length||(ne({type:"closeDialog"}),G())}},300)};l.useEffect
`),status:"error"})},[s,o]),h=l.useCallback(async _=>{d({file:_,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,d]),m=l.useCallback((_,M)=>{if(M.length>1){o({title:s("toast.uploadFailed"),description:s("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}M.forEach(E=>{p(E)}),_.forEach(E=>{h(E)})},[s,o,h,p]),g=l.useCallback(()=>{c(!0)},[]),{getRootProps:b,getInputProps:y,isDragAccept:x,isDragReject:w,isDragActive:S,inputRef:j}=Hy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:m,onDragOver:g,multiple:!1});l.useEffect(()=>{const _=async M=>{var E,A;j.current&&(E=M.clipboardData)!=null&&E.files&&(j.current.files=M.clipboardData.files,(A=j.current)==null||A.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[j]);const I=l.useCallback(_=>{_.key},[]);return a.jsxs(Le,{...b({style:{}}),onKeyDown:I,children:[a.jsx("input",{...y()}),t,a.jsx(So,{children:S&&i&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(EG,{isDragAccept:x,isDragReject:w,setIsHandlingUpload:c})},"image-upload-overlay")})]})},AG=l.memo(OG),RG=De((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...i}={},isChecked:c,...d}=e;return a.jsx(Wn,{label:r,placement:o,hasArrow:s,...i,children:a.jsx(nl,{ref:t,colorScheme:c?"accent":"base",...d,children:n})})}),Dt=l.memo(RG);function DG(e){const t=l.createContext(null);return[({children:o,value:s})=>z.createElement(t.Provider,{value:s},o),()=>{const o=l.useContext(t);if(o===null)throw new Error(e);return o}]}function d6(e){return Array.isArray(e)?e:[e]}const TG=()=>{};function NG(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||TG:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function f6({data:e}){const t=[],n=[],r=e.reduce((o,s,i)=>(s.group?o[s.group]?o[s.group].push(i):o[s.group]=[i]:n.push(i),o),{});return Object.keys(r).forEach(o=>{t.push(...r[o].map(s=>e[s]))}),t.push(...n.map(o=>e[o])),t}function p6(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==z.Fragment:!1}function h6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=h6(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function m6(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=h6(t))&&(r&&(r+=" "),r+=n);return r}const $G={app:100,modal:200,popover:300,overlay:400,max:9999};function Vy(e){return $G[e]}function LG(e,t){const n=l.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const zG=yD({key:"mantine",prepend:!0});function FG(){return OP()||zG}var BG=Object.defineProperty,Ok=Object.getOwnPropertySymbols,HG=Object.prototype.hasOwnProperty,WG=Object.prototype.propertyIsEnumerable,Ak=(e,t,n)=>t in e?BG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VG=(e,t)=>{for(var n in t||(t={}))HG.call(t,n)&&Ak(e,n,t[n]);if(Ok)for(var n of Ok(t))WG.call(t,n)&&Ak(e,n,t[n]);return e};const m1="ref";function UG(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(m1 in n))return{args:e,ref:t};t=n[m1];const r=VG({},n);return delete r[m1],{args:[r],ref:t}}const{cssFactory:GG}=(()=>{function e(n,r,o){const s=[],i=SD(n,s,o);return s.length<2?o:i+r(s)}function t(n){const{cache:r}=n,o=(...i)=>{const{ref:c,args:d}=UG(i),p=CD(d,r.registered);return wD(r,p,!1),`${r.key}-${p.name}${c===void 0?"":` ${c}`}`};return{css:o,cx:(...i)=>e(r.registered,o,m6(i))}}return{cssFactory:t}})();function g6(){const e=FG();return LG(()=>GG({cache:e}),[e])}function qG({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const i=n.reduce((c,d)=>(Object.keys(d.classNames).forEach(p=>{typeof c[p]!="string"?c[p]=`${d.c
* OverlayScrollbars
* Version: 2.4.4
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
*/const Js=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const c=(h,m)=>{const g=s,b=h,y=m||(r?!r(g,b):g!==b);return(y||o)&&(s=b,i=g),[s,y,i]};return[t?h=>c(t(s,i),h):c,h=>[s,!!h,i]]},c2=typeof window<"u",iO=c2&&Node.ELEMENT_NODE,{toString:_te,hasOwnProperty:w1}=Object.prototype,Ite=/^\[object (.+)\]$/,fl=e=>e===void 0,l0=e=>e===null,Pte=e=>fl(e)||l0(e)?`${e}`:_te.call(e).replace(Ite,"$1").toLowerCase(),Ea=e=>typeof e=="number",Zf=e=>typeof e=="string",lO=e=>typeof e=="boolean",Ta=e=>typeof e=="function",$s=e=>Array.isArray(e),df=e=>typeof e=="object"&&!$s(e)&&!l0(e),c0=e=>{const t=!!e&&e.length,n=Ea(t)&&t>-1&&t%1==0;return $s(e)||!Ta(e)&&n?t>0&&df(e)?t-1 in e:!0:!1},qm=e=>{if(!e||!df(e)||Pte(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=w1.call(e,n),i=o&&w1.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return fl(t)||w1.call(e,t)},Wd=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===iO:!1},u0=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===iO:!1};function Xn(e,t){if(c0(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&Xn(Object.keys(e),n=>t(e[n],n,e));return e}const d0=(e,t)=>e.indexOf(t)>=0,Qi=(e,t)=>e.concat(t),Qn=(e,t,n)=>(!n&&!Zf(t)&&c0(t)?Array.prototype.push.apply(e,t):e.push(t),e),Vu=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Qn(n,r)}):Xn(e,r=>{Qn(n,r)}),n)},Km=e=>!!e&&!e.length,Dj=e=>Vu(new Set(e)),Ls=(e,t,n)=>{Xn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},f0=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),gi=e=>e?Object.keys(e):[],Bn=(e,t,n,r,o,s,i)=>{const c=[t,n,r,o,s,i];return(typeof e!="object"||l0(e))&&!Ta(e)&&(e={}),Xn(c,d=>{Xn(d,(p,h)=>{const m=d[h];if(e===m)return!0;const g=$s(m);if(m&&qm(m)){const b=e[h];let y=b;g&&!$s(b)?y=[]:!g&&!qm(b)&&(y={}),e[h]=Bn(y,m)}else e[h]=g?m.slice():m})}),e},cO=(e,t)=>Xn(Bn({},e),(n,r,o)=>{n===void 0?delete o[r]:t&&n&&qm(n)&&(o[r]=cO(n,t))}),u2=e=>{for(const t in e)return!1;return!0},Mo=(e,t,n)=>{if(fl(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},uO=(e,t)=>new Set((Mo(e,t)||"").split(" ")),Wo=(e,t)=>{e&&e.removeAttribute(t)},zl=(e,t,n,r)=>{if(n){const o=uO(e,t);o[r?"add":"delete"](n);const s=Vu(o).join(" ").trim();Mo(e,t,s)}},Ete=(e,t,n)=>uO(e,t).has(n),Xb=c2&&Element.prototype,dO=(e,t)=>{const n=[],r=t?u0(t)&&t:document;return r?Qn(n,r.querySelectorAll(e)):n},Mte=(e,t)=>{const n=t?u0(t)&&t:document;return n?n.querySelector(e):null},Qm=(e,t)=>u0(e)?(Xb.matches||Xb.msMatchesSelector).call(e,t):!1,Yb=e=>e?Vu(e.childNodes):[],li=e=>e&&e.parentElement,Kc=(e,t)=>{if(u0(e)){const n=Xb.closest;if(n)return n.call(e,t);do{if(Qm(e,t))return e;e=li(e)}while(e)}},Ote=(e,t,n)=>{const r=Kc(e,t),o=e&&Mte(n,r),s=Kc(o,t)===r;return r&&o?r===e||o===e||s&&Kc(Kc(e,n),t)!==r:!1},As=()=>{},ci=e=>{if(c0(e))Xn(Vu(e),t=>ci(t));else if(e){const t=li(e);t&&t.removeChild(e)}},d2=(e,t,n)=>{if(n&&e){let r=t,o;return c0(n)?(o=document.createDocumentFragment(),Xn(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),()=>ci(n)}return As},_s=(e,t)=>d2(e,null,t),Ate=(e,t)=>d2(li(e),e,t),Tj=(e,t)=>d2(li(e),e&&e.nextSibling,t),Fl=e=>{const t=document.createElement("div");return Mo(t,"class",e),t},fO=e=>{const t=Fl();return t.innerHTML=e.trim(),Xn(Yb(t),n=>ci(n))},Yo=c2?window:{},Vd=Math.max,Rte=Math.min,ff=Math.round,pO=Yo.cancelAnimationFrame,hO=Yo.requestAnimationFrame,Xm=Yo.setTimeout,Jb=Yo.clearTimeout,Zb=e=>e.charAt(0).toUpperCase()+e.slice(1),Dte=()=>Fl().style,Tte=["-webkit-","-moz-","-o-","-ms-"],Nte=["WebKit","Moz","O","MS","webkit","moz","o","ms"],S1={},k1={},$te=e=>{let t=k1[e];if(f0(k1,e))return t;const n=Zb(e),r=Dte();return Xn(Tte,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,Zb(s)+n].find(c=>r[c]!==void 0))}),k1[e]=t||""},p0=e=>{let t=S1[e]||Yo[e];return f0(S1,e)||(Xn(Nte,n=>(t=t||Yo[n+Zb(e)],!t)),S1[e]=t),t},Lte=p0("MutationObserver"),Nj=p0("IntersectionObserver"),Ym=p0("ResizeObserver"),ex=p0("ScrollTimeline"),Gt=(e,...t)=>e.bind(0,...t),El=e=>{let t;const n=e?Xm:hO,r=e?Jb:pO;return[o=>{r
Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.
See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}}}({queryThunk:et,mutationThunk:Et,api:ie,serializeQueryArgs:pt,context:xe}),Hr=hn.buildInitiateQuery,pr=hn.buildInitiateMutation;return Br(ie.util,{getRunningOperationPromises:hn.getRunningOperationPromises,getRunningOperationPromise:hn.removalWarning,getRunningMutationThunk:hn.getRunningMutationThunk,getRunningMutationsThunk:hn.getRunningMutationsThunk,getRunningQueryThunk:hn.getRunningQueryThunk,getRunningQueriesThunk:hn.getRunningQueriesThunk}),{name:gs,injectEndpoint:function(Tt,zn){var Gn,hr=ie;(Gn=hr.endpoints)[Tt]!=null||(Gn[Tt]={}),W(zn)?Br(hr.endpoints[Tt],{name:Tt,select:Jt(Tt,zn),initiate:Hr(Tt,zn)},an(et,Tt)):zn.type===F.mutation&&Br(hr.endpoints[Tt],{name:Tt,select:yn(),initiate:pr(Tt)},an(Et,Tt))}}}}},fa=ft(Ga())})(FO);zO.exports=FO;var zs=zO.exports;const Fne=e=>{const{boardToDelete:t,setBoardToDelete:n}=e,{t:r}=Q(),o=H(j=>j.config.canRestoreDeletedImagesFromBin),{currentData:s,isFetching:i}=KD((t==null?void 0:t.board_id)??zs.skipToken),c=l.useMemo(()=>me([we],j=>{const I=(s??[]).map(M=>MI(j,M));return{imageUsageSummary:{isInitialImage:ta(I,M=>M.isInitialImage),isCanvasImage:ta(I,M=>M.isCanvasImage),isNodesImage:ta(I,M=>M.isNodesImage),isControlImage:ta(I,M=>M.isControlImage)}}}),[s]),[d,{isLoading:p}]=QD(),[h,{isLoading:m}]=XD(),{imageUsageSummary:g}=H(c),b=l.useCallback(()=>{t&&(d(t.board_id),n(void 0))},[t,d,n]),y=l.useCallback(()=>{t&&(h(t.board_id),n(void 0))},[t,h,n]),x=l.useCallback(()=>{n(void 0)},[n]),w=l.useRef(null),S=l.useMemo(()=>m||p||i,[m,p,i]);return t?a.jsx(Wf,{isOpen:!!t,onClose:x,leastDestructiveRef:w,isCentered:!0,children:a.jsx(Aa,{children:a.jsxs(Vf,{children:[a.jsxs(Oa,{fontSize:"lg",fontWeight:"bold",children:[r("controlnet.delete")," ",t.board_name]}),a.jsx(Ra,{children:a.jsxs(N,{direction:"column",gap:3,children:[i?a.jsx(Wg,{children:a.jsx(N,{sx:{w:"full",h:32}})}):a.jsx(zM,{imageUsage:g,topMessage:r("boards.topMessage"),bottomMessage:r("boards.bottomMessage")}),a.jsx(je,{children:r("boards.deletedBoardsCannotbeRestored")}),a.jsx(je,{children:r(o?"gallery.deleteImageBin":"gallery.deleteImagePermanent")})]})}),a.jsx(pi,{children:a.jsxs(N,{sx:{justifyContent:"space-between",width:"full",gap:2},children:[a.jsx(Dt,{ref:w,onClick:x,children:r("boards.cancel")}),a.jsx(Dt,{colorScheme:"warning",isLoading:S,onClick:b,children:r("boards.deleteBoardOnly")}),a.jsx(Dt,{colorScheme:"error",isLoading:S,onClick:y,children:r("boards.deleteBoardAndImages")})]})})]})})}):null},Bne=l.memo(Fne),Hne=()=>{const{t:e}=Q(),[t,{isLoading:n}]=YD(),r=e("boards.myBoard"),o=l.useCallback(()=>{t(r)},[t,r]);return a.jsx(rt,{icon:a.jsx(Zi,{}),isLoading:n,tooltip:e("boards.addBoard"),"aria-label":e("boards.addBoard"),onClick:o,size:"sm","data-testid":"add-board-button"})},Wne=l.memo(Hne);var BO=Cg({displayName:"ExternalLinkIcon",path:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[a.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.jsx("path",{d:"M15 3h6v6"}),a.jsx("path",{d:"M10 14L21 3"})]})}),b0=Cg({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),Vne=Cg({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),Une=Cg({displayName:"DeleteIcon",path:a.jsx("g",{fill:"currentColor",children:a.jsx("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});const G
* @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 x0e=function(t){var n={},r=l,o=Ih,s=Object.assign;function i(u){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+u,v=1;v<arguments.length;v++)f+="&args[]="+encodeURIComponent(arguments[v]);return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=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"),m=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),y=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),M=Symbol.iterator;function E(u){return u===null||typeof u!="object"?null:(u=M&&u[M]||u["@@iterator"],typeof u=="function"?u:null)}function A(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case h:return"Fragment";case p:return"Portal";case g:return"Profiler";case m:return"StrictMode";case w:return"Suspense";case S:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case y:return(u.displayName||"Context")+".Consumer";case b:return(u._context.displayName||"Context")+".Provider";case x:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case j:return f=u.displayName||null,f!==null?f:A(u.type)||"Memo";case I:f=u._payload,u=u._init;try{return A(u(f))}catch{}}return null}function R(u){var f=u.type;switch(u.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=f.render,u=u.displayName||u.name||"",f.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return A(f);case 8:return f===m?"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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function D(u){var f=u,v=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,f.flags&4098&&(v=f.return),u=f.return;while(u)}return f.tag===3?v:null}function O(u){if(D(u)!==u)throw Error(i(188))}function T(u){var f=u.alternate;if(!f){if(f=D(u),f===null)throw Error(i(188));return f!==u?null:u}for(var v=u,C=f;;){var k=v.return;if(k===null)break;var P=k.alternate;if(P===null){if(C=k.return,C!==null){v=C;continue}break}if(k.child===P.child){for(P=k.child;P;){if(P===v)return O(k),u;if(P===C)return O(k),f;P=P.sibling}throw Error(i(188))}if(v.return!==C.return)v=k,C=P;else{for(var L=!1,ce=k.child;ce;){if(ce===v){L=!0,v=k,C=P;break}if(ce===C){L=!0,C=k,v=P;break}ce=ce.sibling}if(!L){for(ce=P.child;ce;){if(ce===v){L=!0,v=P,C=k;break}if(ce===C){L=!0,C=P,v=k;break}ce=ce.sibling}if(!L)throw Error(i(189))}}if(v.alternate!==C)throw Error(i(190))}if(v.tag!==3)throw Error(i(188));return v.stateNode.current===v?u:f}function K(u){return u=T(u),u!==null?G(u):null}function G(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var f=G(u);if(f!==null)return f;u=u.sibling}return null}function X(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){if(u.tag!==4){var f=X(u);if(f!==null)return f}u=u.sibling}return null}var Z=Array.isArray,te=t.getPublicInstance,V=t.getRootHostContext,oe=t.getChildHostContext,ne=t.prepareForCommit,se=t.resetAfterCommit,re=t.createInstance,ae=t.appendInitialChild,B=t.finalizeInitialChildren,Y=t.prepareUpdate,$=t.shouldSetTextContent,F=t.createTextInstance,q=t.scheduleTimeout,pe=t.cancelTimeout,W=t.noTimeout,U=t.isPrimaryRenderer,ee=t.supportsMutation,J=t.supportsPersistence,ge=t.supportsHydrat
`+$t+u}var tn=!1;function ln(u,f){if(!u||tn)return"";tn=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(We){var C=We}Reflect.construct(u,[],f)}else{try{f.call()}catch(We){C=We}u.call(f.prototype)}else{try{throw Error()}catch(We){C=We}u()}}catch(We){if(We&&C&&typeof We.stack=="string"){for(var k=We.stack.split(`
`),P=C.stack.split(`
`),L=k.length-1,ce=P.length-1;1<=L&&0<=ce&&k[L]!==P[ce];)ce--;for(;1<=L&&0<=ce;L--,ce--)if(k[L]!==P[ce]){if(L!==1||ce!==1)do if(L--,ce--,0>ce||k[L]!==P[ce]){var be=`
`+k[L].replace(" at new "," at ");return u.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",u.displayName)),be}while(1<=L&&0<=ce);break}}}finally{tn=!1,Error.prepareStackTrace=v}return(u=u?u.displayName||u.name:"")?Ut(u):""}var an=Object.prototype.hasOwnProperty,Yt=[],Ve=-1;function Ct(u){return{current:u}}function Ft(u){0>Ve||(u.current=Yt[Ve],Yt[Ve]=null,Ve--)}function Qt(u,f){Ve++,Yt[Ve]=u.current,u.current=f}var Ln={},Jt=Ct(Ln),yn=Ct(!1),hn=Ln;function Hr(u,f){var v=u.type.contextTypes;if(!v)return Ln;var C=u.stateNode;if(C&&C.__reactInternalMemoizedUnmaskedChildContext===f)return C.__reactInternalMemoizedMaskedChildContext;var k={},P;for(P in v)k[P]=f[P];return C&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=f,u.__reactInternalMemoizedMaskedChildContext=k),k}function pr(u){return u=u.childContextTypes,u!=null}function Tt(){Ft(yn),Ft(Jt)}function zn(u,f,v){if(Jt.current!==Ln)throw Error(i(168));Qt(Jt,f),Qt(yn,v)}function Gn(u,f,v){var C=u.stateNode;if(f=f.childContextTypes,typeof C.getChildContext!="function")return v;C=C.getChildContext();for(var k in C)if(!(k in f))throw Error(i(108,R(u)||"Unknown",k));return s({},v,C)}function hr(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Ln,hn=Jt.current,Qt(Jt,u),Qt(yn,yn.current),!0}function Pr(u,f,v){var C=u.stateNode;if(!C)throw Error(i(169));v?(u=Gn(u,f,hn),C.__reactInternalMemoizedMergedChildContext=u,Ft(yn),Ft(Jt),Qt(Jt,u)):Ft(yn),Qt(yn,v)}var er=Math.clz32?Math.clz32:An,qn=Math.log,Cn=Math.LN2;function An(u){return u>>>=0,u===0?32:31-(qn(u)/Cn|0)|0}var Rn=64,jn=4194304;function Fn(u){switch(u&-u){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 u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function Zt(u,f){var v=u.pendingLanes;if(v===0)return 0;var C=0,k=u.suspendedLanes,P=u.pingedLanes,L=v&268435455;if(L!==0){var ce=L&~k;ce!==0?C=Fn(ce):(P&=L,P!==0&&(C=Fn(P)))}else L=v&~k,L!==0?C=Fn(L):P!==0&&(C=Fn(P));if(C===0)return 0;if(f!==0&&f!==C&&!(f&k)&&(k=C&-C,P=f&-f,k>=P||k===16&&(P&4194240)!==0))return f;if(C&4&&(C|=v&16),f=u.entangledLanes,f!==0)for(u=u.entanglements,f&=C;0<f;)v=31-er(f),k=1<<v,C|=u[v],f&=~k;return C}function vt(u,f){switch(u){case 1:case 2:case 4:return f+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 f+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 Mt(u,f){for(var v=u.suspendedLanes,C=u.pingedLanes,k=u.expirationTimes,P=u.pendingLanes;0<P;){var L=31-er(P),ce=1<<L,be=k[L];be===-1?(!(ce&v)||ce&C)&&(k[L]=vt(ce,f)):be<=f&&(u.expiredLanes|=ce),P&=~ce}}function nt(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function mt(){var u=Rn;return Rn<<=1,!(Rn&4194240)&&(Rn=64),u}function St(u){for(var f=[],v=0;31>v;v++)f.push(u);return f}function Bt(u,f,v){u.pendingLanes|=f,f!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,f=31-er(f),u[f]=v}function Ue(u,f){var v=u.pendingLanes&~f;u.pendingLanes=f,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=f,u.mutableReadLanes&=f,u.entangledLanes&=f,f=u.entanglements;var C=u.eventTimes;for(u=u.expirationTimes;0<v;){var k=31-er(v),P=1<<k;f[k]=0,C[k]=-1,u[k]=-1,v&=~P}}function Be(u,f){var v=u.entangledLanes|=f;for(u=u.entanglements;v;){var C=31-er(v),k=1<<C;k&f|u[C]&f&&(u[C]|=f),v&=~k}}var Oe=0;function $e(u){return u&=-u,1<u?4<u?u&268435455?16:536870912:4:1}var Ne=o.unstable_scheduleCallback,Ke=o.unstable_cancelCallback,
Error generating stack: `+P.message+`
`+P.stack}return{value:u,source:f,stack:k,digest:null}}function dv(u,f,v){return{value:u,source:null,stack:v??null,digest:f??null}}function fv(u,f){try{console.error(f.value)}catch(v){setTimeout(function(){throw v})}}var jR=typeof WeakMap=="function"?WeakMap:Map;function QC(u,f,v){v=Qa(-1,v),v.tag=3,v.payload={element:null};var C=f.value;return v.callback=function(){Dp||(Dp=!0,Av=C),fv(u,f)},v}function XC(u,f,v){v=Qa(-1,v),v.tag=3;var C=u.type.getDerivedStateFromError;if(typeof C=="function"){var k=f.value;v.payload=function(){return C(k)},v.callback=function(){fv(u,f)}}var P=u.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(v.callback=function(){fv(u,f),typeof C!="function"&&(Ti===null?Ti=new Set([this]):Ti.add(this));var L=f.stack;this.componentDidCatch(f.value,{componentStack:L!==null?L:""})}),v}function YC(u,f,v){var C=u.pingCache;if(C===null){C=u.pingCache=new jR;var k=new Set;C.set(f,k)}else k=C.get(f),k===void 0&&(k=new Set,C.set(f,k));k.has(v)||(k.add(v),u=zR.bind(null,u,f,v),f.then(u,u))}function JC(u){do{var f;if((f=u.tag===13)&&(f=u.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return u;u=u.return}while(u!==null);return null}function ZC(u,f,v,C,k){return u.mode&1?(u.flags|=65536,u.lanes=k,u):(u===f?u.flags|=65536:(u.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(f=Qa(-1,1),f.tag=2,Di(v,f,1))),v.lanes|=1),u)}var _R=c.ReactCurrentOwner,zo=!1;function Po(u,f,v,C){f.child=u===null?_C(f,null,v,C):mc(f,u.child,v,C)}function ew(u,f,v,C,k){v=v.render;var P=f.ref;return hc(f,k),C=sv(u,f,v,C,P,k),v=av(),u!==null&&!zo?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~k,Xa(u,f,k)):(mr&&v&&F0(f),f.flags|=1,Po(u,f,C,k),f.child)}function tw(u,f,v,C,k){if(u===null){var P=v.type;return typeof P=="function"&&!Lv(P)&&P.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(f.tag=15,f.type=P,nw(u,f,P,C,k)):(u=Fp(v.type,null,C,f,f.mode,k),u.ref=f.ref,u.return=f,f.child=u)}if(P=u.child,!(u.lanes&k)){var L=P.memoizedProps;if(v=v.compare,v=v!==null?v:lp,v(L,C)&&u.ref===f.ref)return Xa(u,f,k)}return f.flags|=1,u=zi(P,C),u.ref=f.ref,u.return=f,f.child=u}function nw(u,f,v,C,k){if(u!==null){var P=u.memoizedProps;if(lp(P,C)&&u.ref===f.ref)if(zo=!1,f.pendingProps=C=P,(u.lanes&k)!==0)u.flags&131072&&(zo=!0);else return f.lanes=u.lanes,Xa(u,f,k)}return pv(u,f,v,C,k)}function rw(u,f,v){var C=f.pendingProps,k=C.children,P=u!==null?u.memoizedState:null;if(C.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qt(yc,ss),ss|=v;else{if(!(v&1073741824))return u=P!==null?P.baseLanes|v:v,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:u,cachePool:null,transitions:null},f.updateQueue=null,Qt(yc,ss),ss|=u,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},C=P!==null?P.baseLanes:v,Qt(yc,ss),ss|=C}else P!==null?(C=P.baseLanes|v,f.memoizedState=null):C=v,Qt(yc,ss),ss|=C;return Po(u,f,k,v),f.child}function ow(u,f){var v=f.ref;(u===null&&v!==null||u!==null&&u.ref!==v)&&(f.flags|=512,f.flags|=2097152)}function pv(u,f,v,C,k){var P=pr(v)?hn:Jt.current;return P=Hr(f,P),hc(f,k),v=sv(u,f,v,C,P,k),C=av(),u!==null&&!zo?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~k,Xa(u,f,k)):(mr&&C&&F0(f),f.flags|=1,Po(u,f,v,k),f.child)}function sw(u,f,v,C,k){if(pr(v)){var P=!0;hr(f)}else P=!1;if(hc(f,k),f.stateNode===null)wp(u,f),wC(f,v,C),J0(f,v,C,k),C=!0;else if(u===null){var L=f.stateNode,ce=f.memoizedProps;L.props=ce;var be=L.context,We=v.contextType;typeof We=="object"&&We!==null?We=xs(We):(We=pr(v)?hn:Jt.current,We=Hr(f,We));var xt=v.getDerivedStateFromProps,on=typeof xt=="function"||typeof L.getSnapshotBeforeUpdate=="function";on||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(ce!==C||be!==We)&&SC(f,L,C,We),Ri=!1;var ut=f.memoizedState;L.state=ut,fp(f,C,L,k),be=f.memoizedState,ce!==C||ut!==be||yn.current||Ri?(typeof xt=="function"&&(Y0(f,v,xt,C),be=f.memoizedState),(ce=Ri||CC(f,v,ce,C,ut,be,We))?(on||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.component
`+(C.join(" > ")+`
No matching component was found for:
`)+u.join(" > ")}return null},n.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return te(u.child.stateNode);default:return u.child.stateNode}},n.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:UR,findFiberByHostInstance:u.findFiberByHostInstance||GR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)u=!0;else{try{cr=f.inject(u),_n=f}catch{}u=!!f.checkDCE}}return u},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(u,f,v,C){if(!Je)throw Error(i(363));u=Iv(u,f);var k=At(u,v,C).disconnect;return{disconnect:function(){k()}}},n.registerMutableSourceForHydration=function(u,f){var v=f._getVersion;v=v(f._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[f,v]:u.mutableSourceEagerHydrationData.push(f,v)},n.runWithPriority=function(u,f){var v=Oe;try{return Oe=u,f()}finally{Oe=v}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(u,f,v,C){var k=f.current,P=bo(),L=$i(k);return v=Nw(v),f.context===null?f.context=v:f.pendingContext=v,f=Qa(P,L),f.payload={element:u},C=C===void 0?null:C,C!==null&&(f.callback=C),u=Di(k,f,L),u!==null&&(ws(u,k,L,P),dp(u,k,L)),L},n};rR.exports=x0e;var y0e=rR.exports;const C0e=Sf(y0e);var oR={exports:{}},dc={};/**
* @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.
*/dc.ConcurrentRoot=1;dc.ContinuousEventPriority=4;dc.DefaultEventPriority=16;dc.DiscreteEventPriority=1;dc.IdleEventPriority=536870912;dc.LegacyRoot=0;oR.exports=dc;var sR=oR.exports;const aI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let iI=!1,lI=!1;const iC=".react-konva-event",w0e=`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
`,S0e=`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
`,k0e={};function z0(e,t,n=k0e){if(!iI&&"zIndex"in t&&(console.warn(S0e),iI=!0),!lI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(w0e),lI=!0)}for(var s in n)if(!aI[s]){var i=s.slice(0,2)==="on",c=n[s]!==t[s];if(i&&c){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,m={},g=!1;const b={};for(var s in t)if(!aI[s]){var i=s.slice(0,2)==="on",y=n[s]!==t[s];if(i&&y){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))&&(g=!0,m[s]=t[s])}g&&(e.setAttrs(m),bl(e));for(var d in b)e.on(d+iC,b[d])}function bl(e){if(!h9.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const aR={},j0e={};Cf.Node.prototype._applyProps=z0;function _0e(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),bl(e)}function I0e(e,t,n){let r=Cf[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=Cf.Group);const o={},s={};for(var i in t){var c=i.slice(0,2)==="on";c?s[i]=t[i]:o[i]=t[i]}const d=new r(o);return z0(d,s),d}function P0e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function E0e(e,t,n){return!1}function M0e(e){return e}function O0e(){return null}function A0e(){return null}function R0e(e,t,n,r){return j0e}function D0e(){}function T0e(e){}function N0e(e,t){return!1}function $0e(){return aR}function L0e(){return aR}const z0e=setTimeout,F0e=clearTimeout,B0e=-1;function H0e(e,t){return!1}const W0e=!1,V0e=!0,U0e=!0;function G0e(e,t){t.parent===e?t.moveToTop():e.add(t),bl(e)}function q0e(e,t){t.parent===e?t.moveToTop():e.add(t),bl(e)}function iR(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),bl(e)}function K0e(e,t,n){iR(e,t,n)}function Q0e(e,t){t.destroy(),t.off(iC),bl(e)}function X0e(e,t){t.destroy(),t.off(iC),bl(e)}function Y0e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function J0e(e,t,n){}function Z0e(e,t,n,r,o){z0(e,o,r)}function eve(e){e.hide(),bl(e)}function tve(e){}function nve(e,t){(t.visible==null||t.visible)&&e.show()}function rve(e,t){}function ove(e){}function sve(){}const ave=()=>sR.DefaultEventPriority,ive=Object.freeze(Object.defineProperty({__proto__:null,appendChild:G0e,appendChildToContainer:q0e,appendInitialChild:_0e,cancelTimeout:F0e,clearContainer:ove,commitMount:J0e,commitTextUpdate:Y0e,commitUpdate:Z0e,createInstance:I0e,createTextInstance:P0e,detachDeletedInstance:sve,finalizeInitialChildren:E0e,getChildHostContext:L0e,getCurrentEventPriority:ave,getPublicInstance:M0e,getRootHostContext:$0e,hideInstance:eve,hideTextInstance:tve,idlePriority:Ih.unstable_IdlePriority,insertBefore:iR,insertInContainerBefore:K0e,isPrimaryRenderer:W0e,noTimeout:B0e,now:Ih.unstable_now,prepareForCommit:O0e,preparePortalMount:A0e,prepareUpdate:R0e,removeChild:Q0e,removeChildFromContainer:X0e,resetAfterCommit:D0e,resetTextContent:T0e,run:Ih.unstable_runWithPriority,scheduleTimeout:z0e,shouldDeprioritizeSubtree:N0e,shouldSetTextContent:H0e,supportsMutation:U0e,unhideInstance:nve,unhideTextInstance:rve,warnsIfNotActing:V0e},Symbol.toStringTag,{value:"Module"}));var lve=Object.defineProperty,cve=Object.defineProperties,uve=Object.getOwnPropertyDescriptors,cI=Object.getOwnPropertySymbols,dve=Object.prototype.hasOwnProperty,fve=Object.prototype.propertyIsEnumerable,uI=(e,t,n)=>t in e?lve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dI=(e,t)=>{for(var n in t||(t={}))dve.call(t,n)&&uI(e,n,t[n]);if(cI)for(var n of cI(t))fve.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),Uve=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=H(Vve),[i,c]=l.useState(null),[d,p]=l.useState(0),h=l.useRef(null),m=l.useCallback(()=>{p(d+1),setTimeout(m,500)},[d]);return l.useEffect(()=>{if(i)return;const g=new Image;g.onload=()=>{c(g)},g.src=hI(n)},[i,n]),l.useEffect(()=>{i&&(i.src=hI(n))},[i,n]),l.useEffect(()=>{const g=setInterval(()=>p(b=>(b+1)%5),50);return()=>clearInterval(g)},[]),!i||!kc(r.x)||!kc(r.y)||!kc(s)||!kc(o.width)||!kc(o.height)?null:a.jsx(Ba,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:kc(d)?d:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Gve=l.memo(Uve),qve=me([Ir],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Nn}}),Kve=e=>{const{...t}=e,{objects:n}=H(qve);return a.jsx(Fa,{listening:!1,...t,children:n.filter(I9).map((r,o)=>a.jsx(fg,{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))})},Qve=l.memo(Kve);var Pl=l,Xve=function(t,n,r){const o=Pl.useRef("loading"),s=Pl.useRef(),[i,c]=Pl.useState(0),d=Pl.useRef(),p=Pl.useRef(),h=Pl.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),Pl.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function g(){o.current="loaded",s.current=m,c(Math.random())}function b(){o.current="failed",s.current=void 0,c(Math.random())}return m.addEventListener("load",g),m.addEventListener("error",b),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",g),m.removeEventListener("error",b)}},[t,n,r]),[s.current,o.current]};const Yve=Sf(Xve),Jve=({canvasImage:e})=>{const[t,n,r,o]=ea("colors",["base.400","base.500","base.700","base.900"]),s=di(t,n),i=di(r,o),{t:c}=Q();return a.jsxs(Fa,{children:[a.jsx(Ba,{x:e.x,y:e.y,width:e.width,height:e.height,fill:s}),a.jsx(xve,{x:e.x,y:e.y,width:e.width,height:e.height,align:"center",verticalAlign:"middle",fontFamily:'"Inter Variable", sans-serif',fontSize:e.width/16,fontStyle:"600",text:c("common.imageFailedToLoad"),fill:i})]})},Zve=l.memo(Jve),e1e=e=>{const{x:t,y:n,imageName:r}=e.canvasImage,{currentData:o,isError:s}=Rs(r??zs.skipToken),[i,c]=Yve((o==null?void 0:o.image_url)??"",UI.get()?"use-credentials":"anonymous");return s||c==="failed"?a.jsx(Zve,{canvasImage:e.canvasImage}):a.jsx(dR,{x:t,y:n,image:i,listening:!1})},pR=l.memo(e1e),t1e=me([Ir],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Nn}}),n1e=()=>{const{objects:e}=H(t1e);return e?a.jsx(Fa,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(P9(t))return a.jsx(pR,{canvasImage:t},n);if(E9(t)){const r=a.jsx(fg,{points:t.points,stroke:t.color?Bl(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(Fa,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(M9(t))return a.jsx(Ba,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Bl(t.color)},n);if(O9(t))return a.jsx(Ba,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},r1e=l.memo(n1e),o1e=me([Ir],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:o,boundingBoxDimensions:s}=e,{selectedImageIndex:i,images:c,boundingBox:d}=t.stagingArea;return{currentStagingAreaImage:c.length>0&&i!==void 0?c[i]:void 0,isOnFirstImage:i===0,isOnLastImage:i===c.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:(d==null?void 0:d.x)??o.x,y:(d==null?void 0:d.y)??o.y,width:(d==null?void 0:d.width)??s.width,he
${s}
\`\`\``),n({title:"Error Copied"})},[e,n]),o=l.useMemo(()=>dbe({user:"invoke-ai",repo:"InvokeAI",template:"BUG_REPORT.yml",title:`[bug]: ${e.name}: ${e.message}`}),[e.message,e.name]);return a.jsx(N,{layerStyle:"body",sx:{w:"100vw",h:"100vh",alignItems:"center",justifyContent:"center",p:4},children:a.jsxs(N,{layerStyle:"first",sx:{flexDir:"column",borderRadius:"base",justifyContent:"center",gap:8,p:16},children:[a.jsx(yo,{children:"Something went wrong"}),a.jsx(N,{layerStyle:"second",sx:{px:8,py:4,borderRadius:"base",gap:4,justifyContent:"space-between",alignItems:"center"},children:a.jsxs(je,{sx:{fontWeight:600,color:"error.500",_dark:{color:"error.400"}},children:[e.name,": ",e.message]})}),a.jsxs(N,{sx:{gap:4},children:[a.jsx(Dt,{leftIcon:a.jsx(sse,{}),onClick:t,children:"Reset UI"}),a.jsx(Dt,{leftIcon:a.jsx(Hu,{}),onClick:r,children:"Copy Error"}),a.jsx(Ig,{href:o,isExternal:!0,children:a.jsx(Dt,{leftIcon:a.jsx(l2,{}),children:"Create Issue"})})]})]})})},xbe=l.memo(bbe),ybe=me([we],({hotkeys:e})=>{const{shift:t,ctrl:n,meta:r}=e;return{shift:t,ctrl:n,meta:r}},{memoizeOptions:{resultEqualityCheck:Nn}}),Cbe=()=>{const e=le(),{shift:t,ctrl:n,meta:r}=H(ybe),{queueBack:o,isDisabled:s,isLoading:i}=R8();_t(["ctrl+enter","meta+enter"],o,{enabled:()=>!s&&!i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[o,s,i]);const{queueFront:c,isDisabled:d,isLoading:p}=$8();return _t(["ctrl+shift+enter","meta+shift+enter"],c,{enabled:()=>!d&&!p,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[c,d,p]),_t("*",()=>{Th("shift")?!t&&e(Qo(!0)):t&&e(Qo(!1)),Th("ctrl")?!n&&e(PS(!0)):n&&e(PS(!1)),Th("meta")?!r&&e(ES(!0)):r&&e(ES(!1))},{keyup:!0,keydown:!0},[t,n,r]),_t("1",()=>{e(ni("txt2img"))}),_t("2",()=>{e(ni("img2img"))}),_t("3",()=>{e(ni("unifiedCanvas"))}),_t("4",()=>{e(ni("nodes"))}),_t("5",()=>{e(ni("modelManager"))}),null},wbe=l.memo(Cbe),Sbe=e=>{const t=le(),{recallAllParameters:n}=j0(),r=Zl(),{currentData:o}=Rs((e==null?void 0:e.imageName)??zs.skipToken),{currentData:s}=GI((e==null?void 0:e.imageName)??zs.skipToken),i=l.useCallback(()=>{o&&(t(QI(o)),t(ni("unifiedCanvas")),r({title:NI("toast.sentToUnifiedCanvas"),status:"info",duration:2500,isClosable:!0}))},[t,r,o]),c=l.useCallback(()=>{o&&t(gg(o))},[t,o]),d=l.useCallback(()=>{s&&n(s.metadata)},[s]);return l.useEffect(()=>{e&&e.action==="sendToCanvas"&&i()},[e,i]),l.useEffect(()=>{e&&e.action==="sendToImg2Img"&&c()},[e,c]),l.useEffect(()=>{e&&e.action==="useAllParameters"&&d()},[e,d]),{handleSendToCanvas:i,handleSendToImg2Img:c,handleUseAllMetadata:d}},kbe=e=>(Sbe(e.selectedImage),null),jbe=l.memo(kbe),_be={},Ibe=({config:e=_be,selectedImage:t})=>{const n=H(sO),r=Q3("system"),o=le(),s=l.useCallback(()=>(localStorage.clear(),location.reload(),!1),[]);l.useEffect(()=>{fn.changeLanguage(n)},[n]),l.useEffect(()=>{cP(e)&&(r.info({config:e},"Received config"),o(f$(e)))},[o,e,r]),l.useEffect(()=>{o(p$())},[o]);const i=Xg(m$);return a.jsxs(cbe,{onReset:s,FallbackComponent:xbe,children:[a.jsx(rl,{w:"100vw",h:"100vh",position:"relative",overflow:"hidden",children:a.jsx(AG,{children:a.jsxs(rl,{sx:{gap:4,p:4,gridAutoRows:"min-content auto",w:"full",h:"full"},children:[i||a.jsx(jte,{}),a.jsx(N,{sx:{gap:4,w:"full",h:"full"},children:a.jsx(ibe,{})})]})})}),a.jsx(fee,{}),a.jsx(lee,{}),a.jsx(h$,{}),a.jsx(wbe,{}),a.jsx(jbe,{selectedImage:t})]})},Rbe=l.memo(Ibe);export{Rbe as default};