InvokeAI/invokeai/frontend/web/dist/assets/App-9a48e001.js

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

200 lines
961 KiB
JavaScript
Raw Normal View History

2023-07-06 01:09:13 +00:00
import{t as b1,b as v8,r as y8,i as b8,a as x8,c as w8,d as UP,e as GP,f as qP,g as S8,h as C8,j as _8,k as k8,l as P8,m as j8,n as E8,o as I8,s as O8,p as T8,q as p,u as i,v as Zm,w as gh,x as R8,y as YP,z as KP,A as M8,P as ef,B as Gy,C as D8,D as A8,E as N8,F as z8,G as $8,H as L8,I as B8,J as Bw,K as ze,L as io,M as zn,N as Ie,O as jt,Q as mr,R as st,S as tf,T as Xo,U as No,V as Ur,W as Jn,X as mu,Y as ni,Z as on,_ as bs,$ as Tc,a0 as ri,a1 as oi,a2 as Qm,a3 as qy,a4 as gu,a5 as gr,a6 as F8,a7 as F,a8 as XP,a9 as Fw,aa as ZP,ab as x1,ac as vu,ad as Sd,ae as H8,af as V8,ag as QP,ah as JP,ai as Wl,aj as W8,ak as ut,al as X,am as $a,an as Oe,ao as wo,ap as Gr,aq as ce,ar as Y,as as nf,at as e3,au as zo,av as Ks,aw as od,ax as Jm,ay as yl,az as U8,aA as rf,aB as G8,aC as eh,aD as eg,aE as qc,aF as q8,aG as Yy,aH as th,aI as nh,aJ as vh,aK as yh,aL as w1,aM as S1,aN as bh,aO as xh,aP as wh,aQ as Sh,aR as Y8,aS as Ch,aT as Bn,aU as Lt,aV as t3,aW as Ky,aX as K8,aY as n3,aZ as X8,a_ as Z8,a$ as r3,b0 as o3,b1 as tg,b2 as ml,b3 as Q8,b4 as J8,b5 as C1,b6 as s3,b7 as e7,b8 as Xy,b9 as t7,ba as n7,bb as r7,bc as cc,bd as xa,be as a3,bf as i3,bg as o7,bh as s7,bi as a7,bj as i7,bk as Zy,bl as Hw,bm as l3,bn as l7,bo as Yc,bp as Vw,bq as c7,br as Ww,bs as u7,bt as _h,bu as d7,bv as c3,bw as ng,bx as en,by as ks,bz as vr,bA as _1,bB as u3,bC as f7,bD as d3,bE as Uw,bF as p7,bG as h7,bH as m7,bI as g7,bJ as v7,bK as y7,bL as Qy,bM as b7,bN as x7,bO as Gw,bP as qw,bQ as Yw,bR as Kw,bS as w7,bT as S7,bU as f3,bV as Cd,bW as p3,bX as Xw,bY as C7,bZ as Mr,b_ as h3,b$ as _7,c0 as m3,c1 as g3,c2 as k7,c3 as Zw,c4 as P7,c5 as j7,c6 as E7,c7 as I7,c8 as O7,c9 as T7,ca as R7,cb as M7,cc as D7,cd as A7,ce as N7,cf as z7,cg as $7,ch as L7,ci as B7,cj as F7,ck as H7,cl as V7,cm as Qw,cn as W7,co as of,cp as U7,cq as G7,cr as Vu,cs as Ul,ct as q7,cu as Y7,cv as K7,cw as X7,cx as Z7,cy as v3,cz as Q7,cA as J7,cB as Ps,cC as eM,cD as Jw,cE as eS,cF as tM,cG as nM,cH as rM,cI as y3,cJ as oM,cK as sM,cL as aM,cM as Jy,cN as eb,cO as tS,cP as iM,cQ as nS,cR as Zo,cS as lM,cT as cM,cU as rS,cV as oS,cW as uM,cX as sS,cY as dM,cZ as fM,c_ as pM,c$ as hM,d0 as mM,d1 as sf,d2 as aS,d3 as gM,d4 as vM,d5 as b3,d6 as yM,d7 as iS,d8 as bM,d9 as xM,da as wM,db as kh,dc as SM,dd as lS,de as x3,df as CM,dg as cS,dh as w3,di as tb,dj as Xs,dk as _M,dl as S3,dm as uS,dn as kM,dp as PM,dq as jM,dr as EM,ds as IM,dt as OM,du as TM,dv as RM,dw as MM,dx as DM,dy as AM,dz as NM,dA as dS,dB as zM,dC as fS,dD as rh,dE as $M,dF as vn,dG as Ph,dH as C3,dI as jh,dJ as LM,dK as BM,dL as va,dM as _3,dN as nb,dO as af,dP as FM,dQ as HM,dR as VM,dS as qa,dT as k3,dU as WM,dV as UM,dW as P3,dX as GM,dY as qM,dZ as YM,d_ as KM,d$ as XM,e0 as ZM,e1 as QM,e2 as JM,e3 as e9,e4 as t9,e5 as n9,e6 as pS,e7 as r9,e8 as o9,e9 as s9,ea as a9,eb as i9,ec as l9,ed as d0,ee as _d,ef as hS,eg as f0,eh as p0,ei as cp,ej as mS,ek as k1,el as c9,em as u9,en as d9,eo as f9,ep as p9,eq as Eh,er as j3,es as E3,et as h9,eu as m9,ev as I3,ew as O3,ex as T3,ey as R3,ez as M3,eA as D3,eB as A3,eC as N3,eD as Rc,eE as Mc,eF as z3,eG as $3,eH as g9,eI as L3,eJ as B3,eK as F3,eL as H3,eM as V3,eN as W3,eO as U3,eP as rb,eQ as v9,eR as gS,eS as y9,eT as b9,eU as Ih,eV as vS,eW as yS,eX as bS,eY as xS,eZ as x9,e_ as w9,e$ as wS,f0 as S9,f1 as C9,f2 as _9,f3 as k9,f4 as P9,f5 as j9}from"./index-581af3d4.js";import{u as we,a as G3,b as si,c as E9,r as Ge,f as I9,g as SS,d as Ut,e as zr}from"./MantineProvider-d7f01775.js";function O9(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 CS=1/0,T9=17976931348623157e292;function h0(e){if(!e)return e===0?e:0;if(e=b1(e),e===CS||e===-CS){var t=e<0?-1:1;return t*T9}return e===e?e:0}var R9=4;function _S(e){return v8(e,R9)}var M9=function(){return y8.Date.now()};const m0=M9;var D9="Expected a function",A9=Math.max,N9=Math.min;function z9(e,t,n){var r,o,s,a,c,d,f=0,h=!1,m=!1,v=!0;if(typeof e!="function")throw new TypeError(D9);t=b1(t)||0,b8(n)&&(h=!!n.leading,m="maxWait"in n,s=m?A9(b1(n.max
M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fill:d,fillRule:"evenodd",stroke:f,strokeWidth:h,pointerEvents:"none"})]})})}K3.displayName="MiniMap";var oD=p.memo(K3),Bs;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Bs||(Bs={}));function sD({color:e,dimensions:t,lineWidth:n}){return i.jsx("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function aD({color:e,radius:t}){return i.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const iD={[Bs.Dots]:"#91919a",[Bs.Lines]:"#eee",[Bs.Cross]:"#e2e2e2"},lD={[Bs.Dots]:1,[Bs.Lines]:1,[Bs.Cross]:6},cD=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function X3({id:e,variant:t=Bs.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:a,style:c,className:d}){const f=p.useRef(null),{transform:h,patternId:m}=gh(cD,Gy),v=a||iD[t],y=r||lD[t],S=t===Bs.Dots,x=t===Bs.Cross,w=Array.isArray(n)?n:[n,n],_=[w[0]*h[2]||1,w[1]*h[2]||1],k=y*h[2],P=x?[k,k]:_,j=S?[k/s,k/s]:[P[0]/s,P[1]/s];return i.jsxs("svg",{className:Zm(["react-flow__background",d]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:f,"data-testid":"rf__background",children:[i.jsx("pattern",{id:m+e,x:h[0]%_[0],y:h[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${j[0]},-${j[1]})`,children:S?i.jsx(aD,{color:v,radius:k/s}):i.jsx(sD,{dimensions:P,color:v,lineWidth:o})}),i.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`})]})}X3.displayName="Background";var uD=p.memo(X3),pd;(function(e){e.Line="line",e.Handle="handle"})(pd||(pd={}));function dD({width:e,prevWidth:t,height:n,prevHeight:r,invertX:o,invertY:s}){const a=e-t,c=n-r,d=[a>0?1:a<0?-1:0,c>0?1:c<0?-1:0];return a&&o&&(d[0]=d[0]*-1),c&&s&&(d[1]=d[1]*-1),d}const Z3={width:0,height:0,x:0,y:0},fD={...Z3,pointerX:0,pointerY:0,aspectRatio:1};function pD({nodeId:e,position:t,variant:n=pd.Handle,className:r,style:o={},children:s,color:a,minWidth:c=10,minHeight:d=10,maxWidth:f=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:m=!1,shouldResize:v,onResizeStart:y,onResize:S,onResizeEnd:x}){const w=$8(),_=typeof e=="string"?e:w,k=YP(),P=p.useRef(null),j=p.useRef(fD),I=p.useRef(Z3),O=L8(),T=n===pd.Line?"right":"bottom-right",R=t??T;p.useEffect(()=>{if(!P.current||!_)return;const G=KP(P.current),$=R.includes("right")||R.includes("left"),H=R.includes("bottom")||R.includes("top"),U=R.includes("left"),q=R.includes("top"),z=B8().on("start",L=>{const V=k.getState().nodeInternals.get(_),{xSnapped:W,ySnapped:te}=O(L);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},j.current={...I.current,pointerX:W,pointerY:te,aspectRatio:I.current.width/I.current.height},y==null||y(L,{...I.current})}).on("drag",L=>{const{nodeInternals:V,triggerNodeChanges:W}=k.getState(),{xSnapped:te,ySnapped:fe}=O(L),ae=V.get(_);if(ae){const J=[],{pointerX:B,pointerY:oe,width:le,height:ge,x:se,y:pe,aspectRatio:ue}=j.current,{x:be,y:ke,width:ie,height:Pe}=I.current,Je=Math.floor($?te-B:0),Ae=Math.floor(H?fe-oe:0);let Ve=Bw(le+(U?-Je:Je),c,f),kt=Bw(ge+(q?-Ae:Ae),d,h);if(m){const me=Ve/kt,Re=$&&H,Ye=$&&!H,ye=H&&!$;Ve=me<=ue&&Re||ye?kt*ue:Ve,kt=me>ue&&Re||Ye?Ve/ue:kt,Ve>=f?(Ve=f,kt=f/ue):Ve<=c&&(Ve=c,kt=c/ue),kt>=h?(kt=h,Ve=h*ue):kt<=d&&(kt=d,Ve=d*ue)}const ft=Ve!==ie,yn=kt!==Pe;if(U||q){const me=U?se-(Ve-le):se,Re=q?pe-(kt-ge):pe,Ye=me!==be&&ft,ye=Re!==ke&&yn;if(Ye||ye){const lt={id:ae.id,type:"position",position:{x:Ye?me:be,y:ye?Re:ke}};J.push(lt),I.current.x=lt.position.x,I.current.y=lt.position.y}}if(ft||yn){const me={id:_,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:Ve,height:kt}};J.push(me),I.current.width=Ve,I.current.height=kt}if(J.length===0)return;const K=dD({width:I.current.width,prevWidth:ie,height:I.current.height,prevHeight:Pe,invertX:U,invertY:q}),Ce={...I.current,direction:K};if((v==null?void 0:v(L,Ce))===!1)return;S==null||S(L,Ce),W(J)}}).on("end",L=>{const V={id:_,type:"dimensions",resizing:!1};x==null||x(L,{...I.current}),k.getState().triggerNo
`})}function HD(e){tf({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function ad(e){const{isOpen:t,isDisabled:n}=ab(),{reduceMotion:r}=ib(),o=jt("chakra-accordion__icon",e.className),s=og(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return i.jsx(io,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:a,...e,children:i.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}ad.displayName="AccordionIcon";var id=ze(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...a}=$D(t),d={...og().container,overflowAnchor:"none"},f=p.useMemo(()=>a,[a]);return i.jsx(RD,{value:f,children:i.jsx(Ie.div,{ref:n,...s,className:jt("chakra-accordion__item",o),__css:d,children:typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r})})});id.displayName="AccordionItem";var gl={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Wu={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 I1(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return Wu.slideRight;case"left":return Wu.slideLeft;case"bottom":return Wu.slideDown;case"top":return Wu.slideUp;default:return Wu.slideRight}}var bl={enter:{duration:.2,ease:gl.easeOut},exit:{duration:.1,ease:gl.easeIn}},Fs={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})},VD=e=>e!=null&&parseInt(e.toString(),10)>0,OS={exit:{height:{duration:.2,ease:gl.ease},opacity:{duration:.3,ease:gl.ease}},enter:{height:{duration:.3,ease:gl.ease},opacity:{duration:.4,ease:gl.ease}}},WD={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:VD(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:Fs.exit(OS.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:Fs.enter(OS.enter,o)}}},sg=p.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:a="auto",style:c,className:d,transition:f,transitionEnd:h,...m}=e,[v,y]=p.useState(!1);p.useEffect(()=>{const k=setTimeout(()=>{y(!0)});return()=>clearTimeout(k)},[]),tf({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(s.toString())>0,x={startingHeight:s,endingHeight:a,animateOpacity:o,transition:v?f:{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"}}},w=r?n:!0,_=n||r?"enter":"exit";return i.jsx(Xo,{initial:!1,custom:x,children:w&&i.jsx(No.div,{ref:t,...m,className:jt("chakra-collapse",d),style:{overflow:"hidden",display:"block",...c},custom:x,variants:WD,initial:r?"exit":!1,animate:_,exit:"exit"})})});sg.displayName="Collapse";var UD={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Fs.enter(bl.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:Fs.exit(bl.exit,n),transitionEnd:t==null?void 0:t.exi
.`.concat(PL,` {
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(a,`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(sh,` {
right: `).concat(c,"px ").concat(r,`;
}
.`).concat(ah,` {
margin-right: `).concat(c,"px ").concat(r,`;
}
.`).concat(sh," .").concat(sh,` {
right: 0 `).concat(r,`;
}
.`).concat(ah," .").concat(ah,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(jL,": ").concat(c,`px;
}
`)},LL=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=p.useMemo(function(){return NL(o)},[o]);return p.createElement(zL,{styles:$L(s,!t,o,n?"":"!important")})},G1=!1;if(typeof window<"u")try{var pp=Object.defineProperty({},"passive",{get:function(){return G1=!0,!0}});window.addEventListener("test",pp,pp),window.removeEventListener("test",pp,pp)}catch{G1=!1}var hc=G1?{passive:!1}:!1,BL=function(e){return e.tagName==="TEXTAREA"},$6=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!BL(e)&&n[t]==="visible")},FL=function(e){return $6(e,"overflowY")},HL=function(e){return $6(e,"overflowX")},aC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=L6(e,r);if(o){var s=B6(e,r),a=s[1],c=s[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},VL=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},WL=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},L6=function(e,t){return e==="v"?FL(t):HL(t)},B6=function(e,t){return e==="v"?VL(t):WL(t)},UL=function(e,t){return e==="h"&&t==="rtl"?-1:1},GL=function(e,t,n,r,o){var s=UL(e,window.getComputedStyle(t).direction),a=s*r,c=n.target,d=t.contains(c),f=!1,h=a>0,m=0,v=0;do{var y=B6(e,c),S=y[0],x=y[1],w=y[2],_=x-w-s*S;(S||_)&&L6(e,c)&&(m+=_,v+=S),c=c.parentNode}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(h&&(o&&m===0||!o&&a>m)||!h&&(o&&v===0||!o&&-a>v))&&(f=!0),f},hp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iC=function(e){return[e.deltaX,e.deltaY]},lC=function(e){return e&&"current"in e?e.current:e},qL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},YL=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},KL=0,mc=[];function XL(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(KL++)[0],s=p.useState(z6)[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=z1([e.lockRef.current],(e.shards||[]).map(lC),!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=p.useCallback(function(x,w){if("touches"in x&&x.touches.length===2)return!a.current.allowPinchZoom;var _=hp(x),k=n.current,P="deltaX"in x?x.deltaX:k[0]-_[0],j="deltaY"in x?x.deltaY:k[1]-_[1],I,O=x.target,T=Math.abs(P)>Math.abs(j)?"h":"v";if("touches"in x&&T==="h"&&O.type==="range")return!1;var R=aC(T,O);if(!R)return!0;if(R?I=T:(I=T==="v"?"h":"v",R=aC(T,O)),!R)return!1;if(!r.current&&"changedTouches"in x&&(P||j)&&(r.current=I),!I)return!0;var M=r.current||I;return GL(M,w,x,M==="h"?P:j,!0)},[]),d=p.useCallback(function(x){var w=x;if(!(!mc.length||mc[mc.length-1]!==s)){var _="deltaY"in w?iC(w):hp(w),k=t.current.filter(function(I){return I.name===w.type&&I.target===w.target&&qL(I.delta,_)})[0];if(k&&k.should){w.cancelable&&w.preventDefault();return}if(!k){var P=(a.current.shards||[]).map(lC).filter(Boolean).filter(function(I){return I.contains(w.target)}),j=P.length>0?c(w,P[0]):!a.current.noIsolation;j&&w.cancelable&&w.preventDefault()}}},[]),f=p.useCallback(function(x,w,_,k){var P={name:x,delta:w,target:_,should:k};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(j){return j!==P})},1)},[]),h=p.useCallback(function(x){n.current=hp(x),r.current=void 0},[]),m=p.useCallback(function(x){f(x.type,iC(x),x.target,c(x,e.lockRef.current))},[]),v=p.useCallback(function(x){f(x.type,hp(x),x.target,c(x,e.lockRef.current))},[]);p.useEffect(function(){return mc.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,hc),document.addEventListener("touchmove",d,hc),document.addEventListener("touchstart",h,hc),function(){mc=mc.filter(function(x){return x!==s}),document.removeEventListener("wheel",d,hc),document.removeEventListener("touchmove",d,hc),document.removeEventListener("touchstart",h,hc)}},[]);var y=e.removeScrollBar,S=e.inert;return p.createElement(p.Fragment,null,S?p.createElement(s,{styles:YL(o)}):null,y?p.createElement(LL,{gapMode:e.gapMode}):null)}const ZL=XA(N6,XL);var F6=p.forwardRef(function(e,t){return p.createElement(pg,ma({},e,{ref:t,sideCar:ZL}))});F6.classNames=pg.classNames;const QL=F6;function JL(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:a,finalFocusRef:c,returnFocusOnClose:d,preserveScrollBarGap:f,lockFocusAcrossFrames:h,isOpen:m}=Rl(),[v,y]=H8();p.useEffect(()=>{!v&&y&&setTimeout(y)},[v,y]);const S=D6(r,m);return i.jsx(l6,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:c,restoreFocus:d,contentRef:r,lockFocusAcrossFrames:h,children:i.jsx(QL,{removeScrollBar:!f,allowPinchZoom:a,enabled:S===1&&s,forwardProps:!0,children:e.children})})}var Rd=ze((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...a}=e,{getDialogProps:c,getDialogContainerProps:d}=Rl(),f=c(a,t),h=d(o),m=jt("chakra-modal__content",n),v=Su(),y={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:x}=Rl();return i.jsx(JL,{children:i.jsx(Ie.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S,children:i.jsx(M6,{preset:x,motionProps:s,className:m,...f,__css:y,children:r})})})});Rd.displayName="ModalContent";function hg(e){const{leastDestructiveRef:t,...n}=e;return i.jsx(Td,{...n,initialFocusRef:t})}var mg=ze((e,t)=>i.jsx(Rd,{ref:t,role:"alertdialog",...e})),zi=ze((e,t)=>{const{className:
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QF(e){if(Array.isArray(e))return Q1(e)}function yC(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 bC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yC(Object(n),!0).forEach(function(r){yj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dd(e,t){return tH(e)||eH(e,t)||bj(e,t)||JF()}function JF(){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 bj(e,t){if(e){if(typeof e=="string")return Q1(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 Q1(e,t)}}function Q1(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 eH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.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 tH(e){if(Array.isArray(e))return e}var nH="file-invalid-type",rH="file-too-large",oH="file-too-small",sH="too-many-files",aH=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:nH,message:"File type must be ".concat(n)}},xC=function(t){return{code:rH,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},wC=function(t){return{code:oH,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},iH={code:sH,message:"Too many files"};function xj(e,t){var n=e.type==="application/x-moz-file"||KF(e,t);return[n,n?null:aH(t)]}function wj(e,t,n){if(pl(e.size))if(pl(t)&&pl(n)){if(e.size>n)return[!1,xC(n)];if(e.size<t)return[!1,wC(t)]}else{if(pl(t)&&e.size<t)return[!1,wC(t)];if(pl(n)&&e.size>n)return[!1,xC(n)]}return[!0,null]}function pl(e){return e!=null}function lH(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,a=e.maxFiles,c=e.validator;return!s&&t.length>1||s&&a>=1&&t.length>a?!1:t.every(function(d){var f=xj(d,n),h=Dd(f,1),m=h[0],v=wj(d,r,o),y=Dd(v,1),S=y[0],x=c?c(d):null;return m&&S&&!x})}function $h(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function gp(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 SC(e){e.preventDefault()}function cH(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function uH(e){return e.indexOf("Edge/")!==-1}function dH(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return cH(e)||uH(e)}function fa(){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),a=1;a<o;a++)s[a-1]=arguments[a];return t.some(function(c){return!$h(r)&&c&&c.apply(void 0,[r].concat(s)),$h(r)})}}function fH(){return"showOpenFilePicker"in window}function pH(e){if(pl(e)){var t=Object.entries(e).filter(function(n){var r=Dd(n,2),o=r[0],s=r[1],a=!0;return Sj(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.')),a=!1),(!Array.isArray(s)||!s.every(Cj))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=Dd(r,2),s=o[0],a=o[1];return bC(bC({},n),{},yj({},s,a))},{});return[{description:"Files",accept:t}]}return e}function hH(e){if(pl(e))return Object.entries(e).reduce(function(t,n){var r=Dd(n,2),o=r[0],s=r[1];return[].concat(vC(t),[o],vC(s))},[]).filter(function(t){return Sj(t)||Cj(t)}).join(",")}function mH(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function gH(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Sj(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Cj(e){return/^.*\.[\w]+$/.test(e)}var vH=["children"],yH=["open"],bH=["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 CH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _H(e){if(Array.isArray(e))return J1(e)}function M0(e,t){return jH(e)||PH(e,t)||_j(e,t)||kH()}function kH(){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 _j(e,t){if(e){if(typeof e=="string")return J1(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 J1(e,t)}}function J1(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 PH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.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 jH(e){if(Array.isArray(e))return e}function CC(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 wr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CC(Object(n),!0).forEach(function(r){ey(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ey(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lh(e,t){if(e==null)return{};var n=EH(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 EH(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 qb=p.forwardRef(function(e,t){var n=e.children,r=Lh(e,vH),o=Yb(r),s=o.open,a=Lh(o,yH);return p.useImperativeHandle(t,function(){return{open:s}},[s]),F.createElement(p.Fragment,null,n(wr(wr({},a),{},{open:s})))});qb.displayName="Dropzone";var kj={disabled:!1,getFilesFromEvent:BF,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};qb.defaultProps=kj;qb.propTypes={children:Kn.func,accept:Kn.objectOf(Kn.arrayOf(Kn.string)),multiple:Kn.bool,preventDropOnDocument:Kn.bool,noClick:Kn.bool,noKeyboard:Kn.bool,noDrag:Kn.bool,noDragEventsBubbling:Kn.bool,minSize:Kn.number,maxSize:Kn.number,maxFiles:Kn.number,disabled:Kn.bool,getFilesFromEvent:Kn.func,onFileDialogCancel:Kn.func,onFileDialogOpen:Kn.func,useFsAccessApi:Kn.bool,autoFocus:Kn.bool,onDragEnter:Kn.func,onDragLeave:Kn.func,onDragOver:Kn.func,onDrop:Kn.func,onDropAccepted:Kn.func,onDropRejected:Kn.func,onError:Kn.func,validator:Kn.func};var ty={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Yb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=wr(wr({},kj),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,a=t.minSize,c=t.multiple,d=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,v=t.onDrop,y=t.onDropAccepted,S=t.onDropRejected,x=t.onFileDialogCancel,w=t.onFileDialogOpen,_=t.useFsAccessApi,k=t.autoFocus,P=t.preventDropOnDocument,j=t.noClick,I=t.noKeyboard,O=t.noDrag,T=t.noDragEventsBubbling,R=t.onError,M=t.validator,D=p.useMemo(function(){return hH(n)},[n]),A=p.useMemo(function(){return pH(n)},[n]),G=p.useMemo(function(){return typeof w=="function"?w:_C},[w]),$=p.useMemo(function(){return typeof x=="function"?x:_C},[x]),H=p.useRef(null),U=p.useRef(null),q=p.useReducer(IH,ty),z=M0(q,2),L=z[0],V=z[1],W=L.isFocused,te=L.isFileDialogActive,fe=p.useRef(typeof window<"u"&&window.isSecureContext&&_&&fH()),ae=function(){!fe.current&&te&&setTimeout(function(){if(U.current){var me=U.current.files;me.length||(V({type:"closeDialog"}),$())}},300)};p.useEffect(functi
`),status:"error"})},[a,s]),m=p.useCallback(async j=>{n(e3({file:j,image_category:"user",is_intermediate:!1,postUploadAction:{type:"TOAST_UPLOADED"}}))},[n]),v=p.useCallback((j,I)=>{if(I.length>1){s({title:a("toast.uploadFailed"),description:a("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}I.forEach(O=>{h(O)}),j.forEach(O=>{m(O)})},[a,s,m,h]),{getRootProps:y,getInputProps:S,isDragAccept:x,isDragReject:w,isDragActive:_,inputRef:k,open:P}=Yb({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>d(!0),disabled:r,multiple:!1});return p.useEffect(()=>{const j=async I=>{var O,T;k.current&&(O=I.clipboardData)!=null&&O.files&&(k.current.files=I.clipboardData.files,(T=k.current)==null||T.dispatchEvent(new Event("change",{bubbles:!0})))};return f(P),document.addEventListener("paste",j),()=>{document.removeEventListener("paste",j),f(()=>{})}},[k,P,f]),i.jsxs(ut,{...y({style:{}}),onKeyDown:j=>{j.key},children:[i.jsx("input",{...S()}),t,_&&c&&i.jsx(VH,{isDragAccept:x,isDragReject:w,setIsHandlingUpload:d})]})},GH=p.memo(UH),Rj=e=>e.gallery;const qH=ze((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...a}={},isChecked:c,...d}=e;return i.jsx(Wn,{label:r,placement:o,hasArrow:s,...a,children:i.jsx(ag,{ref:t,colorScheme:c?"accent":"base",...d,children:n})})}),cn=p.memo(qH),Fe=(e,t)=>n=>n==="light"?e:t,YH=e=>{const{label:t,...n}=e,{colorMode:r}=zo();return i.jsx(d5,{colorScheme:"accent",...n,children:i.jsx(nt,{sx:{fontSize:"sm",color:Fe("base.800","base.200")(r)},children:t})})},Hn=p.memo(YH),Mj=ze((e,t)=>{const{role:n,tooltip:r="",tooltipProps:o,isChecked:s,...a}=e;return i.jsx(Wn,{label:r,hasArrow:!0,...o,...o!=null&&o.placement?{placement:o.placement}:{placement:"top"},children:i.jsx(Ya,{ref:t,role:n,colorScheme:s?"accent":"base",...a})})});Mj.displayName="IAIIconButton";const Ne=p.memo(Mj),KH=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:o=!0,...s}=e;return i.jsxs(U6,{isLazy:o,...s,children:[i.jsx(W6,{children:t}),i.jsxs(Y6,{shadow:"dark-lg",children:[r&&i.jsx(G6,{}),n]})]})},Ba=p.memo(KH);var Dj={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},PC=F.createContext&&F.createContext(Dj),Mi=globalThis&&globalThis.__assign||function(){return Mi=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},Mi.apply(this,arguments)},XH=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function Aj(e){return e&&e.map(function(t,n){return F.createElement(t.tag,Mi({key:n},t.attr),Aj(t.child))})}function it(e){return function(t){return F.createElement(ZH,Mi({attr:Mi({},e.attr)},t),Aj(e.child))}}function ZH(e){var t=function(n){var r=e.attr,o=e.size,s=e.title,a=XH(e,["attr","size","title"]),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),F.createElement("svg",Mi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:d,style:Mi(Mi({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),s&&F.createElement("title",null,s),e.children)};return PC!==void 0?F.createElement(PC.Consumer,null,function(n){return t(n)}):t(Dj)}function QH(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function Nj(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-
* OverlayScrollbars
* Version: 2.2.0
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
*/function Mn(e,t){if(Tg(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&Mn(Object.keys(e),n=>t(e[n],n,e));return e}function lo(e,t){const n=Yi(t);if(Qs(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?OC(e,s,t):t.reduce((a,c)=>(a[c]=OC(e,s,c),a),o)}return o}e&&Mn(Ko(t),o=>bV(e,o,t[o]))}const zs=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,a;const c=(h,m)=>{const v=s,y=h,S=m||(r?!r(v,y):v!==y);return(S||o)&&(s=y,a=v),[s,S,a]};return[t?h=>c(t(s,a),h):c,h=>[s,!!h,a]]},yf=()=>typeof window<"u",zj=yf()&&Node.ELEMENT_NODE,{toString:oV,hasOwnProperty:N0}=Object.prototype,ii=e=>e===void 0,Og=e=>e===null,sV=e=>ii(e)||Og(e)?`${e}`:oV.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Di=e=>typeof e=="number",Yi=e=>typeof e=="string",Kb=e=>typeof e=="boolean",Zs=e=>typeof e=="function",Qs=e=>Array.isArray(e),Ad=e=>typeof e=="object"&&!Qs(e)&&!Og(e),Tg=e=>{const t=!!e&&e.length,n=Di(t)&&t>-1&&t%1==0;return Qs(e)||!Zs(e)&&n?t>0&&Ad(e)?t-1 in e:!0:!1},ry=e=>{if(!e||!Ad(e)||sV(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=N0.call(e,n),a=o&&N0.call(o,"isPrototypeOf");if(r&&!s&&!a)return!1;for(t in e);return ii(t)||N0.call(e,t)},Bh=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===zj:!1},Rg=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===zj:!1},Xb=(e,t,n)=>e.indexOf(t,n),Vn=(e,t,n)=>(!n&&!Yi(t)&&Tg(t)?Array.prototype.push.apply(e,t):e.push(t),e),Ml=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Vn(n,r)}):Mn(e,r=>{Vn(n,r)}),n)},Zb=e=>!!e&&e.length===0,Ea=(e,t,n)=>{Mn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},Mg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ko=e=>e?Object.keys(e):[],Cr=(e,t,n,r,o,s,a)=>{const c=[t,n,r,o,s,a];return(typeof e!="object"||Og(e))&&!Zs(e)&&(e={}),Mn(c,d=>{Mn(Ko(d),f=>{const h=d[f];if(e===h)return!0;const m=Qs(h);if(h&&(ry(h)||m)){const v=e[f];let y=v;m&&!Qs(v)?y=[]:!m&&!ry(v)&&(y={}),e[f]=Cr(y,h)}else e[f]=h})}),e},Qb=e=>{for(const t in e)return!1;return!0},$j=(e,t,n,r)=>{if(ii(r))return n?n[e]:t;n&&(Yi(r)||Di(r))&&(n[e]=r)},ao=(e,t,n)=>{if(ii(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},Po=(e,t)=>{e&&e.removeAttribute(t)},Cl=(e,t,n,r)=>{if(n){const o=ao(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const a=Ml(s).join(" ").trim();ao(e,t,a)}},aV=(e,t,n)=>{const r=ao(e,t)||"";return new Set(r.split(" ")).has(n)},Hs=(e,t)=>$j("scrollLeft",0,e,t),Fa=(e,t)=>$j("scrollTop",0,e,t),oy=yf()&&Element.prototype,Lj=(e,t)=>{const n=[],r=t?Rg(t)?t:null:document;return r?Vn(n,r.querySelectorAll(e)):n},iV=(e,t)=>{const n=t?Rg(t)?t:null:document;return n?n.querySelector(e):null},Fh=(e,t)=>Rg(e)?(oy.matches||oy.msMatchesSelector).call(e,t):!1,Jb=e=>e?Ml(e.childNodes):[],Za=e=>e?e.parentElement:null,Pc=(e,t)=>{if(Rg(e)){const n=oy.closest;if(n)return n.call(e,t);do{if(Fh(e,t))return e;e=Za(e)}while(e)}return null},lV=(e,t,n)=>{const r=e&&Pc(e,t),o=e&&iV(n,r),s=Pc(o,t)===r;return r&&o?r===e||o===e||s&&Pc(Pc(e,n),t)!==r:!1},ex=(e,t,n)=>{if(n&&e){let r=t,o;Tg(n)?(o=document.createDocumentFragment(),Mn(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)}},vs=(e,t)=>{ex(e,null,t)},cV=(e,t)=>{ex(Za(e),e,t)},jC=(e,t)=>{ex(Za(e),e&&e.nextSibling,t)},Sa=e=>{if(Tg(e))Mn(Ml(e),t=>Sa(t));else if(e){const t=Za(e);t&&t.removeChild(e)}},_l=e=>{const t=document.createElement("div");return e&&ao(t,"class",e),t},Bj=e=>{const t=_l();return t.innerHTML=e.trim(),Mn(Jb(t),n=>Sa(n))},sy=e=>e.charAt(0).toUpperCase()+e.slice(1),uV=()=>_l().style,dV=["-webkit-","-moz-","-o-","-ms-"],fV=["WebKit","Moz","O","MS","webkit","moz","o","ms"],z0={},$0={},pV=e=>{let t=$0[e];if(Mg($0,e))return t;const n=sy(e),r=uV();return Mn(dV,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,sy(s)+n].find(c=>r[c]!==void 0))}),$0[e]=t||""},bf=e=>{if(yf()){let t=z0[e]||window[e];return Mg(z0,e)||(Mn(fV,n=>(t=t||window[n+sy(e)],!t)),z0[e]=t),t}},hV=bf("MutationObserver"),EC=bf("IntersectionObserver"),jc=bf("ResizeObserver"),Fj=bf("cancelAnimationFrame"),H
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:Ze,mutationThunk:Ot,api:Z,serializeQueryArgs:rt,context:ve}),Lr=Nn.buildInitiateQuery,ir=Nn.buildInitiateMutation;return $r(Z.util,{getRunningOperationPromises:Nn.getRunningOperationPromises,getRunningOperationPromise:Nn.removalWarning,getRunningMutationThunk:Nn.getRunningMutationThunk,getRunningMutationsThunk:Nn.getRunningMutationsThunk,getRunningQueryThunk:Nn.getRunningQueryThunk,getRunningQueriesThunk:Nn.getRunningQueriesThunk}),{name:Oa,injectEndpoint:function(Tt,Dn){var Ln,lr=Z;(Ln=lr.endpoints)[Tt]!=null||(Ln[Tt]={}),se(Dn)?$r(lr.endpoints[Tt],{name:Tt,select:tn(Tt,Dn),initiate:Lr(Tt,Dn)},Kt(Ze,Tt)):Dn.type===oe.mutation&&$r(lr.endpoints[Tt],{name:Tt,select:dn(),initiate:ir(Tt)},Kt(Ot,Tt))}}}}},Os=pt(ui())})(KE);YE.exports=KE;var Ja=YE.exports;const XE=p.memo(({board:e,isSelected:t})=>{const n=ce(),{currentData:r}=xa(e.cover_image_name??Ja.skipToken),{colorMode:o}=zo(),{board_name:s,board_id:a}=e,{onClickDeleteBoardImages:c}=p.useContext(a3),d=p.useCallback(()=>{n(i3(a))},[a,n]),[f,{isLoading:h}]=o7(),[m,{isLoading:v}]=s7(),y=j=>{f({board_id:a,changes:{board_name:j}})},S=p.useCallback(()=>{m(a)},[a,m]),x=p.useCallback(()=>{console.log({board:e}),c(e)},[e,c]),w={id:a,actionType:"MOVE_BOARD",context:{boardId:a}},{isOver:_,setNodeRef:k,active:P}=rf({id:`board_droppable_${a}`,data:w});return i.jsx(ut,{sx:{touchAction:"none",height:"full"},children:i.jsx(PE,{menuProps:{size:"sm",isLazy:!0},renderMenu:()=>i.jsxs(gf,{sx:{visibility:"visible !important"},children:[e.image_count>0&&i.jsx(vo,{sx:{color:"error.300"},icon:i.jsx(Mo,{}),onClickCapture:x,children:"Delete Board and Images"}),i.jsx(vo,{sx:{color:Fe("error.700","error.300")(o)},icon:i.jsx(Mo,{}),onClickCapture:S,children:"Delete Board"})]}),children:j=>i.jsxs(X,{userSelect:"none",ref:j,sx:{flexDir:"column",justifyContent:"space-between",alignItems:"center",cursor:"pointer",w:"full",h:"full"},children:[i.jsxs(X,{ref:k,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)&&i.jsx(eg,{src:r==null?void 0:r.image_url,draggable:!1}),!(e.cover_image_name&&(r!=null&&r.image_url))&&i.jsx(xf,{boxSize:8,icon:fh,sx:{border:"2px solid var(--invokeai-colors-base-200)",_dark:{border:"2px solid var(--invokeai-colors-base-800)"}}}),i.jsx(X,{sx:{position:"absolute",insetInlineEnd:0,top:0,p:1},children:i.jsx(Kc,{variant:"solid",children:e.image_count})}),i.jsx(Xo,{children:qc(w,P)&&i.jsx(eu,{isOver:_})})]}),i.jsx(X,{sx:{width:"full",height:"full",justifyContent:"center",alignItems:"center"},children:i.jsxs(w5,{defaultValue:s,submitOnBlur:!1,onSubmit:I=>{y(I)},children:[i.jsx(y5,{sx:{color:t?Fe("base.900","base.50")(o):Fe("base.700","base.200")(o),fontWeight:t?600:void 0,fontSize:"xs",textAlign:"center",p:0},noOfLines:1}),i.jsx(v5,{sx:{color:Fe("base.900","base.50")(o),fontSize:"xs",borderColor:Fe("base.500","base.500")(o),p:0,outline:0}})]})})]},a)})})});XE.displayName="HoverableBoard";const xq="My Board",wq=()=>{const[e,{isLoading:t}]=a7(),n=p.useCallback(()=>{e(xq)},[e]);return i.jsx(cn,{isLoading:t,"aria-label":"Add Board",onClick:n,size:"sm",sx:{px:4},children:"Add Board"})},Sq=({isSelected:e})=>{const t=i7(),{colorMode:n}=zo(),r=()=>{t(i3())},o={id:"all-images-board",actionType:"MOVE_BOARD",context:{boardId:null}},{isOver:s,setNodeRef:a,active:c}=rf({id:"board_droppable_all_images",data:o});return i.jsxs(X,{sx:{flexDir:"column",justifyContent:"space-between",alignItems:"center",cursor:"pointer",w:"full",h:"full",borderRadius:"base"},children:[i.jsxs(X,{ref:a,onClick:r,sx:{position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",w:"full",aspectRatio:"1/1",overflow:"hidden",shadow:e?"selected.light":void 0,_dark:{shadow:e?"selected.dark":void 0},flexShrink:0},children:[i.jsx(xf,{boxSize:8,icon:VW,sx:{border
position: relative;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
overflow: hidden;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
margin: 0;
padding: 0;
}
.transform-component-module_content__FBWxo {
display: flex;
flex-wrap: wrap;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
margin: 0;
padding: 0;
transform-origin: 0% 0%;
}
.transform-component-module_content__FBWxo img {
pointer-events: none;
}
`,Ok={wrapper:"transform-component-module_wrapper__SPB86",content:"transform-component-module_content__FBWxo"};Mne(Dne);var Ane=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,o=e.contentClass,s=o===void 0?"":o,a=e.wrapperStyle,c=e.contentStyle,d=e.wrapperProps,f=d===void 0?{}:d,h=e.contentProps,m=h===void 0?{}:h,v=p.useContext(tv).init,y=p.useRef(null),S=p.useRef(null);return p.useEffect(function(){var x=y.current,w=S.current;x!==null&&w!==null&&v&&v(x,w)},[]),F.createElement("div",Ni({},f,{ref:y,className:"react-transform-wrapper ".concat(Ok.wrapper," ").concat(r),style:a}),F.createElement("div",Ni({},m,{ref:S,className:"react-transform-component ".concat(Ok.content," ").concat(s),style:c}),t))},TT=function(){var e=p.useContext(tv);if(!e)throw new Error("Transform context must be placed inside TransformWrapper");return e};const Tk=1.5,RT="28rem",Nne=()=>{const[e,t]=p.useState(0),[n,r]=p.useState(1),[o,s]=p.useState(1);return{rotation:e,scaleX:n,scaleY:o,flipHorizontally:()=>{r(n*-1)},flipVertically:()=>{s(o*-1)},rotateCounterClockwise:()=>{t(e===-270?0:e-90)},rotateClockwise:()=>{t(e===270?0:e+90)},reset:()=>{t(0),r(1),s(1)}}};function zne(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.5 9c-.42 0-.83.04-1.24.11L1.01 3 1 10l9 2-9 2 .01 7 8.07-3.46C9.59 21.19 12.71 24 16.5 24c4.14 0 7.5-3.36 7.5-7.5S20.64 9 16.5 9zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5z"}},{tag:"path",attr:{d:"M18.27 14.03l-1.77 1.76-1.77-1.76-.7.7 1.76 1.77-1.76 1.77.7.7 1.77-1.76 1.77 1.76.7-.7-1.76-1.77 1.76-1.77z"}}]})(e)}function $ne(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function Lne(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"}}]})(e)}function Rk(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function Bne(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"}}]})(e)}function Fne(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function Hne(e){return it({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 1
* @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 Ice=function(t){var n={},r=p,o=rh,s=Object.assign;function a(l){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+l,g=1;g<arguments.length;g++)u+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+l+"; visit "+u+" 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"),f=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),S=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),j=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 T(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 f:return"Portal";case v:return"Profiler";case m:return"StrictMode";case w:return"Suspense";case _:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case S:return(l.displayName||"Context")+".Consumer";case y:return(l._context.displayName||"Context")+".Provider";case x:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case k:return u=l.displayName||null,u!==null?u:T(l.type)||"Memo";case P:u=l._payload,l=l._init;try{return T(l(u))}catch{}}return null}function R(l){var u=l.type;switch(l.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=u.render,l=l.displayName||l.name||"",u.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return T(u);case 8:return u===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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function M(l){var u=l,g=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,u.flags&4098&&(g=u.return),l=u.return;while(l)}return u.tag===3?g:null}function D(l){if(M(l)!==l)throw Error(a(188))}function A(l){var u=l.alternate;if(!u){if(u=M(l),u===null)throw Error(a(188));return u!==l?null:l}for(var g=l,b=u;;){var C=g.return;if(C===null)break;var E=C.alternate;if(E===null){if(b=C.return,b!==null){g=b;continue}break}if(C.child===E.child){for(E=C.child;E;){if(E===g)return D(C),l;if(E===b)return D(C),u;E=E.sibling}throw Error(a(188))}if(g.return!==b.return)g=C,b=E;else{for(var N=!1,Q=C.child;Q;){if(Q===g){N=!0,g=C,b=E;break}if(Q===b){N=!0,b=C,g=E;break}Q=Q.sibling}if(!N){for(Q=E.child;Q;){if(Q===g){N=!0,g=E,b=C;break}if(Q===b){N=!0,b=E,g=C;break}Q=Q.sibling}if(!N)throw Error(a(189))}}if(g.alternate!==b)throw Error(a(190))}if(g.tag!==3)throw Error(a(188));return g.stateNode.current===g?l:u}function G(l){return l=A(l),l!==null?$(l):null}function $(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var u=$(l);if(u!==null)return u;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 u=H(l);if(u!==null)return u}l=l.sibling}return null}var U=Array.isArray,q=t.getPublicInstance,z=t.getRootHostContext,L=t.getChildHostContext,V=t.prepareForCommit,W=t.resetAfterCommit,te=t.createInstance,fe=t.appendInitialChild,ae=t.finalizeInitialChildren,J=t.prepareUpdate,B=t.shouldSetTextContent,oe=t.createTextInstance,le=t.scheduleTimeout,ge=t.cancelTimeout,se=t.noTimeout,pe=t.isPrimaryRenderer,ue=t.supportsMutation,be=t.supportsPersistence,ke=t.supportsHydration,ie=t.g
`+Rt+l}var Yt=!1;function nn(l,u){if(!l||Yt)return"";Yt=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(Be){var b=Be}Reflect.construct(l,[],u)}else{try{u.call()}catch(Be){b=Be}l.call(u.prototype)}else{try{throw Error()}catch(Be){b=Be}l()}}catch(Be){if(Be&&b&&typeof Be.stack=="string"){for(var C=Be.stack.split(`
`),E=b.stack.split(`
`),N=C.length-1,Q=E.length-1;1<=N&&0<=Q&&C[N]!==E[Q];)Q--;for(;1<=N&&0<=Q;N--,Q--)if(C[N]!==E[Q]){if(N!==1||Q!==1)do if(N--,Q--,0>Q||C[N]!==E[Q]){var he=`
`+C[N].replace(" at new "," at ");return l.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",l.displayName)),he}while(1<=N&&0<=Q);break}}}finally{Yt=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?$t(l):""}var Kt=Object.prototype.hasOwnProperty,Me=[],Ct=-1;function Bt(l){return{current:l}}function Ft(l){0>Ct||(l.current=Me[Ct],Me[Ct]=null,Ct--)}function qt(l,u){Ct++,Me[Ct]=l.current,l.current=u}var kn={},tn=Bt(kn),dn=Bt(!1),Nn=kn;function Lr(l,u){var g=l.type.contextTypes;if(!g)return kn;var b=l.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===u)return b.__reactInternalMemoizedMaskedChildContext;var C={},E;for(E in g)C[E]=u[E];return b&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=u,l.__reactInternalMemoizedMaskedChildContext=C),C}function ir(l){return l=l.childContextTypes,l!=null}function Tt(){Ft(dn),Ft(tn)}function Dn(l,u,g){if(tn.current!==kn)throw Error(a(168));qt(tn,u),qt(dn,g)}function Ln(l,u,g){var b=l.stateNode;if(u=u.childContextTypes,typeof b.getChildContext!="function")return g;b=b.getChildContext();for(var C in b)if(!(C in u))throw Error(a(108,R(l)||"Unknown",C));return s({},g,b)}function lr(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||kn,Nn=tn.current,qt(tn,l),qt(dn,dn.current),!0}function _r(l,u,g){var b=l.stateNode;if(!b)throw Error(a(169));g?(l=Ln(l,u,Nn),b.__reactInternalMemoizedMergedChildContext=l,Ft(dn),Ft(tn),qt(tn,l)):Ft(dn),qt(dn,g)}var Un=Math.clz32?Math.clz32:In,Gn=Math.log,bn=Math.LN2;function In(l){return l>>>=0,l===0?32:31-(Gn(l)/bn|0)|0}var An=64,Pn=4194304;function jn(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 Qe(l,u){var g=l.pendingLanes;if(g===0)return 0;var b=0,C=l.suspendedLanes,E=l.pingedLanes,N=g&268435455;if(N!==0){var Q=N&~C;Q!==0?b=jn(Q):(E&=N,E!==0&&(b=jn(E)))}else N=g&~C,N!==0?b=jn(N):E!==0&&(b=jn(E));if(b===0)return 0;if(u!==0&&u!==b&&!(u&C)&&(C=b&-b,E=u&-u,C>=E||C===16&&(E&4194240)!==0))return u;if(b&4&&(b|=g&16),u=l.entangledLanes,u!==0)for(l=l.entanglements,u&=b;0<u;)g=31-Un(u),C=1<<g,b|=l[g],u&=~C;return b}function Mt(l,u){switch(l){case 1:case 2:case 4:return u+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 u+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,u){for(var g=l.suspendedLanes,b=l.pingedLanes,C=l.expirationTimes,E=l.pendingLanes;0<E;){var N=31-Un(E),Q=1<<N,he=C[N];he===-1?(!(Q&g)||Q&b)&&(C[N]=Mt(Q,u)):he<=u&&(l.expiredLanes|=Q),E&=~Q}}function ct(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function _t(){var l=An;return An<<=1,!(An&4194240)&&(An=64),l}function Vt(l){for(var u=[],g=0;31>g;g++)u.push(l);return u}function xt(l,u,g){l.pendingLanes|=u,u!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,u=31-Un(u),l[u]=g}function at(l,u){var g=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u,u=l.entanglements;var b=l.eventTimes;for(l=l.expirationTimes;0<g;){var C=31-Un(g),E=1<<C;u[C]=0,b[C]=-1,l[C]=-1,g&=~E}}function De(l,u){var g=l.entangledLanes|=u;for(l=l.entanglements;g;){var b=31-Un(g),C=1<<b;C&u|l[b]&u&&(l[b]|=u),g&=~C}}var Te=0;function Le(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var We=o.unstable_scheduleCallback,ot=o.unstable_cancelCallback,At=o.unsta
Error generating stack: `+E.message+`
`+E.stack}return{value:l,source:u,stack:C,digest:null}}function Av(l,u,g){return{value:l,source:null,stack:g??null,digest:u??null}}function Nv(l,u){try{console.error(u.value)}catch(g){setTimeout(function(){throw g})}}var YR=typeof WeakMap=="function"?WeakMap:Map;function X2(l,u,g){g=Ma(-1,g),g.tag=3,g.payload={element:null};var b=u.value;return g.callback=function(){ep||(ep=!0,n0=b),Nv(l,u)},g}function Z2(l,u,g){g=Ma(-1,g),g.tag=3;var b=l.type.getDerivedStateFromError;if(typeof b=="function"){var C=u.value;g.payload=function(){return b(C)},g.callback=function(){Nv(l,u)}}var E=l.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(g.callback=function(){Nv(l,u),typeof b!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})}),g}function Q2(l,u,g){var b=l.pingCache;if(b===null){b=l.pingCache=new YR;var C=new Set;b.set(u,C)}else C=b.get(u),C===void 0&&(C=new Set,b.set(u,C));C.has(g)||(C.add(g),l=l8.bind(null,l,u,g),u.then(l,l))}function J2(l){do{var u;if((u=l.tag===13)&&(u=l.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return l;l=l.return}while(l!==null);return null}function ew(l,u,g,b,C){return l.mode&1?(l.flags|=65536,l.lanes=C,l):(l===u?l.flags|=65536:(l.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(u=Ma(-1,1),u.tag=2,pi(g,u,1))),g.lanes|=1),l)}var KR=c.ReactCurrentOwner,So=!1;function go(l,u,g,b){u.child=l===null?j2(u,null,g,b):nc(u,l.child,g,b)}function tw(l,u,g,b,C){g=g.render;var E=u.ref;return tc(u,C),b=Iv(l,u,g,b,E,C),g=Ov(),l!==null&&!So?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~C,Da(l,u,C)):(cr&&g&&uv(u),u.flags|=1,go(l,u,b,C),u.child)}function nw(l,u,g,b,C){if(l===null){var E=g.type;return typeof E=="function"&&!l0(E)&&E.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(u.tag=15,u.type=E,rw(l,u,E,b,C)):(l=ap(g.type,null,b,u,u.mode,C),l.ref=u.ref,l.return=u,u.child=l)}if(E=l.child,!(l.lanes&C)){var N=E.memoizedProps;if(g=g.compare,g=g!==null?g:Ef,g(N,b)&&l.ref===u.ref)return Da(l,u,C)}return u.flags|=1,l=yi(E,b),l.ref=u.ref,l.return=u,u.child=l}function rw(l,u,g,b,C){if(l!==null){var E=l.memoizedProps;if(Ef(E,b)&&l.ref===u.ref)if(So=!1,u.pendingProps=b=E,(l.lanes&C)!==0)l.flags&131072&&(So=!0);else return u.lanes=l.lanes,Da(l,u,C)}return zv(l,u,g,b,C)}function ow(l,u,g){var b=u.pendingProps,C=b.children,E=l!==null?l.memoizedState:null;if(b.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null,transitions:null},qt(ic,Vo),Vo|=g;else{if(!(g&1073741824))return l=E!==null?E.baseLanes|g:g,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:l,cachePool:null,transitions:null},u.updateQueue=null,qt(ic,Vo),Vo|=l,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=E!==null?E.baseLanes:g,qt(ic,Vo),Vo|=b}else E!==null?(b=E.baseLanes|g,u.memoizedState=null):b=g,qt(ic,Vo),Vo|=b;return go(l,u,C,g),u.child}function sw(l,u){var g=u.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(u.flags|=512,u.flags|=2097152)}function zv(l,u,g,b,C){var E=ir(g)?Nn:tn.current;return E=Lr(u,E),tc(u,C),g=Iv(l,u,g,b,E,C),b=Ov(),l!==null&&!So?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~C,Da(l,u,C)):(cr&&b&&uv(u),u.flags|=1,go(l,u,g,C),u.child)}function aw(l,u,g,b,C){if(ir(g)){var E=!0;lr(u)}else E=!1;if(tc(u,C),u.stateNode===null)Hf(l,u),C2(u,g,b),Sv(u,g,b,C),b=!0;else if(l===null){var N=u.stateNode,Q=u.memoizedProps;N.props=Q;var he=N.context,Be=g.contextType;typeof Be=="object"&&Be!==null?Be=os(Be):(Be=ir(g)?Nn:tn.current,Be=Lr(u,Be));var wt=g.getDerivedStateFromProps,Qt=typeof wt=="function"||typeof N.getSnapshotBeforeUpdate=="function";Qt||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Q!==b||he!==Be)&&_2(u,N,b,Be),fi=!1;var dt=u.memoizedState;N.state=dt,Rf(u,b,N,C),he=u.memoizedState,Q!==b||dt!==he||dn.current||fi?(typeof wt=="function"&&(wv(u,g,wt,b),he=u.memoizedState),(Q=fi||S2(u,g,Q,b,dt,he,Be))?(Qt||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMo
`+(b.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:c.ReactCurrentDispatcher,findHostInstanceByFiber:h8,findFiberByHostInstance:l.findFiberByHostInstance||m8,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{nr=u.inject(l),Sn=u}catch{}l=!!u.checkDCE}}return l},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(l,u,g,b){if(!ft)throw Error(a(363));l=Zv(l,u);var C=Ye(l,g,b).disconnect;return{disconnect:function(){C()}}},n.registerMutableSourceForHydration=function(l,u){var g=u._getVersion;g=g(u._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[u,g]:l.mutableSourceEagerHydrationData.push(u,g)},n.runWithPriority=function(l,u){var g=Te;try{return Te=l,u()}finally{Te=g}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(l,u,g,b){var C=u.current,E=so(),N=gi(C);return g=zw(g),u.context===null?u.context=g:u.pendingContext=g,u=Ma(E,N),u.payload={element:l},b=b===void 0?null:b,b!==null&&(u.callback=b),l=pi(C,u,N),l!==null&&(is(l,C,N,E),Tf(l,C,N)),N},n};wR.exports=Ice;var Oce=wR.exports;const Tce=gu(Oce);var SR={exports:{}},Ql={};/**
* @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.
*/Ql.ConcurrentRoot=1;Ql.ContinuousEventPriority=4;Ql.DefaultEventPriority=16;Ql.DiscreteEventPriority=1;Ql.IdleEventPriority=536870912;Ql.LegacyRoot=0;SR.exports=Ql;var CR=SR.exports;const RP={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let MP=!1,DP=!1;const l2=".react-konva-event",Rce=`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
`,Mce=`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
`,Dce={};function cv(e,t,n=Dce){if(!MP&&"zIndex"in t&&(console.warn(Mce),MP=!0),!DP&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(Rce),DP=!0)}for(var s in n)if(!RP[s]){var a=s.slice(0,2)==="on",c=n[s]!==t[s];if(a&&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 f=!t.hasOwnProperty(s);f&&e.setAttr(s,void 0)}var h=t._useStrictMode,m={},v=!1;const y={};for(var s in t)if(!RP[s]){var a=s.slice(0,2)==="on",S=n[s]!==t[s];if(a&&S){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),t[s]&&(y[d]=t[s])}!a&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(v=!0,m[s]=t[s])}v&&(e.setAttrs(m),Qi(e));for(var d in y)e.on(d+l2,y[d])}function Qi(e){if(!$M.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const _R={},Ace={};Jd.Node.prototype._applyProps=cv;function Nce(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),Qi(e)}function zce(e,t,n){let r=Jd[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=Jd.Group);const o={},s={};for(var a in t){var c=a.slice(0,2)==="on";c?s[a]=t[a]:o[a]=t[a]}const d=new r(o);return cv(d,s),d}function $ce(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Lce(e,t,n){return!1}function Bce(e){return e}function Fce(){return null}function Hce(){return null}function Vce(e,t,n,r){return Ace}function Wce(){}function Uce(e){}function Gce(e,t){return!1}function qce(){return _R}function Yce(){return _R}const Kce=setTimeout,Xce=clearTimeout,Zce=-1;function Qce(e,t){return!1}const Jce=!1,eue=!0,tue=!0;function nue(e,t){t.parent===e?t.moveToTop():e.add(t),Qi(e)}function rue(e,t){t.parent===e?t.moveToTop():e.add(t),Qi(e)}function kR(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Qi(e)}function oue(e,t,n){kR(e,t,n)}function sue(e,t){t.destroy(),t.off(l2),Qi(e)}function aue(e,t){t.destroy(),t.off(l2),Qi(e)}function iue(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function lue(e,t,n){}function cue(e,t,n,r,o){cv(e,o,r)}function uue(e){e.hide(),Qi(e)}function due(e){}function fue(e,t){(t.visible==null||t.visible)&&e.show()}function pue(e,t){}function hue(e){}function mue(){}const gue=()=>CR.DefaultEventPriority,vue=Object.freeze(Object.defineProperty({__proto__:null,appendChild:nue,appendChildToContainer:rue,appendInitialChild:Nce,cancelTimeout:Xce,clearContainer:hue,commitMount:lue,commitTextUpdate:iue,commitUpdate:cue,createInstance:zce,createTextInstance:$ce,detachDeletedInstance:mue,finalizeInitialChildren:Lce,getChildHostContext:Yce,getCurrentEventPriority:gue,getPublicInstance:Bce,getRootHostContext:qce,hideInstance:uue,hideTextInstance:due,idlePriority:rh.unstable_IdlePriority,insertBefore:kR,insertInContainerBefore:oue,isPrimaryRenderer:Jce,noTimeout:Zce,now:rh.unstable_now,prepareForCommit:Fce,preparePortalMount:Hce,prepareUpdate:Vce,removeChild:sue,removeChildFromContainer:aue,resetAfterCommit:Wce,resetTextContent:Uce,run:rh.unstable_runWithPriority,scheduleTimeout:Kce,shouldDeprioritizeSubtree:Gce,shouldSetTextContent:Qce,supportsMutation:tue,unhideInstance:fue,unhideTextInstance:pue,warnsIfNotActing:eue},Symbol.toStringTag,{value:"Module"}));var yue=Object.defineProperty,bue=Object.defineProperties,xue=Object.getOwnPropertyDescriptors,AP=Object.getOwnPropertySymbols,wue=Object.prototype.hasOwnProperty,Sue=Object.prototype.propertyIsEnumerable,NP=(e,t,n)=>t in e?yue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zP=(e,t)=>{for(var n in t||(t={}))wue.call(t,n)&&NP(e,n,t[n]);if(AP)for(var n of AP(t))Sue.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),Zue=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=Y(Xue),[a,c]=p.useState(null),[d,f]=p.useState(0),h=p.useRef(null),m=p.useCallback(()=>{f(d+1),setTimeout(m,500)},[d]);return p.useEffect(()=>{if(a)return;const v=new Image;v.onload=()=>{c(v)},v.src=BP(n)},[a,n]),p.useEffect(()=>{a&&(a.src=BP(n))},[a,n]),p.useEffect(()=>{const v=setInterval(()=>f(y=>(y+1)%5),50);return()=>clearInterval(v)},[]),!a||!uc(r.x)||!uc(r.y)||!uc(s)||!uc(o.width)||!uc(o.height)?null:i.jsx(ka,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:a,fillPatternOffsetY:uc(d)?d:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Que=Oe([vn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:en}}),Jue=e=>{const{...t}=e,{objects:n}=Y(Que);return i.jsx(ti,{listening:!1,...t,children:n.filter(ZM).map((r,o)=>i.jsx(Km,{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 cl=p,ede=function(t,n,r){const o=cl.useRef("loading"),s=cl.useRef(),[a,c]=cl.useState(0),d=cl.useRef(),f=cl.useRef(),h=cl.useRef();return(d.current!==t||f.current!==n||h.current!==r)&&(o.current="loading",s.current=void 0,d.current=t,f.current=n,h.current=r),cl.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function v(){o.current="loaded",s.current=m,c(Math.random())}function y(){o.current="failed",s.current=void 0,c(Math.random())}return m.addEventListener("load",v),m.addEventListener("error",y),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",v),m.removeEventListener("error",y)}},[t,n,r]),[s.current,o.current]};const tde=gu(ede),TR=e=>{const{width:t,height:n,x:r,y:o,imageName:s}=e.canvasImage,{currentData:a,isError:c}=xa(s??Ja.skipToken),[d]=tde((a==null?void 0:a.image_url)??"",QM.get()?"use-credentials":"anonymous");return c?i.jsx(ka,{x:r,y:o,width:t,height:n,fill:"red"}):i.jsx(IR,{x:r,y:o,image:d,listening:!1})},nde=Oe([vn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:en}}),rde=()=>{const{objects:e}=Y(nde);return e?i.jsx(ti,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(JM(t))return i.jsx(TR,{canvasImage:t},n);if(e9(t)){const r=i.jsx(Km,{points:t.points,stroke:t.color?Il(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?i.jsx(ti,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(t9(t))return i.jsx(ka,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Il(t.color)},n);if(n9(t))return i.jsx(ka,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},ode=Oe([vn],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:{x:o,y:s},boundingBoxDimensions:{width:a,height:c}}=e,{selectedImageIndex:d,images:f}=t.stagingArea;return{currentStagingAreaImage:f.length>0&&d!==void 0?f[d]:void 0,isOnFirstImage:d===0,isOnLastImage:d===f.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:o,y:s,width:a,height:c}},{memoizeOptions:{resultEqualityCheck:en}}),sde=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:a,width:c,height:d}=Y(ode);return i.jsxs(ti,{...t,children:[r&&n&&i.jsx(TR,{canvasImage:n}),o&&i.jsxs(ti,{children:[i.jsx(ka,{x:s,y:a,width:c,height:d,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),i.jsx(ka,{x:s,y:a,width:c,height:d,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},ade=Oe([vn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n,sessionId:r}},shouldShowSta