diff --git a/.gitignore b/.gitignore index 2b99d137b1..29d27d78ed 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ __pycache__/ .Python build/ develop-eggs/ -# dist/ +dist/ downloads/ eggs/ .eggs/ @@ -187,3 +187,4 @@ installer/install.bat installer/install.sh installer/update.bat installer/update.sh +installer/InvokeAI-Installer/ diff --git a/installer/create_installer.sh b/installer/create_installer.sh index 4e0771fecc..ef489af751 100755 --- a/installer/create_installer.sh +++ b/installer/create_installer.sh @@ -2,43 +2,119 @@ set -e +BCYAN="\e[1;36m" +BYELLOW="\e[1;33m" +BGREEN="\e[1;32m" +BRED="\e[1;31m" +RED="\e[31m" +RESET="\e[0m" + +function is_bin_in_path { + builtin type -P "$1" &>/dev/null +} + +function does_tag_exist { + git rev-parse --quiet --verify "refs/tags/$1" >/dev/null +} + +function git_show_ref { + git show-ref --dereference $1 --abbrev 7 +} + +function git_show { + git show -s --format='%h %s' $1 +} + cd "$(dirname "$0")" +echo -e "${BYELLOW}This script must be run from the installer directory!${RESET}" +echo "The current working directory is $(pwd)" +read -p "If that looks right, press any key to proceed, or CTRL-C to exit..." +echo + +# Some machines only have `python3` in PATH, others have `python` - make an alias. +# We can use a function to approximate an alias within a non-interactive shell. +if ! is_bin_in_path python && is_bin_in_path python3; then + function python { + python3 "$@" + } +fi + if [[ -v "VIRTUAL_ENV" ]]; then # we can't just call 'deactivate' because this function is not exported # to the environment of this script from the bash process that runs the script - echo "A virtual environment is activated. Please deactivate it before proceeding". + echo -e "${BRED}A virtual environment is activated. Please deactivate it before proceeding.${RESET}" exit -1 fi -VERSION=$(cd ..; python -c "from invokeai.version import __version__ as version; print(version)") +VERSION=$( + cd .. + python -c "from invokeai.version import __version__ as version; print(version)" +) PATCH="" VERSION="v${VERSION}${PATCH}" LATEST_TAG="v3-latest" -echo Building installer for version $VERSION -echo "Be certain that you're in the 'installer' directory before continuing." -read -p "Press any key to continue, or CTRL-C to exit..." +echo "Building installer for version $VERSION..." +echo -read -e -p "Tag this repo with '${VERSION}' and '${LATEST_TAG}'? [n]: " input -RESPONSE=${input:='n'} -if [ "$RESPONSE" == 'y' ]; then - - git push origin :refs/tags/$VERSION - if ! git tag -fa $VERSION ; then - echo "Existing/invalid tag" - exit -1 - fi - - git push origin :refs/tags/$LATEST_TAG - git tag -fa $LATEST_TAG - - echo "remember to push --tags!" +if does_tag_exist $VERSION; then + echo -e "${BCYAN}${VERSION}${RESET} already exists:" + git_show_ref tags/$VERSION + echo +fi +if does_tag_exist $LATEST_TAG; then + echo -e "${BCYAN}${LATEST_TAG}${RESET} already exists:" + git_show_ref tags/$LATEST_TAG + echo fi -# ---------------------- +echo -e "${BGREEN}HEAD${RESET}:" +git_show +echo -echo Building the wheel +echo -e -n "Create tags ${BCYAN}${VERSION}${RESET} and ${BCYAN}${LATEST_TAG}${RESET} @ ${BGREEN}HEAD${RESET}, ${RED}deleting existing tags on remote${RESET}? " +read -e -p 'y/n [n]: ' input +RESPONSE=${input:='n'} +if [ "$RESPONSE" == 'y' ]; then + echo + echo -e "Deleting ${BCYAN}${VERSION}${RESET} tag on remote..." + git push origin :refs/tags/$VERSION + + echo -e "Tagging ${BGREEN}HEAD${RESET} with ${BCYAN}${VERSION}${RESET} locally..." + if ! git tag -fa $VERSION; then + echo "Existing/invalid tag" + exit -1 + fi + + echo -e "Deleting ${BCYAN}${LATEST_TAG}${RESET} tag on remote..." + git push origin :refs/tags/$LATEST_TAG + + echo -e "Tagging ${BGREEN}HEAD${RESET} with ${BCYAN}${LATEST_TAG}${RESET} locally..." + git tag -fa $LATEST_TAG + + echo + echo -e "${BYELLOW}Remember to 'git push origin --tags'!${RESET}" +fi + +# ---------------------- FRONTEND ---------------------- + +pushd ../invokeai/frontend/web >/dev/null +echo +echo "Installing frontend dependencies..." +echo +pnpm i --frozen-lockfile +echo +echo "Building frontend..." +echo +pnpm build +popd + +# ---------------------- BACKEND ---------------------- + +echo +echo "Building wheel..." +echo # install the 'build' package in the user site packages, if needed # could be improved by using a temporary venv, but it's tiny and harmless @@ -46,12 +122,15 @@ if [[ $(python -c 'from importlib.util import find_spec; print(find_spec("build" pip install --user build fi -rm -r ../build +rm -rf ../build + python -m build --wheel --outdir dist/ ../. # ---------------------- -echo Building installer zip fles for InvokeAI $VERSION +echo +echo "Building installer zip files for InvokeAI ${VERSION}..." +echo # get rid of any old ones rm -f *.zip @@ -72,7 +151,7 @@ cp install.sh.in InvokeAI-Installer/install.sh chmod a+x InvokeAI-Installer/install.sh # Windows -perl -p -e "s/^set INVOKEAI_VERSION=.*/set INVOKEAI_VERSION=$VERSION/" install.bat.in > InvokeAI-Installer/install.bat +perl -p -e "s/^set INVOKEAI_VERSION=.*/set INVOKEAI_VERSION=$VERSION/" install.bat.in >InvokeAI-Installer/install.bat cp WinLongPathsEnabled.reg InvokeAI-Installer/ # Zip everything up diff --git a/invokeai/app/api_app.py b/invokeai/app/api_app.py index 79c7740485..13fd541139 100644 --- a/invokeai/app/api_app.py +++ b/invokeai/app/api_app.py @@ -219,18 +219,19 @@ def overridden_redoc() -> HTMLResponse: web_root_path = Path(list(web_dir.__path__)[0]) +# Only serve the UI if we it has a build +if (web_root_path / "dist").exists(): + # Cannot add headers to StaticFiles, so we must serve index.html with a custom route + # Add cache-control: no-store header to prevent caching of index.html, which leads to broken UIs at release + @app.get("/", include_in_schema=False, name="ui_root") + def get_index() -> FileResponse: + return FileResponse(Path(web_root_path, "dist/index.html"), headers={"Cache-Control": "no-store"}) -# Cannot add headers to StaticFiles, so we must serve index.html with a custom route -# Add cache-control: no-store header to prevent caching of index.html, which leads to broken UIs at release -@app.get("/", include_in_schema=False, name="ui_root") -def get_index() -> FileResponse: - return FileResponse(Path(web_root_path, "dist/index.html"), headers={"Cache-Control": "no-store"}) + # # Must mount *after* the other routes else it borks em + app.mount("/assets", StaticFiles(directory=Path(web_root_path, "dist/assets/")), name="assets") + app.mount("/locales", StaticFiles(directory=Path(web_root_path, "dist/locales/")), name="locales") - -# # Must mount *after* the other routes else it borks em app.mount("/static", StaticFiles(directory=Path(web_root_path, "static/")), name="static") # docs favicon is in here -app.mount("/assets", StaticFiles(directory=Path(web_root_path, "dist/assets/")), name="assets") -app.mount("/locales", StaticFiles(directory=Path(web_root_path, "dist/locales/")), name="locales") def invoke_api() -> None: diff --git a/invokeai/frontend/web/.gitignore b/invokeai/frontend/web/.gitignore index cacf107e1b..402095f4be 100644 --- a/invokeai/frontend/web/.gitignore +++ b/invokeai/frontend/web/.gitignore @@ -9,7 +9,8 @@ lerna-debug.log* node_modules # We want to distribute the repo -# dist +dist +dist/** dist-ssr *.local @@ -38,4 +39,4 @@ stats.html # Yalc .yalc -yalc.lock \ No newline at end of file +yalc.lock diff --git a/invokeai/frontend/web/dist/assets/App-6125620a.css b/invokeai/frontend/web/dist/assets/App-6125620a.css deleted file mode 100644 index b231132262..0000000000 --- a/invokeai/frontend/web/dist/assets/App-6125620a.css +++ /dev/null @@ -1 +0,0 @@ -.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:rgba(255,255,255,.5);padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%} diff --git a/invokeai/frontend/web/dist/assets/App-6440ab3b.js b/invokeai/frontend/web/dist/assets/App-6440ab3b.js deleted file mode 100644 index 819de2897b..0000000000 --- a/invokeai/frontend/web/dist/assets/App-6440ab3b.js +++ /dev/null @@ -1,171 +0,0 @@ -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,go as NN,gp as $N,gq as CS,gr as LN,gs as zN,gt as FN,gu as BN,gv as HN,gw as WN,gx as VN,gy as UN,gz as GN,gA as wS,gB as qN,gC as KN,gD as QN,gE as XN,gF as YN,gG as JN,gH as ZN,gI as e9,gJ as t9,gK as n9,gL as r9,gM as o9,gN as s9,gO as Ef,gP as a9,gQ as i9,gR as l9,gS as c9,gT as u9,gU as d9,gV as f9,gW as p9,gX as SS,gY as Ih,gZ as h9,g_ as Xh,g$ as jP,h0 as Yh,h1 as m9,h2 as g9,h3 as Zc,h4 as _P,h5 as IP,h6 as ny,h7 as v9,h8 as b9,h9 as x9,ha as ab,hb as PP,hc as y9,hd as C9,he as EP,hf as w9,hg as S9,hh as k9,hi as j9,hj as _9,hk as kS,hl as kc,hm as I9,hn as P9,ho as E9,hp as M9,hq as O9,hr as jS,hs as A9,ht as R9,hu as D9,hv as T9,hw as N9,hx as $9,hy as L9,hz as z9,hA as Gv,hB as qv,hC as Kv,hD as Kp,hE as _S,hF as ib,hG as IS,hH as F9,hI as B9,hJ as MP,hK as H9,hL as W9,hM as V9,hN as U9,hO as G9,hP as q9,hQ as K9,hR as Q9,hS as X9,hT as Y9,hU as J9,hV as Z9,hW as e$,hX as t$,hY as n$,hZ as Qp,h_ as Qv,h$ as r$,i0 as o$,i1 as s$,i2 as a$,i3 as i$,i4 as l$,i5 as c$,i6 as u$,i7 as d$,i8 as PS,i9 as ES,ia as f$,ib as p$,ic as h$,id as m$}from"./index-f820e2e3.js";import{u as OP,a as Ii,b as g$,r as qe,f as v$,g as MS,c as Xt,d as zr}from"./MantineProvider-a6a1d85c.js";var b$=200;function x$(e,t,n,r){var o=-1,s=xI,i=!0,c=e.length,d=[],p=t.length;if(!c)return d;n&&(t=Ou(t,vI(n))),r?(s=yI,i=!1):t.length>=b$&&(s=G1,i=!1,t=new bI(t));e:for(;++o=120&&h.length>=120)?new bI(i&&h):void 0}h=e[0];var m=-1,g=c[0];e:for(;++m{r.has(s)&&n(o,s)})}function T$(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}const AP=({id:e,x:t,y:n,width:r,height:o,style:s,color:i,strokeColor:c,strokeWidth:d,className:p,borderRadius:h,shapeRendering:m,onClick:g,selected:b})=>{const{background:y,backgroundColor:x}=s||{},w=i||y||x;return z.createElement("rect",{className:Px(["react-flow__minimap-node",{selected:b},p]),x:t,y:n,rx:h,ry:h,width:r,height:o,fill:w,stroke:c,strokeWidth:d,shapeRendering:m,onClick:g?S=>g(S,e):void 0})};AP.displayName="MiniMapNode";var N$=l.memo(AP);const $$=e=>e.nodeOrigin,L$=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),Xv=e=>e instanceof Function?e:()=>e;function z$({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o=2,nodeComponent:s=N$,onClick:i}){const c=Bh(L$,Ex),d=Bh($$),p=Xv(t),h=Xv(e),m=Xv(n),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return z.createElement(z.Fragment,null,c.map(b=>{const{x:y,y:x}=rD(b,d).positionAbsolute;return z.createElement(s,{key:b.id,x:y,y:x,width:b.width,height:b.height,style:b.style,selected:b.selected,className:m(b),color:p(b),borderRadius:r,strokeColor:h(b),strokeWidth:o,shapeRendering:g,onClick:i,id:b.id})}))}var F$=l.memo(z$);const B$=200,H$=150,W$=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?uD(dD(t,e.nodeOrigin),n):n,rfId:e.rfId}},V$="react-flow__minimap-desc";function RP({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:i=2,nodeComponent:c,maskColor:d="rgb(240, 240, 240, 0.6)",maskStrokeColor:p="none",maskStrokeWidth:h=1,position:m="bottom-right",onClick:g,onNodeClick:b,pannable:y=!1,zoomable:x=!1,ariaLabel:w="React Flow mini map",inversePan:S=!1,zoomStep:j=10,offsetScale:I=5}){const _=oD(),M=l.useRef(null),{boundingRect:E,viewBB:A,rfId:R}=Bh(W$,Ex),D=(e==null?void 0:e.width)??B$,O=(e==null?void 0:e.height)??H$,T=E.width/D,K=E.height/O,G=Math.max(T,K),X=G*D,Z=G*O,te=I*G,V=E.x-(X-E.width)/2-te,oe=E.y-(Z-E.height)/2-te,ne=X+te*2,se=Z+te*2,re=`${V$}-${R}`,ae=l.useRef(0);ae.current=G,l.useEffect(()=>{if(M.current){const $=sD(M.current),F=W=>{const{transform:U,d3Selection:ee,d3Zoom:J}=_.getState();if(W.sourceEvent.type!=="wheel"||!ee||!J)return;const ge=-W.sourceEvent.deltaY*(W.sourceEvent.deltaMode===1?.05:W.sourceEvent.deltaMode?1:.002)*j,he=U[2]*Math.pow(2,ge);J.scaleTo(ee,he)},q=W=>{const{transform:U,d3Selection:ee,d3Zoom:J,translateExtent:ge,width:he,height:de}=_.getState();if(W.sourceEvent.type!=="mousemove"||!ee||!J)return;const _e=ae.current*Math.max(1,U[2])*(S?-1:1),Pe={x:U[0]-W.sourceEvent.movementX*_e,y:U[1]-W.sourceEvent.movementY*_e},ze=[[0,0],[he,de]],ht=lD.translate(Pe.x,Pe.y).scale(U[2]),Je=J.constrain()(ht,ze,ge);J.transform(ee,Je)},pe=aD().on("zoom",y?q:null).on("zoom.wheel",x?F:null);return $.call(pe),()=>{$.on("zoom",null)}}},[y,x,S,j]);const B=g?$=>{const F=cD($);g($,{x:F[0],y:F[1]})}:void 0,Y=b?($,F)=>{const q=_.getState().nodeInternals.get(F);b($,q)}:void 0;return z.createElement(iD,{position:m,style:e,className:Px(["react-flow__minimap",t]),"data-testid":"rf__minimap"},z.createElement("svg",{width:D,height:O,viewBox:`${V} ${oe} ${ne} ${se}`,role:"img","aria-labelledby":re,ref:M,onClick:B},w&&z.createElement("title",{id:re},w),z.createElement(F$,{onClick:Y,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:i,nodeComponent:c}),z.createElement("path",{className:"react-flow__minimap-mask",d:`M${V-te},${oe-te}h${ne+te*2}v${se+te*2}h${-ne-te*2}z - 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(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(Array.from(this.descendants.keys()));this.assignIndex(t)}),Mr(this,"destroy",()=>{this.descendants.clear()}),Mr(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Mr(this,"count",()=>this.descendants.size),Mr(this,"enabledCount",()=>this.enabledValues().length),Mr(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Mr(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Mr(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Mr(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Mr(this,"first",()=>this.item(0)),Mr(this,"firstEnabled",()=>this.enabledItem(0)),Mr(this,"last",()=>this.item(this.descendants.size-1)),Mr(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Mr(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Mr(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Mr(this,"next",(e,t=!0)=>{const n=DS(e,this.count(),t);return this.item(n)}),Mr(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=DS(r,this.enabledCount(),t);return this.enabledItem(o)}),Mr(this,"prev",(e,t=!0)=>{const n=TS(e,this.count()-1,t);return this.item(n)}),Mr(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=TS(r,this.enabledCount()-1,t);return this.enabledItem(o)}),Mr(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=RS(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const o={node:e,index:-1,...t};this.descendants.set(e,o),this.assignIndex(r)})}};function dL(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function xn(...e){return t=>{e.forEach(n=>{dL(n,t)})}}function fL(...e){return l.useMemo(()=>xn(...e),e)}function pL(){const e=l.useRef(new uL);return ub(()=>()=>e.current.destroy()),e.current}var[hL,LP]=Un({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function mL(e){const t=LP(),[n,r]=l.useState(-1),o=l.useRef(null);ub(()=>()=>{o.current&&t.unregister(o.current)},[]),ub(()=>{if(!o.current)return;const i=Number(o.current.dataset.index);n!=i&&!Number.isNaN(i)&&r(i)});const s=Jh(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:xn(s,o)}}function ry(){return[Jh(hL),()=>Jh(LP()),()=>pL(),o=>mL(o)]}var[gL,wg]=Un({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[vL,oy]=Un({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[bL,Mbe,xL,yL]=ry(),Nc=De(function(t,n){const{getButtonProps:r}=oy(),o=r(t,n),i={display:"flex",alignItems:"center",width:"100%",outline:0,...wg().button};return a.jsx(Ae.button,{...o,className:kt("chakra-accordion__button",t.className),__css:i})});Nc.displayName="AccordionButton";function Of(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(g,b)=>g!==b}=e,s=vr(r),i=vr(o),[c,d]=l.useState(n),p=t!==void 0,h=p?t:c,m=vr(g=>{const y=typeof g=="function"?g(h):g;i(h,y)&&(p||d(y),s(y))},[p,s,h,i]);return[h,m]}function CL(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:s,...i}=e;kL(e),jL(e);const c=xL(),[d,p]=l.useState(-1);l.useEffect(()=>()=>{p(-1)},[]);const[h,m]=Of({value:r,defaultValue(){return o?n??[]:n??-1},onChange:t});return{index:h,setIndex:m,htmlProps:i,getAccordionItemProps:b=>{let y=!1;return b!==null&&(y=Array.isArray(h)?h.includes(b):h===b),{isOpen:y,onChange:w=>{if(b!==null)if(o&&Array.isArray(h)){const S=w?h.concat(b):h.filter(j=>j!==b);m(S)}else w?m(b):s&&m(-1)}}},focusedIndex:d,setFocusedIndex:p,descendants:c}}var[wL,sy]=Un({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function SL(e){const{isDisabled:t,isFocusable:n,id:r,...o}=e,{getAccordionItemProps:s,setFocusedIndex:i}=sy(),c=l.useRef(null),d=l.useId(),p=r??d,h=`accordion-button-${p}`,m=`accordion-panel-${p}`;_L(e);const{register:g,index:b,descendants:y}=yL({disabled:t&&!n}),{isOpen:x,onChange:w}=s(b===-1?null:b);IL({isOpen:x,isDisabled:t});const S=()=>{w==null||w(!0)},j=()=>{w==null||w(!1)},I=l.useCallback(()=>{w==null||w(!x),i(b)},[b,i,x,w]),_=l.useCallback(R=>{const O={ArrowDown:()=>{const T=y.nextEnabled(b);T==null||T.node.focus()},ArrowUp:()=>{const T=y.prevEnabled(b);T==null||T.node.focus()},Home:()=>{const T=y.firstEnabled();T==null||T.node.focus()},End:()=>{const T=y.lastEnabled();T==null||T.node.focus()}}[R.key];O&&(R.preventDefault(),O(R))},[y,b]),M=l.useCallback(()=>{i(b)},[i,b]),E=l.useCallback(function(D={},O=null){return{...D,type:"button",ref:xn(g,c,O),id:h,disabled:!!t,"aria-expanded":!!x,"aria-controls":m,onClick:ot(D.onClick,I),onFocus:ot(D.onFocus,M),onKeyDown:ot(D.onKeyDown,_)}},[h,t,x,I,M,_,m,g]),A=l.useCallback(function(D={},O=null){return{...D,ref:O,role:"region",id:m,"aria-labelledby":h,hidden:!x}},[h,x,m]);return{isOpen:x,isDisabled:t,isFocusable:n,onOpen:S,onClose:j,getButtonProps:E,getPanelProps:A,htmlProps:o}}function kL(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;wf({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function jL(e){wf({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function _L(e){wf({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}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:"enter",exit:"exit",variants:AL},RL=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,initialScale:i=.95,className:c,transition:d,transitionEnd:p,delay:h,...m}=t,g=r?o&&r:!0,b=o||r?"enter":"exit",y={initialScale:i,reverse:s,transition:d,transitionEnd:p,delay:h};return a.jsx(So,{custom:y,children:g&&a.jsx(Ar.div,{ref:n,className:kt("chakra-offset-slide",c),...FP,animate:b,custom:y,...m})})});RL.displayName="ScaleFade";var DL={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,x:e,y:t,transition:(s=n==null?void 0:n.exit)!=null?s:ii.exit(Tl.exit,o),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:ii.enter(Tl.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:s})=>{var i;const c={x:t,y:e};return{opacity:0,transition:(i=n==null?void 0:n.exit)!=null?i:ii.exit(Tl.exit,s),...o?{...c,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...c,...r==null?void 0:r.exit}}}}},Md={initial:"initial",animate:"enter",exit:"exit",variants:DL},TL=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,className:i,offsetX:c=0,offsetY:d=8,transition:p,transitionEnd:h,delay:m,...g}=t,b=r?o&&r:!0,y=o||r?"enter":"exit",x={offsetX:c,offsetY:d,reverse:s,transition:p,transitionEnd:h,delay:m};return a.jsx(So,{custom:x,children:b&&a.jsx(Ar.div,{ref:n,className:kt("chakra-offset-slide",i),custom:x,...Md,animate:y,...g})})});TL.displayName="SlideFade";var zc=De(function(t,n){const{className:r,motionProps:o,...s}=t,{reduceMotion:i}=sy(),{getPanelProps:c,isOpen:d}=oy(),p=c(s,n),h=kt("chakra-accordion__panel",r),m=wg();i||delete p.hidden;const g=a.jsx(Ae.div,{...p,__css:m.panel,className:h});return i?g:a.jsx(Af,{in:d,...o,children:g})});zc.displayName="AccordionPanel";var BP=De(function({children:t,reduceMotion:n,...r},o){const s=no("Accordion",r),i=lr(r),{htmlProps:c,descendants:d,...p}=CL(i),h=l.useMemo(()=>({...p,reduceMotion:!!n}),[p,n]);return a.jsx(bL,{value:d,children:a.jsx(wL,{value:h,children:a.jsx(gL,{value:s,children:a.jsx(Ae.div,{ref:o,...c,className:kt("chakra-accordion",r.className),__css:s.root,children:t})})})})});BP.displayName="Accordion";function Sg(e){return l.Children.toArray(e).filter(t=>l.isValidElement(t))}var[NL,$L]=Un({strict:!1,name:"ButtonGroupContext"}),LL={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},zL={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},Hn=De(function(t,n){const{size:r,colorScheme:o,variant:s,className:i,spacing:c="0.5rem",isAttached:d,isDisabled:p,orientation:h="horizontal",...m}=t,g=kt("chakra-button__group",i),b=l.useMemo(()=>({size:r,colorScheme:o,variant:s,isDisabled:p}),[r,o,s,p]);let y={display:"inline-flex",...d?LL[h]:zL[h](c)};const x=h==="vertical";return a.jsx(NL,{value:b,children:a.jsx(Ae.div,{ref:n,role:"group",__css:y,className:g,"data-attached":d?"":void 0,"data-orientation":h,flexDir:x?"column":void 0,...m})})});Hn.displayName="ButtonGroup";function FL(e){const[t,n]=l.useState(!e);return{ref:l.useCallback(s=>{s&&n(s.tagName==="BUTTON")},[]),type:t?"button":void 0}}function db(e){const{children:t,className:n,...r}=e,o=l.isValidElement(t)?l.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,s=kt("chakra-button__icon",n);return a.jsx(Ae.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:s,children:o})}db.displayName="ButtonIcon";function fb(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=a.jsx(Ci,{color:"currentColor",width:"1em",height:"1em"}),className:s,__css:i,...c}=e,d=kt("chakra-button__spinner",s),p=n==="start"?"marginEnd":"marginStart",h=l.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[p]:t?r:0,fontSize:"1em",lineHeight:"normal",...i}),[i,t,p,r]);return a.jsx(Ae.div,{className:d,...c,__css:h,children:o})}fb.displayName="ButtonSpinner";var nl=De((e,t)=>{const n=$L(),r=cl("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:s,isActive:i,children:c,leftIcon:d,rightIcon:p,loadingText:h,iconSpacing:m="0.5rem",type:g,spinner:b,spinnerPlacement:y="start",className:x,as:w,...S}=lr(e),j=l.useMemo(()=>{const E={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:E}}},[r,n]),{ref:I,type:_}=FL(w),M={rightIcon:p,leftIcon:d,iconSpacing:m,children:c};return a.jsxs(Ae.button,{ref:fL(t,I),as:w,type:g??_,"data-active":Vt(i),"data-loading":Vt(s),__css:j,className:kt("chakra-button",x),...S,disabled:o||s,children:[s&&y==="start"&&a.jsx(fb,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:m,children:b}),s?h||a.jsx(Ae.span,{opacity:0,children:a.jsx($S,{...M})}):a.jsx($S,{...M}),s&&y==="end"&&a.jsx(fb,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:m,children:b})]})});nl.displayName="Button";function $S(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return a.jsxs(a.Fragment,{children:[t&&a.jsx(db,{marginEnd:o,children:t}),r,n&&a.jsx(db,{marginStart:o,children:n})]})}var Ia=De((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":s,...i}=e,c=n||r,d=l.isValidElement(c)?l.cloneElement(c,{"aria-hidden":!0,focusable:!1}):null;return a.jsx(nl,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":s,...i,children:d})});Ia.displayName="IconButton";var[Obe,BL]=Un({name:"CheckboxGroupContext",strict:!1});function HL(e){const[t,n]=l.useState(e),[r,o]=l.useState(!1);return e!==t&&(o(!0),n(e)),r}function WL(e){return a.jsx(Ae.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:a.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function VL(e){return a.jsx(Ae.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:a.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function UL(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?VL:WL;return n||t?a.jsx(Ae.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:a.jsx(o,{...r})}):null}var[GL,HP]=Un({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[qL,Rf]=Un({strict:!1,name:"FormControlContext"});function KL(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:s,...i}=e,c=l.useId(),d=t||`field-${c}`,p=`${d}-label`,h=`${d}-feedback`,m=`${d}-helptext`,[g,b]=l.useState(!1),[y,x]=l.useState(!1),[w,S]=l.useState(!1),j=l.useCallback((A={},R=null)=>({id:m,...A,ref:xn(R,D=>{D&&x(!0)})}),[m]),I=l.useCallback((A={},R=null)=>({...A,ref:R,"data-focus":Vt(w),"data-disabled":Vt(o),"data-invalid":Vt(r),"data-readonly":Vt(s),id:A.id!==void 0?A.id:p,htmlFor:A.htmlFor!==void 0?A.htmlFor:d}),[d,o,w,r,s,p]),_=l.useCallback((A={},R=null)=>({id:h,...A,ref:xn(R,D=>{D&&b(!0)}),"aria-live":"polite"}),[h]),M=l.useCallback((A={},R=null)=>({...A,...i,ref:R,role:"group","data-focus":Vt(w),"data-disabled":Vt(o),"data-invalid":Vt(r),"data-readonly":Vt(s)}),[i,o,w,r,s]),E=l.useCallback((A={},R=null)=>({...A,ref:R,role:"presentation","aria-hidden":!0,children:A.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!s,isDisabled:!!o,isFocused:!!w,onFocus:()=>S(!0),onBlur:()=>S(!1),hasFeedbackText:g,setHasFeedbackText:b,hasHelpText:y,setHasHelpText:x,id:d,labelId:p,feedbackId:h,helpTextId:m,htmlProps:i,getHelpTextProps:j,getErrorMessageProps:_,getRootProps:M,getLabelProps:I,getRequiredIndicatorProps:E}}var Vn=De(function(t,n){const r=no("Form",t),o=lr(t),{getRootProps:s,htmlProps:i,...c}=KL(o),d=kt("chakra-form-control",t.className);return a.jsx(qL,{value:c,children:a.jsx(GL,{value:r,children:a.jsx(Ae.div,{...s({},n),className:d,__css:r.container})})})});Vn.displayName="FormControl";var WP=De(function(t,n){const r=Rf(),o=HP(),s=kt("chakra-form__helper-text",t.className);return a.jsx(Ae.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:s})});WP.displayName="FormHelperText";var yr=De(function(t,n){var r;const o=cl("FormLabel",t),s=lr(t),{className:i,children:c,requiredIndicator:d=a.jsx(VP,{}),optionalIndicator:p=null,...h}=s,m=Rf(),g=(r=m==null?void 0:m.getLabelProps(h,n))!=null?r:{ref:n,...h};return a.jsxs(Ae.label,{...g,className:kt("chakra-form__label",s.className),__css:{display:"block",textAlign:"start",...o},children:[c,m!=null&&m.isRequired?d:p]})});yr.displayName="FormLabel";var VP=De(function(t,n){const r=Rf(),o=HP();if(!(r!=null&&r.isRequired))return null;const s=kt("chakra-form__required-indicator",t.className);return a.jsx(Ae.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:s})});VP.displayName="RequiredIndicator";function ay(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...s}=iy(e);return{...s,disabled:t,readOnly:r,required:o,"aria-invalid":Ms(n),"aria-required":Ms(o),"aria-readonly":Ms(r)}}function iy(e){var t,n,r;const o=Rf(),{id:s,disabled:i,readOnly:c,required:d,isRequired:p,isInvalid:h,isReadOnly:m,isDisabled:g,onFocus:b,onBlur:y,...x}=e,w=e["aria-describedby"]?[e["aria-describedby"]]:[];return o!=null&&o.hasFeedbackText&&(o!=null&&o.isInvalid)&&w.push(o.feedbackId),o!=null&&o.hasHelpText&&w.push(o.helpTextId),{...x,"aria-describedby":w.join(" ")||void 0,id:s??(o==null?void 0:o.id),isDisabled:(t=i??g)!=null?t:o==null?void 0:o.isDisabled,isReadOnly:(n=c??m)!=null?n:o==null?void 0:o.isReadOnly,isRequired:(r=d??p)!=null?r:o==null?void 0:o.isRequired,isInvalid:h??(o==null?void 0:o.isInvalid),onFocus:ot(o==null?void 0:o.onFocus,b),onBlur:ot(o==null?void 0:o.onBlur,y)}}var ly={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},UP=Ae("span",{baseStyle:ly});UP.displayName="VisuallyHidden";var QL=Ae("input",{baseStyle:ly});QL.displayName="VisuallyHiddenInput";var XL=()=>typeof document<"u",LS=!1,Df=null,Ul=!1,pb=!1,hb=new Set;function cy(e,t){hb.forEach(n=>n(e,t))}var YL=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function JL(e){return!(e.metaKey||!YL&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function zS(e){Ul=!0,JL(e)&&(Df="keyboard",cy("keyboard",e))}function jc(e){if(Df="pointer",e.type==="mousedown"||e.type==="pointerdown"){Ul=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;cy("pointer",e)}}function ZL(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function ez(e){ZL(e)&&(Ul=!0,Df="virtual")}function tz(e){e.target===window||e.target===document||(!Ul&&!pb&&(Df="virtual",cy("virtual",e)),Ul=!1,pb=!1)}function nz(){Ul=!1,pb=!0}function FS(){return Df!=="pointer"}function rz(){if(!XL()||LS)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Ul=!0,e.apply(this,n)},document.addEventListener("keydown",zS,!0),document.addEventListener("keyup",zS,!0),document.addEventListener("click",ez,!0),window.addEventListener("focus",tz,!0),window.addEventListener("blur",nz,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",jc,!0),document.addEventListener("pointermove",jc,!0),document.addEventListener("pointerup",jc,!0)):(document.addEventListener("mousedown",jc,!0),document.addEventListener("mousemove",jc,!0),document.addEventListener("mouseup",jc,!0)),LS=!0}function GP(e){rz(),e(FS());const t=()=>e(FS());return hb.add(t),()=>{hb.delete(t)}}function oz(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qP(e={}){const t=iy(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:s,id:i,onBlur:c,onFocus:d,"aria-describedby":p}=t,{defaultChecked:h,isChecked:m,isFocusable:g,onChange:b,isIndeterminate:y,name:x,value:w,tabIndex:S=void 0,"aria-label":j,"aria-labelledby":I,"aria-invalid":_,...M}=e,E=oz(M,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),A=vr(b),R=vr(c),D=vr(d),[O,T]=l.useState(!1),[K,G]=l.useState(!1),[X,Z]=l.useState(!1),[te,V]=l.useState(!1);l.useEffect(()=>GP(T),[]);const oe=l.useRef(null),[ne,se]=l.useState(!0),[re,ae]=l.useState(!!h),B=m!==void 0,Y=B?m:re,$=l.useCallback(de=>{if(r||n){de.preventDefault();return}B||ae(Y?de.target.checked:y?!0:de.target.checked),A==null||A(de)},[r,n,Y,B,y,A]);Yc(()=>{oe.current&&(oe.current.indeterminate=!!y)},[y]),wi(()=>{n&&G(!1)},[n,G]),Yc(()=>{const de=oe.current;if(!(de!=null&&de.form))return;const _e=()=>{ae(!!h)};return de.form.addEventListener("reset",_e),()=>{var Pe;return(Pe=de.form)==null?void 0:Pe.removeEventListener("reset",_e)}},[]);const F=n&&!g,q=l.useCallback(de=>{de.key===" "&&V(!0)},[V]),pe=l.useCallback(de=>{de.key===" "&&V(!1)},[V]);Yc(()=>{if(!oe.current)return;oe.current.checked!==Y&&ae(oe.current.checked)},[oe.current]);const W=l.useCallback((de={},_e=null)=>{const Pe=ze=>{K&&ze.preventDefault(),V(!0)};return{...de,ref:_e,"data-active":Vt(te),"data-hover":Vt(X),"data-checked":Vt(Y),"data-focus":Vt(K),"data-focus-visible":Vt(K&&O),"data-indeterminate":Vt(y),"data-disabled":Vt(n),"data-invalid":Vt(s),"data-readonly":Vt(r),"aria-hidden":!0,onMouseDown:ot(de.onMouseDown,Pe),onMouseUp:ot(de.onMouseUp,()=>V(!1)),onMouseEnter:ot(de.onMouseEnter,()=>Z(!0)),onMouseLeave:ot(de.onMouseLeave,()=>Z(!1))}},[te,Y,n,K,O,X,y,s,r]),U=l.useCallback((de={},_e=null)=>({...de,ref:_e,"data-active":Vt(te),"data-hover":Vt(X),"data-checked":Vt(Y),"data-focus":Vt(K),"data-focus-visible":Vt(K&&O),"data-indeterminate":Vt(y),"data-disabled":Vt(n),"data-invalid":Vt(s),"data-readonly":Vt(r)}),[te,Y,n,K,O,X,y,s,r]),ee=l.useCallback((de={},_e=null)=>({...E,...de,ref:xn(_e,Pe=>{Pe&&se(Pe.tagName==="LABEL")}),onClick:ot(de.onClick,()=>{var Pe;ne||((Pe=oe.current)==null||Pe.click(),requestAnimationFrame(()=>{var ze;(ze=oe.current)==null||ze.focus({preventScroll:!0})}))}),"data-disabled":Vt(n),"data-checked":Vt(Y),"data-invalid":Vt(s)}),[E,n,Y,s,ne]),J=l.useCallback((de={},_e=null)=>({...de,ref:xn(oe,_e),type:"checkbox",name:x,value:w,id:i,tabIndex:S,onChange:ot(de.onChange,$),onBlur:ot(de.onBlur,R,()=>G(!1)),onFocus:ot(de.onFocus,D,()=>G(!0)),onKeyDown:ot(de.onKeyDown,q),onKeyUp:ot(de.onKeyUp,pe),required:o,checked:Y,disabled:F,readOnly:r,"aria-label":j,"aria-labelledby":I,"aria-invalid":_?!!_:s,"aria-describedby":p,"aria-disabled":n,style:ly}),[x,w,i,$,R,D,q,pe,o,Y,F,r,j,I,_,s,p,n,S]),ge=l.useCallback((de={},_e=null)=>({...de,ref:_e,onMouseDown:ot(de.onMouseDown,sz),"data-disabled":Vt(n),"data-checked":Vt(Y),"data-invalid":Vt(s)}),[Y,n,s]);return{state:{isInvalid:s,isFocused:K,isChecked:Y,isActive:te,isHovered:X,isIndeterminate:y,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:ee,getCheckboxProps:W,getIndicatorProps:U,getInputProps:J,getLabelProps:ge,htmlProps:E}}function sz(e){e.preventDefault(),e.stopPropagation()}var az={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},iz={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},lz=Si({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),cz=Si({from:{opacity:0},to:{opacity:1}}),uz=Si({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Tf=De(function(t,n){const r=BL(),o={...r,...t},s=no("Checkbox",o),i=lr(t),{spacing:c="0.5rem",className:d,children:p,iconColor:h,iconSize:m,icon:g=a.jsx(UL,{}),isChecked:b,isDisabled:y=r==null?void 0:r.isDisabled,onChange:x,inputProps:w,...S}=i;let j=b;r!=null&&r.value&&i.value&&(j=r.value.includes(i.value));let I=x;r!=null&&r.onChange&&i.value&&(I=pg(r.onChange,x));const{state:_,getInputProps:M,getCheckboxProps:E,getLabelProps:A,getRootProps:R}=qP({...S,isDisabled:y,isChecked:j,onChange:I}),D=HL(_.isChecked),O=l.useMemo(()=>({animation:D?_.isIndeterminate?`${cz} 20ms linear, ${uz} 200ms linear`:`${lz} 200ms linear`:void 0,fontSize:m,color:h,...s.icon}),[h,m,D,_.isIndeterminate,s.icon]),T=l.cloneElement(g,{__css:O,isIndeterminate:_.isIndeterminate,isChecked:_.isChecked});return a.jsxs(Ae.label,{__css:{...iz,...s.container},className:kt("chakra-checkbox",d),...R(),children:[a.jsx("input",{className:"chakra-checkbox__input",...M(w,n)}),a.jsx(Ae.span,{__css:{...az,...s.control},className:"chakra-checkbox__control",...E(),children:T}),p&&a.jsx(Ae.span,{className:"chakra-checkbox__label",...A(),__css:{marginStart:c,...s.label},children:p})]})});Tf.displayName="Checkbox";function dz(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function uy(e,t){let n=dz(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function mb(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function Zh(e,t,n){return(e-t)*100/(n-t)}function KP(e,t,n){return(n-t)*e+t}function gb(e,t,n){const r=Math.round((e-t)/n)*n+t,o=mb(n);return uy(r,o)}function tu(e,t,n){return e==null?e:(n{var O;return r==null?"":(O=Yv(r,s,n))!=null?O:""}),g=typeof o<"u",b=g?o:h,y=QP(Vi(b),s),x=n??y,w=l.useCallback(O=>{O!==b&&(g||m(O.toString()),p==null||p(O.toString(),Vi(O)))},[p,g,b]),S=l.useCallback(O=>{let T=O;return d&&(T=tu(T,i,c)),uy(T,x)},[x,d,c,i]),j=l.useCallback((O=s)=>{let T;b===""?T=Vi(O):T=Vi(b)+O,T=S(T),w(T)},[S,s,w,b]),I=l.useCallback((O=s)=>{let T;b===""?T=Vi(-O):T=Vi(b)-O,T=S(T),w(T)},[S,s,w,b]),_=l.useCallback(()=>{var O;let T;r==null?T="":T=(O=Yv(r,s,n))!=null?O:i,w(T)},[r,n,s,w,i]),M=l.useCallback(O=>{var T;const K=(T=Yv(O,s,x))!=null?T:i;w(K)},[x,s,w,i]),E=Vi(b);return{isOutOfRange:E>c||E" `}),[hz,dy]=Un({name:"EditableContext",errorMessage:"useEditableContext: context is undefined. Seems you forgot to wrap the editable components in ``"}),YP={fontSize:"inherit",fontWeight:"inherit",textAlign:"inherit",bg:"transparent"},Nf=De(function(t,n){const{getInputProps:r}=dy(),o=XP(),s=r(t,n),i=kt("chakra-editable__input",t.className);return a.jsx(Ae.input,{...s,__css:{outline:0,...YP,...o.input},className:i})});Nf.displayName="EditableInput";var $f=De(function(t,n){const{getPreviewProps:r}=dy(),o=XP(),s=r(t,n),i=kt("chakra-editable__preview",t.className);return a.jsx(Ae.span,{...s,__css:{cursor:"text",display:"inline-block",...YP,...o.preview},className:i})});$f.displayName="EditablePreview";function Nl(e,t,n,r){const o=vr(n);return l.useEffect(()=>{const s=typeof e=="function"?e():e??document;if(!(!n||!s))return s.addEventListener(t,o,r),()=>{s.removeEventListener(t,o,r)}},[t,e,r,o,n]),()=>{const s=typeof e=="function"?e():e??document;s==null||s.removeEventListener(t,o,r)}}function mz(e){return"current"in e}var JP=()=>typeof window<"u";function gz(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var vz=e=>JP()&&e.test(navigator.vendor),bz=e=>JP()&&e.test(gz()),xz=()=>bz(/mac|iphone|ipad|ipod/i),yz=()=>xz()&&vz(/apple/i);function ZP(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var s,i;return(i=(s=t.current)==null?void 0:s.ownerDocument)!=null?i:document};Nl(o,"pointerdown",s=>{if(!yz()||!r)return;const i=s.target,d=(n??[t]).some(p=>{const h=mz(p)?p.current:p;return(h==null?void 0:h.contains(i))||h===i});o().activeElement!==i&&d&&(s.preventDefault(),i.focus())})}function BS(e,t){return e?e===t||e.contains(t):!1}function Cz(e={}){const{onChange:t,onCancel:n,onSubmit:r,onBlur:o,value:s,isDisabled:i,defaultValue:c,startWithEditView:d,isPreviewFocusable:p=!0,submitOnBlur:h=!0,selectAllOnFocus:m=!0,placeholder:g,onEdit:b,finalFocusRef:y,...x}=e,w=vr(b),S=!!(d&&!i),[j,I]=l.useState(S),[_,M]=Of({defaultValue:c||"",value:s,onChange:t}),[E,A]=l.useState(_),R=l.useRef(null),D=l.useRef(null),O=l.useRef(null),T=l.useRef(null),K=l.useRef(null);ZP({ref:R,enabled:j,elements:[T,K]});const G=!j&&!i;Yc(()=>{var W,U;j&&((W=R.current)==null||W.focus(),m&&((U=R.current)==null||U.select()))},[]),wi(()=>{var W,U,ee,J;if(!j){y?(W=y.current)==null||W.focus():(U=O.current)==null||U.focus();return}(ee=R.current)==null||ee.focus(),m&&((J=R.current)==null||J.select()),w==null||w()},[j,w,m]);const X=l.useCallback(()=>{G&&I(!0)},[G]),Z=l.useCallback(()=>{A(_)},[_]),te=l.useCallback(()=>{I(!1),M(E),n==null||n(E),o==null||o(E)},[n,o,M,E]),V=l.useCallback(()=>{I(!1),A(_),r==null||r(_),o==null||o(E)},[_,r,o,E]);l.useEffect(()=>{if(j)return;const W=R.current;(W==null?void 0:W.ownerDocument.activeElement)===W&&(W==null||W.blur())},[j]);const oe=l.useCallback(W=>{M(W.currentTarget.value)},[M]),ne=l.useCallback(W=>{const U=W.key,J={Escape:te,Enter:ge=>{!ge.shiftKey&&!ge.metaKey&&V()}}[U];J&&(W.preventDefault(),J(W))},[te,V]),se=l.useCallback(W=>{const U=W.key,J={Escape:te}[U];J&&(W.preventDefault(),J(W))},[te]),re=_.length===0,ae=l.useCallback(W=>{var U;if(!j)return;const ee=W.currentTarget.ownerDocument,J=(U=W.relatedTarget)!=null?U:ee.activeElement,ge=BS(T.current,J),he=BS(K.current,J);!ge&&!he&&(h?V():te())},[h,V,te,j]),B=l.useCallback((W={},U=null)=>{const ee=G&&p?0:void 0;return{...W,ref:xn(U,D),children:re?g:_,hidden:j,"aria-disabled":Ms(i),tabIndex:ee,onFocus:ot(W.onFocus,X,Z)}},[i,j,G,p,re,X,Z,g,_]),Y=l.useCallback((W={},U=null)=>({...W,hidden:!j,placeholder:g,ref:xn(U,R),disabled:i,"aria-disabled":Ms(i),value:_,onBlur:ot(W.onBlur,ae),onChange:ot(W.onChange,oe),onKeyDown:ot(W.onKeyDown,ne),onFocus:ot(W.onFocus,Z)}),[i,j,ae,oe,ne,Z,g,_]),$=l.useCallback((W={},U=null)=>({...W,hidden:!j,placeholder:g,ref:xn(U,R),disabled:i,"aria-disabled":Ms(i),value:_,onBlur:ot(W.onBlur,ae),onChange:ot(W.onChange,oe),onKeyDown:ot(W.onKeyDown,se),onFocus:ot(W.onFocus,Z)}),[i,j,ae,oe,se,Z,g,_]),F=l.useCallback((W={},U=null)=>({"aria-label":"Edit",...W,type:"button",onClick:ot(W.onClick,X),ref:xn(U,O),disabled:i}),[X,i]),q=l.useCallback((W={},U=null)=>({...W,"aria-label":"Submit",ref:xn(K,U),type:"button",onClick:ot(W.onClick,V),disabled:i}),[V,i]),pe=l.useCallback((W={},U=null)=>({"aria-label":"Cancel",id:"cancel",...W,ref:xn(T,U),type:"button",onClick:ot(W.onClick,te),disabled:i}),[te,i]);return{isEditing:j,isDisabled:i,isValueEmpty:re,value:_,onEdit:X,onCancel:te,onSubmit:V,getPreviewProps:B,getInputProps:Y,getTextareaProps:$,getEditButtonProps:F,getSubmitButtonProps:q,getCancelButtonProps:pe,htmlProps:x}}var Lf=De(function(t,n){const r=no("Editable",t),o=lr(t),{htmlProps:s,...i}=Cz(o),{isEditing:c,onSubmit:d,onCancel:p,onEdit:h}=i,m=kt("chakra-editable",t.className),g=Mx(t.children,{isEditing:c,onSubmit:d,onCancel:p,onEdit:h});return a.jsx(hz,{value:i,children:a.jsx(pz,{value:r,children:a.jsx(Ae.div,{ref:n,...s,className:m,children:g})})})});Lf.displayName="Editable";function e5(){const{isEditing:e,getEditButtonProps:t,getCancelButtonProps:n,getSubmitButtonProps:r}=dy();return{isEditing:e,getEditButtonProps:t,getCancelButtonProps:n,getSubmitButtonProps:r}}var t5={exports:{}},wz="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Sz=wz,kz=Sz;function n5(){}function r5(){}r5.resetWarningCache=n5;var jz=function(){function e(r,o,s,i,c,d){if(d!==kz){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r5,resetWarningCache:n5};return n.PropTypes=n,n};t5.exports=jz();var _z=t5.exports;const nr=Sf(_z);var vb="data-focus-lock",o5="data-focus-lock-disabled",Iz="data-no-focus-lock",Pz="data-autofocus-inside",Ez="data-no-autofocus";function Mz(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Oz(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function s5(e,t){return Oz(t||null,function(n){return e.forEach(function(r){return Mz(r,n)})})}var Jv={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},wa=function(){return wa=Object.assign||function(t){for(var n,r=1,o=arguments.length;r=0}).sort(Gz)},qz=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],my=qz.join(","),Kz="".concat(my,", [data-focus-guard]"),S5=function(e,t){return Wa((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?Kz:my)?[r]:[],S5(r))},[])},Qz=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?kg([e.contentDocument.body],t):[e]},kg=function(e,t){return e.reduce(function(n,r){var o,s=S5(r,t),i=(o=[]).concat.apply(o,s.map(function(c){return Qz(c,t)}));return n.concat(i,r.parentNode?Wa(r.parentNode.querySelectorAll(my)).filter(function(c){return c===r}):[])},[])},Xz=function(e){var t=e.querySelectorAll("[".concat(Pz,"]"));return Wa(t).map(function(n){return kg([n])}).reduce(function(n,r){return n.concat(r)},[])},gy=function(e,t){return Wa(e).filter(function(n){return v5(t,n)}).filter(function(n){return Wz(n)})},HS=function(e,t){return t===void 0&&(t=new Map),Wa(e).filter(function(n){return b5(t,n)})},xb=function(e,t,n){return w5(gy(kg(e,n),t),!0,n)},WS=function(e,t){return w5(gy(kg(e),t),!1)},Yz=function(e,t){return gy(Xz(e),t)},nu=function(e,t){return e.shadowRoot?nu(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Wa(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?nu(o,t):!1}return nu(n,t)})},Jz=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(s&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(i,c){return!t.has(c)})},k5=function(e){return e.parentNode?k5(e.parentNode):e},vy=function(e){var t=em(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(vb);return n.push.apply(n,o?Jz(Wa(k5(r).querySelectorAll("[".concat(vb,'="').concat(o,'"]:not([').concat(o5,'="disabled"])')))):[r]),n},[])},Zz=function(e){try{return e()}catch{return}},tf=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?tf(t.shadowRoot):t instanceof HTMLIFrameElement&&Zz(function(){return t.contentWindow.document})?tf(t.contentWindow.document):t}},eF=function(e,t){return e===t},tF=function(e,t){return!!Wa(e.querySelectorAll("iframe")).some(function(n){return eF(n,t)})},j5=function(e,t){return t===void 0&&(t=tf(h5(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:vy(e).some(function(n){return nu(n,t)||tF(n,t)})},nF=function(e){e===void 0&&(e=document);var t=tf(e);return t?Wa(e.querySelectorAll("[".concat(Iz,"]"))).some(function(n){return nu(n,t)}):!1},rF=function(e,t){return t.filter(C5).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},by=function(e,t){return C5(e)&&e.name?rF(e,t):e},oF=function(e){var t=new Set;return e.forEach(function(n){return t.add(by(n,e))}),e.filter(function(n){return t.has(n)})},VS=function(e){return e[0]&&e.length>1?by(e[0],e):e[0]},US=function(e,t){return e.length>1?e.indexOf(by(e[t],e)):t},_5="NEW_FOCUS",sF=function(e,t,n,r){var o=e.length,s=e[0],i=e[o-1],c=hy(n);if(!(n&&e.indexOf(n)>=0)){var d=n!==void 0?t.indexOf(n):-1,p=r?t.indexOf(r):d,h=r?e.indexOf(r):-1,m=d-p,g=t.indexOf(s),b=t.indexOf(i),y=oF(t),x=n!==void 0?y.indexOf(n):-1,w=x-(r?y.indexOf(r):d),S=US(e,0),j=US(e,o-1);if(d===-1||h===-1)return _5;if(!m&&h>=0)return h;if(d<=g&&c&&Math.abs(m)>1)return j;if(d>=b&&c&&Math.abs(m)>1)return S;if(m&&Math.abs(w)>1)return h;if(d<=g)return j;if(d>b)return S;if(m)return Math.abs(m)>1?h:(o+h+m)%o}},aF=function(e){return function(t){var n,r=(n=x5(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},iF=function(e,t,n){var r=e.map(function(s){var i=s.node;return i}),o=HS(r.filter(aF(n)));return o&&o.length?VS(o):VS(HS(t))},yb=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&yb(e.parentNode.host||e.parentNode,t),t},Zv=function(e,t){for(var n=yb(e),r=yb(t),o=0;o=0)return s}return!1},I5=function(e,t,n){var r=em(e),o=em(t),s=r[0],i=!1;return o.filter(Boolean).forEach(function(c){i=Zv(i||c,c)||i,n.filter(Boolean).forEach(function(d){var p=Zv(s,d);p&&(!i||nu(p,i)?i=p:i=Zv(p,i))})}),i},lF=function(e,t){return e.reduce(function(n,r){return n.concat(Yz(r,t))},[])},cF=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Uz)},uF=function(e,t){var n=tf(em(e).length>0?document:h5(e).ownerDocument),r=vy(e).filter(tm),o=I5(n||e,e,r),s=new Map,i=WS(r,s),c=xb(r,s).filter(function(b){var y=b.node;return tm(y)});if(!(!c[0]&&(c=i,!c[0]))){var d=WS([o],s).map(function(b){var y=b.node;return y}),p=cF(d,c),h=p.map(function(b){var y=b.node;return y}),m=sF(h,d,n,t);if(m===_5){var g=iF(i,h,lF(r,s));if(g)return{node:g};console.warn("focus-lock: cannot find any node to move focus into");return}return m===void 0?m:p[m]}},dF=function(e){var t=vy(e).filter(tm),n=I5(e,e,t),r=new Map,o=xb([n],r,!0),s=xb(t,r).filter(function(i){var c=i.node;return tm(c)}).map(function(i){var c=i.node;return c});return o.map(function(i){var c=i.node,d=i.index;return{node:c,index:d,lockItem:s.indexOf(c)>=0,guard:hy(c)}})},fF=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},e1=0,t1=!1,P5=function(e,t,n){n===void 0&&(n={});var r=uF(e,t);if(!t1&&r){if(e1>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),t1=!0,setTimeout(function(){t1=!1},1);return}e1++,fF(r.node,n.focusOptions),e1--}};function xy(e){setTimeout(e,1)}var pF=function(){return document&&document.activeElement===document.body},hF=function(){return pF()||nF()},ru=null,qc=null,ou=null,nf=!1,mF=function(){return!0},gF=function(t){return(ru.whiteList||mF)(t)},vF=function(t,n){ou={observerNode:t,portaledElement:n}},bF=function(t){return ou&&ou.portaledElement===t};function GS(e,t,n,r){var o=null,s=e;do{var i=r[s];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else if(i.lockItem){if(s!==e)return;o=null}else break}while((s+=n)!==t);o&&(o.node.tabIndex=0)}var xF=function(t){return t&&"current"in t?t.current:t},yF=function(t){return t?!!nf:nf==="meanwhile"},CF=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},wF=function(t,n){return n.some(function(r){return CF(t,r,r)})},nm=function(){var t=!1;if(ru){var n=ru,r=n.observed,o=n.persistentFocus,s=n.autoFocus,i=n.shards,c=n.crossFrame,d=n.focusOptions,p=r||ou&&ou.portaledElement,h=document&&document.activeElement;if(p){var m=[p].concat(i.map(xF).filter(Boolean));if((!h||gF(h))&&(o||yF(c)||!hF()||!qc&&s)&&(p&&!(j5(m)||h&&wF(h,m)||bF(h))&&(document&&!qc&&h&&!s?(h.blur&&h.blur(),document.body.focus()):(t=P5(m,qc,{focusOptions:d}),ou={})),nf=!1,qc=document&&document.activeElement),document){var g=document&&document.activeElement,b=dF(m),y=b.map(function(x){var w=x.node;return w}).indexOf(g);y>-1&&(b.filter(function(x){var w=x.guard,S=x.node;return w&&S.dataset.focusAutoGuard}).forEach(function(x){var w=x.node;return w.removeAttribute("tabIndex")}),GS(y,b.length,1,b),GS(y,-1,-1,b))}}}return t},E5=function(t){nm()&&t&&(t.stopPropagation(),t.preventDefault())},yy=function(){return xy(nm)},SF=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||vF(r,n)},kF=function(){return null},M5=function(){nf="just",xy(function(){nf="meanwhile"})},jF=function(){document.addEventListener("focusin",E5),document.addEventListener("focusout",yy),window.addEventListener("blur",M5)},_F=function(){document.removeEventListener("focusin",E5),document.removeEventListener("focusout",yy),window.removeEventListener("blur",M5)};function IF(e){return e.filter(function(t){var n=t.disabled;return!n})}function PF(e){var t=e.slice(-1)[0];t&&!ru&&jF();var n=ru,r=n&&t&&t.id===n.id;ru=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var s=o.id;return s===n.id}).length||n.returnFocus(!t)),t?(qc=null,(!r||n.observed!==t.observed)&&t.onActivation(),nm(),xy(nm)):(_F(),qc=null)}d5.assignSyncMedium(SF);f5.assignMedium(yy);Dz.assignMedium(function(e){return e({moveFocusInside:P5,focusInside:j5})});const EF=Lz(IF,PF)(kF);var O5=l.forwardRef(function(t,n){return l.createElement(p5,K1({sideCar:EF,ref:n},t))}),A5=p5.propTypes||{};A5.sideCar;T$(A5,["sideCar"]);O5.propTypes={};const qS=O5;function R5(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Cy(e){var t;if(!R5(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function MF(e){var t,n;return(n=(t=D5(e))==null?void 0:t.defaultView)!=null?n:window}function D5(e){return R5(e)?e.ownerDocument:document}function OF(e){return D5(e).activeElement}function AF(e){const t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}function RF(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function T5(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:Cy(e)&&AF(e)?e:T5(RF(e))}var N5=e=>e.hasAttribute("tabindex"),DF=e=>N5(e)&&e.tabIndex===-1;function TF(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function $5(e){return e.parentElement&&$5(e.parentElement)?!0:e.hidden}function NF(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function L5(e){if(!Cy(e)||$5(e)||TF(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():NF(e)?!0:N5(e)}function $F(e){return e?Cy(e)&&L5(e)&&!DF(e):!1}var LF=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],zF=LF.join(),FF=e=>e.offsetWidth>0&&e.offsetHeight>0;function z5(e){const t=Array.from(e.querySelectorAll(zF));return t.unshift(e),t.filter(n=>L5(n)&&FF(n))}var KS,BF=(KS=qS.default)!=null?KS:qS,F5=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:s,isDisabled:i,autoFocus:c,persistentFocus:d,lockFocusAcrossFrames:p}=e,h=l.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&z5(r.current).length===0&&requestAnimationFrame(()=>{var y;(y=r.current)==null||y.focus()})},[t,r]),m=l.useCallback(()=>{var b;(b=n==null?void 0:n.current)==null||b.focus()},[n]),g=o&&!n;return a.jsx(BF,{crossFrame:p,persistentFocus:d,autoFocus:c,disabled:i,onActivation:h,onDeactivation:m,returnFocus:g,children:s})};F5.displayName="FocusLock";var HF=Z$?l.useLayoutEffect:l.useEffect;function Cb(e,t=[]){const n=l.useRef(e);return HF(()=>{n.current=e}),l.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function WF(e,t,n,r){const o=Cb(t);return l.useEffect(()=>{var s;const i=(s=Fw(n))!=null?s:document;if(t)return i.addEventListener(e,o,r),()=>{i.removeEventListener(e,o,r)}},[e,n,r,o,t]),()=>{var s;((s=Fw(n))!=null?s:document).removeEventListener(e,o,r)}}function VF(e,t){const n=l.useId();return l.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function UF(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function hs(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=Cb(n),i=Cb(t),[c,d]=l.useState(e.defaultIsOpen||!1),[p,h]=UF(r,c),m=VF(o,"disclosure"),g=l.useCallback(()=>{p||d(!1),i==null||i()},[p,i]),b=l.useCallback(()=>{p||d(!0),s==null||s()},[p,s]),y=l.useCallback(()=>{(h?g:b)()},[h,b,g]);return{isOpen:!!h,onOpen:b,onClose:g,onToggle:y,isControlled:p,getButtonProps:(x={})=>({...x,"aria-expanded":h,"aria-controls":m,onClick:pD(x.onClick,y)}),getDisclosureProps:(x={})=>({...x,hidden:!h,id:m})}}var[GF,qF]=Un({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),B5=De(function(t,n){const r=no("Input",t),{children:o,className:s,...i}=lr(t),c=kt("chakra-input__group",s),d={},p=Sg(o),h=r.field;p.forEach(g=>{var b,y;r&&(h&&g.type.id==="InputLeftElement"&&(d.paddingStart=(b=h.height)!=null?b:h.h),h&&g.type.id==="InputRightElement"&&(d.paddingEnd=(y=h.height)!=null?y:h.h),g.type.id==="InputRightAddon"&&(d.borderEndRadius=0),g.type.id==="InputLeftAddon"&&(d.borderStartRadius=0))});const m=p.map(g=>{var b,y;const x=jI({size:((b=g.props)==null?void 0:b.size)||t.size,variant:((y=g.props)==null?void 0:y.variant)||t.variant});return g.type.id!=="Input"?l.cloneElement(g,x):l.cloneElement(g,Object.assign(x,d,g.props))});return a.jsx(Ae.div,{className:c,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...i,children:a.jsx(GF,{value:r,children:m})})});B5.displayName="InputGroup";var KF=Ae("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),jg=De(function(t,n){var r,o;const{placement:s="left",...i}=t,c=qF(),d=c.field,h={[s==="left"?"insetStart":"insetEnd"]:"0",width:(r=d==null?void 0:d.height)!=null?r:d==null?void 0:d.h,height:(o=d==null?void 0:d.height)!=null?o:d==null?void 0:d.h,fontSize:d==null?void 0:d.fontSize,...c.element};return a.jsx(KF,{ref:n,__css:h,...i})});jg.id="InputElement";jg.displayName="InputElement";var H5=De(function(t,n){const{className:r,...o}=t,s=kt("chakra-input__left-element",r);return a.jsx(jg,{ref:n,placement:"left",className:s,...o})});H5.id="InputLeftElement";H5.displayName="InputLeftElement";var wy=De(function(t,n){const{className:r,...o}=t,s=kt("chakra-input__right-element",r);return a.jsx(jg,{ref:n,placement:"right",className:s,...o})});wy.id="InputRightElement";wy.displayName="InputRightElement";var _g=De(function(t,n){const{htmlSize:r,...o}=t,s=no("Input",o),i=lr(o),c=ay(i),d=kt("chakra-input",t.className);return a.jsx(Ae.input,{size:r,...c,__css:s.field,ref:n,className:d})});_g.displayName="Input";_g.id="Input";var Ig=De(function(t,n){const r=cl("Link",t),{className:o,isExternal:s,...i}=lr(t);return a.jsx(Ae.a,{target:s?"_blank":void 0,rel:s?"noopener":void 0,ref:n,className:kt("chakra-link",o),...i,__css:r})});Ig.displayName="Link";var[QF,W5]=Un({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sy=De(function(t,n){const r=no("List",t),{children:o,styleType:s="none",stylePosition:i,spacing:c,...d}=lr(t),p=Sg(o),m=c?{["& > *:not(style) ~ *:not(style)"]:{mt:c}}:{};return a.jsx(QF,{value:r,children:a.jsx(Ae.ul,{ref:n,listStyleType:s,listStylePosition:i,role:"list",__css:{...r.container,...m},...d,children:p})})});Sy.displayName="List";var V5=De((e,t)=>{const{as:n,...r}=e;return a.jsx(Sy,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});V5.displayName="OrderedList";var zf=De(function(t,n){const{as:r,...o}=t;return a.jsx(Sy,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});zf.displayName="UnorderedList";var Ps=De(function(t,n){const r=W5();return a.jsx(Ae.li,{ref:n,...t,__css:r.item})});Ps.displayName="ListItem";var XF=De(function(t,n){const r=W5();return a.jsx(Gr,{ref:n,role:"presentation",...t,__css:r.icon})});XF.displayName="ListIcon";var rl=De(function(t,n){const{templateAreas:r,gap:o,rowGap:s,columnGap:i,column:c,row:d,autoFlow:p,autoRows:h,templateRows:m,autoColumns:g,templateColumns:b,...y}=t,x={display:"grid",gridTemplateAreas:r,gridGap:o,gridRowGap:s,gridColumnGap:i,gridAutoColumns:g,gridColumn:c,gridRow:d,gridAutoFlow:p,gridAutoRows:h,gridTemplateRows:m,gridTemplateColumns:b};return a.jsx(Ae.div,{ref:n,__css:x,...y})});rl.displayName="Grid";function U5(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Q1(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Pi=Ae("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Pi.displayName="Spacer";var G5=e=>a.jsx(Ae.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});G5.displayName="StackItem";function YF(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":U5(n,o=>r[o])}}var ky=De((e,t)=>{const{isInline:n,direction:r,align:o,justify:s,spacing:i="0.5rem",wrap:c,children:d,divider:p,className:h,shouldWrapChildren:m,...g}=e,b=n?"row":r??"column",y=l.useMemo(()=>YF({spacing:i,direction:b}),[i,b]),x=!!p,w=!m&&!x,S=l.useMemo(()=>{const I=Sg(d);return w?I:I.map((_,M)=>{const E=typeof _.key<"u"?_.key:M,A=M+1===I.length,D=m?a.jsx(G5,{children:_},E):_;if(!x)return D;const O=l.cloneElement(p,{__css:y}),T=A?null:O;return a.jsxs(l.Fragment,{children:[D,T]},E)})},[p,y,x,w,m,d]),j=kt("chakra-stack",h);return a.jsx(Ae.div,{ref:t,display:"flex",alignItems:o,justifyContent:s,flexDirection:b,flexWrap:c,gap:x?void 0:i,className:j,...g,children:S})});ky.displayName="Stack";var q5=De((e,t)=>a.jsx(ky,{align:"center",...e,direction:"column",ref:t}));q5.displayName="VStack";var Pg=De((e,t)=>a.jsx(ky,{align:"center",...e,direction:"row",ref:t}));Pg.displayName="HStack";function QS(e){return U5(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var rf=De(function(t,n){const{area:r,colSpan:o,colStart:s,colEnd:i,rowEnd:c,rowSpan:d,rowStart:p,...h}=t,m=jI({gridArea:r,gridColumn:QS(o),gridRow:QS(d),gridColumnStart:s,gridColumnEnd:i,gridRowStart:p,gridRowEnd:c});return a.jsx(Ae.div,{ref:n,__css:m,...h})});rf.displayName="GridItem";var Va=De(function(t,n){const r=cl("Badge",t),{className:o,...s}=lr(t);return a.jsx(Ae.span,{ref:n,className:kt("chakra-badge",t.className),...s,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Va.displayName="Badge";var io=De(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:s,borderRightWidth:i,borderWidth:c,borderStyle:d,borderColor:p,...h}=cl("Divider",t),{className:m,orientation:g="horizontal",__css:b,...y}=lr(t),x={vertical:{borderLeftWidth:r||i||c||"1px",height:"100%"},horizontal:{borderBottomWidth:o||s||c||"1px",width:"100%"}};return a.jsx(Ae.hr,{ref:n,"aria-orientation":g,...y,__css:{...h,border:"0",borderColor:p,borderStyle:d,...x[g],...b},className:kt("chakra-divider",m)})});io.displayName="Divider";function JF(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function ZF(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,o]=l.useState([]),s=l.useRef(),i=()=>{s.current&&(clearTimeout(s.current),s.current=null)},c=()=>{i(),s.current=setTimeout(()=>{o([]),s.current=null},t)};l.useEffect(()=>i,[]);function d(p){return h=>{if(h.key==="Backspace"){const m=[...r];m.pop(),o(m);return}if(JF(h)){const m=r.concat(h.key);n(h)&&(h.preventDefault(),h.stopPropagation()),o(m),p(m.join("")),c()}}}return d}function eB(e,t,n,r){if(t==null)return r;if(!r)return e.find(i=>n(i).toLowerCase().startsWith(t.toLowerCase()));const o=e.filter(s=>n(s).toLowerCase().startsWith(t.toLowerCase()));if(o.length>0){let s;return o.includes(r)?(s=o.indexOf(r)+1,s===o.length&&(s=0),o[s]):(s=e.indexOf(o[0]),e[s])}return r}function tB(){const e=l.useRef(new Map),t=e.current,n=l.useCallback((o,s,i,c)=>{e.current.set(i,{type:s,el:o,options:c}),o.addEventListener(s,i,c)},[]),r=l.useCallback((o,s,i,c)=>{o.removeEventListener(s,i,c),e.current.delete(i)},[]);return l.useEffect(()=>()=>{t.forEach((o,s)=>{r(o.el,o.type,s,o.options)})},[r,t]),{add:n,remove:r}}function n1(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function K5(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:s=!0,onMouseDown:i,onMouseUp:c,onClick:d,onKeyDown:p,onKeyUp:h,tabIndex:m,onMouseOver:g,onMouseLeave:b,...y}=e,[x,w]=l.useState(!0),[S,j]=l.useState(!1),I=tB(),_=V=>{V&&V.tagName!=="BUTTON"&&w(!1)},M=x?m:m||0,E=n&&!r,A=l.useCallback(V=>{if(n){V.stopPropagation(),V.preventDefault();return}V.currentTarget.focus(),d==null||d(V)},[n,d]),R=l.useCallback(V=>{S&&n1(V)&&(V.preventDefault(),V.stopPropagation(),j(!1),I.remove(document,"keyup",R,!1))},[S,I]),D=l.useCallback(V=>{if(p==null||p(V),n||V.defaultPrevented||V.metaKey||!n1(V.nativeEvent)||x)return;const oe=o&&V.key==="Enter";s&&V.key===" "&&(V.preventDefault(),j(!0)),oe&&(V.preventDefault(),V.currentTarget.click()),I.add(document,"keyup",R,!1)},[n,x,p,o,s,I,R]),O=l.useCallback(V=>{if(h==null||h(V),n||V.defaultPrevented||V.metaKey||!n1(V.nativeEvent)||x)return;s&&V.key===" "&&(V.preventDefault(),j(!1),V.currentTarget.click())},[s,x,n,h]),T=l.useCallback(V=>{V.button===0&&(j(!1),I.remove(document,"mouseup",T,!1))},[I]),K=l.useCallback(V=>{if(V.button!==0)return;if(n){V.stopPropagation(),V.preventDefault();return}x||j(!0),V.currentTarget.focus({preventScroll:!0}),I.add(document,"mouseup",T,!1),i==null||i(V)},[n,x,i,I,T]),G=l.useCallback(V=>{V.button===0&&(x||j(!1),c==null||c(V))},[c,x]),X=l.useCallback(V=>{if(n){V.preventDefault();return}g==null||g(V)},[n,g]),Z=l.useCallback(V=>{S&&(V.preventDefault(),j(!1)),b==null||b(V)},[S,b]),te=xn(t,_);return x?{...y,ref:te,type:"button","aria-disabled":E?void 0:n,disabled:E,onClick:A,onMouseDown:i,onMouseUp:c,onKeyUp:h,onKeyDown:p,onMouseOver:g,onMouseLeave:b}:{...y,ref:te,role:"button","data-active":Vt(S),"aria-disabled":n?"true":void 0,tabIndex:E?void 0:M,onClick:A,onMouseDown:K,onMouseUp:G,onKeyUp:O,onKeyDown:D,onMouseOver:X,onMouseLeave:Z}}function nB(e){const t=e.current;if(!t)return!1;const n=OF(t);return!n||t.contains(n)?!1:!!$F(n)}function Q5(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,s=n&&!r;wi(()=>{if(!s||nB(e))return;const i=(o==null?void 0:o.current)||e.current;let c;if(i)return c=requestAnimationFrame(()=>{i.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(c)}},[s,e,o])}var rB={preventScroll:!0,shouldFocus:!1};function oB(e,t=rB){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:s}=t,i=sB(e)?e.current:e,c=o&&s,d=l.useRef(c),p=l.useRef(s);Yc(()=>{!p.current&&s&&(d.current=c),p.current=s},[s,c]);const h=l.useCallback(()=>{if(!(!s||!i||!d.current)&&(d.current=!1,!i.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var m;(m=n.current)==null||m.focus({preventScroll:r})});else{const m=z5(i);m.length>0&&requestAnimationFrame(()=>{m[0].focus({preventScroll:r})})}},[s,r,i,n]);wi(()=>{h()},[h]),Nl(i,"transitionend",h)}function sB(e){return"current"in e}var _c=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),qr={arrowShadowColor:_c("--popper-arrow-shadow-color"),arrowSize:_c("--popper-arrow-size","8px"),arrowSizeHalf:_c("--popper-arrow-size-half"),arrowBg:_c("--popper-arrow-bg"),transformOrigin:_c("--popper-transform-origin"),arrowOffset:_c("--popper-arrow-offset")};function aB(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var iB={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},lB=e=>iB[e],XS={scroll:!0,resize:!0};function cB(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XS,...e}}:t={enabled:e,options:XS},t}var uB={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},dB={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{YS(e)},effect:({state:e})=>()=>{YS(e)}},YS=e=>{e.elements.popper.style.setProperty(qr.transformOrigin.var,lB(e.placement))},fB={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{pB(e)}},pB=e=>{var t;if(!e.placement)return;const n=hB(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:qr.arrowSize.varRef,height:qr.arrowSize.varRef,zIndex:-1});const r={[qr.arrowSizeHalf.var]:`calc(${qr.arrowSize.varRef} / 2 - 1px)`,[qr.arrowOffset.var]:`calc(${qr.arrowSizeHalf.varRef} * -1)`};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},hB=e=>{if(e.startsWith("top"))return{property:"bottom",value:qr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:qr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:qr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:qr.arrowOffset.varRef}},mB={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{JS(e)},effect:({state:e})=>()=>{JS(e)}},JS=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=aB(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:qr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},gB={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},vB={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function bB(e,t="ltr"){var n,r;const o=((n=gB[e])==null?void 0:n[t])||e;return t==="ltr"?o:(r=vB[e])!=null?r:o}var qo="top",Ds="bottom",Ts="right",Ko="left",jy="auto",Ff=[qo,Ds,Ts,Ko],pu="start",of="end",xB="clippingParents",X5="viewport",bd="popper",yB="reference",ZS=Ff.reduce(function(e,t){return e.concat([t+"-"+pu,t+"-"+of])},[]),Y5=[].concat(Ff,[jy]).reduce(function(e,t){return e.concat([t,t+"-"+pu,t+"-"+of])},[]),CB="beforeRead",wB="read",SB="afterRead",kB="beforeMain",jB="main",_B="afterMain",IB="beforeWrite",PB="write",EB="afterWrite",MB=[CB,wB,SB,kB,jB,_B,IB,PB,EB];function Ma(e){return e?(e.nodeName||"").toLowerCase():null}function ms(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Gl(e){var t=ms(e).Element;return e instanceof t||e instanceof Element}function Os(e){var t=ms(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _y(e){if(typeof ShadowRoot>"u")return!1;var t=ms(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function OB(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!Os(s)||!Ma(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(i){var c=o[i];c===!1?s.removeAttribute(i):s.setAttribute(i,c===!0?"":c)}))})}function AB(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],s=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),c=i.reduce(function(d,p){return d[p]="",d},{});!Os(o)||!Ma(o)||(Object.assign(o.style,c),Object.keys(s).forEach(function(d){o.removeAttribute(d)}))})}}const RB={name:"applyStyles",enabled:!0,phase:"write",fn:OB,effect:AB,requires:["computeStyles"]};function Pa(e){return e.split("-")[0]}var $l=Math.max,rm=Math.min,hu=Math.round;function wb(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function J5(){return!/^((?!chrome|android).)*safari/i.test(wb())}function mu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&Os(e)&&(o=e.offsetWidth>0&&hu(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&hu(r.height)/e.offsetHeight||1);var i=Gl(e)?ms(e):window,c=i.visualViewport,d=!J5()&&n,p=(r.left+(d&&c?c.offsetLeft:0))/o,h=(r.top+(d&&c?c.offsetTop:0))/s,m=r.width/o,g=r.height/s;return{width:m,height:g,top:h,right:p+m,bottom:h+g,left:p,x:p,y:h}}function Iy(e){var t=mu(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Z5(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_y(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fi(e){return ms(e).getComputedStyle(e)}function DB(e){return["table","td","th"].indexOf(Ma(e))>=0}function ul(e){return((Gl(e)?e.ownerDocument:e.document)||window.document).documentElement}function Eg(e){return Ma(e)==="html"?e:e.assignedSlot||e.parentNode||(_y(e)?e.host:null)||ul(e)}function ek(e){return!Os(e)||fi(e).position==="fixed"?null:e.offsetParent}function TB(e){var t=/firefox/i.test(wb()),n=/Trident/i.test(wb());if(n&&Os(e)){var r=fi(e);if(r.position==="fixed")return null}var o=Eg(e);for(_y(o)&&(o=o.host);Os(o)&&["html","body"].indexOf(Ma(o))<0;){var s=fi(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Bf(e){for(var t=ms(e),n=ek(e);n&&DB(n)&&fi(n).position==="static";)n=ek(n);return n&&(Ma(n)==="html"||Ma(n)==="body"&&fi(n).position==="static")?t:n||TB(e)||t}function Py(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bd(e,t,n){return $l(e,rm(t,n))}function NB(e,t,n){var r=Bd(e,t,n);return r>n?n:r}function e3(){return{top:0,right:0,bottom:0,left:0}}function t3(e){return Object.assign({},e3(),e)}function n3(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var $B=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,t3(typeof t!="number"?t:n3(t,Ff))};function LB(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,c=Pa(n.placement),d=Py(c),p=[Ko,Ts].indexOf(c)>=0,h=p?"height":"width";if(!(!s||!i)){var m=$B(o.padding,n),g=Iy(s),b=d==="y"?qo:Ko,y=d==="y"?Ds:Ts,x=n.rects.reference[h]+n.rects.reference[d]-i[d]-n.rects.popper[h],w=i[d]-n.rects.reference[d],S=Bf(s),j=S?d==="y"?S.clientHeight||0:S.clientWidth||0:0,I=x/2-w/2,_=m[b],M=j-g[h]-m[y],E=j/2-g[h]/2+I,A=Bd(_,E,M),R=d;n.modifiersData[r]=(t={},t[R]=A,t.centerOffset=A-E,t)}}function zB(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Z5(t.elements.popper,o)&&(t.elements.arrow=o))}const FB={name:"arrow",enabled:!0,phase:"main",fn:LB,effect:zB,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gu(e){return e.split("-")[1]}var BB={top:"auto",right:"auto",bottom:"auto",left:"auto"};function HB(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:hu(n*o)/o||0,y:hu(r*o)/o||0}}function tk(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,c=e.position,d=e.gpuAcceleration,p=e.adaptive,h=e.roundOffsets,m=e.isFixed,g=i.x,b=g===void 0?0:g,y=i.y,x=y===void 0?0:y,w=typeof h=="function"?h({x:b,y:x}):{x:b,y:x};b=w.x,x=w.y;var S=i.hasOwnProperty("x"),j=i.hasOwnProperty("y"),I=Ko,_=qo,M=window;if(p){var E=Bf(n),A="clientHeight",R="clientWidth";if(E===ms(n)&&(E=ul(n),fi(E).position!=="static"&&c==="absolute"&&(A="scrollHeight",R="scrollWidth")),E=E,o===qo||(o===Ko||o===Ts)&&s===of){_=Ds;var D=m&&E===M&&M.visualViewport?M.visualViewport.height:E[A];x-=D-r.height,x*=d?1:-1}if(o===Ko||(o===qo||o===Ds)&&s===of){I=Ts;var O=m&&E===M&&M.visualViewport?M.visualViewport.width:E[R];b-=O-r.width,b*=d?1:-1}}var T=Object.assign({position:c},p&&BB),K=h===!0?HB({x:b,y:x},ms(n)):{x:b,y:x};if(b=K.x,x=K.y,d){var G;return Object.assign({},T,(G={},G[_]=j?"0":"",G[I]=S?"0":"",G.transform=(M.devicePixelRatio||1)<=1?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",G))}return Object.assign({},T,(t={},t[_]=j?x+"px":"",t[I]=S?b+"px":"",t.transform="",t))}function WB(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,c=n.roundOffsets,d=c===void 0?!0:c,p={placement:Pa(t.placement),variation:gu(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tk(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:d})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tk(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const VB={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:WB,data:{}};var Xp={passive:!0};function UB(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,c=i===void 0?!0:i,d=ms(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&p.forEach(function(h){h.addEventListener("scroll",n.update,Xp)}),c&&d.addEventListener("resize",n.update,Xp),function(){s&&p.forEach(function(h){h.removeEventListener("scroll",n.update,Xp)}),c&&d.removeEventListener("resize",n.update,Xp)}}const GB={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:UB,data:{}};var qB={left:"right",right:"left",bottom:"top",top:"bottom"};function Ph(e){return e.replace(/left|right|bottom|top/g,function(t){return qB[t]})}var KB={start:"end",end:"start"};function nk(e){return e.replace(/start|end/g,function(t){return KB[t]})}function Ey(e){var t=ms(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function My(e){return mu(ul(e)).left+Ey(e).scrollLeft}function QB(e,t){var n=ms(e),r=ul(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,c=0,d=0;if(o){s=o.width,i=o.height;var p=J5();(p||!p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}return{width:s,height:i,x:c+My(e),y:d}}function XB(e){var t,n=ul(e),r=Ey(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=$l(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=$l(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+My(e),d=-r.scrollTop;return fi(o||n).direction==="rtl"&&(c+=$l(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:c,y:d}}function Oy(e){var t=fi(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function r3(e){return["html","body","#document"].indexOf(Ma(e))>=0?e.ownerDocument.body:Os(e)&&Oy(e)?e:r3(Eg(e))}function Hd(e,t){var n;t===void 0&&(t=[]);var r=r3(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=ms(r),i=o?[s].concat(s.visualViewport||[],Oy(r)?r:[]):r,c=t.concat(i);return o?c:c.concat(Hd(Eg(i)))}function Sb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function YB(e,t){var n=mu(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function rk(e,t,n){return t===X5?Sb(QB(e,n)):Gl(t)?YB(t,n):Sb(XB(ul(e)))}function JB(e){var t=Hd(Eg(e)),n=["absolute","fixed"].indexOf(fi(e).position)>=0,r=n&&Os(e)?Bf(e):e;return Gl(r)?t.filter(function(o){return Gl(o)&&Z5(o,r)&&Ma(o)!=="body"}):[]}function ZB(e,t,n,r){var o=t==="clippingParents"?JB(e):[].concat(t),s=[].concat(o,[n]),i=s[0],c=s.reduce(function(d,p){var h=rk(e,p,r);return d.top=$l(h.top,d.top),d.right=rm(h.right,d.right),d.bottom=rm(h.bottom,d.bottom),d.left=$l(h.left,d.left),d},rk(e,i,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function o3(e){var t=e.reference,n=e.element,r=e.placement,o=r?Pa(r):null,s=r?gu(r):null,i=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,d;switch(o){case qo:d={x:i,y:t.y-n.height};break;case Ds:d={x:i,y:t.y+t.height};break;case Ts:d={x:t.x+t.width,y:c};break;case Ko:d={x:t.x-n.width,y:c};break;default:d={x:t.x,y:t.y}}var p=o?Py(o):null;if(p!=null){var h=p==="y"?"height":"width";switch(s){case pu:d[p]=d[p]-(t[h]/2-n[h]/2);break;case of:d[p]=d[p]+(t[h]/2-n[h]/2);break}}return d}function sf(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,c=n.boundary,d=c===void 0?xB:c,p=n.rootBoundary,h=p===void 0?X5:p,m=n.elementContext,g=m===void 0?bd:m,b=n.altBoundary,y=b===void 0?!1:b,x=n.padding,w=x===void 0?0:x,S=t3(typeof w!="number"?w:n3(w,Ff)),j=g===bd?yB:bd,I=e.rects.popper,_=e.elements[y?j:g],M=ZB(Gl(_)?_:_.contextElement||ul(e.elements.popper),d,h,i),E=mu(e.elements.reference),A=o3({reference:E,element:I,strategy:"absolute",placement:o}),R=Sb(Object.assign({},I,A)),D=g===bd?R:E,O={top:M.top-D.top+S.top,bottom:D.bottom-M.bottom+S.bottom,left:M.left-D.left+S.left,right:D.right-M.right+S.right},T=e.modifiersData.offset;if(g===bd&&T){var K=T[o];Object.keys(O).forEach(function(G){var X=[Ts,Ds].indexOf(G)>=0?1:-1,Z=[qo,Ds].indexOf(G)>=0?"y":"x";O[G]+=K[Z]*X})}return O}function eH(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,c=n.flipVariations,d=n.allowedAutoPlacements,p=d===void 0?Y5:d,h=gu(r),m=h?c?ZS:ZS.filter(function(y){return gu(y)===h}):Ff,g=m.filter(function(y){return p.indexOf(y)>=0});g.length===0&&(g=m);var b=g.reduce(function(y,x){return y[x]=sf(e,{placement:x,boundary:o,rootBoundary:s,padding:i})[Pa(x)],y},{});return Object.keys(b).sort(function(y,x){return b[y]-b[x]})}function tH(e){if(Pa(e)===jy)return[];var t=Ph(e);return[nk(e),t,nk(t)]}function nH(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,c=i===void 0?!0:i,d=n.fallbackPlacements,p=n.padding,h=n.boundary,m=n.rootBoundary,g=n.altBoundary,b=n.flipVariations,y=b===void 0?!0:b,x=n.allowedAutoPlacements,w=t.options.placement,S=Pa(w),j=S===w,I=d||(j||!y?[Ph(w)]:tH(w)),_=[w].concat(I).reduce(function(Y,$){return Y.concat(Pa($)===jy?eH(t,{placement:$,boundary:h,rootBoundary:m,padding:p,flipVariations:y,allowedAutoPlacements:x}):$)},[]),M=t.rects.reference,E=t.rects.popper,A=new Map,R=!0,D=_[0],O=0;O<_.length;O++){var T=_[O],K=Pa(T),G=gu(T)===pu,X=[qo,Ds].indexOf(K)>=0,Z=X?"width":"height",te=sf(t,{placement:T,boundary:h,rootBoundary:m,altBoundary:g,padding:p}),V=X?G?Ts:Ko:G?Ds:qo;M[Z]>E[Z]&&(V=Ph(V));var oe=Ph(V),ne=[];if(s&&ne.push(te[K]<=0),c&&ne.push(te[V]<=0,te[oe]<=0),ne.every(function(Y){return Y})){D=T,R=!1;break}A.set(T,ne)}if(R)for(var se=y?3:1,re=function($){var F=_.find(function(q){var pe=A.get(q);if(pe)return pe.slice(0,$).every(function(W){return W})});if(F)return D=F,"break"},ae=se;ae>0;ae--){var B=re(ae);if(B==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const rH={name:"flip",enabled:!0,phase:"main",fn:nH,requiresIfExists:["offset"],data:{_skip:!1}};function ok(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function sk(e){return[qo,Ts,Ds,Ko].some(function(t){return e[t]>=0})}function oH(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=sf(t,{elementContext:"reference"}),c=sf(t,{altBoundary:!0}),d=ok(i,r),p=ok(c,o,s),h=sk(d),m=sk(p);t.modifiersData[n]={referenceClippingOffsets:d,popperEscapeOffsets:p,isReferenceHidden:h,hasPopperEscaped:m},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":m})}const sH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:oH};function aH(e,t,n){var r=Pa(e),o=[Ko,qo].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],c=s[1];return i=i||0,c=(c||0)*o,[Ko,Ts].indexOf(r)>=0?{x:c,y:i}:{x:i,y:c}}function iH(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=Y5.reduce(function(h,m){return h[m]=aH(m,t.rects,s),h},{}),c=i[t.placement],d=c.x,p=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=i}const lH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:iH};function cH(e){var t=e.state,n=e.name;t.modifiersData[n]=o3({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const uH={name:"popperOffsets",enabled:!0,phase:"read",fn:cH,data:{}};function dH(e){return e==="x"?"y":"x"}function fH(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,c=i===void 0?!1:i,d=n.boundary,p=n.rootBoundary,h=n.altBoundary,m=n.padding,g=n.tether,b=g===void 0?!0:g,y=n.tetherOffset,x=y===void 0?0:y,w=sf(t,{boundary:d,rootBoundary:p,padding:m,altBoundary:h}),S=Pa(t.placement),j=gu(t.placement),I=!j,_=Py(S),M=dH(_),E=t.modifiersData.popperOffsets,A=t.rects.reference,R=t.rects.popper,D=typeof x=="function"?x(Object.assign({},t.rects,{placement:t.placement})):x,O=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,K={x:0,y:0};if(E){if(s){var G,X=_==="y"?qo:Ko,Z=_==="y"?Ds:Ts,te=_==="y"?"height":"width",V=E[_],oe=V+w[X],ne=V-w[Z],se=b?-R[te]/2:0,re=j===pu?A[te]:R[te],ae=j===pu?-R[te]:-A[te],B=t.elements.arrow,Y=b&&B?Iy(B):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:e3(),F=$[X],q=$[Z],pe=Bd(0,A[te],Y[te]),W=I?A[te]/2-se-pe-F-O.mainAxis:re-pe-F-O.mainAxis,U=I?-A[te]/2+se+pe+q+O.mainAxis:ae+pe+q+O.mainAxis,ee=t.elements.arrow&&Bf(t.elements.arrow),J=ee?_==="y"?ee.clientTop||0:ee.clientLeft||0:0,ge=(G=T==null?void 0:T[_])!=null?G:0,he=V+W-ge-J,de=V+U-ge,_e=Bd(b?rm(oe,he):oe,V,b?$l(ne,de):ne);E[_]=_e,K[_]=_e-V}if(c){var Pe,ze=_==="x"?qo:Ko,ht=_==="x"?Ds:Ts,Je=E[M],qt=M==="y"?"height":"width",Pt=Je+w[ze],jt=Je-w[ht],Se=[qo,Ko].indexOf(S)!==-1,Fe=(Pe=T==null?void 0:T[M])!=null?Pe:0,it=Se?Pt:Je-A[qt]-R[qt]-Fe+O.altAxis,At=Se?Je+A[qt]+R[qt]-Fe-O.altAxis:jt,ke=b&&Se?NB(it,Je,At):Bd(b?it:Pt,Je,b?At:jt);E[M]=ke,K[M]=ke-Je}t.modifiersData[r]=K}}const pH={name:"preventOverflow",enabled:!0,phase:"main",fn:fH,requiresIfExists:["offset"]};function hH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function mH(e){return e===ms(e)||!Os(e)?Ey(e):hH(e)}function gH(e){var t=e.getBoundingClientRect(),n=hu(t.width)/e.offsetWidth||1,r=hu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function vH(e,t,n){n===void 0&&(n=!1);var r=Os(t),o=Os(t)&&gH(t),s=ul(t),i=mu(e,o,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(r||!r&&!n)&&((Ma(t)!=="body"||Oy(s))&&(c=mH(t)),Os(t)?(d=mu(t,!0),d.x+=t.clientLeft,d.y+=t.clientTop):s&&(d.x=My(s))),{x:i.left+c.scrollLeft-d.x,y:i.top+c.scrollTop-d.y,width:i.width,height:i.height}}function bH(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(c){if(!n.has(c)){var d=t.get(c);d&&o(d)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function xH(e){var t=bH(e);return MB.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function yH(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function CH(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var ak={placement:"bottom",modifiers:[],strategy:"absolute"};function ik(){for(var e=arguments.length,t=new Array(e),n=0;n{}),I=l.useCallback(()=>{var O;!t||!y.current||!x.current||((O=j.current)==null||O.call(j),w.current=kH(y.current,x.current,{placement:S,modifiers:[mB,fB,dB,{...uB,enabled:!!g},{name:"eventListeners",...cB(i)},{name:"arrow",options:{padding:s}},{name:"offset",options:{offset:c??[0,d]}},{name:"flip",enabled:!!p,options:{padding:8}},{name:"preventOverflow",enabled:!!m,options:{boundary:h}},...n??[]],strategy:o}),w.current.forceUpdate(),j.current=w.current.destroy)},[S,t,n,g,i,s,c,d,p,m,h,o]);l.useEffect(()=>()=>{var O;!y.current&&!x.current&&((O=w.current)==null||O.destroy(),w.current=null)},[]);const _=l.useCallback(O=>{y.current=O,I()},[I]),M=l.useCallback((O={},T=null)=>({...O,ref:xn(_,T)}),[_]),E=l.useCallback(O=>{x.current=O,I()},[I]),A=l.useCallback((O={},T=null)=>({...O,ref:xn(E,T),style:{...O.style,position:o,minWidth:g?void 0:"max-content",inset:"0 auto auto 0"}}),[o,E,g]),R=l.useCallback((O={},T=null)=>{const{size:K,shadowColor:G,bg:X,style:Z,...te}=O;return{...te,ref:T,"data-popper-arrow":"",style:jH(O)}},[]),D=l.useCallback((O={},T=null)=>({...O,ref:T,"data-popper-arrow-inner":""}),[]);return{update(){var O;(O=w.current)==null||O.update()},forceUpdate(){var O;(O=w.current)==null||O.forceUpdate()},transformOrigin:qr.transformOrigin.varRef,referenceRef:_,popperRef:E,getPopperProps:A,getArrowProps:R,getArrowInnerProps:D,getReferenceProps:M}}function jH(e){const{size:t,shadowColor:n,bg:r,style:o}=e,s={...o,position:"absolute"};return t&&(s["--popper-arrow-size"]=t),n&&(s["--popper-arrow-shadow-color"]=n),r&&(s["--popper-arrow-bg"]=r),s}function Ry(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=vr(n),i=vr(t),[c,d]=l.useState(e.defaultIsOpen||!1),p=r!==void 0?r:c,h=r!==void 0,m=l.useId(),g=o??`disclosure-${m}`,b=l.useCallback(()=>{h||d(!1),i==null||i()},[h,i]),y=l.useCallback(()=>{h||d(!0),s==null||s()},[h,s]),x=l.useCallback(()=>{p?b():y()},[p,y,b]);function w(j={}){return{...j,"aria-expanded":p,"aria-controls":g,onClick(I){var _;(_=j.onClick)==null||_.call(j,I),x()}}}function S(j={}){return{...j,hidden:!p,id:g}}return{isOpen:p,onOpen:y,onClose:b,onToggle:x,isControlled:h,getButtonProps:w,getDisclosureProps:S}}function _H(e){const{ref:t,handler:n,enabled:r=!0}=e,o=vr(n),i=l.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;l.useEffect(()=>{if(!r)return;const c=m=>{r1(m,t)&&(i.isPointerDown=!0)},d=m=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&n&&r1(m,t)&&(i.isPointerDown=!1,o(m))},p=m=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&r1(m,t)&&(i.isPointerDown=!1,o(m))},h=s3(t.current);return h.addEventListener("mousedown",c,!0),h.addEventListener("mouseup",d,!0),h.addEventListener("touchstart",c,!0),h.addEventListener("touchend",p,!0),()=>{h.removeEventListener("mousedown",c,!0),h.removeEventListener("mouseup",d,!0),h.removeEventListener("touchstart",c,!0),h.removeEventListener("touchend",p,!0)}},[n,t,o,i,r])}function r1(e,t){var n;const r=e.target;return r&&!s3(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function s3(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function a3(e){const{isOpen:t,ref:n}=e,[r,o]=l.useState(t),[s,i]=l.useState(!1);return l.useEffect(()=>{s||(o(t),i(!0))},[t,s,r]),Nl(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var d;const p=MF(n.current),h=new p.CustomEvent("animationend",{bubbles:!0});(d=n.current)==null||d.dispatchEvent(h)}}}function Dy(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}var[IH,PH,EH,MH]=ry(),[OH,Hf]=Un({strict:!1,name:"MenuContext"});function AH(e,...t){const n=l.useId(),r=e||n;return l.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}function i3(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function lk(e){return i3(e).activeElement===e}function RH(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:s=!0,isLazy:i,isOpen:c,defaultIsOpen:d,onClose:p,onOpen:h,placement:m="bottom-start",lazyBehavior:g="unmount",direction:b,computePositionOnMount:y=!1,...x}=e,w=l.useRef(null),S=l.useRef(null),j=EH(),I=l.useCallback(()=>{requestAnimationFrame(()=>{var B;(B=w.current)==null||B.focus({preventScroll:!1})})},[]),_=l.useCallback(()=>{const B=setTimeout(()=>{var Y;if(o)(Y=o.current)==null||Y.focus();else{const $=j.firstEnabled();$&&G($.index)}});oe.current.add(B)},[j,o]),M=l.useCallback(()=>{const B=setTimeout(()=>{const Y=j.lastEnabled();Y&&G(Y.index)});oe.current.add(B)},[j]),E=l.useCallback(()=>{h==null||h(),s?_():I()},[s,_,I,h]),{isOpen:A,onOpen:R,onClose:D,onToggle:O}=Ry({isOpen:c,defaultIsOpen:d,onClose:p,onOpen:E});_H({enabled:A&&r,ref:w,handler:B=>{var Y;(Y=S.current)!=null&&Y.contains(B.target)||D()}});const T=Ay({...x,enabled:A||y,placement:m,direction:b}),[K,G]=l.useState(-1);wi(()=>{A||G(-1)},[A]),Q5(w,{focusRef:S,visible:A,shouldFocus:!0});const X=a3({isOpen:A,ref:w}),[Z,te]=AH(t,"menu-button","menu-list"),V=l.useCallback(()=>{R(),I()},[R,I]),oe=l.useRef(new Set([]));l.useEffect(()=>{const B=oe.current;return()=>{B.forEach(Y=>clearTimeout(Y)),B.clear()}},[]);const ne=l.useCallback(()=>{R(),_()},[_,R]),se=l.useCallback(()=>{R(),M()},[R,M]),re=l.useCallback(()=>{var B,Y;const $=i3(w.current),F=(B=w.current)==null?void 0:B.contains($.activeElement);if(!(A&&!F))return;const pe=(Y=j.item(K))==null?void 0:Y.node;pe==null||pe.focus({preventScroll:!0})},[A,K,j]),ae=l.useRef(null);return{openAndFocusMenu:V,openAndFocusFirstItem:ne,openAndFocusLastItem:se,onTransitionEnd:re,unstable__animationState:X,descendants:j,popper:T,buttonId:Z,menuId:te,forceUpdate:T.forceUpdate,orientation:"vertical",isOpen:A,onToggle:O,onOpen:R,onClose:D,menuRef:w,buttonRef:S,focusedIndex:K,closeOnSelect:n,closeOnBlur:r,autoSelect:s,setFocusedIndex:G,isLazy:i,lazyBehavior:g,initialFocusRef:o,rafId:ae}}function DH(e={},t=null){const n=Hf(),{onToggle:r,popper:o,openAndFocusFirstItem:s,openAndFocusLastItem:i}=n,c=l.useCallback(d=>{const p=d.key,m={Enter:s,ArrowDown:s,ArrowUp:i}[p];m&&(d.preventDefault(),d.stopPropagation(),m(d))},[s,i]);return{...e,ref:xn(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":Vt(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:ot(e.onClick,r),onKeyDown:ot(e.onKeyDown,c)}}function kb(e){var t;return LH(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function TH(e={},t=null){const n=Hf();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:o,menuRef:s,isOpen:i,onClose:c,menuId:d,isLazy:p,lazyBehavior:h,unstable__animationState:m}=n,g=PH(),b=ZF({preventDefault:S=>S.key!==" "&&kb(S.target)}),y=l.useCallback(S=>{if(!S.currentTarget.contains(S.target))return;const j=S.key,_={Tab:E=>E.preventDefault(),Escape:c,ArrowDown:()=>{const E=g.nextEnabled(r);E&&o(E.index)},ArrowUp:()=>{const E=g.prevEnabled(r);E&&o(E.index)}}[j];if(_){S.preventDefault(),_(S);return}const M=b(E=>{const A=eB(g.values(),E,R=>{var D,O;return(O=(D=R==null?void 0:R.node)==null?void 0:D.textContent)!=null?O:""},g.item(r));if(A){const R=g.indexOf(A.node);o(R)}});kb(S.target)&&M(S)},[g,r,b,c,o]),x=l.useRef(!1);i&&(x.current=!0);const w=Dy({wasSelected:x.current,enabled:p,mode:h,isSelected:m.present});return{...e,ref:xn(s,t),children:w?e.children:null,tabIndex:-1,role:"menu",id:d,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:ot(e.onKeyDown,y)}}function NH(e={}){const{popper:t,isOpen:n}=Hf();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function $H(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:s,onFocus:i,isDisabled:c,isFocusable:d,closeOnSelect:p,type:h,...m}=e,g=Hf(),{setFocusedIndex:b,focusedIndex:y,closeOnSelect:x,onClose:w,menuRef:S,isOpen:j,menuId:I,rafId:_}=g,M=l.useRef(null),E=`${I}-menuitem-${l.useId()}`,{index:A,register:R}=MH({disabled:c&&!d}),D=l.useCallback(V=>{n==null||n(V),!c&&b(A)},[b,A,c,n]),O=l.useCallback(V=>{r==null||r(V),M.current&&!lk(M.current)&&D(V)},[D,r]),T=l.useCallback(V=>{o==null||o(V),!c&&b(-1)},[b,c,o]),K=l.useCallback(V=>{s==null||s(V),kb(V.currentTarget)&&(p??x)&&w()},[w,s,x,p]),G=l.useCallback(V=>{i==null||i(V),b(A)},[b,i,A]),X=A===y,Z=c&&!d;wi(()=>{if(j)return X&&!Z&&M.current?(_.current&&cancelAnimationFrame(_.current),_.current=requestAnimationFrame(()=>{var V;(V=M.current)==null||V.focus({preventScroll:!0}),_.current=null})):S.current&&!lk(S.current)&&S.current.focus({preventScroll:!0}),()=>{_.current&&cancelAnimationFrame(_.current)}},[X,Z,S,j]);const te=K5({onClick:K,onFocus:G,onMouseEnter:D,onMouseMove:O,onMouseLeave:T,ref:xn(R,M,t),isDisabled:c,isFocusable:d});return{...m,...te,type:h??te.type,id:E,role:"menuitem",tabIndex:X?0:-1}}function LH(e){var t;if(!zH(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function zH(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}var[FH,Tu]=Un({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Mg=e=>{const{children:t}=e,n=no("Menu",e),r=lr(e),{direction:o}=kf(),{descendants:s,...i}=RH({...r,direction:o}),c=l.useMemo(()=>i,[i]),{isOpen:d,onClose:p,forceUpdate:h}=c;return a.jsx(IH,{value:s,children:a.jsx(OH,{value:c,children:a.jsx(FH,{value:n,children:Mx(t,{isOpen:d,onClose:p,forceUpdate:h})})})})};Mg.displayName="Menu";var l3=De((e,t)=>{const n=Tu();return a.jsx(Ae.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});l3.displayName="MenuCommand";var BH=De((e,t)=>{const{type:n,...r}=e,o=Tu(),s=r.as||n?n??void 0:"button",i=l.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...o.item}),[o.item]);return a.jsx(Ae.button,{ref:t,type:s,...r,__css:i})}),c3=e=>{const{className:t,children:n,...r}=e,o=Tu(),s=l.Children.only(n),i=l.isValidElement(s)?l.cloneElement(s,{focusable:"false","aria-hidden":!0,className:kt("chakra-menu__icon",s.props.className)}):null,c=kt("chakra-menu__icon-wrapper",t);return a.jsx(Ae.span,{className:c,...r,__css:o.icon,children:i})};c3.displayName="MenuIcon";var Kn=De((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:o,commandSpacing:s="0.75rem",children:i,...c}=e,d=$H(c,t),h=n||o?a.jsx("span",{style:{pointerEvents:"none",flex:1},children:i}):i;return a.jsxs(BH,{...d,className:kt("chakra-menu__menuitem",d.className),children:[n&&a.jsx(c3,{fontSize:"0.8em",marginEnd:r,children:n}),h,o&&a.jsx(l3,{marginStart:s,children:o})]})});Kn.displayName="MenuItem";var HH={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},WH=Ae(Ar.div),ql=De(function(t,n){var r,o;const{rootProps:s,motionProps:i,...c}=t,{isOpen:d,onTransitionEnd:p,unstable__animationState:h}=Hf(),m=TH(c,n),g=NH(s),b=Tu();return a.jsx(Ae.div,{...g,__css:{zIndex:(o=t.zIndex)!=null?o:(r=b.list)==null?void 0:r.zIndex},children:a.jsx(WH,{variants:HH,initial:!1,animate:d?"enter":"exit",__css:{outline:0,...b.list},...i,className:kt("chakra-menu__menu-list",m.className),...m,onUpdate:p,onAnimationComplete:pg(h.onComplete,m.onAnimationComplete)})})});ql.displayName="MenuList";var af=De((e,t)=>{const{title:n,children:r,className:o,...s}=e,i=kt("chakra-menu__group__title",o),c=Tu();return a.jsxs("div",{ref:t,className:"chakra-menu__group",role:"group",children:[n&&a.jsx(Ae.p,{className:i,...s,__css:c.groupTitle,children:n}),r]})});af.displayName="MenuGroup";var VH=De((e,t)=>{const n=Tu();return a.jsx(Ae.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),Og=De((e,t)=>{const{children:n,as:r,...o}=e,s=DH(o,t),i=r||VH;return a.jsx(i,{...s,className:kt("chakra-menu__menu-button",e.className),children:a.jsx(Ae.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});Og.displayName="MenuButton";var UH={slideInBottom:{...Md,custom:{offsetY:16,reverse:!0}},slideInRight:{...Md,custom:{offsetX:16,reverse:!0}},slideInTop:{...Md,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...Md,custom:{offsetX:-16,reverse:!0}},scale:{...FP,custom:{initialScale:.95,reverse:!0}},none:{}},GH=Ae(Ar.section),qH=e=>UH[e||"none"],u3=l.forwardRef((e,t)=>{const{preset:n,motionProps:r=qH(n),...o}=e;return a.jsx(GH,{ref:t,...r,...o})});u3.displayName="ModalTransition";var KH=Object.defineProperty,QH=(e,t,n)=>t in e?KH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,XH=(e,t,n)=>(QH(e,typeof t!="symbol"?t+"":t,n),n),YH=class{constructor(){XH(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},jb=new YH;function d3(e,t){const[n,r]=l.useState(0);return l.useEffect(()=>{const o=e.current;if(o){if(t){const s=jb.add(o);r(s)}return()=>{jb.remove(o),r(0)}}},[t,e]),n}var JH=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ic=new WeakMap,Yp=new WeakMap,Jp={},o1=0,f3=function(e){return e&&(e.host||f3(e.parentNode))},ZH=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=f3(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},eW=function(e,t,n,r){var o=ZH(t,Array.isArray(e)?e:[e]);Jp[n]||(Jp[n]=new WeakMap);var s=Jp[n],i=[],c=new Set,d=new Set(o),p=function(m){!m||c.has(m)||(c.add(m),p(m.parentNode))};o.forEach(p);var h=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(g){if(c.has(g))h(g);else{var b=g.getAttribute(r),y=b!==null&&b!=="false",x=(Ic.get(g)||0)+1,w=(s.get(g)||0)+1;Ic.set(g,x),s.set(g,w),i.push(g),x===1&&y&&Yp.set(g,!0),w===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}})};return h(t),c.clear(),o1++,function(){i.forEach(function(m){var g=Ic.get(m)-1,b=s.get(m)-1;Ic.set(m,g),s.set(m,b),g||(Yp.has(m)||m.removeAttribute(r),Yp.delete(m)),b||m.removeAttribute(n)}),o1--,o1||(Ic=new WeakMap,Ic=new WeakMap,Yp=new WeakMap,Jp={})}},tW=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||JH(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),eW(r,o,n,"aria-hidden")):function(){return null}};function nW(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:s=!0,useInert:i=!0,onOverlayClick:c,onEsc:d}=e,p=l.useRef(null),h=l.useRef(null),[m,g,b]=oW(r,"chakra-modal","chakra-modal--header","chakra-modal--body");rW(p,t&&i);const y=d3(p,t),x=l.useRef(null),w=l.useCallback(D=>{x.current=D.target},[]),S=l.useCallback(D=>{D.key==="Escape"&&(D.stopPropagation(),s&&(n==null||n()),d==null||d())},[s,n,d]),[j,I]=l.useState(!1),[_,M]=l.useState(!1),E=l.useCallback((D={},O=null)=>({role:"dialog",...D,ref:xn(O,p),id:m,tabIndex:-1,"aria-modal":!0,"aria-labelledby":j?g:void 0,"aria-describedby":_?b:void 0,onClick:ot(D.onClick,T=>T.stopPropagation())}),[b,_,m,g,j]),A=l.useCallback(D=>{D.stopPropagation(),x.current===D.target&&jb.isTopModal(p.current)&&(o&&(n==null||n()),c==null||c())},[n,o,c]),R=l.useCallback((D={},O=null)=>({...D,ref:xn(O,h),onClick:ot(D.onClick,A),onKeyDown:ot(D.onKeyDown,S),onMouseDown:ot(D.onMouseDown,w)}),[S,w,A]);return{isOpen:t,onClose:n,headerId:g,bodyId:b,setBodyMounted:M,setHeaderMounted:I,dialogRef:p,overlayRef:h,getDialogProps:E,getDialogContainerProps:R,index:y}}function rW(e,t){const n=e.current;l.useEffect(()=>{if(!(!e.current||!t))return tW(e.current)},[t,e,n])}function oW(e,...t){const n=l.useId(),r=e||n;return l.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}var[sW,Nu]=Un({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[aW,Kl]=Un({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),vu=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:o,trapFocus:s,initialFocusRef:i,finalFocusRef:c,returnFocusOnClose:d,blockScrollOnMount:p,allowPinchZoom:h,preserveScrollBarGap:m,motionPreset:g,lockFocusAcrossFrames:b,onCloseComplete:y}=t,x=no("Modal",t),S={...nW(t),autoFocus:o,trapFocus:s,initialFocusRef:i,finalFocusRef:c,returnFocusOnClose:d,blockScrollOnMount:p,allowPinchZoom:h,preserveScrollBarGap:m,motionPreset:g,lockFocusAcrossFrames:b};return a.jsx(aW,{value:S,children:a.jsx(sW,{value:x,children:a.jsx(So,{onExitComplete:y,children:S.isOpen&&a.jsx(Au,{...n,children:r})})})})};vu.displayName="Modal";var Eh="right-scroll-bar-position",Mh="width-before-scroll-bar",iW="with-scroll-bars-hidden",lW="--removed-body-scroll-bar-size",p3=c5(),s1=function(){},Ag=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:s1,onWheelCapture:s1,onTouchMoveCapture:s1}),o=r[0],s=r[1],i=e.forwardProps,c=e.children,d=e.className,p=e.removeScrollBar,h=e.enabled,m=e.shards,g=e.sideCar,b=e.noIsolation,y=e.inert,x=e.allowPinchZoom,w=e.as,S=w===void 0?"div":w,j=e.gapMode,I=a5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=g,M=s5([n,t]),E=wa(wa({},I),o);return l.createElement(l.Fragment,null,h&&l.createElement(_,{sideCar:p3,removeScrollBar:p,shards:m,noIsolation:b,inert:y,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:j}),i?l.cloneElement(l.Children.only(c),wa(wa({},E),{ref:M})):l.createElement(S,wa({},E,{className:d,ref:M}),c))});Ag.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ag.classNames={fullWidth:Mh,zeroRight:Eh};var ck,cW=function(){if(ck)return ck;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uW(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cW();return t&&e.setAttribute("nonce",t),e}function dW(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fW(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pW=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uW())&&(dW(t,n),fW(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hW=function(){var e=pW();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},h3=function(){var e=hW(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},mW={left:0,top:0,right:0,gap:0},a1=function(e){return parseInt(e||"",10)||0},gW=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[a1(n),a1(r),a1(o)]},vW=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mW;var t=gW(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},bW=h3(),xW=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),` - .`.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{leastDestructiveRef:t,...n}=e;return a.jsx(vu,{...n,initialFocusRef:t})}var Vf=De((e,t)=>a.jsx(bu,{ref:t,role:"alertdialog",...e})),pi=De((e,t)=>{const{className:n,...r}=e,o=kt("chakra-modal__footer",n),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...Nu().footer};return a.jsx(Ae.footer,{ref:t,...r,__css:i,className:o})});pi.displayName="ModalFooter";var Oa=De((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:s}=Kl();l.useEffect(()=>(s(!0),()=>s(!1)),[s]);const i=kt("chakra-modal__header",n),d={flex:0,...Nu().header};return a.jsx(Ae.header,{ref:t,className:i,id:o,...r,__css:d})});Oa.displayName="ModalHeader";var NW=Ae(Ar.div),Aa=De((e,t)=>{const{className:n,transition:r,motionProps:o,...s}=e,i=kt("chakra-modal__overlay",n),d={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Nu().overlay},{motionPreset:p}=Kl(),m=o||(p==="none"?{}:zP);return a.jsx(NW,{...m,__css:d,ref:t,className:i,...s})});Aa.displayName="ModalOverlay";var Ra=De((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:s}=Kl();l.useEffect(()=>(s(!0),()=>s(!1)),[s]);const i=kt("chakra-modal__body",n),c=Nu();return a.jsx(Ae.div,{ref:t,className:i,id:o,...r,__css:c.body})});Ra.displayName="ModalBody";var Rg=De((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:s}=Kl(),i=kt("chakra-modal__close-btn",r),c=Nu();return a.jsx(_I,{ref:t,__css:c.closeButton,className:i,onClick:ot(n,d=>{d.stopPropagation(),s()}),...o})});Rg.displayName="ModalCloseButton";var $W=e=>a.jsx(Gr,{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),LW=e=>a.jsx(Gr,{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function pk(e,t,n,r){l.useEffect(()=>{var o;if(!e.current||!r)return;const s=(o=e.current.ownerDocument.defaultView)!=null?o:window,i=Array.isArray(t)?t:[t],c=new s.MutationObserver(d=>{for(const p of d)p.type==="attributes"&&p.attributeName&&i.includes(p.attributeName)&&n(p)});return c.observe(e.current,{attributes:!0,attributeFilter:i}),()=>c.disconnect()})}function zW(e,t){const n=vr(e);l.useEffect(()=>{let r=null;const o=()=>n();return t!==null&&(r=window.setInterval(o,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var FW=50,hk=300;function BW(e,t){const[n,r]=l.useState(!1),[o,s]=l.useState(null),[i,c]=l.useState(!0),d=l.useRef(null),p=()=>clearTimeout(d.current);zW(()=>{o==="increment"&&e(),o==="decrement"&&t()},n?FW:null);const h=l.useCallback(()=>{i&&e(),d.current=setTimeout(()=>{c(!1),r(!0),s("increment")},hk)},[e,i]),m=l.useCallback(()=>{i&&t(),d.current=setTimeout(()=>{c(!1),r(!0),s("decrement")},hk)},[t,i]),g=l.useCallback(()=>{c(!0),r(!1),p()},[]);return l.useEffect(()=>()=>p(),[]),{up:h,down:m,stop:g,isSpinning:n}}var HW=/^[Ee0-9+\-.]$/;function WW(e){return HW.test(e)}function VW(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function UW(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,step:i=1,isReadOnly:c,isDisabled:d,isRequired:p,isInvalid:h,pattern:m="[0-9]*(.[0-9]+)?",inputMode:g="decimal",allowMouseWheel:b,id:y,onChange:x,precision:w,name:S,"aria-describedby":j,"aria-label":I,"aria-labelledby":_,onFocus:M,onBlur:E,onInvalid:A,getAriaValueText:R,isValidCharacter:D,format:O,parse:T,...K}=e,G=vr(M),X=vr(E),Z=vr(A),te=vr(D??WW),V=vr(R),oe=fz(e),{update:ne,increment:se,decrement:re}=oe,[ae,B]=l.useState(!1),Y=!(c||d),$=l.useRef(null),F=l.useRef(null),q=l.useRef(null),pe=l.useRef(null),W=l.useCallback(ke=>ke.split("").filter(te).join(""),[te]),U=l.useCallback(ke=>{var lt;return(lt=T==null?void 0:T(ke))!=null?lt:ke},[T]),ee=l.useCallback(ke=>{var lt;return((lt=O==null?void 0:O(ke))!=null?lt:ke).toString()},[O]);wi(()=>{(oe.valueAsNumber>s||oe.valueAsNumber{if(!$.current)return;if($.current.value!=oe.value){const lt=U($.current.value);oe.setValue(W(lt))}},[U,W]);const J=l.useCallback((ke=i)=>{Y&&se(ke)},[se,Y,i]),ge=l.useCallback((ke=i)=>{Y&&re(ke)},[re,Y,i]),he=BW(J,ge);pk(q,"disabled",he.stop,he.isSpinning),pk(pe,"disabled",he.stop,he.isSpinning);const de=l.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Rt=U(ke.currentTarget.value);ne(W(Rt)),F.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[ne,W,U]),_e=l.useCallback(ke=>{var lt,Rt,zt;G==null||G(ke),F.current&&(ke.target.selectionStart=(Rt=F.current.start)!=null?Rt:(lt=ke.currentTarget.value)==null?void 0:lt.length,ke.currentTarget.selectionEnd=(zt=F.current.end)!=null?zt:ke.currentTarget.selectionStart)},[G]),Pe=l.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;VW(ke,te)||ke.preventDefault();const lt=ze(ke)*i,Rt=ke.key,Re={ArrowUp:()=>J(lt),ArrowDown:()=>ge(lt),Home:()=>ne(o),End:()=>ne(s)}[Rt];Re&&(ke.preventDefault(),Re(ke))},[te,i,J,ge,ne,o,s]),ze=ke=>{let lt=1;return(ke.metaKey||ke.ctrlKey)&&(lt=.1),ke.shiftKey&&(lt=10),lt},ht=l.useMemo(()=>{const ke=V==null?void 0:V(oe.value);if(ke!=null)return ke;const lt=oe.value.toString();return lt||void 0},[oe.value,V]),Je=l.useCallback(()=>{let ke=oe.value;if(oe.value==="")return;/^[eE]/.test(oe.value.toString())?oe.setValue(""):(oe.valueAsNumbers&&(ke=s),oe.cast(ke))},[oe,s,o]),qt=l.useCallback(()=>{B(!1),n&&Je()},[n,B,Je]),Pt=l.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=$.current)==null||ke.focus()})},[t]),jt=l.useCallback(ke=>{ke.preventDefault(),he.up(),Pt()},[Pt,he]),Se=l.useCallback(ke=>{ke.preventDefault(),he.down(),Pt()},[Pt,he]);Nl(()=>$.current,"wheel",ke=>{var lt,Rt;const Re=((Rt=(lt=$.current)==null?void 0:lt.ownerDocument)!=null?Rt:document).activeElement===$.current;if(!b||!Re)return;ke.preventDefault();const Qe=ze(ke)*i,En=Math.sign(ke.deltaY);En===-1?J(Qe):En===1&&ge(Qe)},{passive:!1});const Fe=l.useCallback((ke={},lt=null)=>{const Rt=d||r&&oe.isAtMax;return{...ke,ref:xn(lt,q),role:"button",tabIndex:-1,onPointerDown:ot(ke.onPointerDown,zt=>{zt.button!==0||Rt||jt(zt)}),onPointerLeave:ot(ke.onPointerLeave,he.stop),onPointerUp:ot(ke.onPointerUp,he.stop),disabled:Rt,"aria-disabled":Ms(Rt)}},[oe.isAtMax,r,jt,he.stop,d]),it=l.useCallback((ke={},lt=null)=>{const Rt=d||r&&oe.isAtMin;return{...ke,ref:xn(lt,pe),role:"button",tabIndex:-1,onPointerDown:ot(ke.onPointerDown,zt=>{zt.button!==0||Rt||Se(zt)}),onPointerLeave:ot(ke.onPointerLeave,he.stop),onPointerUp:ot(ke.onPointerUp,he.stop),disabled:Rt,"aria-disabled":Ms(Rt)}},[oe.isAtMin,r,Se,he.stop,d]),At=l.useCallback((ke={},lt=null)=>{var Rt,zt,Re,Qe;return{name:S,inputMode:g,type:"text",pattern:m,"aria-labelledby":_,"aria-label":I,"aria-describedby":j,id:y,disabled:d,...ke,readOnly:(Rt=ke.readOnly)!=null?Rt:c,"aria-readonly":(zt=ke.readOnly)!=null?zt:c,"aria-required":(Re=ke.required)!=null?Re:p,required:(Qe=ke.required)!=null?Qe:p,ref:xn($,lt),value:ee(oe.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":Number.isNaN(oe.valueAsNumber)?void 0:oe.valueAsNumber,"aria-invalid":Ms(h??oe.isOutOfRange),"aria-valuetext":ht,autoComplete:"off",autoCorrect:"off",onChange:ot(ke.onChange,de),onKeyDown:ot(ke.onKeyDown,Pe),onFocus:ot(ke.onFocus,_e,()=>B(!0)),onBlur:ot(ke.onBlur,X,qt)}},[S,g,m,_,I,ee,j,y,d,p,c,h,oe.value,oe.valueAsNumber,oe.isOutOfRange,o,s,ht,de,Pe,_e,X,qt]);return{value:ee(oe.value),valueAsNumber:oe.valueAsNumber,isFocused:ae,isDisabled:d,isReadOnly:c,getIncrementButtonProps:Fe,getDecrementButtonProps:it,getInputProps:At,htmlProps:K}}var[GW,Dg]=Un({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[qW,Ty]=Un({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Tg=De(function(t,n){const r=no("NumberInput",t),o=lr(t),s=iy(o),{htmlProps:i,...c}=UW(s),d=l.useMemo(()=>c,[c]);return a.jsx(qW,{value:d,children:a.jsx(GW,{value:r,children:a.jsx(Ae.div,{...i,ref:n,className:kt("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});Tg.displayName="NumberInput";var Ng=De(function(t,n){const r=Dg();return a.jsx(Ae.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});Ng.displayName="NumberInputStepper";var $g=De(function(t,n){const{getInputProps:r}=Ty(),o=r(t,n),s=Dg();return a.jsx(Ae.input,{...o,className:kt("chakra-numberinput__field",t.className),__css:{width:"100%",...s.field}})});$g.displayName="NumberInputField";var x3=Ae("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Lg=De(function(t,n){var r;const o=Dg(),{getDecrementButtonProps:s}=Ty(),i=s(t,n);return a.jsx(x3,{...i,__css:o.stepper,children:(r=t.children)!=null?r:a.jsx($W,{})})});Lg.displayName="NumberDecrementStepper";var zg=De(function(t,n){var r;const{getIncrementButtonProps:o}=Ty(),s=o(t,n),i=Dg();return a.jsx(x3,{...s,__css:i.stepper,children:(r=t.children)!=null?r:a.jsx(LW,{})})});zg.displayName="NumberIncrementStepper";var[KW,ec]=Un({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[QW,Fg]=Un({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `});function Bg(e){const t=l.Children.only(e.children),{getTriggerProps:n}=ec();return l.cloneElement(t,n(t.props,t.ref))}Bg.displayName="PopoverTrigger";var Mc={click:"click",hover:"hover"};function XW(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:s=!0,autoFocus:i=!0,arrowSize:c,arrowShadowColor:d,trigger:p=Mc.click,openDelay:h=200,closeDelay:m=200,isLazy:g,lazyBehavior:b="unmount",computePositionOnMount:y,...x}=e,{isOpen:w,onClose:S,onOpen:j,onToggle:I}=Ry(e),_=l.useRef(null),M=l.useRef(null),E=l.useRef(null),A=l.useRef(!1),R=l.useRef(!1);w&&(R.current=!0);const[D,O]=l.useState(!1),[T,K]=l.useState(!1),G=l.useId(),X=o??G,[Z,te,V,oe]=["popover-trigger","popover-content","popover-header","popover-body"].map(de=>`${de}-${X}`),{referenceRef:ne,getArrowProps:se,getPopperProps:re,getArrowInnerProps:ae,forceUpdate:B}=Ay({...x,enabled:w||!!y}),Y=a3({isOpen:w,ref:E});ZP({enabled:w,ref:M}),Q5(E,{focusRef:M,visible:w,shouldFocus:s&&p===Mc.click}),oB(E,{focusRef:r,visible:w,shouldFocus:i&&p===Mc.click});const $=Dy({wasSelected:R.current,enabled:g,mode:b,isSelected:Y.present}),F=l.useCallback((de={},_e=null)=>{const Pe={...de,style:{...de.style,transformOrigin:qr.transformOrigin.varRef,[qr.arrowSize.var]:c?`${c}px`:void 0,[qr.arrowShadowColor.var]:d},ref:xn(E,_e),children:$?de.children:null,id:te,tabIndex:-1,role:"dialog",onKeyDown:ot(de.onKeyDown,ze=>{n&&ze.key==="Escape"&&S()}),onBlur:ot(de.onBlur,ze=>{const ht=mk(ze),Je=i1(E.current,ht),qt=i1(M.current,ht);w&&t&&(!Je&&!qt)&&S()}),"aria-labelledby":D?V:void 0,"aria-describedby":T?oe:void 0};return p===Mc.hover&&(Pe.role="tooltip",Pe.onMouseEnter=ot(de.onMouseEnter,()=>{A.current=!0}),Pe.onMouseLeave=ot(de.onMouseLeave,ze=>{ze.nativeEvent.relatedTarget!==null&&(A.current=!1,setTimeout(()=>S(),m))})),Pe},[$,te,D,V,T,oe,p,n,S,w,t,m,d,c]),q=l.useCallback((de={},_e=null)=>re({...de,style:{visibility:w?"visible":"hidden",...de.style}},_e),[w,re]),pe=l.useCallback((de,_e=null)=>({...de,ref:xn(_e,_,ne)}),[_,ne]),W=l.useRef(),U=l.useRef(),ee=l.useCallback(de=>{_.current==null&&ne(de)},[ne]),J=l.useCallback((de={},_e=null)=>{const Pe={...de,ref:xn(M,_e,ee),id:Z,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":te};return p===Mc.click&&(Pe.onClick=ot(de.onClick,I)),p===Mc.hover&&(Pe.onFocus=ot(de.onFocus,()=>{W.current===void 0&&j()}),Pe.onBlur=ot(de.onBlur,ze=>{const ht=mk(ze),Je=!i1(E.current,ht);w&&t&&Je&&S()}),Pe.onKeyDown=ot(de.onKeyDown,ze=>{ze.key==="Escape"&&S()}),Pe.onMouseEnter=ot(de.onMouseEnter,()=>{A.current=!0,W.current=window.setTimeout(()=>j(),h)}),Pe.onMouseLeave=ot(de.onMouseLeave,()=>{A.current=!1,W.current&&(clearTimeout(W.current),W.current=void 0),U.current=window.setTimeout(()=>{A.current===!1&&S()},m)})),Pe},[Z,w,te,p,ee,I,j,t,S,h,m]);l.useEffect(()=>()=>{W.current&&clearTimeout(W.current),U.current&&clearTimeout(U.current)},[]);const ge=l.useCallback((de={},_e=null)=>({...de,id:V,ref:xn(_e,Pe=>{O(!!Pe)})}),[V]),he=l.useCallback((de={},_e=null)=>({...de,id:oe,ref:xn(_e,Pe=>{K(!!Pe)})}),[oe]);return{forceUpdate:B,isOpen:w,onAnimationComplete:Y.onComplete,onClose:S,getAnchorProps:pe,getArrowProps:se,getArrowInnerProps:ae,getPopoverPositionerProps:q,getPopoverProps:F,getTriggerProps:J,getHeaderProps:ge,getBodyProps:he}}function i1(e,t){return e===t||(e==null?void 0:e.contains(t))}function mk(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:n}function Uf(e){const t=no("Popover",e),{children:n,...r}=lr(e),o=kf(),s=XW({...r,direction:o.direction});return a.jsx(KW,{value:s,children:a.jsx(QW,{value:t,children:Mx(n,{isOpen:s.isOpen,onClose:s.onClose,forceUpdate:s.forceUpdate})})})}Uf.displayName="Popover";function y3(e){const t=l.Children.only(e.children),{getAnchorProps:n}=ec();return l.cloneElement(t,n(t.props,t.ref))}y3.displayName="PopoverAnchor";var l1=(e,t)=>t?`${e}.${t}, ${t}`:void 0;function C3(e){var t;const{bg:n,bgColor:r,backgroundColor:o,shadow:s,boxShadow:i,shadowColor:c}=e,{getArrowProps:d,getArrowInnerProps:p}=ec(),h=Fg(),m=(t=n??r)!=null?t:o,g=s??i;return a.jsx(Ae.div,{...d(),className:"chakra-popover__arrow-positioner",children:a.jsx(Ae.div,{className:kt("chakra-popover__arrow",e.className),...p(e),__css:{"--popper-arrow-shadow-color":l1("colors",c),"--popper-arrow-bg":l1("colors",m),"--popper-arrow-shadow":l1("shadows",g),...h.arrow}})})}C3.displayName="PopoverArrow";var Hg=De(function(t,n){const{getBodyProps:r}=ec(),o=Fg();return a.jsx(Ae.div,{...r(t,n),className:kt("chakra-popover__body",t.className),__css:o.body})});Hg.displayName="PopoverBody";var w3=De(function(t,n){const{onClose:r}=ec(),o=Fg();return a.jsx(_I,{size:"sm",onClick:r,className:kt("chakra-popover__close-btn",t.className),__css:o.closeButton,ref:n,...t})});w3.displayName="PopoverCloseButton";function YW(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var JW={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},ZW=Ae(Ar.section),S3=De(function(t,n){const{variants:r=JW,...o}=t,{isOpen:s}=ec();return a.jsx(ZW,{ref:n,variants:YW(r),initial:!1,animate:s?"enter":"exit",...o})});S3.displayName="PopoverTransition";var Gf=De(function(t,n){const{rootProps:r,motionProps:o,...s}=t,{getPopoverProps:i,getPopoverPositionerProps:c,onAnimationComplete:d}=ec(),p=Fg(),h={position:"relative",display:"flex",flexDirection:"column",...p.content};return a.jsx(Ae.div,{...c(r),__css:p.popper,className:"chakra-popover__popper",children:a.jsx(S3,{...o,...i(s,n),onAnimationComplete:pg(d,s.onAnimationComplete),className:kt("chakra-popover__content",t.className),__css:h})})});Gf.displayName="PopoverContent";var Ib=e=>a.jsx(Ae.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});Ib.displayName="Circle";function eV(e,t,n){return(e-t)*100/(n-t)}var tV=Si({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),nV=Si({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),rV=Si({"0%":{left:"-40%"},"100%":{left:"100%"}}),oV=Si({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function k3(e){const{value:t=0,min:n,max:r,valueText:o,getValueText:s,isIndeterminate:i,role:c="progressbar"}=e,d=eV(t,n,r);return{bind:{"data-indeterminate":i?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":i?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof s=="function"?s(t,d):o})(),role:c},percent:d,value:t}}var j3=e=>{const{size:t,isIndeterminate:n,...r}=e;return a.jsx(Ae.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${nV} 2s linear infinite`:void 0},...r})};j3.displayName="Shape";var Pb=De((e,t)=>{var n;const{size:r="48px",max:o=100,min:s=0,valueText:i,getValueText:c,value:d,capIsRound:p,children:h,thickness:m="10px",color:g="#0078d4",trackColor:b="#edebe9",isIndeterminate:y,...x}=e,w=k3({min:s,max:o,value:d,valueText:i,getValueText:c,isIndeterminate:y}),S=y?void 0:((n=w.percent)!=null?n:0)*2.64,j=S==null?void 0:`${S} ${264-S}`,I=y?{css:{animation:`${tV} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:j,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},_={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:r};return a.jsxs(Ae.div,{ref:t,className:"chakra-progress",...w.bind,...x,__css:_,children:[a.jsxs(j3,{size:r,isIndeterminate:y,children:[a.jsx(Ib,{stroke:b,strokeWidth:m,className:"chakra-progress__track"}),a.jsx(Ib,{stroke:g,strokeWidth:m,className:"chakra-progress__indicator",strokeLinecap:p?"round":void 0,opacity:w.value===0&&!y?0:void 0,...I})]}),h]})});Pb.displayName="CircularProgress";var[sV,aV]=Un({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),iV=De((e,t)=>{const{min:n,max:r,value:o,isIndeterminate:s,role:i,...c}=e,d=k3({value:o,min:n,max:r,isIndeterminate:s,role:i}),h={height:"100%",...aV().filledTrack};return a.jsx(Ae.div,{ref:t,style:{width:`${d.percent}%`,...c.style},...d.bind,...c,__css:h})}),_3=De((e,t)=>{var n;const{value:r,min:o=0,max:s=100,hasStripe:i,isAnimated:c,children:d,borderRadius:p,isIndeterminate:h,"aria-label":m,"aria-labelledby":g,"aria-valuetext":b,title:y,role:x,...w}=lr(e),S=no("Progress",e),j=p??((n=S.track)==null?void 0:n.borderRadius),I={animation:`${oV} 1s linear infinite`},E={...!h&&i&&c&&I,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${rV} 1s ease infinite normal none running`}},A={overflow:"hidden",position:"relative",...S.track};return a.jsx(Ae.div,{ref:t,borderRadius:j,__css:A,...w,children:a.jsxs(sV,{value:S,children:[a.jsx(iV,{"aria-label":m,"aria-labelledby":g,"aria-valuetext":b,min:o,max:s,value:r,isIndeterminate:h,css:E,borderRadius:j,title:y,role:x}),d]})})});_3.displayName="Progress";function lV(e){return e&&Q1(e)&&Q1(e.target)}function cV(e={}){const{onChange:t,value:n,defaultValue:r,name:o,isDisabled:s,isFocusable:i,isNative:c,...d}=e,[p,h]=l.useState(r||""),m=typeof n<"u",g=m?n:p,b=l.useRef(null),y=l.useCallback(()=>{const M=b.current;if(!M)return;let E="input:not(:disabled):checked";const A=M.querySelector(E);if(A){A.focus();return}E="input:not(:disabled)";const R=M.querySelector(E);R==null||R.focus()},[]),w=`radio-${l.useId()}`,S=o||w,j=l.useCallback(M=>{const E=lV(M)?M.target.value:M;m||h(E),t==null||t(String(E))},[t,m]),I=l.useCallback((M={},E=null)=>({...M,ref:xn(E,b),role:"radiogroup"}),[]),_=l.useCallback((M={},E=null)=>({...M,ref:E,name:S,[c?"checked":"isChecked"]:g!=null?M.value===g:void 0,onChange(R){j(R)},"data-radiogroup":!0}),[c,S,j,g]);return{getRootProps:I,getRadioProps:_,name:S,ref:b,focus:y,setValue:h,value:g,onChange:j,isDisabled:s,isFocusable:i,htmlProps:d}}var[uV,I3]=Un({name:"RadioGroupContext",strict:!1}),om=De((e,t)=>{const{colorScheme:n,size:r,variant:o,children:s,className:i,isDisabled:c,isFocusable:d,...p}=e,{value:h,onChange:m,getRootProps:g,name:b,htmlProps:y}=cV(p),x=l.useMemo(()=>({name:b,size:r,onChange:m,colorScheme:n,value:h,variant:o,isDisabled:c,isFocusable:d}),[b,r,m,n,h,o,c,d]);return a.jsx(uV,{value:x,children:a.jsx(Ae.div,{...g(y,t),className:kt("chakra-radio-group",i),children:s})})});om.displayName="RadioGroup";var dV={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function fV(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:o,isReadOnly:s,isRequired:i,onChange:c,isInvalid:d,name:p,value:h,id:m,"data-radiogroup":g,"aria-describedby":b,...y}=e,x=`radio-${l.useId()}`,w=Rf(),j=!!I3()||!!g;let _=!!w&&!j?w.id:x;_=m??_;const M=o??(w==null?void 0:w.isDisabled),E=s??(w==null?void 0:w.isReadOnly),A=i??(w==null?void 0:w.isRequired),R=d??(w==null?void 0:w.isInvalid),[D,O]=l.useState(!1),[T,K]=l.useState(!1),[G,X]=l.useState(!1),[Z,te]=l.useState(!1),[V,oe]=l.useState(!!t),ne=typeof n<"u",se=ne?n:V;l.useEffect(()=>GP(O),[]);const re=l.useCallback(ee=>{if(E||M){ee.preventDefault();return}ne||oe(ee.target.checked),c==null||c(ee)},[ne,M,E,c]),ae=l.useCallback(ee=>{ee.key===" "&&te(!0)},[te]),B=l.useCallback(ee=>{ee.key===" "&&te(!1)},[te]),Y=l.useCallback((ee={},J=null)=>({...ee,ref:J,"data-active":Vt(Z),"data-hover":Vt(G),"data-disabled":Vt(M),"data-invalid":Vt(R),"data-checked":Vt(se),"data-focus":Vt(T),"data-focus-visible":Vt(T&&D),"data-readonly":Vt(E),"aria-hidden":!0,onMouseDown:ot(ee.onMouseDown,()=>te(!0)),onMouseUp:ot(ee.onMouseUp,()=>te(!1)),onMouseEnter:ot(ee.onMouseEnter,()=>X(!0)),onMouseLeave:ot(ee.onMouseLeave,()=>X(!1))}),[Z,G,M,R,se,T,E,D]),{onFocus:$,onBlur:F}=w??{},q=l.useCallback((ee={},J=null)=>{const ge=M&&!r;return{...ee,id:_,ref:J,type:"radio",name:p,value:h,onChange:ot(ee.onChange,re),onBlur:ot(F,ee.onBlur,()=>K(!1)),onFocus:ot($,ee.onFocus,()=>K(!0)),onKeyDown:ot(ee.onKeyDown,ae),onKeyUp:ot(ee.onKeyUp,B),checked:se,disabled:ge,readOnly:E,required:A,"aria-invalid":Ms(R),"aria-disabled":Ms(ge),"aria-required":Ms(A),"data-readonly":Vt(E),"aria-describedby":b,style:dV}},[M,r,_,p,h,re,F,$,ae,B,se,E,A,R,b]);return{state:{isInvalid:R,isFocused:T,isChecked:se,isActive:Z,isHovered:G,isDisabled:M,isReadOnly:E,isRequired:A},getCheckboxProps:Y,getRadioProps:Y,getInputProps:q,getLabelProps:(ee={},J=null)=>({...ee,ref:J,onMouseDown:ot(ee.onMouseDown,pV),"data-disabled":Vt(M),"data-checked":Vt(se),"data-invalid":Vt(R)}),getRootProps:(ee,J=null)=>({...ee,ref:J,"data-disabled":Vt(M),"data-checked":Vt(se),"data-invalid":Vt(R)}),htmlProps:y}}function pV(e){e.preventDefault(),e.stopPropagation()}function hV(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}var ei=De((e,t)=>{var n;const r=I3(),{onChange:o,value:s}=e,i=no("Radio",{...r,...e}),c=lr(e),{spacing:d="0.5rem",children:p,isDisabled:h=r==null?void 0:r.isDisabled,isFocusable:m=r==null?void 0:r.isFocusable,inputProps:g,...b}=c;let y=e.isChecked;(r==null?void 0:r.value)!=null&&s!=null&&(y=r.value===s);let x=o;r!=null&&r.onChange&&s!=null&&(x=pg(r.onChange,o));const w=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:S,getCheckboxProps:j,getLabelProps:I,getRootProps:_,htmlProps:M}=fV({...b,isChecked:y,isFocusable:m,isDisabled:h,onChange:x,name:w}),[E,A]=hV(M,II),R=j(A),D=S(g,t),O=I(),T=Object.assign({},E,_()),K={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...i.container},G={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...i.control},X={userSelect:"none",marginStart:d,...i.label};return a.jsxs(Ae.label,{className:"chakra-radio",...T,__css:K,children:[a.jsx("input",{className:"chakra-radio__input",...D}),a.jsx(Ae.span,{className:"chakra-radio__control",...R,__css:G}),p&&a.jsx(Ae.span,{className:"chakra-radio__label",...O,__css:X,children:p})]})});ei.displayName="Radio";var P3=De(function(t,n){const{children:r,placeholder:o,className:s,...i}=t;return a.jsxs(Ae.select,{...i,ref:n,className:kt("chakra-select",s),children:[o&&a.jsx("option",{value:"",children:o}),r]})});P3.displayName="SelectField";function mV(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}var E3=De((e,t)=>{var n;const r=no("Select",e),{rootProps:o,placeholder:s,icon:i,color:c,height:d,h:p,minH:h,minHeight:m,iconColor:g,iconSize:b,...y}=lr(e),[x,w]=mV(y,II),S=ay(w),j={width:"100%",height:"fit-content",position:"relative",color:c},I={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return a.jsxs(Ae.div,{className:"chakra-select__wrapper",__css:j,...x,...o,children:[a.jsx(P3,{ref:t,height:p??d,minH:h??m,placeholder:s,...S,__css:I,children:e.children}),a.jsx(M3,{"data-disabled":Vt(S.disabled),...(g||c)&&{color:g||c},__css:r.icon,...b&&{fontSize:b},children:i})]})});E3.displayName="Select";var gV=e=>a.jsx("svg",{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),vV=Ae("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),M3=e=>{const{children:t=a.jsx(gV,{}),...n}=e,r=l.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return a.jsx(vV,{...n,className:"chakra-select__icon-wrapper",children:l.isValidElement(t)?r:null})};M3.displayName="SelectIcon";function bV(){const e=l.useRef(!0);return l.useEffect(()=>{e.current=!1},[]),e.current}function xV(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}var yV=Ae("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),Eb=PI("skeleton-start-color"),Mb=PI("skeleton-end-color"),CV=Si({from:{opacity:0},to:{opacity:1}}),wV=Si({from:{borderColor:Eb.reference,background:Eb.reference},to:{borderColor:Mb.reference,background:Mb.reference}}),Wg=De((e,t)=>{const n={...e,fadeDuration:typeof e.fadeDuration=="number"?e.fadeDuration:.4,speed:typeof e.speed=="number"?e.speed:.8},r=cl("Skeleton",n),o=bV(),{startColor:s="",endColor:i="",isLoaded:c,fadeDuration:d,speed:p,className:h,fitContent:m,...g}=lr(n),[b,y]=ea("colors",[s,i]),x=xV(c),w=kt("chakra-skeleton",h),S={...b&&{[Eb.variable]:b},...y&&{[Mb.variable]:y}};if(c){const j=o||x?"none":`${CV} ${d}s`;return a.jsx(Ae.div,{ref:t,className:w,__css:{animation:j},...g})}return a.jsx(yV,{ref:t,className:w,...g,__css:{width:m?"fit-content":void 0,...r,...S,_dark:{...r._dark,...S},animation:`${p}s linear infinite alternate ${wV}`}})});Wg.displayName="Skeleton";var js=e=>e?"":void 0,su=e=>e?!0:void 0,dl=(...e)=>e.filter(Boolean).join(" ");function au(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function SV(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Od(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Oh={width:0,height:0},th=e=>e||Oh;function O3(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:o}=e,s=x=>{var w;const S=(w=r[x])!=null?w:Oh;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Od({orientation:t,vertical:{bottom:`calc(${n[x]}% - ${S.height/2}px)`},horizontal:{left:`calc(${n[x]}% - ${S.width/2}px)`}})}},i=t==="vertical"?r.reduce((x,w)=>th(x).height>th(w).height?x:w,Oh):r.reduce((x,w)=>th(x).width>th(w).width?x:w,Oh),c={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Od({orientation:t,vertical:i?{paddingLeft:i.width/2,paddingRight:i.width/2}:{},horizontal:i?{paddingTop:i.height/2,paddingBottom:i.height/2}:{}})},d={position:"absolute",...Od({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},p=n.length===1,h=[0,o?100-n[0]:n[0]],m=p?h:n;let g=m[0];!p&&o&&(g=100-g);const b=Math.abs(m[m.length-1]-m[0]),y={...d,...Od({orientation:t,vertical:o?{height:`${b}%`,top:`${g}%`}:{height:`${b}%`,bottom:`${g}%`},horizontal:o?{width:`${b}%`,right:`${g}%`}:{width:`${b}%`,left:`${g}%`}})};return{trackStyle:d,innerTrackStyle:y,rootStyle:c,getThumbStyle:s}}function A3(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function kV(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function jV(e){const t=IV(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function R3(e){return!!e.touches}function _V(e){return R3(e)&&e.touches.length>1}function IV(e){var t;return(t=e.view)!=null?t:window}function PV(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function EV(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function D3(e,t="page"){return R3(e)?PV(e,t):EV(e,t)}function MV(e){return t=>{const n=jV(t);(!n||n&&t.button===0)&&e(t)}}function OV(e,t=!1){function n(o){e(o,{point:D3(o)})}return t?MV(n):n}function Ah(e,t,n,r){return kV(e,t,OV(n,t==="pointerdown"),r)}var AV=Object.defineProperty,RV=(e,t,n)=>t in e?AV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qs=(e,t,n)=>(RV(e,typeof t!="symbol"?t+"":t,n),n),DV=class{constructor(e,t,n){Qs(this,"history",[]),Qs(this,"startEvent",null),Qs(this,"lastEvent",null),Qs(this,"lastEventInfo",null),Qs(this,"handlers",{}),Qs(this,"removeListeners",()=>{}),Qs(this,"threshold",3),Qs(this,"win"),Qs(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const c=c1(this.lastEventInfo,this.history),d=this.startEvent!==null,p=LV(c.offset,{x:0,y:0})>=this.threshold;if(!d&&!p)return;const{timestamp:h}=AS();this.history.push({...c.point,timestamp:h});const{onStart:m,onMove:g}=this.handlers;d||(m==null||m(this.lastEvent,c),this.startEvent=this.lastEvent),g==null||g(this.lastEvent,c)}),Qs(this,"onPointerMove",(c,d)=>{this.lastEvent=c,this.lastEventInfo=d,rL.update(this.updatePoint,!0)}),Qs(this,"onPointerUp",(c,d)=>{const p=c1(d,this.history),{onEnd:h,onSessionEnd:m}=this.handlers;m==null||m(c,p),this.end(),!(!h||!this.startEvent)&&(h==null||h(c,p))});var r;if(this.win=(r=e.view)!=null?r:window,_V(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const o={point:D3(e)},{timestamp:s}=AS();this.history=[{...o.point,timestamp:s}];const{onSessionStart:i}=t;i==null||i(e,c1(o,this.history)),this.removeListeners=$V(Ah(this.win,"pointermove",this.onPointerMove),Ah(this.win,"pointerup",this.onPointerUp),Ah(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),oL.update(this.updatePoint)}};function gk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function c1(e,t){return{point:e.point,delta:gk(e.point,t[t.length-1]),offset:gk(e.point,t[0]),velocity:NV(t,.1)}}var TV=e=>e*1e3;function NV(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=e[e.length-1];for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>TV(t)));)n--;if(!r)return{x:0,y:0};const s=(o.timestamp-r.timestamp)/1e3;if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function $V(...e){return t=>e.reduce((n,r)=>r(n),t)}function u1(e,t){return Math.abs(e-t)}function vk(e){return"x"in e&&"y"in e}function LV(e,t){if(typeof e=="number"&&typeof t=="number")return u1(e,t);if(vk(e)&&vk(t)){const n=u1(e.x,t.x),r=u1(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function T3(e){const t=l.useRef(null);return t.current=e,t}function N3(e,t){const{onPan:n,onPanStart:r,onPanEnd:o,onPanSessionStart:s,onPanSessionEnd:i,threshold:c}=t,d=!!(n||r||o||s||i),p=l.useRef(null),h=T3({onSessionStart:s,onSessionEnd:i,onStart:r,onMove:n,onEnd(m,g){p.current=null,o==null||o(m,g)}});l.useEffect(()=>{var m;(m=p.current)==null||m.updateHandlers(h.current)}),l.useEffect(()=>{const m=e.current;if(!m||!d)return;function g(b){p.current=new DV(b,h.current,c)}return Ah(m,"pointerdown",g)},[e,d,h,c]),l.useEffect(()=>()=>{var m;(m=p.current)==null||m.end(),p.current=null},[])}function zV(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const[s]=o;let i,c;if("borderBoxSize"in s){const d=s.borderBoxSize,p=Array.isArray(d)?d[0]:d;i=p.inlineSize,c=p.blockSize}else i=e.offsetWidth,c=e.offsetHeight;t({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var FV=globalThis!=null&&globalThis.document?l.useLayoutEffect:l.useEffect;function BV(e,t){var n,r;if(!e||!e.parentElement)return;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window,s=new o.MutationObserver(()=>{t()});return s.observe(e.parentElement,{childList:!0}),()=>{s.disconnect()}}function $3({getNodes:e,observeMutation:t=!0}){const[n,r]=l.useState([]),[o,s]=l.useState(0);return FV(()=>{const i=e(),c=i.map((d,p)=>zV(d,h=>{r(m=>[...m.slice(0,p),h,...m.slice(p+1)])}));if(t){const d=i[0];c.push(BV(d,()=>{s(p=>p+1)}))}return()=>{c.forEach(d=>{d==null||d()})}},[o]),n}function HV(e){return typeof e=="object"&&e!==null&&"current"in e}function WV(e){const[t]=$3({observeMutation:!1,getNodes(){return[HV(e)?e.current:e]}});return t}function VV(e){const{min:t=0,max:n=100,onChange:r,value:o,defaultValue:s,isReversed:i,direction:c="ltr",orientation:d="horizontal",id:p,isDisabled:h,isReadOnly:m,onChangeStart:g,onChangeEnd:b,step:y=1,getAriaValueText:x,"aria-valuetext":w,"aria-label":S,"aria-labelledby":j,name:I,focusThumbOnChange:_=!0,minStepsBetweenThumbs:M=0,...E}=e,A=vr(g),R=vr(b),D=vr(x),O=A3({isReversed:i,direction:c,orientation:d}),[T,K]=Of({value:o,defaultValue:s??[25,75],onChange:r});if(!Array.isArray(T))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof T}\``);const[G,X]=l.useState(!1),[Z,te]=l.useState(!1),[V,oe]=l.useState(-1),ne=!(h||m),se=l.useRef(T),re=T.map(Te=>tu(Te,t,n)),ae=M*y,B=UV(re,t,n,ae),Y=l.useRef({eventSource:null,value:[],valueBounds:[]});Y.current.value=re,Y.current.valueBounds=B;const $=re.map(Te=>n-Te+t),q=(O?$:re).map(Te=>Zh(Te,t,n)),pe=d==="vertical",W=l.useRef(null),U=l.useRef(null),ee=$3({getNodes(){const Te=U.current,ct=Te==null?void 0:Te.querySelectorAll("[role=slider]");return ct?Array.from(ct):[]}}),J=l.useId(),he=SV(p??J),de=l.useCallback(Te=>{var ct,ft;if(!W.current)return;Y.current.eventSource="pointer";const tt=W.current.getBoundingClientRect(),{clientX:en,clientY:ar}=(ft=(ct=Te.touches)==null?void 0:ct[0])!=null?ft:Te,vn=pe?tt.bottom-ar:en-tt.left,dn=pe?tt.height:tt.width;let Tr=vn/dn;return O&&(Tr=1-Tr),KP(Tr,t,n)},[pe,O,n,t]),_e=(n-t)/10,Pe=y||(n-t)/100,ze=l.useMemo(()=>({setValueAtIndex(Te,ct){if(!ne)return;const ft=Y.current.valueBounds[Te];ct=parseFloat(gb(ct,ft.min,Pe)),ct=tu(ct,ft.min,ft.max);const tt=[...Y.current.value];tt[Te]=ct,K(tt)},setActiveIndex:oe,stepUp(Te,ct=Pe){const ft=Y.current.value[Te],tt=O?ft-ct:ft+ct;ze.setValueAtIndex(Te,tt)},stepDown(Te,ct=Pe){const ft=Y.current.value[Te],tt=O?ft+ct:ft-ct;ze.setValueAtIndex(Te,tt)},reset(){K(se.current)}}),[Pe,O,K,ne]),ht=l.useCallback(Te=>{const ct=Te.key,tt={ArrowRight:()=>ze.stepUp(V),ArrowUp:()=>ze.stepUp(V),ArrowLeft:()=>ze.stepDown(V),ArrowDown:()=>ze.stepDown(V),PageUp:()=>ze.stepUp(V,_e),PageDown:()=>ze.stepDown(V,_e),Home:()=>{const{min:en}=B[V];ze.setValueAtIndex(V,en)},End:()=>{const{max:en}=B[V];ze.setValueAtIndex(V,en)}}[ct];tt&&(Te.preventDefault(),Te.stopPropagation(),tt(Te),Y.current.eventSource="keyboard")},[ze,V,_e,B]),{getThumbStyle:Je,rootStyle:qt,trackStyle:Pt,innerTrackStyle:jt}=l.useMemo(()=>O3({isReversed:O,orientation:d,thumbRects:ee,thumbPercents:q}),[O,d,q,ee]),Se=l.useCallback(Te=>{var ct;const ft=Te??V;if(ft!==-1&&_){const tt=he.getThumb(ft),en=(ct=U.current)==null?void 0:ct.ownerDocument.getElementById(tt);en&&setTimeout(()=>en.focus())}},[_,V,he]);wi(()=>{Y.current.eventSource==="keyboard"&&(R==null||R(Y.current.value))},[re,R]);const Fe=Te=>{const ct=de(Te)||0,ft=Y.current.value.map(dn=>Math.abs(dn-ct)),tt=Math.min(...ft);let en=ft.indexOf(tt);const ar=ft.filter(dn=>dn===tt);ar.length>1&&ct>Y.current.value[en]&&(en=en+ar.length-1),oe(en),ze.setValueAtIndex(en,ct),Se(en)},it=Te=>{if(V==-1)return;const ct=de(Te)||0;oe(V),ze.setValueAtIndex(V,ct),Se(V)};N3(U,{onPanSessionStart(Te){ne&&(X(!0),Fe(Te),A==null||A(Y.current.value))},onPanSessionEnd(){ne&&(X(!1),R==null||R(Y.current.value))},onPan(Te){ne&&it(Te)}});const At=l.useCallback((Te={},ct=null)=>({...Te,...E,id:he.root,ref:xn(ct,U),tabIndex:-1,"aria-disabled":su(h),"data-focused":js(Z),style:{...Te.style,...qt}}),[E,h,Z,qt,he]),ke=l.useCallback((Te={},ct=null)=>({...Te,ref:xn(ct,W),id:he.track,"data-disabled":js(h),style:{...Te.style,...Pt}}),[h,Pt,he]),lt=l.useCallback((Te={},ct=null)=>({...Te,ref:ct,id:he.innerTrack,style:{...Te.style,...jt}}),[jt,he]),Rt=l.useCallback((Te,ct=null)=>{var ft;const{index:tt,...en}=Te,ar=re[tt];if(ar==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${re.length}`);const vn=B[tt];return{...en,ref:ct,role:"slider",tabIndex:ne?0:void 0,id:he.getThumb(tt),"data-active":js(G&&V===tt),"aria-valuetext":(ft=D==null?void 0:D(ar))!=null?ft:w==null?void 0:w[tt],"aria-valuemin":vn.min,"aria-valuemax":vn.max,"aria-valuenow":ar,"aria-orientation":d,"aria-disabled":su(h),"aria-readonly":su(m),"aria-label":S==null?void 0:S[tt],"aria-labelledby":S!=null&&S[tt]||j==null?void 0:j[tt],style:{...Te.style,...Je(tt)},onKeyDown:au(Te.onKeyDown,ht),onFocus:au(Te.onFocus,()=>{te(!0),oe(tt)}),onBlur:au(Te.onBlur,()=>{te(!1),oe(-1)})}},[he,re,B,ne,G,V,D,w,d,h,m,S,j,Je,ht,te]),zt=l.useCallback((Te={},ct=null)=>({...Te,ref:ct,id:he.output,htmlFor:re.map((ft,tt)=>he.getThumb(tt)).join(" "),"aria-live":"off"}),[he,re]),Re=l.useCallback((Te,ct=null)=>{const{value:ft,...tt}=Te,en=!(ftn),ar=ft>=re[0]&&ft<=re[re.length-1];let vn=Zh(ft,t,n);vn=O?100-vn:vn;const dn={position:"absolute",pointerEvents:"none",...Od({orientation:d,vertical:{bottom:`${vn}%`},horizontal:{left:`${vn}%`}})};return{...tt,ref:ct,id:he.getMarker(Te.value),role:"presentation","aria-hidden":!0,"data-disabled":js(h),"data-invalid":js(!en),"data-highlighted":js(ar),style:{...Te.style,...dn}}},[h,O,n,t,d,re,he]),Qe=l.useCallback((Te,ct=null)=>{const{index:ft,...tt}=Te;return{...tt,ref:ct,id:he.getInput(ft),type:"hidden",value:re[ft],name:Array.isArray(I)?I[ft]:`${I}-${ft}`}},[I,re,he]);return{state:{value:re,isFocused:Z,isDragging:G,getThumbPercent:Te=>q[Te],getThumbMinValue:Te=>B[Te].min,getThumbMaxValue:Te=>B[Te].max},actions:ze,getRootProps:At,getTrackProps:ke,getInnerTrackProps:lt,getThumbProps:Rt,getMarkerProps:Re,getInputProps:Qe,getOutputProps:zt}}function UV(e,t,n,r){return e.map((o,s)=>{const i=s===0?t:e[s-1]+r,c=s===e.length-1?n:e[s+1]-r;return{min:i,max:c}})}var[GV,Vg]=Un({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[qV,Ug]=Un({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),L3=De(function(t,n){const r={orientation:"horizontal",...t},o=no("Slider",r),s=lr(r),{direction:i}=kf();s.direction=i;const{getRootProps:c,...d}=VV(s),p=l.useMemo(()=>({...d,name:r.name}),[d,r.name]);return a.jsx(GV,{value:p,children:a.jsx(qV,{value:o,children:a.jsx(Ae.div,{...c({},n),className:"chakra-slider",__css:o.container,children:r.children})})})});L3.displayName="RangeSlider";var Ob=De(function(t,n){const{getThumbProps:r,getInputProps:o,name:s}=Vg(),i=Ug(),c=r(t,n);return a.jsxs(Ae.div,{...c,className:dl("chakra-slider__thumb",t.className),__css:i.thumb,children:[c.children,s&&a.jsx("input",{...o({index:t.index})})]})});Ob.displayName="RangeSliderThumb";var z3=De(function(t,n){const{getTrackProps:r}=Vg(),o=Ug(),s=r(t,n);return a.jsx(Ae.div,{...s,className:dl("chakra-slider__track",t.className),__css:o.track,"data-testid":"chakra-range-slider-track"})});z3.displayName="RangeSliderTrack";var F3=De(function(t,n){const{getInnerTrackProps:r}=Vg(),o=Ug(),s=r(t,n);return a.jsx(Ae.div,{...s,className:"chakra-slider__filled-track",__css:o.filledTrack})});F3.displayName="RangeSliderFilledTrack";var Rh=De(function(t,n){const{getMarkerProps:r}=Vg(),o=Ug(),s=r(t,n);return a.jsx(Ae.div,{...s,className:dl("chakra-slider__marker",t.className),__css:o.mark})});Rh.displayName="RangeSliderMark";function KV(e){var t;const{min:n=0,max:r=100,onChange:o,value:s,defaultValue:i,isReversed:c,direction:d="ltr",orientation:p="horizontal",id:h,isDisabled:m,isReadOnly:g,onChangeStart:b,onChangeEnd:y,step:x=1,getAriaValueText:w,"aria-valuetext":S,"aria-label":j,"aria-labelledby":I,name:_,focusThumbOnChange:M=!0,...E}=e,A=vr(b),R=vr(y),D=vr(w),O=A3({isReversed:c,direction:d,orientation:p}),[T,K]=Of({value:s,defaultValue:i??XV(n,r),onChange:o}),[G,X]=l.useState(!1),[Z,te]=l.useState(!1),V=!(m||g),oe=(r-n)/10,ne=x||(r-n)/100,se=tu(T,n,r),re=r-se+n,B=Zh(O?re:se,n,r),Y=p==="vertical",$=T3({min:n,max:r,step:x,isDisabled:m,value:se,isInteractive:V,isReversed:O,isVertical:Y,eventSource:null,focusThumbOnChange:M,orientation:p}),F=l.useRef(null),q=l.useRef(null),pe=l.useRef(null),W=l.useId(),U=h??W,[ee,J]=[`slider-thumb-${U}`,`slider-track-${U}`],ge=l.useCallback(Re=>{var Qe,En;if(!F.current)return;const Te=$.current;Te.eventSource="pointer";const ct=F.current.getBoundingClientRect(),{clientX:ft,clientY:tt}=(En=(Qe=Re.touches)==null?void 0:Qe[0])!=null?En:Re,en=Y?ct.bottom-tt:ft-ct.left,ar=Y?ct.height:ct.width;let vn=en/ar;O&&(vn=1-vn);let dn=KP(vn,Te.min,Te.max);return Te.step&&(dn=parseFloat(gb(dn,Te.min,Te.step))),dn=tu(dn,Te.min,Te.max),dn},[Y,O,$]),he=l.useCallback(Re=>{const Qe=$.current;Qe.isInteractive&&(Re=parseFloat(gb(Re,Qe.min,ne)),Re=tu(Re,Qe.min,Qe.max),K(Re))},[ne,K,$]),de=l.useMemo(()=>({stepUp(Re=ne){const Qe=O?se-Re:se+Re;he(Qe)},stepDown(Re=ne){const Qe=O?se+Re:se-Re;he(Qe)},reset(){he(i||0)},stepTo(Re){he(Re)}}),[he,O,se,ne,i]),_e=l.useCallback(Re=>{const Qe=$.current,Te={ArrowRight:()=>de.stepUp(),ArrowUp:()=>de.stepUp(),ArrowLeft:()=>de.stepDown(),ArrowDown:()=>de.stepDown(),PageUp:()=>de.stepUp(oe),PageDown:()=>de.stepDown(oe),Home:()=>he(Qe.min),End:()=>he(Qe.max)}[Re.key];Te&&(Re.preventDefault(),Re.stopPropagation(),Te(Re),Qe.eventSource="keyboard")},[de,he,oe,$]),Pe=(t=D==null?void 0:D(se))!=null?t:S,ze=WV(q),{getThumbStyle:ht,rootStyle:Je,trackStyle:qt,innerTrackStyle:Pt}=l.useMemo(()=>{const Re=$.current,Qe=ze??{width:0,height:0};return O3({isReversed:O,orientation:Re.orientation,thumbRects:[Qe],thumbPercents:[B]})},[O,ze,B,$]),jt=l.useCallback(()=>{$.current.focusThumbOnChange&&setTimeout(()=>{var Qe;return(Qe=q.current)==null?void 0:Qe.focus()})},[$]);wi(()=>{const Re=$.current;jt(),Re.eventSource==="keyboard"&&(R==null||R(Re.value))},[se,R]);function Se(Re){const Qe=ge(Re);Qe!=null&&Qe!==$.current.value&&K(Qe)}N3(pe,{onPanSessionStart(Re){const Qe=$.current;Qe.isInteractive&&(X(!0),jt(),Se(Re),A==null||A(Qe.value))},onPanSessionEnd(){const Re=$.current;Re.isInteractive&&(X(!1),R==null||R(Re.value))},onPan(Re){$.current.isInteractive&&Se(Re)}});const Fe=l.useCallback((Re={},Qe=null)=>({...Re,...E,ref:xn(Qe,pe),tabIndex:-1,"aria-disabled":su(m),"data-focused":js(Z),style:{...Re.style,...Je}}),[E,m,Z,Je]),it=l.useCallback((Re={},Qe=null)=>({...Re,ref:xn(Qe,F),id:J,"data-disabled":js(m),style:{...Re.style,...qt}}),[m,J,qt]),At=l.useCallback((Re={},Qe=null)=>({...Re,ref:Qe,style:{...Re.style,...Pt}}),[Pt]),ke=l.useCallback((Re={},Qe=null)=>({...Re,ref:xn(Qe,q),role:"slider",tabIndex:V?0:void 0,id:ee,"data-active":js(G),"aria-valuetext":Pe,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":se,"aria-orientation":p,"aria-disabled":su(m),"aria-readonly":su(g),"aria-label":j,"aria-labelledby":j?void 0:I,style:{...Re.style,...ht(0)},onKeyDown:au(Re.onKeyDown,_e),onFocus:au(Re.onFocus,()=>te(!0)),onBlur:au(Re.onBlur,()=>te(!1))}),[V,ee,G,Pe,n,r,se,p,m,g,j,I,ht,_e]),lt=l.useCallback((Re,Qe=null)=>{const En=!(Re.valuer),Te=se>=Re.value,ct=Zh(Re.value,n,r),ft={position:"absolute",pointerEvents:"none",...QV({orientation:p,vertical:{bottom:O?`${100-ct}%`:`${ct}%`},horizontal:{left:O?`${100-ct}%`:`${ct}%`}})};return{...Re,ref:Qe,role:"presentation","aria-hidden":!0,"data-disabled":js(m),"data-invalid":js(!En),"data-highlighted":js(Te),style:{...Re.style,...ft}}},[m,O,r,n,p,se]),Rt=l.useCallback((Re={},Qe=null)=>({...Re,ref:Qe,type:"hidden",value:se,name:_}),[_,se]);return{state:{value:se,isFocused:Z,isDragging:G},actions:de,getRootProps:Fe,getTrackProps:it,getInnerTrackProps:At,getThumbProps:ke,getMarkerProps:lt,getInputProps:Rt}}function QV(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function XV(e,t){return t"}),[JV,qg]=Un({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),Ny=De((e,t)=>{var n;const r={...e,orientation:(n=e==null?void 0:e.orientation)!=null?n:"horizontal"},o=no("Slider",r),s=lr(r),{direction:i}=kf();s.direction=i;const{getInputProps:c,getRootProps:d,...p}=KV(s),h=d(),m=c({},t);return a.jsx(YV,{value:p,children:a.jsx(JV,{value:o,children:a.jsxs(Ae.div,{...h,className:dl("chakra-slider",r.className),__css:o.container,children:[r.children,a.jsx("input",{...m})]})})})});Ny.displayName="Slider";var $y=De((e,t)=>{const{getThumbProps:n}=Gg(),r=qg(),o=n(e,t);return a.jsx(Ae.div,{...o,className:dl("chakra-slider__thumb",e.className),__css:r.thumb})});$y.displayName="SliderThumb";var Ly=De((e,t)=>{const{getTrackProps:n}=Gg(),r=qg(),o=n(e,t);return a.jsx(Ae.div,{...o,className:dl("chakra-slider__track",e.className),__css:r.track})});Ly.displayName="SliderTrack";var zy=De((e,t)=>{const{getInnerTrackProps:n}=Gg(),r=qg(),o=n(e,t);return a.jsx(Ae.div,{...o,className:dl("chakra-slider__filled-track",e.className),__css:r.filledTrack})});zy.displayName="SliderFilledTrack";var Fc=De((e,t)=>{const{getMarkerProps:n}=Gg(),r=qg(),o=n(e,t);return a.jsx(Ae.div,{...o,className:dl("chakra-slider__marker",e.className),__css:r.mark})});Fc.displayName="SliderMark";var[ZV,B3]=Un({name:"StatStylesContext",errorMessage:`useStatStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),H3=De(function(t,n){const r=no("Stat",t),o={position:"relative",flex:"1 1 0%",...r.container},{className:s,children:i,...c}=lr(t);return a.jsx(ZV,{value:r,children:a.jsx(Ae.div,{ref:n,...c,className:kt("chakra-stat",s),__css:o,children:a.jsx("dl",{children:i})})})});H3.displayName="Stat";var W3=De(function(t,n){return a.jsx(Ae.div,{...t,ref:n,role:"group",className:kt("chakra-stat__group",t.className),__css:{display:"flex",flexWrap:"wrap",justifyContent:"space-around",alignItems:"flex-start"}})});W3.displayName="StatGroup";var V3=De(function(t,n){const r=B3();return a.jsx(Ae.dt,{ref:n,...t,className:kt("chakra-stat__label",t.className),__css:r.label})});V3.displayName="StatLabel";var U3=De(function(t,n){const r=B3();return a.jsx(Ae.dd,{ref:n,...t,className:kt("chakra-stat__number",t.className),__css:{...r.number,fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums"}})});U3.displayName="StatNumber";var Fy=De(function(t,n){const r=no("Switch",t),{spacing:o="0.5rem",children:s,...i}=lr(t),{getIndicatorProps:c,getInputProps:d,getCheckboxProps:p,getRootProps:h,getLabelProps:m}=qP(i),g=l.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),b=l.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),y=l.useMemo(()=>({userSelect:"none",marginStart:o,...r.label}),[o,r.label]);return a.jsxs(Ae.label,{...h(),className:kt("chakra-switch",t.className),__css:g,children:[a.jsx("input",{className:"chakra-switch__input",...d({},n)}),a.jsx(Ae.span,{...p(),className:"chakra-switch__track",__css:b,children:a.jsx(Ae.span,{__css:r.thumb,className:"chakra-switch__thumb",...c()})}),s&&a.jsx(Ae.span,{className:"chakra-switch__label",...m(),__css:y,children:s})]})});Fy.displayName="Switch";var[eU,tU,nU,rU]=ry();function oU(e){var t;const{defaultIndex:n,onChange:r,index:o,isManual:s,isLazy:i,lazyBehavior:c="unmount",orientation:d="horizontal",direction:p="ltr",...h}=e,[m,g]=l.useState(n??0),[b,y]=Of({defaultValue:n??0,value:o,onChange:r});l.useEffect(()=>{o!=null&&g(o)},[o]);const x=nU(),w=l.useId();return{id:`tabs-${(t=e.id)!=null?t:w}`,selectedIndex:b,focusedIndex:m,setSelectedIndex:y,setFocusedIndex:g,isManual:s,isLazy:i,lazyBehavior:c,orientation:d,descendants:x,direction:p,htmlProps:h}}var[sU,Kg]=Un({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function aU(e){const{focusedIndex:t,orientation:n,direction:r}=Kg(),o=tU(),s=l.useCallback(i=>{const c=()=>{var j;const I=o.nextEnabled(t);I&&((j=I.node)==null||j.focus())},d=()=>{var j;const I=o.prevEnabled(t);I&&((j=I.node)==null||j.focus())},p=()=>{var j;const I=o.firstEnabled();I&&((j=I.node)==null||j.focus())},h=()=>{var j;const I=o.lastEnabled();I&&((j=I.node)==null||j.focus())},m=n==="horizontal",g=n==="vertical",b=i.key,y=r==="ltr"?"ArrowLeft":"ArrowRight",x=r==="ltr"?"ArrowRight":"ArrowLeft",S={[y]:()=>m&&d(),[x]:()=>m&&c(),ArrowDown:()=>g&&c(),ArrowUp:()=>g&&d(),Home:p,End:h}[b];S&&(i.preventDefault(),S(i))},[o,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:ot(e.onKeyDown,s)}}function iU(e){const{isDisabled:t=!1,isFocusable:n=!1,...r}=e,{setSelectedIndex:o,isManual:s,id:i,setFocusedIndex:c,selectedIndex:d}=Kg(),{index:p,register:h}=rU({disabled:t&&!n}),m=p===d,g=()=>{o(p)},b=()=>{c(p),!s&&!(t&&n)&&o(p)},y=K5({...r,ref:xn(h,e.ref),isDisabled:t,isFocusable:n,onClick:ot(e.onClick,g)}),x="button";return{...y,id:G3(i,p),role:"tab",tabIndex:m?0:-1,type:x,"aria-selected":m,"aria-controls":q3(i,p),onFocus:t?void 0:ot(e.onFocus,b)}}var[lU,cU]=Un({});function uU(e){const t=Kg(),{id:n,selectedIndex:r}=t,s=Sg(e.children).map((i,c)=>l.createElement(lU,{key:c,value:{isSelected:c===r,id:q3(n,c),tabId:G3(n,c),selectedIndex:r}},i));return{...e,children:s}}function dU(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:o}=Kg(),{isSelected:s,id:i,tabId:c}=cU(),d=l.useRef(!1);s&&(d.current=!0);const p=Dy({wasSelected:d.current,isSelected:s,enabled:r,mode:o});return{tabIndex:0,...n,children:p?t:null,role:"tabpanel","aria-labelledby":c,hidden:!s,id:i}}function G3(e,t){return`${e}--tab-${t}`}function q3(e,t){return`${e}--tabpanel-${t}`}var[fU,Qg]=Un({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),tc=De(function(t,n){const r=no("Tabs",t),{children:o,className:s,...i}=lr(t),{htmlProps:c,descendants:d,...p}=oU(i),h=l.useMemo(()=>p,[p]),{isFitted:m,...g}=c,b={position:"relative",...r.root};return a.jsx(eU,{value:d,children:a.jsx(sU,{value:h,children:a.jsx(fU,{value:r,children:a.jsx(Ae.div,{className:kt("chakra-tabs",s),ref:n,...g,__css:b,children:o})})})})});tc.displayName="Tabs";var nc=De(function(t,n){const r=aU({...t,ref:n}),s={display:"flex",...Qg().tablist};return a.jsx(Ae.div,{...r,className:kt("chakra-tabs__tablist",t.className),__css:s})});nc.displayName="TabList";var Go=De(function(t,n){const r=dU({...t,ref:n}),o=Qg();return a.jsx(Ae.div,{outline:"0",...r,className:kt("chakra-tabs__tab-panel",t.className),__css:o.tabpanel})});Go.displayName="TabPanel";var $u=De(function(t,n){const r=uU(t),o=Qg();return a.jsx(Ae.div,{...r,width:"100%",ref:n,className:kt("chakra-tabs__tab-panels",t.className),__css:o.tabpanels})});$u.displayName="TabPanels";var wo=De(function(t,n){const r=Qg(),o=iU({...t,ref:n}),s={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return a.jsx(Ae.button,{...o,className:kt("chakra-tabs__tab",t.className),__css:s})});wo.displayName="Tab";function pU(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var hU=["h","minH","height","minHeight"],K3=De((e,t)=>{const n=cl("Textarea",e),{className:r,rows:o,...s}=lr(e),i=ay(s),c=o?pU(n,hU):n;return a.jsx(Ae.textarea,{ref:t,rows:o,...i,className:kt("chakra-textarea",r),__css:c})});K3.displayName="Textarea";var mU={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Ab=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},Dh=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function gU(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:s,closeOnPointerDown:i=o,closeOnEsc:c=!0,onOpen:d,onClose:p,placement:h,id:m,isOpen:g,defaultIsOpen:b,arrowSize:y=10,arrowShadowColor:x,arrowPadding:w,modifiers:S,isDisabled:j,gutter:I,offset:_,direction:M,...E}=e,{isOpen:A,onOpen:R,onClose:D}=Ry({isOpen:g,defaultIsOpen:b,onOpen:d,onClose:p}),{referenceRef:O,getPopperProps:T,getArrowInnerProps:K,getArrowProps:G}=Ay({enabled:A,placement:h,arrowPadding:w,modifiers:S,gutter:I,offset:_,direction:M}),X=l.useId(),te=`tooltip-${m??X}`,V=l.useRef(null),oe=l.useRef(),ne=l.useCallback(()=>{oe.current&&(clearTimeout(oe.current),oe.current=void 0)},[]),se=l.useRef(),re=l.useCallback(()=>{se.current&&(clearTimeout(se.current),se.current=void 0)},[]),ae=l.useCallback(()=>{re(),D()},[D,re]),B=vU(V,ae),Y=l.useCallback(()=>{if(!j&&!oe.current){A&&B();const J=Dh(V);oe.current=J.setTimeout(R,t)}},[B,j,A,R,t]),$=l.useCallback(()=>{ne();const J=Dh(V);se.current=J.setTimeout(ae,n)},[n,ae,ne]),F=l.useCallback(()=>{A&&r&&$()},[r,$,A]),q=l.useCallback(()=>{A&&i&&$()},[i,$,A]),pe=l.useCallback(J=>{A&&J.key==="Escape"&&$()},[A,$]);Nl(()=>Ab(V),"keydown",c?pe:void 0),Nl(()=>{if(!s)return null;const J=V.current;if(!J)return null;const ge=T5(J);return ge.localName==="body"?Dh(V):ge},"scroll",()=>{A&&s&&ae()},{passive:!0,capture:!0}),l.useEffect(()=>{j&&(ne(),A&&D())},[j,A,D,ne]),l.useEffect(()=>()=>{ne(),re()},[ne,re]),Nl(()=>V.current,"pointerleave",$);const W=l.useCallback((J={},ge=null)=>({...J,ref:xn(V,ge,O),onPointerEnter:ot(J.onPointerEnter,de=>{de.pointerType!=="touch"&&Y()}),onClick:ot(J.onClick,F),onPointerDown:ot(J.onPointerDown,q),onFocus:ot(J.onFocus,Y),onBlur:ot(J.onBlur,$),"aria-describedby":A?te:void 0}),[Y,$,q,A,te,F,O]),U=l.useCallback((J={},ge=null)=>T({...J,style:{...J.style,[qr.arrowSize.var]:y?`${y}px`:void 0,[qr.arrowShadowColor.var]:x}},ge),[T,y,x]),ee=l.useCallback((J={},ge=null)=>{const he={...J.style,position:"relative",transformOrigin:qr.transformOrigin.varRef};return{ref:ge,...E,...J,id:te,role:"tooltip",style:he}},[E,te]);return{isOpen:A,show:Y,hide:$,getTriggerProps:W,getTooltipProps:ee,getTooltipPositionerProps:U,getArrowProps:G,getArrowInnerProps:K}}var d1="chakra-ui:close-tooltip";function vU(e,t){return l.useEffect(()=>{const n=Ab(e);return n.addEventListener(d1,t),()=>n.removeEventListener(d1,t)},[t,e]),()=>{const n=Ab(e),r=Dh(e);n.dispatchEvent(new r.CustomEvent(d1))}}function bU(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function xU(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yU=Ae(Ar.div),Wn=De((e,t)=>{var n,r;const o=cl("Tooltip",e),s=lr(e),i=kf(),{children:c,label:d,shouldWrapChildren:p,"aria-label":h,hasArrow:m,bg:g,portalProps:b,background:y,backgroundColor:x,bgColor:w,motionProps:S,...j}=s,I=(r=(n=y??x)!=null?n:g)!=null?r:w;if(I){o.bg=I;const T=mD(i,"colors",I);o[qr.arrowBg.var]=T}const _=gU({...j,direction:i.direction}),M=typeof c=="string"||p;let E;if(M)E=a.jsx(Ae.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps(),children:c});else{const T=l.Children.only(c);E=l.cloneElement(T,_.getTriggerProps(T.props,T.ref))}const A=!!h,R=_.getTooltipProps({},t),D=A?bU(R,["role","id"]):R,O=xU(R,["role","id"]);return d?a.jsxs(a.Fragment,{children:[E,a.jsx(So,{children:_.isOpen&&a.jsx(Au,{...b,children:a.jsx(Ae.div,{..._.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:a.jsxs(yU,{variants:mU,initial:"exit",animate:"enter",exit:"exit",...S,...D,__css:o,children:[d,A&&a.jsx(Ae.span,{srOnly:!0,...O,children:h}),m&&a.jsx(Ae.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:a.jsx(Ae.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):a.jsx(a.Fragment,{children:c})});Wn.displayName="Tooltip";function Xg(e,t={}){let n=l.useCallback(o=>t.keys?D$(e,t.keys,o):e.listen(o),[t.keys,e]),r=e.get.bind(e);return l.useSyncExternalStore(n,r,r)}const CU=me(we,({system:e})=>{const{consoleLogLevel:t,shouldLogToConsole:n}=e;return{consoleLogLevel:t,shouldLogToConsole:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Q3=e=>{const{consoleLogLevel:t,shouldLogToConsole:n}=H(CU);return l.useEffect(()=>{n?(localStorage.setItem("ROARR_LOG","true"),localStorage.setItem("ROARR_FILTER",`context.logLevel:>=${gD[t]}`)):localStorage.setItem("ROARR_LOG","false"),Bw.ROARR.write=vD.createLogWriter()},[t,n]),l.useEffect(()=>{const o={...bD};xD.set(Bw.Roarr.child(o))},[]),l.useMemo(()=>ki(e),[e])};function Lu(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(h){try{p(r.next(h))}catch(m){i(m)}}function d(h){try{p(r.throw(h))}catch(m){i(m)}}function p(h){h.done?s(h.value):o(h.value).then(c,d)}p((r=r.apply(e,t||[])).next())})}function zu(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(p){return function(h){return d([p,h])}}function d(p){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,p[0]&&(n=0)),n;)try{if(r=1,o&&(s=p[0]&2?o.return:p[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,p[1])).done)return s;switch(o=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return n.label++,{value:p[1],done:!1};case 5:n.label++,o=p[1],p=[0];continue;case 7:p=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]0)&&!(o=r.next()).done;)s.push(o.value)}catch(c){i={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function xk(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function SU(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=wU.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var kU=[".DS_Store","Thumbs.db"];function jU(e){return Lu(this,void 0,void 0,function(){return zu(this,function(t){return sm(e)&&_U(e.dataTransfer)?[2,MU(e.dataTransfer,e.type)]:IU(e)?[2,PU(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,EU(e)]:[2,[]]})})}function _U(e){return sm(e)}function IU(e){return sm(e)&&sm(e.target)}function sm(e){return typeof e=="object"&&e!==null}function PU(e){return Rb(e.target.files).map(function(t){return qf(t)})}function EU(e){return Lu(this,void 0,void 0,function(){var t;return zu(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return qf(r)})]}})})}function MU(e,t){return Lu(this,void 0,void 0,function(){var n,r;return zu(this,function(o){switch(o.label){case 0:return e.items?(n=Rb(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(OU))]):[3,2];case 1:return r=o.sent(),[2,yk(X3(r))];case 2:return[2,yk(Rb(e.files).map(function(s){return qf(s)}))]}})})}function yk(e){return e.filter(function(t){return kU.indexOf(t.name)===-1})}function Rb(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,jk(n)];if(e.sizen)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;n1?o-1:0),i=1;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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=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(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[Z,re,G,ae]);var Y=l.useRef([]),$=function(Fe){X.current&&X.current.contains(Fe.target)||(Fe.preventDefault(),Y.current=[])};l.useEffect(function(){return I&&(document.addEventListener("dragover",Ik,!1),document.addEventListener("drop",$,!1)),function(){I&&(document.removeEventListener("dragover",Ik),document.removeEventListener("drop",$))}},[X,I]),l.useEffect(function(){return!r&&j&&X.current&&X.current.focus(),function(){}},[X,j,r]);var F=l.useCallback(function(Se){R?R(Se):console.error(Se)},[R]),q=l.useCallback(function(Se){Se.preventDefault(),Se.persist(),Je(Se),Y.current=[].concat(aG(Y.current),[Se.target]),nh(Se)&&Promise.resolve(o(Se)).then(function(Fe){if(!(am(Se)&&!A)){var it=Fe.length,At=it>0&&qU({files:Fe,accept:O,minSize:i,maxSize:s,multiple:c,maxFiles:d,validator:D}),ke=it>0&&!At;ne({isDragAccept:At,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),p&&p(Se)}}).catch(function(Fe){return F(Fe)})},[o,p,F,A,O,i,s,c,d,D]),pe=l.useCallback(function(Se){Se.preventDefault(),Se.persist(),Je(Se);var Fe=nh(Se);if(Fe&&Se.dataTransfer)try{Se.dataTransfer.dropEffect="copy"}catch{}return Fe&&m&&m(Se),!1},[m,A]),W=l.useCallback(function(Se){Se.preventDefault(),Se.persist(),Je(Se);var Fe=Y.current.filter(function(At){return X.current&&X.current.contains(At)}),it=Fe.indexOf(Se.target);it!==-1&&Fe.splice(it,1),Y.current=Fe,!(Fe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),nh(Se)&&h&&h(Se))},[X,h,A]),U=l.useCallback(function(Se,Fe){var it=[],At=[];Se.forEach(function(ke){var lt=e6(ke,O),Rt=f1(lt,2),zt=Rt[0],Re=Rt[1],Qe=t6(ke,i,s),En=f1(Qe,2),Te=En[0],ct=En[1],ft=D?D(ke):null;if(zt&&Te&&!ft)it.push(ke);else{var tt=[Re,ct];ft&&(tt=tt.concat(ft)),At.push({file:ke,errors:tt.filter(function(en){return en})})}}),(!c&&it.length>1||c&&d>=1&&it.length>d)&&(it.forEach(function(ke){At.push({file:ke,errors:[GU]})}),it.splice(0)),ne({acceptedFiles:it,fileRejections:At,type:"setFiles"}),g&&g(it,At,Fe),At.length>0&&y&&y(At,Fe),it.length>0&&b&&b(it,Fe)},[ne,c,O,i,s,d,g,b,y,D]),ee=l.useCallback(function(Se){Se.preventDefault(),Se.persist(),Je(Se),Y.current=[],nh(Se)&&Promise.resolve(o(Se)).then(function(Fe){am(Se)&&!A||U(Fe,Se)}).catch(function(Fe){return F(Fe)}),ne({type:"reset"})},[o,U,F,A]),J=l.useCallback(function(){if(ae.current){ne({type:"openDialog"}),K();var Se={multiple:c,types:T};window.showOpenFilePicker(Se).then(function(Fe){return o(Fe)}).then(function(Fe){U(Fe,null),ne({type:"closeDialog"})}).catch(function(Fe){eG(Fe)?(G(Fe),ne({type:"closeDialog"})):tG(Fe)?(ae.current=!1,Z.current?(Z.current.value=null,Z.current.click()):F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):F(Fe)});return}Z.current&&(ne({type:"openDialog"}),K(),Z.current.value=null,Z.current.click())},[ne,K,G,S,U,F,T,c]),ge=l.useCallback(function(Se){!X.current||!X.current.isEqualNode(Se.target)||(Se.key===" "||Se.key==="Enter"||Se.keyCode===32||Se.keyCode===13)&&(Se.preventDefault(),J())},[X,J]),he=l.useCallback(function(){ne({type:"focus"})},[]),de=l.useCallback(function(){ne({type:"blur"})},[]),_e=l.useCallback(function(){_||(XU()?setTimeout(J,0):J())},[_,J]),Pe=function(Fe){return r?null:Fe},ze=function(Fe){return M?null:Pe(Fe)},ht=function(Fe){return E?null:Pe(Fe)},Je=function(Fe){A&&Fe.stopPropagation()},qt=l.useMemo(function(){return function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Fe=Se.refKey,it=Fe===void 0?"ref":Fe,At=Se.role,ke=Se.onKeyDown,lt=Se.onFocus,Rt=Se.onBlur,zt=Se.onClick,Re=Se.onDragEnter,Qe=Se.onDragOver,En=Se.onDragLeave,Te=Se.onDrop,ct=im(Se,oG);return kr(kr(Nb({onKeyDown:ze(ya(ke,ge)),onFocus:ze(ya(lt,he)),onBlur:ze(ya(Rt,de)),onClick:Pe(ya(zt,_e)),onDragEnter:ht(ya(Re,q)),onDragOver:ht(ya(Qe,pe)),onDragLeave:ht(ya(En,W)),onDrop:ht(ya(Te,ee)),role:typeof At=="string"&&At!==""?At:"presentation"},it,X),!r&&!M?{tabIndex:0}:{}),ct)}},[X,ge,he,de,_e,q,pe,W,ee,M,E,r]),Pt=l.useCallback(function(Se){Se.stopPropagation()},[]),jt=l.useMemo(function(){return function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Fe=Se.refKey,it=Fe===void 0?"ref":Fe,At=Se.onChange,ke=Se.onClick,lt=im(Se,sG),Rt=Nb({accept:O,multiple:c,type:"file",style:{display:"none"},onChange:Pe(ya(At,ee)),onClick:Pe(ya(ke,Pt)),tabIndex:-1},it,Z);return kr(kr({},Rt),lt)}},[Z,n,c,ee,r]);return kr(kr({},oe),{},{isFocused:se&&!r,getRootProps:qt,getInputProps:jt,rootRef:X,inputRef:Z,open:Pe(J)})}function hG(e,t){switch(t.type){case"focus":return kr(kr({},e),{},{isFocused:!0});case"blur":return kr(kr({},e),{},{isFocused:!1});case"openDialog":return kr(kr({},$b),{},{isFileDialogActive:!0});case"closeDialog":return kr(kr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return kr(kr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return kr(kr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return kr({},$b);default:return e}}function Ek(){}function Lb(){return Lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var CG=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,s=n.meta,i=n.mod,c=n.shift,d=n.ctrl,p=n.keys,h=t.key,m=t.code,g=t.ctrlKey,b=t.metaKey,y=t.shiftKey,x=t.altKey,w=qi(m),S=h.toLowerCase();if(!r){if(o===!x&&S!=="alt"||c===!y&&S!=="shift")return!1;if(i){if(!b&&!g)return!1}else if(s===!b&&S!=="meta"&&S!=="os"||d===!g&&S!=="ctrl"&&S!=="control")return!1}return p&&p.length===1&&(p.includes(S)||p.includes(w))?!0:p?Th(p):!p},wG=l.createContext(void 0),SG=function(){return l.useContext(wG)};function u6(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&u6(e[r],t[r])},!0):e===t}var kG=l.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),jG=function(){return l.useContext(kG)};function _G(e){var t=l.useRef(void 0);return u6(t.current,e)||(t.current=e),t.current}var Mk=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},IG=typeof window<"u"?l.useLayoutEffect:l.useEffect;function _t(e,t,n,r){var o=l.useRef(null),s=l.useRef(!1),i=n instanceof Array?r instanceof Array?void 0:r:n,c=Wy(e)?e.join(i==null?void 0:i.splitKey):e,d=n instanceof Array?n:r instanceof Array?r:void 0,p=l.useCallback(t,d??[]),h=l.useRef(p);d?h.current=p:h.current=t;var m=_G(i),g=jG(),b=g.enabledScopes,y=SG();return IG(function(){if(!((m==null?void 0:m.enabled)===!1||!yG(b,m==null?void 0:m.scopes))){var x=function(_,M){var E;if(M===void 0&&(M=!1),!(xG(_)&&!c6(_,m==null?void 0:m.enableOnFormTags))&&!(m!=null&&m.ignoreEventWhen!=null&&m.ignoreEventWhen(_))){if(o.current!==null&&document.activeElement!==o.current&&!o.current.contains(document.activeElement)){Mk(_);return}(E=_.target)!=null&&E.isContentEditable&&!(m!=null&&m.enableOnContentEditable)||p1(c,m==null?void 0:m.splitKey).forEach(function(A){var R,D=h1(A,m==null?void 0:m.combinationKey);if(CG(_,D,m==null?void 0:m.ignoreModifiers)||(R=D.keys)!=null&&R.includes("*")){if(M&&s.current)return;if(vG(_,D,m==null?void 0:m.preventDefault),!bG(_,D,m==null?void 0:m.enabled)){Mk(_);return}h.current(_,D),M||(s.current=!0)}})}},w=function(_){_.key!==void 0&&(i6(qi(_.code)),((m==null?void 0:m.keydown)===void 0&&(m==null?void 0:m.keyup)!==!0||m!=null&&m.keydown)&&x(_))},S=function(_){_.key!==void 0&&(l6(qi(_.code)),s.current=!1,m!=null&&m.keyup&&x(_,!0))},j=o.current||(i==null?void 0:i.document)||document;return j.addEventListener("keyup",S),j.addEventListener("keydown",w),y&&p1(c,m==null?void 0:m.splitKey).forEach(function(I){return y.addHotkey(h1(I,m==null?void 0:m.combinationKey,m==null?void 0:m.description))}),function(){j.removeEventListener("keyup",S),j.removeEventListener("keydown",w),y&&p1(c,m==null?void 0:m.splitKey).forEach(function(I){return y.removeHotkey(h1(I,m==null?void 0:m.combinationKey,m==null?void 0:m.description))})}}},[c,m,b]),o}const PG=e=>{const{isDragAccept:t,isDragReject:n,setIsHandlingUpload:r}=e;return _t("esc",()=>{r(!1)}),a.jsxs(Le,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"100vw",height:"100vh",zIndex:999,backdropFilter:"blur(20px)"},children:[a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",bg:"base.700",_dark:{bg:"base.900"},opacity:.7,alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"0.1s"}}),a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"full",height:"full",alignItems:"center",justifyContent:"center",p:4},children:a.jsx(N,{sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",flexDir:"column",gap:4,borderWidth:3,borderRadius:"xl",borderStyle:"dashed",color:"base.100",borderColor:"base.100",_dark:{borderColor:"base.200"}},children:t?a.jsx(yo,{size:"lg",children:"Drop to Upload"}):a.jsxs(a.Fragment,{children:[a.jsx(yo,{size:"lg",children:"Invalid Upload"}),a.jsx(yo,{size:"md",children:"Must be single JPEG or PNG image"})]})})})]})},EG=l.memo(PG),MG=me([we,lo],({gallery:e},t)=>{let n={type:"TOAST"};t==="unifiedCanvas"&&(n={type:"SET_CANVAS_INITIAL_IMAGE"}),t==="img2img"&&(n={type:"SET_INITIAL_IMAGE"});const{autoAddBoardId:r}=e;return{autoAddBoardId:r,postUploadAction:n}},Ie),OG=e=>{const{children:t}=e,{autoAddBoardId:n,postUploadAction:r}=H(MG),o=Zl(),{t:s}=Q(),[i,c]=l.useState(!1),[d]=EI(),p=l.useCallback(_=>{c(!0),o({title:s("toast.uploadFailed"),description:_.errors.map(M=>M.message).join(` -`),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;tr===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.classNames[p]}`:c[p]=`${c[p]} ${d.classNames[p]}`}),c),{});return Object.keys(t).reduce((c,d)=>(c[d]=e(t[d],i[d],r!=null&&r[d],Array.isArray(o)?o.filter(Boolean).map(p=>`${(s==null?void 0:s.key)||"mantine"}-${p}-${d}`).join(" "):o?`${(s==null?void 0:s.key)||"mantine"}-${o}-${d}`:null),c),{})}var KG=Object.defineProperty,Rk=Object.getOwnPropertySymbols,QG=Object.prototype.hasOwnProperty,XG=Object.prototype.propertyIsEnumerable,Dk=(e,t,n)=>t in e?KG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g1=(e,t)=>{for(var n in t||(t={}))QG.call(t,n)&&Dk(e,n,t[n]);if(Rk)for(var n of Rk(t))XG.call(t,n)&&Dk(e,n,t[n]);return e};function zb(e,t){return t&&Object.keys(t).forEach(n=>{e[n]?e[n]=g1(g1({},e[n]),t[n]):e[n]=g1({},t[n])}),e}function Tk(e,t,n,r){const o=s=>typeof s=="function"?s(t,n||{},r):s||{};return Array.isArray(e)?e.map(s=>o(s.styles)).reduce((s,i)=>zb(s,i),{}):o(e)}function YG({ctx:e,theme:t,params:n,variant:r,size:o}){return e.reduce((s,i)=>(i.variants&&r in i.variants&&zb(s,i.variants[r](t,n,{variant:r,size:o})),i.sizes&&o in i.sizes&&zb(s,i.sizes[o](t,n,{variant:r,size:o})),s),{})}function ko(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const s=Ii(),i=g$(o==null?void 0:o.name),c=OP(),d={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:p,cx:h}=g6(),m=t(s,r,d),g=Tk(o==null?void 0:o.styles,s,r,d),b=Tk(i,s,r,d),y=YG({ctx:i,theme:s,params:r,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),x=Object.fromEntries(Object.keys(m).map(w=>{const S=h({[p(m[w])]:!(o!=null&&o.unstyled)},p(y[w]),p(b[w]),p(g[w]));return[w,S]}));return{classes:qG({cx:h,classes:x,context:i,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:c}),cx:h,theme:s}}return n}function Nk(e){return`___ref-${e||""}`}var JG=Object.defineProperty,ZG=Object.defineProperties,eq=Object.getOwnPropertyDescriptors,$k=Object.getOwnPropertySymbols,tq=Object.prototype.hasOwnProperty,nq=Object.prototype.propertyIsEnumerable,Lk=(e,t,n)=>t in e?JG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xd=(e,t)=>{for(var n in t||(t={}))tq.call(t,n)&&Lk(e,n,t[n]);if($k)for(var n of $k(t))nq.call(t,n)&&Lk(e,n,t[n]);return e},yd=(e,t)=>ZG(e,eq(t));const Cd={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${qe(10)})`},transitionProperty:"transform, opacity"},rh={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${qe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${qe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${qe(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${qe(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:yd(xd({},Cd),{common:{transformOrigin:"center center"}}),"pop-bottom-left":yd(xd({},Cd),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":yd(xd({},Cd),{common:{transformOrigin:"bottom right"}}),"pop-top-left":yd(xd({},Cd),{common:{transformOrigin:"top left"}}),"pop-top-right":yd(xd({},Cd),{common:{transformOrigin:"top right"}})},zk=["mousedown","touchstart"];function rq(e,t,n){const r=l.useRef();return l.useEffect(()=>{const o=s=>{const{target:i}=s??{};if(Array.isArray(n)){const c=(i==null?void 0:i.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(i)&&i.tagName!=="HTML";n.every(p=>!!p&&!s.composedPath().includes(p))&&!c&&e()}else r.current&&!r.current.contains(i)&&e()};return(t||zk).forEach(s=>document.addEventListener(s,o)),()=>{(t||zk).forEach(s=>document.removeEventListener(s,o))}},[r,e,n]),r}function oq(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function sq(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function aq(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=l.useState(n?t:sq(e,t)),s=l.useRef();return l.useEffect(()=>{if("matchMedia"in window)return s.current=window.matchMedia(e),o(s.current.matches),oq(s.current,i=>o(i.matches))},[e]),r}const v6=typeof document<"u"?l.useLayoutEffect:l.useEffect;function oa(e,t){const n=l.useRef(!1);l.useEffect(()=>()=>{n.current=!1},[]),l.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function iq({opened:e,shouldReturnFocus:t=!0}){const n=l.useRef(),r=()=>{var o;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((o=n.current)==null||o.focus({preventScroll:!0}))};return oa(()=>{let o=-1;const s=i=>{i.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",s),e?n.current=document.activeElement:t&&(o=window.setTimeout(r,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",s)}},[e,t]),r}const lq=/input|select|textarea|button|object/,b6="a, input, select, textarea, button, object, [tabindex]";function cq(e){return e.style.display==="none"}function uq(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(cq(n))return!1;n=n.parentNode}return!0}function x6(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Fb(e){const t=e.nodeName.toLowerCase(),n=!Number.isNaN(x6(e));return(lq.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&uq(e)}function y6(e){const t=x6(e);return(Number.isNaN(t)||t>=0)&&Fb(e)}function dq(e){return Array.from(e.querySelectorAll(b6)).filter(y6)}function fq(e,t){const n=dq(e);if(!n.length){t.preventDefault();return}const r=n[t.shiftKey?0:n.length-1],o=e.getRootNode();if(!(r===o.activeElement||e===o.activeElement))return;t.preventDefault();const i=n[t.shiftKey?n.length-1:0];i&&i.focus()}function Uy(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function pq(e,t="body > :not(script)"){const n=Uy(),r=Array.from(document.querySelectorAll(t)).map(o=>{var s;if((s=o==null?void 0:o.shadowRoot)!=null&&s.contains(e)||o.contains(e))return;const i=o.getAttribute("aria-hidden"),c=o.getAttribute("data-hidden"),d=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",n),i===null||i==="false"?o.setAttribute("aria-hidden","true"):!c&&!d&&o.setAttribute("data-hidden",i),{node:o,ariaHidden:c||null}});return()=>{r.forEach(o=>{!o||n!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function hq(e=!0){const t=l.useRef(),n=l.useRef(null),r=s=>{let i=s.querySelector("[data-autofocus]");if(!i){const c=Array.from(s.querySelectorAll(b6));i=c.find(y6)||c.find(Fb)||null,!i&&Fb(s)&&(i=s)}i&&i.focus({preventScroll:!0})},o=l.useCallback(s=>{if(e){if(s===null){n.current&&(n.current(),n.current=null);return}n.current=pq(s),t.current!==s&&(s?(setTimeout(()=>{s.getRootNode()&&r(s)}),t.current=s):t.current=null)}},[e]);return l.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const s=i=>{i.key==="Tab"&&t.current&&fq(t.current,i)};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s),n.current&&n.current()}},[e]),o}const mq=z["useId".toString()]||(()=>{});function gq(){const e=mq();return e?`mantine-${e.replace(/:/g,"")}`:""}function Gy(e){const t=gq(),[n,r]=l.useState(t);return v6(()=>{r(Uy())},[]),typeof e=="string"?e:typeof window>"u"?t:n}function Fk(e,t,n){l.useEffect(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function C6(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function vq(...e){return t=>{e.forEach(n=>C6(n,t))}}function Kf(...e){return l.useCallback(vq(...e),e)}function cf({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){const[o,s]=l.useState(t!==void 0?t:n),i=c=>{s(c),r==null||r(c)};return e!==void 0?[e,r,!0]:[o,i,!1]}function w6(e,t){return aq("(prefers-reduced-motion: reduce)",e,t)}const bq=e=>e<.5?2*e*e:-1+(4-2*e)*e,xq=({axis:e,target:t,parent:n,alignment:r,offset:o,isList:s})=>{if(!t||!n&&typeof document>"u")return 0;const i=!!n,d=(n||document.body).getBoundingClientRect(),p=t.getBoundingClientRect(),h=m=>p[m]-d[m];if(e==="y"){const m=h("top");if(m===0)return 0;if(r==="start"){const b=m-o;return b<=p.height*(s?0:1)||!s?b:0}const g=i?d.height:window.innerHeight;if(r==="end"){const b=m+o-g+p.height;return b>=-p.height*(s?0:1)||!s?b:0}return r==="center"?m-g/2+p.height/2:0}if(e==="x"){const m=h("left");if(m===0)return 0;if(r==="start"){const b=m-o;return b<=p.width||!s?b:0}const g=i?d.width:window.innerWidth;if(r==="end"){const b=m+o-g+p.width;return b>=-p.width||!s?b:0}return r==="center"?m-g/2+p.width/2:0}return 0},yq=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const n=e==="y"?"scrollTop":"scrollLeft";if(t)return t[n];const{body:r,documentElement:o}=document;return r[n]+o[n]},Cq=({axis:e,parent:t,distance:n})=>{if(!t&&typeof document>"u")return;const r=e==="y"?"scrollTop":"scrollLeft";if(t)t[r]=n;else{const{body:o,documentElement:s}=document;o[r]=n,s[r]=n}};function S6({duration:e=1250,axis:t="y",onScrollFinish:n,easing:r=bq,offset:o=0,cancelable:s=!0,isList:i=!1}={}){const c=l.useRef(0),d=l.useRef(0),p=l.useRef(!1),h=l.useRef(null),m=l.useRef(null),g=w6(),b=()=>{c.current&&cancelAnimationFrame(c.current)},y=l.useCallback(({alignment:w="start"}={})=>{var S;p.current=!1,c.current&&b();const j=(S=yq({parent:h.current,axis:t}))!=null?S:0,I=xq({parent:h.current,target:m.current,axis:t,alignment:w,offset:o,isList:i})-(h.current?0:j);function _(){d.current===0&&(d.current=performance.now());const E=performance.now()-d.current,A=g||e===0?1:E/e,R=j+I*r(A);Cq({parent:h.current,axis:t,distance:R}),!p.current&&A<1?c.current=requestAnimationFrame(_):(typeof n=="function"&&n(),d.current=0,c.current=0,b())}_()},[t,e,r,i,o,n,g]),x=()=>{s&&(p.current=!0)};return Fk("wheel",x,{passive:!0}),Fk("touchmove",x,{passive:!0}),l.useEffect(()=>b,[]),{scrollableRef:h,targetRef:m,scrollIntoView:y,cancel:b}}var Bk=Object.getOwnPropertySymbols,wq=Object.prototype.hasOwnProperty,Sq=Object.prototype.propertyIsEnumerable,kq=(e,t)=>{var n={};for(var r in e)wq.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bk)for(var r of Bk(e))t.indexOf(r)<0&&Sq.call(e,r)&&(n[r]=e[r]);return n};function Yg(e){const t=e,{m:n,mx:r,my:o,mt:s,mb:i,ml:c,mr:d,p,px:h,py:m,pt:g,pb:b,pl:y,pr:x,bg:w,c:S,opacity:j,ff:I,fz:_,fw:M,lts:E,ta:A,lh:R,fs:D,tt:O,td:T,w:K,miw:G,maw:X,h:Z,mih:te,mah:V,bgsz:oe,bgp:ne,bgr:se,bga:re,pos:ae,top:B,left:Y,bottom:$,right:F,inset:q,display:pe}=t,W=kq(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:v$({m:n,mx:r,my:o,mt:s,mb:i,ml:c,mr:d,p,px:h,py:m,pt:g,pb:b,pl:y,pr:x,bg:w,c:S,opacity:j,ff:I,fz:_,fw:M,lts:E,ta:A,lh:R,fs:D,tt:O,td:T,w:K,miw:G,maw:X,h:Z,mih:te,mah:V,bgsz:oe,bgp:ne,bgr:se,bga:re,pos:ae,top:B,left:Y,bottom:$,right:F,inset:q,display:pe}),rest:W}}function jq(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>MS(Xt({size:r,sizes:t.breakpoints}))-MS(Xt({size:o,sizes:t.breakpoints})));return"base"in e?["base",...n]:n}function _q({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return jq(e,t).reduce((i,c)=>{if(c==="base"&&e.base!==void 0){const p=n(e.base,t);return Array.isArray(r)?(r.forEach(h=>{i[h]=p}),i):(i[r]=p,i)}const d=n(e[c],t);return Array.isArray(r)?(i[t.fn.largerThan(c)]={},r.forEach(p=>{i[t.fn.largerThan(c)][p]=d}),i):(i[t.fn.largerThan(c)]={[r]:d},i)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((s,i)=>(s[i]=o,s),{}):{[r]:o}}function Iq(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function Pq(e){return qe(e)}function Eq(e){return e}function Mq(e,t){return Xt({size:e,sizes:t.fontSizes})}const Oq=["-xs","-sm","-md","-lg","-xl"];function Aq(e,t){return Oq.includes(e)?`calc(${Xt({size:e.replace("-",""),sizes:t.spacing})} * -1)`:Xt({size:e,sizes:t.spacing})}const Rq={identity:Eq,color:Iq,size:Pq,fontSize:Mq,spacing:Aq},Dq={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var Tq=Object.defineProperty,Hk=Object.getOwnPropertySymbols,Nq=Object.prototype.hasOwnProperty,$q=Object.prototype.propertyIsEnumerable,Wk=(e,t,n)=>t in e?Tq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vk=(e,t)=>{for(var n in t||(t={}))Nq.call(t,n)&&Wk(e,n,t[n]);if(Hk)for(var n of Hk(t))$q.call(t,n)&&Wk(e,n,t[n]);return e};function Uk(e,t,n=Dq){return Object.keys(n).reduce((o,s)=>(s in e&&e[s]!==void 0&&o.push(_q({value:e[s],getValue:Rq[n[s].type],property:n[s].property,theme:t})),o),[]).reduce((o,s)=>(Object.keys(s).forEach(i=>{typeof s[i]=="object"&&s[i]!==null&&i in o?o[i]=Vk(Vk({},o[i]),s[i]):o[i]=s[i]}),o),{})}function Gk(e,t){return typeof e=="function"?e(t):e}function Lq(e,t,n){const r=Ii(),{css:o,cx:s}=g6();return Array.isArray(e)?s(n,o(Uk(t,r)),e.map(i=>o(Gk(i,r)))):s(n,o(Gk(e,r)),o(Uk(t,r)))}var zq=Object.defineProperty,lm=Object.getOwnPropertySymbols,k6=Object.prototype.hasOwnProperty,j6=Object.prototype.propertyIsEnumerable,qk=(e,t,n)=>t in e?zq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fq=(e,t)=>{for(var n in t||(t={}))k6.call(t,n)&&qk(e,n,t[n]);if(lm)for(var n of lm(t))j6.call(t,n)&&qk(e,n,t[n]);return e},Bq=(e,t)=>{var n={};for(var r in e)k6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&lm)for(var r of lm(e))t.indexOf(r)<0&&j6.call(e,r)&&(n[r]=e[r]);return n};const _6=l.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:s,sx:i}=n,c=Bq(n,["className","component","style","sx"]);const{systemStyles:d,rest:p}=Yg(c),h=o||"div";return z.createElement(h,Fq({ref:t,className:Lq(i,d,r),style:s},p))});_6.displayName="@mantine/core/Box";const Xo=_6;var Hq=Object.defineProperty,Wq=Object.defineProperties,Vq=Object.getOwnPropertyDescriptors,Kk=Object.getOwnPropertySymbols,Uq=Object.prototype.hasOwnProperty,Gq=Object.prototype.propertyIsEnumerable,Qk=(e,t,n)=>t in e?Hq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xk=(e,t)=>{for(var n in t||(t={}))Uq.call(t,n)&&Qk(e,n,t[n]);if(Kk)for(var n of Kk(t))Gq.call(t,n)&&Qk(e,n,t[n]);return e},qq=(e,t)=>Wq(e,Vq(t)),Kq=ko(e=>({root:qq(Xk(Xk({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const Qq=Kq;var Xq=Object.defineProperty,cm=Object.getOwnPropertySymbols,I6=Object.prototype.hasOwnProperty,P6=Object.prototype.propertyIsEnumerable,Yk=(e,t,n)=>t in e?Xq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yq=(e,t)=>{for(var n in t||(t={}))I6.call(t,n)&&Yk(e,n,t[n]);if(cm)for(var n of cm(t))P6.call(t,n)&&Yk(e,n,t[n]);return e},Jq=(e,t)=>{var n={};for(var r in e)I6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cm)for(var r of cm(e))t.indexOf(r)<0&&P6.call(e,r)&&(n[r]=e[r]);return n};const E6=l.forwardRef((e,t)=>{const n=zr("UnstyledButton",{},e),{className:r,component:o="button",unstyled:s,variant:i}=n,c=Jq(n,["className","component","unstyled","variant"]),{classes:d,cx:p}=Qq(null,{name:"UnstyledButton",unstyled:s,variant:i});return z.createElement(Xo,Yq({component:o,ref:t,className:p(d.root,r),type:o==="button"?"button":void 0},c))});E6.displayName="@mantine/core/UnstyledButton";const Zq=E6;var eK=Object.defineProperty,tK=Object.defineProperties,nK=Object.getOwnPropertyDescriptors,Jk=Object.getOwnPropertySymbols,rK=Object.prototype.hasOwnProperty,oK=Object.prototype.propertyIsEnumerable,Zk=(e,t,n)=>t in e?eK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bb=(e,t)=>{for(var n in t||(t={}))rK.call(t,n)&&Zk(e,n,t[n]);if(Jk)for(var n of Jk(t))oK.call(t,n)&&Zk(e,n,t[n]);return e},e4=(e,t)=>tK(e,nK(t));const sK=["subtle","filled","outline","light","default","transparent","gradient"],oh={xs:qe(18),sm:qe(22),md:qe(28),lg:qe(34),xl:qe(44)};function aK({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:sK.includes(e)?Bb({border:`${qe(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var iK=ko((e,{radius:t,color:n,gradient:r},{variant:o,size:s})=>({root:e4(Bb({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Xt({size:s,sizes:oh}),minHeight:Xt({size:s,sizes:oh}),width:Xt({size:s,sizes:oh}),minWidth:Xt({size:s,sizes:oh})},aK({variant:o,theme:e,color:n,gradient:r})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":e4(Bb({content:'""'},e.fn.cover(qe(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const lK=iK;var cK=Object.defineProperty,um=Object.getOwnPropertySymbols,M6=Object.prototype.hasOwnProperty,O6=Object.prototype.propertyIsEnumerable,t4=(e,t,n)=>t in e?cK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,n4=(e,t)=>{for(var n in t||(t={}))M6.call(t,n)&&t4(e,n,t[n]);if(um)for(var n of um(t))O6.call(t,n)&&t4(e,n,t[n]);return e},r4=(e,t)=>{var n={};for(var r in e)M6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&um)for(var r of um(e))t.indexOf(r)<0&&O6.call(e,r)&&(n[r]=e[r]);return n};function uK(e){var t=e,{size:n,color:r}=t,o=r4(t,["size","color"]);const s=o,{style:i}=s,c=r4(s,["style"]);return z.createElement("svg",n4({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,style:n4({width:n},i)},c),z.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var dK=Object.defineProperty,dm=Object.getOwnPropertySymbols,A6=Object.prototype.hasOwnProperty,R6=Object.prototype.propertyIsEnumerable,o4=(e,t,n)=>t in e?dK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s4=(e,t)=>{for(var n in t||(t={}))A6.call(t,n)&&o4(e,n,t[n]);if(dm)for(var n of dm(t))R6.call(t,n)&&o4(e,n,t[n]);return e},a4=(e,t)=>{var n={};for(var r in e)A6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dm)for(var r of dm(e))t.indexOf(r)<0&&R6.call(e,r)&&(n[r]=e[r]);return n};function fK(e){var t=e,{size:n,color:r}=t,o=a4(t,["size","color"]);const s=o,{style:i}=s,c=a4(s,["style"]);return z.createElement("svg",s4({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r,style:s4({width:n,height:n},i)},c),z.createElement("g",{fill:"none",fillRule:"evenodd"},z.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},z.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),z.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},z.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var pK=Object.defineProperty,fm=Object.getOwnPropertySymbols,D6=Object.prototype.hasOwnProperty,T6=Object.prototype.propertyIsEnumerable,i4=(e,t,n)=>t in e?pK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l4=(e,t)=>{for(var n in t||(t={}))D6.call(t,n)&&i4(e,n,t[n]);if(fm)for(var n of fm(t))T6.call(t,n)&&i4(e,n,t[n]);return e},c4=(e,t)=>{var n={};for(var r in e)D6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fm)for(var r of fm(e))t.indexOf(r)<0&&T6.call(e,r)&&(n[r]=e[r]);return n};function hK(e){var t=e,{size:n,color:r}=t,o=c4(t,["size","color"]);const s=o,{style:i}=s,c=c4(s,["style"]);return z.createElement("svg",l4({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r,style:l4({width:n},i)},c),z.createElement("circle",{cx:"15",cy:"15",r:"15"},z.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},z.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("circle",{cx:"105",cy:"15",r:"15"},z.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var mK=Object.defineProperty,pm=Object.getOwnPropertySymbols,N6=Object.prototype.hasOwnProperty,$6=Object.prototype.propertyIsEnumerable,u4=(e,t,n)=>t in e?mK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gK=(e,t)=>{for(var n in t||(t={}))N6.call(t,n)&&u4(e,n,t[n]);if(pm)for(var n of pm(t))$6.call(t,n)&&u4(e,n,t[n]);return e},vK=(e,t)=>{var n={};for(var r in e)N6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pm)for(var r of pm(e))t.indexOf(r)<0&&$6.call(e,r)&&(n[r]=e[r]);return n};const v1={bars:uK,oval:fK,dots:hK},bK={xs:qe(18),sm:qe(22),md:qe(36),lg:qe(44),xl:qe(58)},xK={size:"md"};function L6(e){const t=zr("Loader",xK,e),{size:n,color:r,variant:o}=t,s=vK(t,["size","color","variant"]),i=Ii(),c=o in v1?o:i.loader;return z.createElement(Xo,gK({role:"presentation",component:v1[c]||v1.bars,size:Xt({size:n,sizes:bK}),color:i.fn.variant({variant:"filled",primaryFallback:!1,color:r||i.primaryColor}).background},s))}L6.displayName="@mantine/core/Loader";var yK=Object.defineProperty,hm=Object.getOwnPropertySymbols,z6=Object.prototype.hasOwnProperty,F6=Object.prototype.propertyIsEnumerable,d4=(e,t,n)=>t in e?yK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f4=(e,t)=>{for(var n in t||(t={}))z6.call(t,n)&&d4(e,n,t[n]);if(hm)for(var n of hm(t))F6.call(t,n)&&d4(e,n,t[n]);return e},CK=(e,t)=>{var n={};for(var r in e)z6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hm)for(var r of hm(e))t.indexOf(r)<0&&F6.call(e,r)&&(n[r]=e[r]);return n};const wK={color:"gray",size:"md",variant:"subtle"},B6=l.forwardRef((e,t)=>{const n=zr("ActionIcon",wK,e),{className:r,color:o,children:s,radius:i,size:c,variant:d,gradient:p,disabled:h,loaderProps:m,loading:g,unstyled:b,__staticSelector:y}=n,x=CK(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:w,cx:S,theme:j}=lK({radius:i,color:o,gradient:p},{name:["ActionIcon",y],unstyled:b,size:c,variant:d}),I=z.createElement(L6,f4({color:j.fn.variant({color:o,variant:d}).color,size:"100%","data-action-icon-loader":!0},m));return z.createElement(Zq,f4({className:S(w.root,r),ref:t,disabled:h,"data-disabled":h||void 0,"data-loading":g||void 0,unstyled:b},x),g?I:s)});B6.displayName="@mantine/core/ActionIcon";const SK=B6;var kK=Object.defineProperty,jK=Object.defineProperties,_K=Object.getOwnPropertyDescriptors,mm=Object.getOwnPropertySymbols,H6=Object.prototype.hasOwnProperty,W6=Object.prototype.propertyIsEnumerable,p4=(e,t,n)=>t in e?kK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IK=(e,t)=>{for(var n in t||(t={}))H6.call(t,n)&&p4(e,n,t[n]);if(mm)for(var n of mm(t))W6.call(t,n)&&p4(e,n,t[n]);return e},PK=(e,t)=>jK(e,_K(t)),EK=(e,t)=>{var n={};for(var r in e)H6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mm)for(var r of mm(e))t.indexOf(r)<0&&W6.call(e,r)&&(n[r]=e[r]);return n};function V6(e){const t=zr("Portal",{},e),{children:n,target:r,className:o,innerRef:s}=t,i=EK(t,["children","target","className","innerRef"]),c=Ii(),[d,p]=l.useState(!1),h=l.useRef();return v6(()=>(p(!0),h.current=r?typeof r=="string"?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(h.current),()=>{!r&&document.body.removeChild(h.current)}),[r]),d?ls.createPortal(z.createElement("div",PK(IK({className:o,dir:c.dir},i),{ref:s}),n),h.current):null}V6.displayName="@mantine/core/Portal";var MK=Object.defineProperty,gm=Object.getOwnPropertySymbols,U6=Object.prototype.hasOwnProperty,G6=Object.prototype.propertyIsEnumerable,h4=(e,t,n)=>t in e?MK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OK=(e,t)=>{for(var n in t||(t={}))U6.call(t,n)&&h4(e,n,t[n]);if(gm)for(var n of gm(t))G6.call(t,n)&&h4(e,n,t[n]);return e},AK=(e,t)=>{var n={};for(var r in e)U6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gm)for(var r of gm(e))t.indexOf(r)<0&&G6.call(e,r)&&(n[r]=e[r]);return n};function q6(e){var t=e,{withinPortal:n=!0,children:r}=t,o=AK(t,["withinPortal","children"]);return n?z.createElement(V6,OK({},o),r):z.createElement(z.Fragment,null,r)}q6.displayName="@mantine/core/OptionalPortal";var RK=Object.defineProperty,vm=Object.getOwnPropertySymbols,K6=Object.prototype.hasOwnProperty,Q6=Object.prototype.propertyIsEnumerable,m4=(e,t,n)=>t in e?RK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g4=(e,t)=>{for(var n in t||(t={}))K6.call(t,n)&&m4(e,n,t[n]);if(vm)for(var n of vm(t))Q6.call(t,n)&&m4(e,n,t[n]);return e},DK=(e,t)=>{var n={};for(var r in e)K6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vm)for(var r of vm(e))t.indexOf(r)<0&&Q6.call(e,r)&&(n[r]=e[r]);return n};function X6(e){const t=e,{width:n,height:r,style:o}=t,s=DK(t,["width","height","style"]);return z.createElement("svg",g4({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:g4({width:n,height:r},o)},s),z.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}X6.displayName="@mantine/core/CloseIcon";var TK=Object.defineProperty,bm=Object.getOwnPropertySymbols,Y6=Object.prototype.hasOwnProperty,J6=Object.prototype.propertyIsEnumerable,v4=(e,t,n)=>t in e?TK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NK=(e,t)=>{for(var n in t||(t={}))Y6.call(t,n)&&v4(e,n,t[n]);if(bm)for(var n of bm(t))J6.call(t,n)&&v4(e,n,t[n]);return e},$K=(e,t)=>{var n={};for(var r in e)Y6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bm)for(var r of bm(e))t.indexOf(r)<0&&J6.call(e,r)&&(n[r]=e[r]);return n};const LK={xs:qe(12),sm:qe(16),md:qe(20),lg:qe(28),xl:qe(34)},zK={size:"sm"},Z6=l.forwardRef((e,t)=>{const n=zr("CloseButton",zK,e),{iconSize:r,size:o,children:s}=n,i=$K(n,["iconSize","size","children"]),c=qe(r||LK[o]);return z.createElement(SK,NK({ref:t,__staticSelector:"CloseButton",size:o},i),s||z.createElement(X6,{width:c,height:c}))});Z6.displayName="@mantine/core/CloseButton";const eE=Z6;var FK=Object.defineProperty,BK=Object.defineProperties,HK=Object.getOwnPropertyDescriptors,b4=Object.getOwnPropertySymbols,WK=Object.prototype.hasOwnProperty,VK=Object.prototype.propertyIsEnumerable,x4=(e,t,n)=>t in e?FK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sh=(e,t)=>{for(var n in t||(t={}))WK.call(t,n)&&x4(e,n,t[n]);if(b4)for(var n of b4(t))VK.call(t,n)&&x4(e,n,t[n]);return e},UK=(e,t)=>BK(e,HK(t));function GK({underline:e,strikethrough:t}){const n=[];return e&&n.push("underline"),t&&n.push("line-through"),n.length>0?n.join(" "):"none"}function qK({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function KK(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function QK({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var XK=ko((e,{color:t,lineClamp:n,truncate:r,inline:o,inherit:s,underline:i,gradient:c,weight:d,transform:p,align:h,strikethrough:m,italic:g},{size:b})=>{const y=e.fn.variant({variant:"gradient",gradient:c});return{root:UK(sh(sh(sh(sh({},e.fn.fontStyles()),e.fn.focusStyles()),KK(n)),QK({theme:e,truncate:r})),{color:qK({color:t,theme:e}),fontFamily:s?"inherit":e.fontFamily,fontSize:s||b===void 0?"inherit":Xt({size:b,sizes:e.fontSizes}),lineHeight:s?"inherit":o?1:e.lineHeight,textDecoration:GK({underline:i,strikethrough:m}),WebkitTapHighlightColor:"transparent",fontWeight:s?"inherit":d,textTransform:p,textAlign:h,fontStyle:g?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const YK=XK;var JK=Object.defineProperty,xm=Object.getOwnPropertySymbols,tE=Object.prototype.hasOwnProperty,nE=Object.prototype.propertyIsEnumerable,y4=(e,t,n)=>t in e?JK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZK=(e,t)=>{for(var n in t||(t={}))tE.call(t,n)&&y4(e,n,t[n]);if(xm)for(var n of xm(t))nE.call(t,n)&&y4(e,n,t[n]);return e},eQ=(e,t)=>{var n={};for(var r in e)tE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xm)for(var r of xm(e))t.indexOf(r)<0&&nE.call(e,r)&&(n[r]=e[r]);return n};const tQ={variant:"text"},rE=l.forwardRef((e,t)=>{const n=zr("Text",tQ,e),{className:r,size:o,weight:s,transform:i,color:c,align:d,variant:p,lineClamp:h,truncate:m,gradient:g,inline:b,inherit:y,underline:x,strikethrough:w,italic:S,classNames:j,styles:I,unstyled:_,span:M,__staticSelector:E}=n,A=eQ(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:D}=YK({color:c,lineClamp:h,truncate:m,inline:b,inherit:y,underline:x,strikethrough:w,italic:S,weight:s,transform:i,align:d,gradient:g},{unstyled:_,name:E||"Text",variant:p,size:o});return z.createElement(Xo,ZK({ref:t,className:D(R.root,{[R.gradient]:p==="gradient"},r),component:M?"span":"div"},A))});rE.displayName="@mantine/core/Text";const xu=rE,ah={xs:qe(1),sm:qe(2),md:qe(3),lg:qe(4),xl:qe(5)};function ih(e,t){const n=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?n:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var nQ=ko((e,{color:t},{size:n,variant:r})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:qe(1),borderTop:`${Xt({size:n,sizes:ah})} ${r} ${ih(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Xt({size:n,sizes:ah})} ${r} ${ih(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:qe(Xt({size:n,sizes:ah})),borderTopColor:ih(e,t),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:qe(Xt({size:n,sizes:ah})),borderLeftColor:ih(e,t),borderLeftStyle:r}}));const rQ=nQ;var oQ=Object.defineProperty,sQ=Object.defineProperties,aQ=Object.getOwnPropertyDescriptors,ym=Object.getOwnPropertySymbols,oE=Object.prototype.hasOwnProperty,sE=Object.prototype.propertyIsEnumerable,C4=(e,t,n)=>t in e?oQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w4=(e,t)=>{for(var n in t||(t={}))oE.call(t,n)&&C4(e,n,t[n]);if(ym)for(var n of ym(t))sE.call(t,n)&&C4(e,n,t[n]);return e},iQ=(e,t)=>sQ(e,aQ(t)),lQ=(e,t)=>{var n={};for(var r in e)oE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ym)for(var r of ym(e))t.indexOf(r)<0&&sE.call(e,r)&&(n[r]=e[r]);return n};const cQ={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},Hb=l.forwardRef((e,t)=>{const n=zr("Divider",cQ,e),{className:r,color:o,orientation:s,size:i,label:c,labelPosition:d,labelProps:p,variant:h,styles:m,classNames:g,unstyled:b}=n,y=lQ(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:x,cx:w}=rQ({color:o},{classNames:g,styles:m,unstyled:b,name:"Divider",variant:h,size:i}),S=s==="vertical",j=s==="horizontal",I=!!c&&j,_=!(p!=null&&p.color);return z.createElement(Xo,w4({ref:t,className:w(x.root,{[x.vertical]:S,[x.horizontal]:j,[x.withLabel]:I},r),role:"separator"},y),I&&z.createElement(xu,iQ(w4({},p),{size:(p==null?void 0:p.size)||"xs",mt:qe(2),className:w(x.label,x[d],{[x.labelDefaultStyles]:_})}),c))});Hb.displayName="@mantine/core/Divider";var uQ=Object.defineProperty,dQ=Object.defineProperties,fQ=Object.getOwnPropertyDescriptors,S4=Object.getOwnPropertySymbols,pQ=Object.prototype.hasOwnProperty,hQ=Object.prototype.propertyIsEnumerable,k4=(e,t,n)=>t in e?uQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j4=(e,t)=>{for(var n in t||(t={}))pQ.call(t,n)&&k4(e,n,t[n]);if(S4)for(var n of S4(t))hQ.call(t,n)&&k4(e,n,t[n]);return e},mQ=(e,t)=>dQ(e,fQ(t)),gQ=ko((e,t,{size:n})=>({item:mQ(j4({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Xt({size:n,sizes:e.spacing})} / 1.5) ${Xt({size:n,sizes:e.spacing})}`,cursor:"pointer",fontSize:Xt({size:n,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":j4({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${Xt({size:n,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${Xt({size:n,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Xt({size:n,sizes:e.spacing})} / 1.5) ${Xt({size:n,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const vQ=gQ;var bQ=Object.defineProperty,_4=Object.getOwnPropertySymbols,xQ=Object.prototype.hasOwnProperty,yQ=Object.prototype.propertyIsEnumerable,I4=(e,t,n)=>t in e?bQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CQ=(e,t)=>{for(var n in t||(t={}))xQ.call(t,n)&&I4(e,n,t[n]);if(_4)for(var n of _4(t))yQ.call(t,n)&&I4(e,n,t[n]);return e};function qy({data:e,hovered:t,classNames:n,styles:r,isItemSelected:o,uuid:s,__staticSelector:i,onItemHover:c,onItemSelect:d,itemsRefs:p,itemComponent:h,size:m,nothingFound:g,creatable:b,createLabel:y,unstyled:x,variant:w}){const{classes:S}=vQ(null,{classNames:n,styles:r,unstyled:x,name:i,variant:w,size:m}),j=[],I=[];let _=null;const M=(A,R)=>{const D=typeof o=="function"?o(A.value):!1;return z.createElement(h,CQ({key:A.value,className:S.item,"data-disabled":A.disabled||void 0,"data-hovered":!A.disabled&&t===R||void 0,"data-selected":!A.disabled&&D||void 0,selected:D,onMouseEnter:()=>c(R),id:`${s}-${R}`,role:"option",tabIndex:-1,"aria-selected":t===R,ref:O=>{p&&p.current&&(p.current[A.value]=O)},onMouseDown:A.disabled?null:O=>{O.preventDefault(),d(A)},disabled:A.disabled,variant:w},A))};let E=null;if(e.forEach((A,R)=>{A.creatable?_=R:A.group?(E!==A.group&&(E=A.group,I.push(z.createElement("div",{className:S.separator,key:`__mantine-divider-${R}`},z.createElement(Hb,{classNames:{label:S.separatorLabel},label:A.group})))),I.push(M(A,R))):j.push(M(A,R))}),b){const A=e[_];j.push(z.createElement("div",{key:Uy(),className:S.item,"data-hovered":t===_||void 0,onMouseEnter:()=>c(_),onMouseDown:R=>{R.preventDefault(),d(A)},tabIndex:-1,ref:R=>{p&&p.current&&(p.current[A.value]=R)}},y))}return I.length>0&&j.length>0&&j.unshift(z.createElement("div",{className:S.separator,key:"empty-group-separator"},z.createElement(Hb,null))),I.length>0||j.length>0?z.createElement(z.Fragment,null,I,j):z.createElement(xu,{size:m,unstyled:x,className:S.nothingFound},g)}qy.displayName="@mantine/core/SelectItems";var wQ=Object.defineProperty,Cm=Object.getOwnPropertySymbols,aE=Object.prototype.hasOwnProperty,iE=Object.prototype.propertyIsEnumerable,P4=(e,t,n)=>t in e?wQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SQ=(e,t)=>{for(var n in t||(t={}))aE.call(t,n)&&P4(e,n,t[n]);if(Cm)for(var n of Cm(t))iE.call(t,n)&&P4(e,n,t[n]);return e},kQ=(e,t)=>{var n={};for(var r in e)aE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cm)for(var r of Cm(e))t.indexOf(r)<0&&iE.call(e,r)&&(n[r]=e[r]);return n};const Ky=l.forwardRef((e,t)=>{var n=e,{label:r,value:o}=n,s=kQ(n,["label","value"]);return z.createElement("div",SQ({ref:t},s),r||o)});Ky.displayName="@mantine/core/DefaultItem";function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>jQ(n,t))}function rc(...e){return l.useCallback(lE(...e),e)}const cE=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),s=o.find(IQ);if(s){const i=s.props.children,c=o.map(d=>d===s?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:d);return l.createElement(Vb,wm({},r,{ref:t}),l.isValidElement(i)?l.cloneElement(i,void 0,c):null)}return l.createElement(Vb,wm({},r,{ref:t}),n)});cE.displayName="Slot";const Vb=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...PQ(r,n.props),ref:lE(t,n.ref)}):l.Children.count(n)>1?l.Children.only(null):null});Vb.displayName="SlotClone";const _Q=({children:e})=>l.createElement(l.Fragment,null,e);function IQ(e){return l.isValidElement(e)&&e.type===_Q}function PQ(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{s(...c),o(...c)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}const EQ=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Qf=EQ.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:s,...i}=r,c=s?cE:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(c,Wb({},i,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ub=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function MQ(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Xf=e=>{const{present:t,children:n}=e,r=OQ(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=rc(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Xf.displayName="Presence";function OQ(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,d]=MQ(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const p=lh(r.current);s.current=c==="mounted"?p:"none"},[c]),Ub(()=>{const p=r.current,h=o.current;if(h!==e){const g=s.current,b=lh(p);e?d("MOUNT"):b==="none"||(p==null?void 0:p.display)==="none"?d("UNMOUNT"):d(h&&g!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Ub(()=>{if(t){const p=m=>{const b=lh(r.current).includes(m.animationName);m.target===t&&b&&ls.flushSync(()=>d("ANIMATION_END"))},h=m=>{m.target===t&&(s.current=lh(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function lh(e){return(e==null?void 0:e.animationName)||"none"}function AQ(e,t=[]){let n=[];function r(s,i){const c=l.createContext(i),d=n.length;n=[...n,i];function p(m){const{scope:g,children:b,...y}=m,x=(g==null?void 0:g[e][d])||c,w=l.useMemo(()=>y,Object.values(y));return l.createElement(x.Provider,{value:w},b)}function h(m,g){const b=(g==null?void 0:g[e][d])||c,y=l.useContext(b);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${s}\``)}return p.displayName=s+"Provider",[p,h]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(c){const d=(c==null?void 0:c[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return o.scopeName=e,[r,RQ(o,...t)]}function RQ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((c,{useScope:d,scopeName:p})=>{const m=d(s)[`__scope${p}`];return{...c,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ol(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const DQ=l.createContext(void 0);function TQ(e){const t=l.useContext(DQ);return e||t||"ltr"}function NQ(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ll(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function $Q(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const uE="ScrollArea",[dE,Abe]=AQ(uE),[LQ,Bs]=dE(uE),zQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[c,d]=l.useState(null),[p,h]=l.useState(null),[m,g]=l.useState(null),[b,y]=l.useState(null),[x,w]=l.useState(null),[S,j]=l.useState(0),[I,_]=l.useState(0),[M,E]=l.useState(!1),[A,R]=l.useState(!1),D=rc(t,T=>d(T)),O=TQ(o);return l.createElement(LQ,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:c,viewport:p,onViewportChange:h,content:m,onContentChange:g,scrollbarX:b,onScrollbarXChange:y,scrollbarXEnabled:M,onScrollbarXEnabledChange:E,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:A,onScrollbarYEnabledChange:R,onCornerWidthChange:j,onCornerHeightChange:_},l.createElement(Qf.div,Kr({dir:O},i,{ref:D,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":I+"px",...e.style}})))}),FQ="ScrollAreaViewport",BQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,s=Bs(FQ,n),i=l.useRef(null),c=rc(t,i,s.onViewportChange);return l.createElement(l.Fragment,null,l.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),l.createElement(Qf.div,Kr({"data-radix-scroll-area-viewport":""},o,{ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style}}),l.createElement("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ei="ScrollAreaScrollbar",HQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bs(Ei,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return l.useEffect(()=>(c?s(!0):i(!0),()=>{c?s(!1):i(!1)}),[c,s,i]),o.type==="hover"?l.createElement(WQ,Kr({},r,{ref:t,forceMount:n})):o.type==="scroll"?l.createElement(VQ,Kr({},r,{ref:t,forceMount:n})):o.type==="auto"?l.createElement(fE,Kr({},r,{ref:t,forceMount:n})):o.type==="always"?l.createElement(Qy,Kr({},r,{ref:t})):null}),WQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bs(Ei,e.__scopeScrollArea),[s,i]=l.useState(!1);return l.useEffect(()=>{const c=o.scrollArea;let d=0;if(c){const p=()=>{window.clearTimeout(d),i(!0)},h=()=>{d=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",p),c.addEventListener("pointerleave",h),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",p),c.removeEventListener("pointerleave",h)}}},[o.scrollArea,o.scrollHideDelay]),l.createElement(Xf,{present:n||s},l.createElement(fE,Kr({"data-state":s?"visible":"hidden"},r,{ref:t})))}),VQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bs(Ei,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Zg(()=>d("SCROLL_END"),100),[c,d]=$Q("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return l.useEffect(()=>{if(c==="idle"){const p=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[c,o.scrollHideDelay,d]),l.useEffect(()=>{const p=o.viewport,h=s?"scrollLeft":"scrollTop";if(p){let m=p[h];const g=()=>{const b=p[h];m!==b&&(d("SCROLL"),i()),m=b};return p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[o.viewport,s,d,i]),l.createElement(Xf,{present:n||c!=="hidden"},l.createElement(Qy,Kr({"data-state":c==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Ll(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ll(e.onPointerLeave,()=>d("POINTER_LEAVE"))})))}),fE=l.forwardRef((e,t)=>{const n=Bs(Ei,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=l.useState(!1),c=e.orientation==="horizontal",d=Zg(()=>{if(n.viewport){const p=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=Bs(Ei,e.__scopeScrollArea),s=l.useRef(null),i=l.useRef(0),[c,d]=l.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=gE(c.viewport,c.content),h={...r,sizes:c,onSizesChange:d,hasThumb:p>0&&p<1,onThumbChange:g=>s.current=g,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:g=>i.current=g};function m(g,b){return JQ(g,i.current,c,b)}return n==="horizontal"?l.createElement(UQ,Kr({},h,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const g=o.viewport.scrollLeft,b=E4(g,c,o.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=m(g,o.dir))}})):n==="vertical"?l.createElement(GQ,Kr({},h,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const g=o.viewport.scrollTop,b=E4(g,c);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=m(g))}})):null}),UQ=l.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Bs(Ei,e.__scopeScrollArea),[i,c]=l.useState(),d=l.useRef(null),p=rc(t,d,s.onScrollbarXChange);return l.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),l.createElement(hE,Kr({"data-orientation":"horizontal"},o,{ref:p,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Jg(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,m)=>{if(s.viewport){const g=s.viewport.scrollLeft+h.deltaX;e.onWheelScroll(g),bE(g,m)&&h.preventDefault()}},onResize:()=>{d.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Sm(i.paddingLeft),paddingEnd:Sm(i.paddingRight)}})}}))}),GQ=l.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Bs(Ei,e.__scopeScrollArea),[i,c]=l.useState(),d=l.useRef(null),p=rc(t,d,s.onScrollbarYChange);return l.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),l.createElement(hE,Kr({"data-orientation":"vertical"},o,{ref:p,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Jg(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,m)=>{if(s.viewport){const g=s.viewport.scrollTop+h.deltaY;e.onWheelScroll(g),bE(g,m)&&h.preventDefault()}},onResize:()=>{d.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Sm(i.paddingTop),paddingEnd:Sm(i.paddingBottom)}})}}))}),[qQ,pE]=dE(Ei),hE=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:h,onResize:m,...g}=e,b=Bs(Ei,n),[y,x]=l.useState(null),w=rc(t,D=>x(D)),S=l.useRef(null),j=l.useRef(""),I=b.viewport,_=r.content-r.viewport,M=Ol(h),E=Ol(d),A=Zg(m,10);function R(D){if(S.current){const O=D.clientX-S.current.left,T=D.clientY-S.current.top;p({x:O,y:T})}}return l.useEffect(()=>{const D=O=>{const T=O.target;(y==null?void 0:y.contains(T))&&M(O,_)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[I,y,_,M]),l.useEffect(E,[r,E]),yu(y,A),yu(b.content,A),l.createElement(qQ,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:Ol(s),onThumbPointerUp:Ol(i),onThumbPositionChange:E,onThumbPointerDown:Ol(c)},l.createElement(Qf.div,Kr({},g,{ref:w,style:{position:"absolute",...g.style},onPointerDown:Ll(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),S.current=y.getBoundingClientRect(),j.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(D))}),onPointerMove:Ll(e.onPointerMove,R),onPointerUp:Ll(e.onPointerUp,D=>{const O=D.target;O.hasPointerCapture(D.pointerId)&&O.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=j.current,S.current=null})})))}),Gb="ScrollAreaThumb",KQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pE(Gb,e.__scopeScrollArea);return l.createElement(Xf,{present:n||o.hasThumb},l.createElement(QQ,Kr({ref:t},r)))}),QQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=Bs(Gb,n),i=pE(Gb,n),{onThumbPositionChange:c}=i,d=rc(t,m=>i.onThumbChange(m)),p=l.useRef(),h=Zg(()=>{p.current&&(p.current(),p.current=void 0)},100);return l.useEffect(()=>{const m=s.viewport;if(m){const g=()=>{if(h(),!p.current){const b=ZQ(m,c);p.current=b,c()}};return c(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[s.viewport,h,c]),l.createElement(Qf.div,Kr({"data-state":i.hasThumb?"visible":"hidden"},o,{ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ll(e.onPointerDownCapture,m=>{const b=m.target.getBoundingClientRect(),y=m.clientX-b.left,x=m.clientY-b.top;i.onThumbPointerDown({x:y,y:x})}),onPointerUp:Ll(e.onPointerUp,i.onThumbPointerUp)}))}),mE="ScrollAreaCorner",XQ=l.forwardRef((e,t)=>{const n=Bs(mE,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.createElement(YQ,Kr({},e,{ref:t})):null}),YQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Bs(mE,n),[s,i]=l.useState(0),[c,d]=l.useState(0),p=!!(s&&c);return yu(o.scrollbarX,()=>{var h;const m=((h=o.scrollbarX)===null||h===void 0?void 0:h.offsetHeight)||0;o.onCornerHeightChange(m),d(m)}),yu(o.scrollbarY,()=>{var h;const m=((h=o.scrollbarY)===null||h===void 0?void 0:h.offsetWidth)||0;o.onCornerWidthChange(m),i(m)}),p?l.createElement(Qf.div,Kr({},r,{ref:t,style:{width:s,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Sm(e){return e?parseInt(e,10):0}function gE(e,t){const n=e/t;return isNaN(n)?0:n}function Jg(e){const t=gE(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function JQ(e,t,n,r="ltr"){const o=Jg(n),s=o/2,i=t||s,c=o-i,d=n.scrollbar.paddingStart+i,p=n.scrollbar.size-n.scrollbar.paddingEnd-c,h=n.content-n.viewport,m=r==="ltr"?[0,h]:[h*-1,0];return vE([d,p],m)(e)}function E4(e,t,n="ltr"){const r=Jg(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,c=s-r,d=n==="ltr"?[0,i]:[i*-1,0],p=NQ(e,d);return vE([0,i],[0,c])(p)}function vE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function bE(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,c=n.top!==s.top;(i||c)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Zg(e,t){const n=Ol(e),r=l.useRef(0);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),l.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function yu(e,t){const n=Ol(t);Ub(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const eX=zQ,tX=BQ,M4=HQ,O4=KQ,nX=XQ;var rX=ko((e,{scrollbarSize:t,offsetScrollbars:n,scrollbarHovered:r,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?qe(t):void 0,paddingBottom:n?qe(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${qe(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Nk("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:qe(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:qe(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Nk("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:qe(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:qe(44),minHeight:qe(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:r?1:0,display:o?"none":void 0}}));const oX=rX;var sX=Object.defineProperty,aX=Object.defineProperties,iX=Object.getOwnPropertyDescriptors,km=Object.getOwnPropertySymbols,xE=Object.prototype.hasOwnProperty,yE=Object.prototype.propertyIsEnumerable,A4=(e,t,n)=>t in e?sX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qb=(e,t)=>{for(var n in t||(t={}))xE.call(t,n)&&A4(e,n,t[n]);if(km)for(var n of km(t))yE.call(t,n)&&A4(e,n,t[n]);return e},CE=(e,t)=>aX(e,iX(t)),wE=(e,t)=>{var n={};for(var r in e)xE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&km)for(var r of km(e))t.indexOf(r)<0&&yE.call(e,r)&&(n[r]=e[r]);return n};const SE={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},e0=l.forwardRef((e,t)=>{const n=zr("ScrollArea",SE,e),{children:r,className:o,classNames:s,styles:i,scrollbarSize:c,scrollHideDelay:d,type:p,dir:h,offsetScrollbars:m,viewportRef:g,onScrollPositionChange:b,unstyled:y,variant:x,viewportProps:w}=n,S=wE(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[j,I]=l.useState(!1),_=Ii(),{classes:M,cx:E}=oX({scrollbarSize:c,offsetScrollbars:m,scrollbarHovered:j,hidden:p==="never"},{name:"ScrollArea",classNames:s,styles:i,unstyled:y,variant:x});return z.createElement(eX,{type:p==="never"?"always":p,scrollHideDelay:d,dir:h||_.dir,ref:t,asChild:!0},z.createElement(Xo,qb({className:E(M.root,o)},S),z.createElement(tX,CE(qb({},w),{className:M.viewport,ref:g,onScroll:typeof b=="function"?({currentTarget:A})=>b({x:A.scrollLeft,y:A.scrollTop}):void 0}),r),z.createElement(M4,{orientation:"horizontal",className:M.scrollbar,forceMount:!0,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1)},z.createElement(O4,{className:M.thumb})),z.createElement(M4,{orientation:"vertical",className:M.scrollbar,forceMount:!0,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1)},z.createElement(O4,{className:M.thumb})),z.createElement(nX,{className:M.corner})))}),kE=l.forwardRef((e,t)=>{const n=zr("ScrollAreaAutosize",SE,e),{children:r,classNames:o,styles:s,scrollbarSize:i,scrollHideDelay:c,type:d,dir:p,offsetScrollbars:h,viewportRef:m,onScrollPositionChange:g,unstyled:b,sx:y,variant:x,viewportProps:w}=n,S=wE(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return z.createElement(Xo,CE(qb({},S),{ref:t,sx:[{display:"flex"},...d6(y)]}),z.createElement(Xo,{sx:{display:"flex",flexDirection:"column",flex:1}},z.createElement(e0,{classNames:o,styles:s,scrollHideDelay:c,scrollbarSize:i,type:d,dir:p,offsetScrollbars:h,viewportRef:m,onScrollPositionChange:g,unstyled:b,variant:x,viewportProps:w},r)))});kE.displayName="@mantine/core/ScrollAreaAutosize";e0.displayName="@mantine/core/ScrollArea";e0.Autosize=kE;const jE=e0;var lX=Object.defineProperty,cX=Object.defineProperties,uX=Object.getOwnPropertyDescriptors,jm=Object.getOwnPropertySymbols,_E=Object.prototype.hasOwnProperty,IE=Object.prototype.propertyIsEnumerable,R4=(e,t,n)=>t in e?lX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D4=(e,t)=>{for(var n in t||(t={}))_E.call(t,n)&&R4(e,n,t[n]);if(jm)for(var n of jm(t))IE.call(t,n)&&R4(e,n,t[n]);return e},dX=(e,t)=>cX(e,uX(t)),fX=(e,t)=>{var n={};for(var r in e)_E.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jm)for(var r of jm(e))t.indexOf(r)<0&&IE.call(e,r)&&(n[r]=e[r]);return n};const t0=l.forwardRef((e,t)=>{var n=e,{style:r}=n,o=fX(n,["style"]);return z.createElement(jE,dX(D4({},o),{style:D4({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});t0.displayName="@mantine/core/SelectScrollArea";var pX=ko(()=>({dropdown:{},itemsWrapper:{padding:qe(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const hX=pX,ia=Math.min,xo=Math.max,_m=Math.round,ch=Math.floor,ol=e=>({x:e,y:e}),mX={left:"right",right:"left",bottom:"top",top:"bottom"},gX={start:"end",end:"start"};function Kb(e,t,n){return xo(e,ia(t,n))}function hi(e,t){return typeof e=="function"?e(t):e}function la(e){return e.split("-")[0]}function Fu(e){return e.split("-")[1]}function Xy(e){return e==="x"?"y":"x"}function Yy(e){return e==="y"?"height":"width"}function oc(e){return["top","bottom"].includes(la(e))?"y":"x"}function Jy(e){return Xy(oc(e))}function vX(e,t,n){n===void 0&&(n=!1);const r=Fu(e),o=Jy(e),s=Yy(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Im(i)),[i,Im(i)]}function bX(e){const t=Im(e);return[Qb(e),t,Qb(t)]}function Qb(e){return e.replace(/start|end/g,t=>gX[t])}function xX(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function yX(e,t,n,r){const o=Fu(e);let s=xX(la(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Qb)))),s}function Im(e){return e.replace(/left|right|bottom|top/g,t=>mX[t])}function CX(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zy(e){return typeof e!="number"?CX(e):{top:e,right:e,bottom:e,left:e}}function Cu(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T4(e,t,n){let{reference:r,floating:o}=e;const s=oc(t),i=Jy(t),c=Yy(i),d=la(t),p=s==="y",h=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,g=r[c]/2-o[c]/2;let b;switch(d){case"top":b={x:h,y:r.y-o.height};break;case"bottom":b={x:h,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:m};break;case"left":b={x:r.x-o.width,y:m};break;default:b={x:r.x,y:r.y}}switch(Fu(t)){case"start":b[i]-=g*(n&&p?-1:1);break;case"end":b[i]+=g*(n&&p?-1:1);break}return b}const wX=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let p=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:m}=T4(p,r,d),g=r,b={},y=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:d}=t,{element:p,padding:h=0}=hi(e,t)||{};if(p==null)return{};const m=Zy(h),g={x:n,y:r},b=Jy(o),y=Yy(b),x=await i.getDimensions(p),w=b==="y",S=w?"top":"left",j=w?"bottom":"right",I=w?"clientHeight":"clientWidth",_=s.reference[y]+s.reference[b]-g[b]-s.floating[y],M=g[b]-s.reference[b],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(p));let A=E?E[I]:0;(!A||!await(i.isElement==null?void 0:i.isElement(E)))&&(A=c.floating[I]||s.floating[y]);const R=_/2-M/2,D=A/2-x[y]/2-1,O=ia(m[S],D),T=ia(m[j],D),K=O,G=A-x[y]-T,X=A/2-x[y]/2+R,Z=Kb(K,X,G),te=!d.arrow&&Fu(o)!=null&&X!=Z&&s.reference[y]/2-(XK<=0)){var D,O;const K=(((D=s.flip)==null?void 0:D.index)||0)+1,G=M[K];if(G)return{data:{index:K,overflows:R},reset:{placement:G}};let X=(O=R.filter(Z=>Z.overflows[0]<=0).sort((Z,te)=>Z.overflows[1]-te.overflows[1])[0])==null?void 0:O.placement;if(!X)switch(b){case"bestFit":{var T;const Z=(T=R.map(te=>[te.placement,te.overflows.filter(V=>V>0).reduce((V,oe)=>V+oe,0)]).sort((te,V)=>te[1]-V[1])[0])==null?void 0:T[0];Z&&(X=Z);break}case"initialPlacement":X=c;break}if(o!==X)return{reset:{placement:X}}}return{}}}};function PE(e){const t=ia(...e.map(s=>s.left)),n=ia(...e.map(s=>s.top)),r=xo(...e.map(s=>s.right)),o=xo(...e.map(s=>s.bottom));return{x:t,y:n,width:r-t,height:o-n}}function kX(e){const t=e.slice().sort((o,s)=>o.y-s.y),n=[];let r=null;for(let o=0;or.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(o=>Cu(PE(o)))}const jX=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:s,strategy:i}=t,{padding:c=2,x:d,y:p}=hi(e,t),h=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),m=kX(h),g=Cu(PE(h)),b=Zy(c);function y(){if(m.length===2&&m[0].left>m[1].right&&d!=null&&p!=null)return m.find(w=>d>w.left-b.left&&dw.top-b.top&&p=2){if(oc(n)==="y"){const O=m[0],T=m[m.length-1],K=la(n)==="top",G=O.top,X=T.bottom,Z=K?O.left:T.left,te=K?O.right:T.right,V=te-Z,oe=X-G;return{top:G,bottom:X,left:Z,right:te,width:V,height:oe,x:Z,y:G}}const w=la(n)==="left",S=xo(...m.map(O=>O.right)),j=ia(...m.map(O=>O.left)),I=m.filter(O=>w?O.left===j:O.right===S),_=I[0].top,M=I[I.length-1].bottom,E=j,A=S,R=A-E,D=M-_;return{top:_,bottom:M,left:E,right:A,width:R,height:D,x:E,y:_}}return g}const x=await s.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:i});return o.reference.x!==x.reference.x||o.reference.y!==x.reference.y||o.reference.width!==x.reference.width||o.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}};async function _X(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=la(n),c=Fu(n),d=oc(n)==="y",p=["left","top"].includes(i)?-1:1,h=s&&d?-1:1,m=hi(t,e);let{mainAxis:g,crossAxis:b,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return c&&typeof y=="number"&&(b=c==="end"?y*-1:y),d?{x:b*h,y:g*p}:{x:g*p,y:b*h}}const IX=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await _X(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},PX=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:w=>{let{x:S,y:j}=w;return{x:S,y:j}}},...d}=hi(e,t),p={x:n,y:r},h=await e2(t,d),m=oc(la(o)),g=Xy(m);let b=p[g],y=p[m];if(s){const w=g==="y"?"top":"left",S=g==="y"?"bottom":"right",j=b+h[w],I=b-h[S];b=Kb(j,b,I)}if(i){const w=m==="y"?"top":"left",S=m==="y"?"bottom":"right",j=y+h[w],I=y-h[S];y=Kb(j,y,I)}const x=c.fn({...t,[g]:b,[m]:y});return{...x,data:{x:x.x-n,y:x.y-r}}}}},EX=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:d=!0,crossAxis:p=!0}=hi(e,t),h={x:n,y:r},m=oc(o),g=Xy(m);let b=h[g],y=h[m];const x=hi(c,t),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const I=g==="y"?"height":"width",_=s.reference[g]-s.floating[I]+w.mainAxis,M=s.reference[g]+s.reference[I]-w.mainAxis;b<_?b=_:b>M&&(b=M)}if(p){var S,j;const I=g==="y"?"width":"height",_=["top","left"].includes(la(o)),M=s.reference[m]-s.floating[I]+(_&&((S=i.offset)==null?void 0:S[m])||0)+(_?0:w.crossAxis),E=s.reference[m]+s.reference[I]+(_?0:((j=i.offset)==null?void 0:j[m])||0)-(_?w.crossAxis:0);yE&&(y=E)}return{[g]:b,[m]:y}}}},MX=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...c}=hi(e,t),d=await e2(t,c),p=la(n),h=Fu(n),m=oc(n)==="y",{width:g,height:b}=r.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(x=p,y=h==="end"?"top":"bottom");const w=b-d[y],S=g-d[x],j=!t.middlewareData.shift;let I=w,_=S;if(m){const E=g-d.left-d.right;_=h||j?ia(S,E):E}else{const E=b-d.top-d.bottom;I=h||j?ia(w,E):E}if(j&&!h){const E=xo(d.left,0),A=xo(d.right,0),R=xo(d.top,0),D=xo(d.bottom,0);m?_=g-2*(E!==0||A!==0?E+A:xo(d.left,d.right)):I=b-2*(R!==0||D!==0?R+D:xo(d.top,d.bottom))}await i({...t,availableWidth:_,availableHeight:I});const M=await o.getDimensions(s.floating);return g!==M.width||b!==M.height?{reset:{rects:!0}}:{}}}};function sl(e){return EE(e)?(e.nodeName||"").toLowerCase():"#document"}function ds(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mi(e){var t;return(t=(EE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EE(e){return e instanceof Node||e instanceof ds(e).Node}function mi(e){return e instanceof Element||e instanceof ds(e).Element}function Da(e){return e instanceof HTMLElement||e instanceof ds(e).HTMLElement}function $4(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ds(e).ShadowRoot}function Yf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ns(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function OX(e){return["table","td","th"].includes(sl(e))}function t2(e){const t=n2(),n=Ns(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function AX(e){let t=wu(e);for(;Da(t)&&!n0(t);){if(t2(t))return t;t=wu(t)}return null}function n2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function n0(e){return["html","body","#document"].includes(sl(e))}function Ns(e){return ds(e).getComputedStyle(e)}function r0(e){return mi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function wu(e){if(sl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$4(e)&&e.host||Mi(e);return $4(t)?t.host:t}function ME(e){const t=wu(e);return n0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Da(t)&&Yf(t)?t:ME(t)}function uf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ME(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ds(o);return s?t.concat(i,i.visualViewport||[],Yf(o)?o:[],i.frameElement&&n?uf(i.frameElement):[]):t.concat(o,uf(o,[],n))}function OE(e){const t=Ns(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Da(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=_m(n)!==s||_m(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function r2(e){return mi(e)?e:e.contextElement}function iu(e){const t=r2(e);if(!Da(t))return ol(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=OE(t);let i=(s?_m(n.width):n.width)/r,c=(s?_m(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const RX=ol(0);function AE(e){const t=ds(e);return!n2()||!t.visualViewport?RX:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function DX(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ds(e)?!1:t}function Ql(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=r2(e);let i=ol(1);t&&(r?mi(r)&&(i=iu(r)):i=iu(e));const c=DX(s,n,r)?AE(s):ol(0);let d=(o.left+c.x)/i.x,p=(o.top+c.y)/i.y,h=o.width/i.x,m=o.height/i.y;if(s){const g=ds(s),b=r&&mi(r)?ds(r):r;let y=g.frameElement;for(;y&&r&&b!==g;){const x=iu(y),w=y.getBoundingClientRect(),S=Ns(y),j=w.left+(y.clientLeft+parseFloat(S.paddingLeft))*x.x,I=w.top+(y.clientTop+parseFloat(S.paddingTop))*x.y;d*=x.x,p*=x.y,h*=x.x,m*=x.y,d+=j,p+=I,y=ds(y).frameElement}}return Cu({width:h,height:m,x:d,y:p})}function TX(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Da(n),s=Mi(n);if(n===s)return t;let i={scrollLeft:0,scrollTop:0},c=ol(1);const d=ol(0);if((o||!o&&r!=="fixed")&&((sl(n)!=="body"||Yf(s))&&(i=r0(n)),Da(n))){const p=Ql(n);c=iu(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-i.scrollLeft*c.x+d.x,y:t.y*c.y-i.scrollTop*c.y+d.y}}function NX(e){return Array.from(e.getClientRects())}function RE(e){return Ql(Mi(e)).left+r0(e).scrollLeft}function $X(e){const t=Mi(e),n=r0(e),r=e.ownerDocument.body,o=xo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=xo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+RE(e);const c=-n.scrollTop;return Ns(r).direction==="rtl"&&(i+=xo(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}function LX(e,t){const n=ds(e),r=Mi(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,d=0;if(o){s=o.width,i=o.height;const p=n2();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}return{width:s,height:i,x:c,y:d}}function zX(e,t){const n=Ql(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Da(e)?iu(e):ol(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,d=o*s.x,p=r*s.y;return{width:i,height:c,x:d,y:p}}function L4(e,t,n){let r;if(t==="viewport")r=LX(e,n);else if(t==="document")r=$X(Mi(e));else if(mi(t))r=zX(t,n);else{const o=AE(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Cu(r)}function DE(e,t){const n=wu(e);return n===t||!mi(n)||n0(n)?!1:Ns(n).position==="fixed"||DE(n,t)}function FX(e,t){const n=t.get(e);if(n)return n;let r=uf(e,[],!1).filter(c=>mi(c)&&sl(c)!=="body"),o=null;const s=Ns(e).position==="fixed";let i=s?wu(e):e;for(;mi(i)&&!n0(i);){const c=Ns(i),d=t2(i);!d&&c.position==="fixed"&&(o=null),(s?!d&&!o:!d&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Yf(i)&&!d&&DE(e,i))?r=r.filter(h=>h!==i):o=c,i=wu(i)}return t.set(e,r),r}function BX(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?FX(t,this._c):[].concat(n),r],c=i[0],d=i.reduce((p,h)=>{const m=L4(t,h,o);return p.top=xo(m.top,p.top),p.right=ia(m.right,p.right),p.bottom=ia(m.bottom,p.bottom),p.left=xo(m.left,p.left),p},L4(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function HX(e){return OE(e)}function WX(e,t,n){const r=Da(t),o=Mi(t),s=n==="fixed",i=Ql(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=ol(0);if(r||!r&&!s)if((sl(t)!=="body"||Yf(o))&&(c=r0(t)),r){const p=Ql(t,!0,s,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else o&&(d.x=RE(o));return{x:i.left+c.scrollLeft-d.x,y:i.top+c.scrollTop-d.y,width:i.width,height:i.height}}function z4(e,t){return!Da(e)||Ns(e).position==="fixed"?null:t?t(e):e.offsetParent}function TE(e,t){const n=ds(e);if(!Da(e))return n;let r=z4(e,t);for(;r&&OX(r)&&Ns(r).position==="static";)r=z4(r,t);return r&&(sl(r)==="html"||sl(r)==="body"&&Ns(r).position==="static"&&!t2(r))?n:r||AX(e)||n}const VX=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||TE,s=this.getDimensions;return{reference:WX(t,await o(n),r),floating:{x:0,y:0,...await s(n)}}};function UX(e){return Ns(e).direction==="rtl"}const GX={convertOffsetParentRelativeRectToViewportRelativeRect:TX,getDocumentElement:Mi,getClippingRect:BX,getOffsetParent:TE,getElementRects:VX,getClientRects:NX,getDimensions:HX,getScale:iu,isElement:mi,isRTL:UX};function qX(e,t){let n=null,r;const o=Mi(e);function s(){clearTimeout(r),n&&n.disconnect(),n=null}function i(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const{left:p,top:h,width:m,height:g}=e.getBoundingClientRect();if(c||t(),!m||!g)return;const b=ch(h),y=ch(o.clientWidth-(p+m)),x=ch(o.clientHeight-(h+g)),w=ch(p),j={rootMargin:-b+"px "+-y+"px "+-x+"px "+-w+"px",threshold:xo(0,ia(1,d))||1};let I=!0;function _(M){const E=M[0].intersectionRatio;if(E!==d){if(!I)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},100)}I=!1}try{n=new IntersectionObserver(_,{...j,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,j)}n.observe(e)}return i(!0),s}function KX(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,p=r2(e),h=o||s?[...p?uf(p):[],...uf(t)]:[];h.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const m=p&&c?qX(p,n):null;let g=-1,b=null;i&&(b=new ResizeObserver(S=>{let[j]=S;j&&j.target===p&&b&&(b.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{b&&b.observe(t)})),n()}),p&&!d&&b.observe(p),b.observe(t));let y,x=d?Ql(e):null;d&&w();function w(){const S=Ql(e);x&&(S.x!==x.x||S.y!==x.y||S.width!==x.width||S.height!==x.height)&&n(),x=S,y=requestAnimationFrame(w)}return n(),()=>{h.forEach(S=>{o&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),m&&m(),b&&b.disconnect(),b=null,d&&cancelAnimationFrame(y)}}const QX=(e,t,n)=>{const r=new Map,o={platform:GX,...n},s={...o.platform,_c:r};return wX(e,t,{...o,platform:s})},XX=e=>{const{element:t,padding:n}=e;function r(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return r(t)?t.current!=null?N4({element:t.current,padding:n}).fn(o):{}:t?N4({element:t,padding:n}).fn(o):{}}}};var Nh=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Pm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Pm(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Pm(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function F4(e){const t=l.useRef(e);return Nh(()=>{t.current=e}),t}function YX(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:s,open:i}=e,[c,d]=l.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);Pm(p,r)||h(r);const m=l.useRef(null),g=l.useRef(null),b=l.useRef(c),y=F4(s),x=F4(o),[w,S]=l.useState(null),[j,I]=l.useState(null),_=l.useCallback(O=>{m.current!==O&&(m.current=O,S(O))},[]),M=l.useCallback(O=>{g.current!==O&&(g.current=O,I(O))},[]),E=l.useCallback(()=>{if(!m.current||!g.current)return;const O={placement:t,strategy:n,middleware:p};x.current&&(O.platform=x.current),QX(m.current,g.current,O).then(T=>{const K={...T,isPositioned:!0};A.current&&!Pm(b.current,K)&&(b.current=K,ls.flushSync(()=>{d(K)}))})},[p,t,n,x]);Nh(()=>{i===!1&&b.current.isPositioned&&(b.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[i]);const A=l.useRef(!1);Nh(()=>(A.current=!0,()=>{A.current=!1}),[]),Nh(()=>{if(w&&j){if(y.current)return y.current(w,j,E);E()}},[w,j,E,y]);const R=l.useMemo(()=>({reference:m,floating:g,setReference:_,setFloating:M}),[_,M]),D=l.useMemo(()=>({reference:w,floating:j}),[w,j]);return l.useMemo(()=>({...c,update:E,refs:R,elements:D,reference:_,floating:M}),[c,E,R,D,_,M])}var JX=typeof document<"u"?l.useLayoutEffect:l.useEffect;function ZX(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const eY=l.createContext(null),tY=()=>l.useContext(eY);function nY(e){return(e==null?void 0:e.ownerDocument)||document}function rY(e){return nY(e).defaultView||window}function uh(e){return e?e instanceof rY(e).Element:!1}const oY=Ox["useInsertionEffect".toString()],sY=oY||(e=>e());function aY(e){const t=l.useRef(()=>{});return sY(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;oZX())[0],[p,h]=l.useState(null),m=l.useCallback(S=>{const j=uh(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;o.refs.setReference(j)},[o.refs]),g=l.useCallback(S=>{(uh(S)||S===null)&&(i.current=S,h(S)),(uh(o.refs.reference.current)||o.refs.reference.current===null||S!==null&&!uh(S))&&o.refs.setReference(S)},[o.refs]),b=l.useMemo(()=>({...o.refs,setReference:g,setPositionReference:m,domReference:i}),[o.refs,g,m]),y=l.useMemo(()=>({...o.elements,domReference:p}),[o.elements,p]),x=aY(n),w=l.useMemo(()=>({...o,refs:b,elements:y,dataRef:c,nodeId:r,events:d,open:t,onOpenChange:x}),[o,r,d,t,x,b,y]);return JX(()=>{const S=s==null?void 0:s.nodesRef.current.find(j=>j.id===r);S&&(S.context=w)}),l.useMemo(()=>({...o,context:w,refs:b,reference:g,positionReference:m}),[o,b,w,g,m])}function lY({opened:e,floating:t,position:n,positionDependencies:r}){const[o,s]=l.useState(0);l.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return KX(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),oa(()=>{t.update()},r),oa(()=>{s(i=>i+1)},[e])}function cY(e){const t=[IX(e.offset)];return e.middlewares.shift&&t.push(PX({limiter:EX()})),e.middlewares.flip&&t.push(SX()),e.middlewares.inline&&t.push(jX()),t.push(XX({element:e.arrowRef,padding:e.arrowOffset})),t}function uY(e){const[t,n]=cf({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=()=>{var i;(i=e.onClose)==null||i.call(e),n(!1)},o=()=>{var i,c;t?((i=e.onClose)==null||i.call(e),n(!1)):((c=e.onOpen)==null||c.call(e),n(!0))},s=iY({placement:e.position,middleware:[...cY(e),...e.width==="target"?[MX({apply({rects:i}){var c,d;Object.assign((d=(c=s.refs.floating.current)==null?void 0:c.style)!=null?d:{},{width:`${i.reference.width}px`})}})]:[]]});return lY({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:s}),oa(()=>{var i;(i=e.onPositionChange)==null||i.call(e,s.placement)},[s.placement]),oa(()=>{var i,c;e.opened?(c=e.onOpen)==null||c.call(e):(i=e.onClose)==null||i.call(e)},[e.opened]),{floating:s,controlled:typeof e.opened=="boolean",opened:t,onClose:r,onToggle:o}}const NE={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[dY,$E]=DG(NE.context);var fY=Object.defineProperty,pY=Object.defineProperties,hY=Object.getOwnPropertyDescriptors,Em=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,zE=Object.prototype.propertyIsEnumerable,B4=(e,t,n)=>t in e?fY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dh=(e,t)=>{for(var n in t||(t={}))LE.call(t,n)&&B4(e,n,t[n]);if(Em)for(var n of Em(t))zE.call(t,n)&&B4(e,n,t[n]);return e},mY=(e,t)=>pY(e,hY(t)),gY=(e,t)=>{var n={};for(var r in e)LE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Em)for(var r of Em(e))t.indexOf(r)<0&&zE.call(e,r)&&(n[r]=e[r]);return n};const vY={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},FE=l.forwardRef((e,t)=>{const n=zr("PopoverTarget",vY,e),{children:r,refProp:o,popupType:s,shouldOverrideDefaultTargetId:i}=n,c=gY(n,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!p6(r))throw new Error(NE.children);const d=c,p=$E(),h=Kf(p.reference,r.ref,t),m=p.withRoles?{"aria-haspopup":s,"aria-expanded":p.opened,"aria-controls":p.getDropdownId(),id:i?p.getTargetId():r.props.id}:{};return l.cloneElement(r,dh(mY(dh(dh(dh({},d),m),p.targetProps),{className:m6(p.targetProps.className,d.className,r.props.className),[o]:h}),p.controlled?null:{onClick:p.onToggle}))});FE.displayName="@mantine/core/PopoverTarget";var bY=ko((e,{radius:t,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${qe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[n]||n||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${qe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const xY=bY;var yY=Object.defineProperty,H4=Object.getOwnPropertySymbols,CY=Object.prototype.hasOwnProperty,wY=Object.prototype.propertyIsEnumerable,W4=(e,t,n)=>t in e?yY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oc=(e,t)=>{for(var n in t||(t={}))CY.call(t,n)&&W4(e,n,t[n]);if(H4)for(var n of H4(t))wY.call(t,n)&&W4(e,n,t[n]);return e};const V4={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function SY({transition:e,state:t,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in rh?Oc(Oc(Oc({transitionProperty:rh[e].transitionProperty},o),rh[e].common),rh[e][V4[t]]):null:Oc(Oc(Oc({transitionProperty:e.transitionProperty},o),e.common),e[V4[t]])}function kY({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:s,onEntered:i,onExited:c}){const d=Ii(),p=w6(),h=d.respectReducedMotion?p:!1,[m,g]=l.useState(h?0:e),[b,y]=l.useState(r?"entered":"exited"),x=l.useRef(-1),w=S=>{const j=S?o:s,I=S?i:c;y(S?"pre-entering":"pre-exiting"),window.clearTimeout(x.current);const _=h?0:S?e:t;if(g(_),_===0)typeof j=="function"&&j(),typeof I=="function"&&I(),y(S?"entered":"exited");else{const M=window.setTimeout(()=>{typeof j=="function"&&j(),y(S?"entering":"exiting")},10);x.current=window.setTimeout(()=>{window.clearTimeout(M),typeof I=="function"&&I(),y(S?"entered":"exited")},_)}};return oa(()=>{w(r)},[r]),l.useEffect(()=>()=>window.clearTimeout(x.current),[]),{transitionDuration:m,transitionStatus:b,transitionTimingFunction:n||d.transitionTimingFunction}}function BE({keepMounted:e,transition:t,duration:n=250,exitDuration:r=n,mounted:o,children:s,timingFunction:i,onExit:c,onEntered:d,onEnter:p,onExited:h}){const{transitionDuration:m,transitionStatus:g,transitionTimingFunction:b}=kY({mounted:o,exitDuration:r,duration:n,timingFunction:i,onExit:c,onEntered:d,onEnter:p,onExited:h});return m===0?o?z.createElement(z.Fragment,null,s({})):e?s({display:"none"}):null:g==="exited"?e?s({display:"none"}):null:z.createElement(z.Fragment,null,s(SY({transition:t,duration:m,state:g,timingFunction:b})))}BE.displayName="@mantine/core/Transition";function HE({children:e,active:t=!0,refProp:n="ref"}){const r=hq(t),o=Kf(r,e==null?void 0:e.ref);return p6(e)?l.cloneElement(e,{[n]:o}):e}HE.displayName="@mantine/core/FocusTrap";var jY=Object.defineProperty,_Y=Object.defineProperties,IY=Object.getOwnPropertyDescriptors,U4=Object.getOwnPropertySymbols,PY=Object.prototype.hasOwnProperty,EY=Object.prototype.propertyIsEnumerable,G4=(e,t,n)=>t in e?jY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bi=(e,t)=>{for(var n in t||(t={}))PY.call(t,n)&&G4(e,n,t[n]);if(U4)for(var n of U4(t))EY.call(t,n)&&G4(e,n,t[n]);return e},fh=(e,t)=>_Y(e,IY(t));function q4(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function K4(e,t,n,r,o){return e==="center"||r==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:n}:e==="start"?{[o==="ltr"?"left":"right"]:n}:{}}const MY={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function OY({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:s,arrowY:i,dir:c}){const[d,p="center"]=e.split("-"),h={width:qe(t),height:qe(t),transform:"rotate(45deg)",position:"absolute",[MY[d]]:qe(r)},m=qe(-t/2);return d==="left"?fh(Bi(Bi({},h),q4(p,i,n,o)),{right:m,borderLeftColor:"transparent",borderBottomColor:"transparent"}):d==="right"?fh(Bi(Bi({},h),q4(p,i,n,o)),{left:m,borderRightColor:"transparent",borderTopColor:"transparent"}):d==="top"?fh(Bi(Bi({},h),K4(p,s,n,o,c)),{bottom:m,borderTopColor:"transparent",borderLeftColor:"transparent"}):d==="bottom"?fh(Bi(Bi({},h),K4(p,s,n,o,c)),{top:m,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var AY=Object.defineProperty,RY=Object.defineProperties,DY=Object.getOwnPropertyDescriptors,Mm=Object.getOwnPropertySymbols,WE=Object.prototype.hasOwnProperty,VE=Object.prototype.propertyIsEnumerable,Q4=(e,t,n)=>t in e?AY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TY=(e,t)=>{for(var n in t||(t={}))WE.call(t,n)&&Q4(e,n,t[n]);if(Mm)for(var n of Mm(t))VE.call(t,n)&&Q4(e,n,t[n]);return e},NY=(e,t)=>RY(e,DY(t)),$Y=(e,t)=>{var n={};for(var r in e)WE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mm)for(var r of Mm(e))t.indexOf(r)<0&&VE.call(e,r)&&(n[r]=e[r]);return n};const UE=l.forwardRef((e,t)=>{var n=e,{position:r,arrowSize:o,arrowOffset:s,arrowRadius:i,arrowPosition:c,visible:d,arrowX:p,arrowY:h}=n,m=$Y(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const g=Ii();return d?z.createElement("div",NY(TY({},m),{ref:t,style:OY({position:r,arrowSize:o,arrowOffset:s,arrowRadius:i,arrowPosition:c,dir:g.dir,arrowX:p,arrowY:h})})):null});UE.displayName="@mantine/core/FloatingArrow";var LY=Object.defineProperty,zY=Object.defineProperties,FY=Object.getOwnPropertyDescriptors,Om=Object.getOwnPropertySymbols,GE=Object.prototype.hasOwnProperty,qE=Object.prototype.propertyIsEnumerable,X4=(e,t,n)=>t in e?LY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ac=(e,t)=>{for(var n in t||(t={}))GE.call(t,n)&&X4(e,n,t[n]);if(Om)for(var n of Om(t))qE.call(t,n)&&X4(e,n,t[n]);return e},ph=(e,t)=>zY(e,FY(t)),BY=(e,t)=>{var n={};for(var r in e)GE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Om)for(var r of Om(e))t.indexOf(r)<0&&qE.call(e,r)&&(n[r]=e[r]);return n};const HY={};function KE(e){var t;const n=zr("PopoverDropdown",HY,e),{style:r,className:o,children:s,onKeyDownCapture:i}=n,c=BY(n,["style","className","children","onKeyDownCapture"]),d=$E(),{classes:p,cx:h}=xY({radius:d.radius,shadow:d.shadow},{name:d.__staticSelector,classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),m=iq({opened:d.opened,shouldReturnFocus:d.returnFocus}),g=d.withRoles?{"aria-labelledby":d.getTargetId(),id:d.getDropdownId(),role:"dialog"}:{};return d.disabled?null:z.createElement(q6,ph(Ac({},d.portalProps),{withinPortal:d.withinPortal}),z.createElement(BE,ph(Ac({mounted:d.opened},d.transitionProps),{transition:d.transitionProps.transition||"fade",duration:(t=d.transitionProps.duration)!=null?t:150,keepMounted:d.keepMounted,exitDuration:typeof d.transitionProps.exitDuration=="number"?d.transitionProps.exitDuration:d.transitionProps.duration}),b=>{var y,x;return z.createElement(HE,{active:d.trapFocus},z.createElement(Xo,Ac(ph(Ac({},g),{tabIndex:-1,ref:d.floating,style:ph(Ac(Ac({},r),b),{zIndex:d.zIndex,top:(y=d.y)!=null?y:0,left:(x=d.x)!=null?x:0,width:d.width==="target"?void 0:qe(d.width)}),className:h(p.dropdown,o),onKeyDownCapture:NG(d.onClose,{active:d.closeOnEscape,onTrigger:m,onKeyDown:i}),"data-position":d.placement}),c),s,z.createElement(UE,{ref:d.arrowRef,arrowX:d.arrowX,arrowY:d.arrowY,visible:d.withArrow,position:d.placement,arrowSize:d.arrowSize,arrowRadius:d.arrowRadius,arrowOffset:d.arrowOffset,arrowPosition:d.arrowPosition,className:p.arrow})))}))}KE.displayName="@mantine/core/PopoverDropdown";function WY(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[n,r]=t.split("-"),o=n==="right"?"left":"right";return r===void 0?o:`${o}-${r}`}return t}var Y4=Object.getOwnPropertySymbols,VY=Object.prototype.hasOwnProperty,UY=Object.prototype.propertyIsEnumerable,GY=(e,t)=>{var n={};for(var r in e)VY.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Y4)for(var r of Y4(e))t.indexOf(r)<0&&UY.call(e,r)&&(n[r]=e[r]);return n};const qY={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Vy("popover"),__staticSelector:"Popover",width:"max-content"};function Bu(e){var t,n,r,o,s,i;const c=l.useRef(null),d=zr("Popover",qY,e),{children:p,position:h,offset:m,onPositionChange:g,positionDependencies:b,opened:y,transitionProps:x,width:w,middlewares:S,withArrow:j,arrowSize:I,arrowOffset:_,arrowRadius:M,arrowPosition:E,unstyled:A,classNames:R,styles:D,closeOnClickOutside:O,withinPortal:T,portalProps:K,closeOnEscape:G,clickOutsideEvents:X,trapFocus:Z,onClose:te,onOpen:V,onChange:oe,zIndex:ne,radius:se,shadow:re,id:ae,defaultOpened:B,__staticSelector:Y,withRoles:$,disabled:F,returnFocus:q,variant:pe,keepMounted:W}=d,U=GY(d,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[ee,J]=l.useState(null),[ge,he]=l.useState(null),de=Gy(ae),_e=Ii(),Pe=uY({middlewares:S,width:w,position:WY(_e.dir,h),offset:typeof m=="number"?m+(j?I/2:0):m,arrowRef:c,arrowOffset:_,onPositionChange:g,positionDependencies:b,opened:y,defaultOpened:B,onChange:oe,onOpen:V,onClose:te});rq(()=>Pe.opened&&O&&Pe.onClose(),X,[ee,ge]);const ze=l.useCallback(Je=>{J(Je),Pe.floating.reference(Je)},[Pe.floating.reference]),ht=l.useCallback(Je=>{he(Je),Pe.floating.floating(Je)},[Pe.floating.floating]);return z.createElement(dY,{value:{returnFocus:q,disabled:F,controlled:Pe.controlled,reference:ze,floating:ht,x:Pe.floating.x,y:Pe.floating.y,arrowX:(r=(n=(t=Pe.floating)==null?void 0:t.middlewareData)==null?void 0:n.arrow)==null?void 0:r.x,arrowY:(i=(s=(o=Pe.floating)==null?void 0:o.middlewareData)==null?void 0:s.arrow)==null?void 0:i.y,opened:Pe.opened,arrowRef:c,transitionProps:x,width:w,withArrow:j,arrowSize:I,arrowOffset:_,arrowRadius:M,arrowPosition:E,placement:Pe.floating.placement,trapFocus:Z,withinPortal:T,portalProps:K,zIndex:ne,radius:se,shadow:re,closeOnEscape:G,onClose:Pe.onClose,onToggle:Pe.onToggle,getTargetId:()=>`${de}-target`,getDropdownId:()=>`${de}-dropdown`,withRoles:$,targetProps:U,__staticSelector:Y,classNames:R,styles:D,unstyled:A,variant:pe,keepMounted:W}},p)}Bu.Target=FE;Bu.Dropdown=KE;Bu.displayName="@mantine/core/Popover";var KY=Object.defineProperty,Am=Object.getOwnPropertySymbols,QE=Object.prototype.hasOwnProperty,XE=Object.prototype.propertyIsEnumerable,J4=(e,t,n)=>t in e?KY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QY=(e,t)=>{for(var n in t||(t={}))QE.call(t,n)&&J4(e,n,t[n]);if(Am)for(var n of Am(t))XE.call(t,n)&&J4(e,n,t[n]);return e},XY=(e,t)=>{var n={};for(var r in e)QE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Am)for(var r of Am(e))t.indexOf(r)<0&&XE.call(e,r)&&(n[r]=e[r]);return n};function YY(e){var t=e,{children:n,component:r="div",maxHeight:o=220,direction:s="column",id:i,innerRef:c,__staticSelector:d,styles:p,classNames:h,unstyled:m}=t,g=XY(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:b}=hX(null,{name:d,styles:p,classNames:h,unstyled:m});return z.createElement(Bu.Dropdown,QY({p:0,onMouseDown:y=>y.preventDefault()},g),z.createElement("div",{style:{maxHeight:qe(o),display:"flex"}},z.createElement(Xo,{component:r||"div",id:`${i}-items`,"aria-labelledby":`${i}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:r!==t0?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:c},z.createElement("div",{className:b.itemsWrapper,style:{flexDirection:s}},n))))}function Yi({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:n,withinPortal:r,portalProps:o,children:s,__staticSelector:i,onDirectionChange:c,switchDirectionOnFlip:d,zIndex:p,dropdownPosition:h,positionDependencies:m=[],classNames:g,styles:b,unstyled:y,readOnly:x,variant:w}){return z.createElement(Bu,{unstyled:y,classNames:g,styles:b,width:"target",withRoles:!1,opened:e,middlewares:{flip:h==="flip",shift:!1},position:h==="flip"?"bottom":h,positionDependencies:m,zIndex:p,__staticSelector:i,withinPortal:r,portalProps:o,transitionProps:t,shadow:n,disabled:x,onPositionChange:S=>d&&(c==null?void 0:c(S==="top"?"column-reverse":"column")),variant:w},s)}Yi.Target=Bu.Target;Yi.Dropdown=YY;var JY=Object.defineProperty,ZY=Object.defineProperties,eJ=Object.getOwnPropertyDescriptors,Rm=Object.getOwnPropertySymbols,YE=Object.prototype.hasOwnProperty,JE=Object.prototype.propertyIsEnumerable,Z4=(e,t,n)=>t in e?JY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hh=(e,t)=>{for(var n in t||(t={}))YE.call(t,n)&&Z4(e,n,t[n]);if(Rm)for(var n of Rm(t))JE.call(t,n)&&Z4(e,n,t[n]);return e},tJ=(e,t)=>ZY(e,eJ(t)),nJ=(e,t)=>{var n={};for(var r in e)YE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rm)for(var r of Rm(e))t.indexOf(r)<0&&JE.call(e,r)&&(n[r]=e[r]);return n};function ZE(e,t,n){const r=zr(e,t,n),{label:o,description:s,error:i,required:c,classNames:d,styles:p,className:h,unstyled:m,__staticSelector:g,sx:b,errorProps:y,labelProps:x,descriptionProps:w,wrapperProps:S,id:j,size:I,style:_,inputContainer:M,inputWrapperOrder:E,withAsterisk:A,variant:R}=r,D=nJ(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),O=Gy(j),{systemStyles:T,rest:K}=Yg(D),G=hh({label:o,description:s,error:i,required:c,classNames:d,className:h,__staticSelector:g,sx:b,errorProps:y,labelProps:x,descriptionProps:w,unstyled:m,styles:p,id:O,size:I,style:_,inputContainer:M,inputWrapperOrder:E,withAsterisk:A,variant:R},S);return tJ(hh({},K),{classNames:d,styles:p,unstyled:m,wrapperProps:hh(hh({},G),T),inputProps:{required:c,classNames:d,styles:p,unstyled:m,id:O,size:I,__staticSelector:g,error:i,variant:R}})}var rJ=ko((e,t,{size:n})=>({label:{display:"inline-block",fontSize:Xt({size:n,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const oJ=rJ;var sJ=Object.defineProperty,Dm=Object.getOwnPropertySymbols,eM=Object.prototype.hasOwnProperty,tM=Object.prototype.propertyIsEnumerable,ej=(e,t,n)=>t in e?sJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aJ=(e,t)=>{for(var n in t||(t={}))eM.call(t,n)&&ej(e,n,t[n]);if(Dm)for(var n of Dm(t))tM.call(t,n)&&ej(e,n,t[n]);return e},iJ=(e,t)=>{var n={};for(var r in e)eM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dm)for(var r of Dm(e))t.indexOf(r)<0&&tM.call(e,r)&&(n[r]=e[r]);return n};const lJ={labelElement:"label",size:"sm"},o2=l.forwardRef((e,t)=>{const n=zr("InputLabel",lJ,e),{labelElement:r,children:o,required:s,size:i,classNames:c,styles:d,unstyled:p,className:h,htmlFor:m,__staticSelector:g,variant:b,onMouseDown:y}=n,x=iJ(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:w,cx:S}=oJ(null,{name:["InputWrapper",g],classNames:c,styles:d,unstyled:p,variant:b,size:i});return z.createElement(Xo,aJ({component:r,ref:t,className:S(w.label,h),htmlFor:r==="label"?m:void 0,onMouseDown:j=>{y==null||y(j),!j.defaultPrevented&&j.detail>1&&j.preventDefault()}},x),o,s&&z.createElement("span",{className:w.required,"aria-hidden":!0}," *"))});o2.displayName="@mantine/core/InputLabel";var cJ=ko((e,t,{size:n})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Xt({size:n,sizes:e.fontSizes})} - ${qe(2)})`,lineHeight:1.2,display:"block"}}));const uJ=cJ;var dJ=Object.defineProperty,Tm=Object.getOwnPropertySymbols,nM=Object.prototype.hasOwnProperty,rM=Object.prototype.propertyIsEnumerable,tj=(e,t,n)=>t in e?dJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fJ=(e,t)=>{for(var n in t||(t={}))nM.call(t,n)&&tj(e,n,t[n]);if(Tm)for(var n of Tm(t))rM.call(t,n)&&tj(e,n,t[n]);return e},pJ=(e,t)=>{var n={};for(var r in e)nM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tm)for(var r of Tm(e))t.indexOf(r)<0&&rM.call(e,r)&&(n[r]=e[r]);return n};const hJ={size:"sm"},s2=l.forwardRef((e,t)=>{const n=zr("InputError",hJ,e),{children:r,className:o,classNames:s,styles:i,unstyled:c,size:d,__staticSelector:p,variant:h}=n,m=pJ(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:b}=uJ(null,{name:["InputWrapper",p],classNames:s,styles:i,unstyled:c,variant:h,size:d});return z.createElement(xu,fJ({className:b(g.error,o),ref:t},m),r)});s2.displayName="@mantine/core/InputError";var mJ=ko((e,t,{size:n})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${Xt({size:n,sizes:e.fontSizes})} - ${qe(2)})`,lineHeight:1.2,display:"block"}}));const gJ=mJ;var vJ=Object.defineProperty,Nm=Object.getOwnPropertySymbols,oM=Object.prototype.hasOwnProperty,sM=Object.prototype.propertyIsEnumerable,nj=(e,t,n)=>t in e?vJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bJ=(e,t)=>{for(var n in t||(t={}))oM.call(t,n)&&nj(e,n,t[n]);if(Nm)for(var n of Nm(t))sM.call(t,n)&&nj(e,n,t[n]);return e},xJ=(e,t)=>{var n={};for(var r in e)oM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Nm)for(var r of Nm(e))t.indexOf(r)<0&&sM.call(e,r)&&(n[r]=e[r]);return n};const yJ={size:"sm"},a2=l.forwardRef((e,t)=>{const n=zr("InputDescription",yJ,e),{children:r,className:o,classNames:s,styles:i,unstyled:c,size:d,__staticSelector:p,variant:h}=n,m=xJ(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:b}=gJ(null,{name:["InputWrapper",p],classNames:s,styles:i,unstyled:c,variant:h,size:d});return z.createElement(xu,bJ({color:"dimmed",className:b(g.description,o),ref:t,unstyled:c},m),r)});a2.displayName="@mantine/core/InputDescription";const aM=l.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),CJ=aM.Provider,wJ=()=>l.useContext(aM);function SJ(e,{hasDescription:t,hasError:n}){const r=e.findIndex(d=>d==="input"),o=e[r-1],s=e[r+1];return{offsetBottom:t&&s==="description"||n&&s==="error",offsetTop:t&&o==="description"||n&&o==="error"}}var kJ=Object.defineProperty,jJ=Object.defineProperties,_J=Object.getOwnPropertyDescriptors,rj=Object.getOwnPropertySymbols,IJ=Object.prototype.hasOwnProperty,PJ=Object.prototype.propertyIsEnumerable,oj=(e,t,n)=>t in e?kJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EJ=(e,t)=>{for(var n in t||(t={}))IJ.call(t,n)&&oj(e,n,t[n]);if(rj)for(var n of rj(t))PJ.call(t,n)&&oj(e,n,t[n]);return e},MJ=(e,t)=>jJ(e,_J(t)),OJ=ko(e=>({root:MJ(EJ({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const AJ=OJ;var RJ=Object.defineProperty,DJ=Object.defineProperties,TJ=Object.getOwnPropertyDescriptors,$m=Object.getOwnPropertySymbols,iM=Object.prototype.hasOwnProperty,lM=Object.prototype.propertyIsEnumerable,sj=(e,t,n)=>t in e?RJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hi=(e,t)=>{for(var n in t||(t={}))iM.call(t,n)&&sj(e,n,t[n]);if($m)for(var n of $m(t))lM.call(t,n)&&sj(e,n,t[n]);return e},aj=(e,t)=>DJ(e,TJ(t)),NJ=(e,t)=>{var n={};for(var r in e)iM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$m)for(var r of $m(e))t.indexOf(r)<0&&lM.call(e,r)&&(n[r]=e[r]);return n};const $J={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},cM=l.forwardRef((e,t)=>{const n=zr("InputWrapper",$J,e),{className:r,label:o,children:s,required:i,id:c,error:d,description:p,labelElement:h,labelProps:m,descriptionProps:g,errorProps:b,classNames:y,styles:x,size:w,inputContainer:S,__staticSelector:j,unstyled:I,inputWrapperOrder:_,withAsterisk:M,variant:E}=n,A=NJ(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:D}=AJ(null,{classNames:y,styles:x,name:["InputWrapper",j],unstyled:I,variant:E,size:w}),O={classNames:y,styles:x,unstyled:I,size:w,variant:E,__staticSelector:j},T=typeof M=="boolean"?M:i,K=c?`${c}-error`:b==null?void 0:b.id,G=c?`${c}-description`:g==null?void 0:g.id,Z=`${!!d&&typeof d!="boolean"?K:""} ${p?G:""}`,te=Z.trim().length>0?Z.trim():void 0,V=o&&z.createElement(o2,Hi(Hi({key:"label",labelElement:h,id:c?`${c}-label`:void 0,htmlFor:c,required:T},O),m),o),oe=p&&z.createElement(a2,aj(Hi(Hi({key:"description"},g),O),{size:(g==null?void 0:g.size)||O.size,id:(g==null?void 0:g.id)||G}),p),ne=z.createElement(l.Fragment,{key:"input"},S(s)),se=typeof d!="boolean"&&d&&z.createElement(s2,aj(Hi(Hi({},b),O),{size:(b==null?void 0:b.size)||O.size,key:"error",id:(b==null?void 0:b.id)||K}),d),re=_.map(ae=>{switch(ae){case"label":return V;case"input":return ne;case"description":return oe;case"error":return se;default:return null}});return z.createElement(CJ,{value:Hi({describedBy:te},SJ(_,{hasDescription:!!oe,hasError:!!se}))},z.createElement(Xo,Hi({className:D(R.root,r),ref:t},A),re))});cM.displayName="@mantine/core/InputWrapper";var LJ=Object.defineProperty,Lm=Object.getOwnPropertySymbols,uM=Object.prototype.hasOwnProperty,dM=Object.prototype.propertyIsEnumerable,ij=(e,t,n)=>t in e?LJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zJ=(e,t)=>{for(var n in t||(t={}))uM.call(t,n)&&ij(e,n,t[n]);if(Lm)for(var n of Lm(t))dM.call(t,n)&&ij(e,n,t[n]);return e},FJ=(e,t)=>{var n={};for(var r in e)uM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Lm)for(var r of Lm(e))t.indexOf(r)<0&&dM.call(e,r)&&(n[r]=e[r]);return n};const BJ={},fM=l.forwardRef((e,t)=>{const n=zr("InputPlaceholder",BJ,e),{sx:r}=n,o=FJ(n,["sx"]);return z.createElement(Xo,zJ({component:"span",sx:[s=>s.fn.placeholderStyles(),...d6(r)],ref:t},o))});fM.displayName="@mantine/core/InputPlaceholder";var HJ=Object.defineProperty,WJ=Object.defineProperties,VJ=Object.getOwnPropertyDescriptors,lj=Object.getOwnPropertySymbols,UJ=Object.prototype.hasOwnProperty,GJ=Object.prototype.propertyIsEnumerable,cj=(e,t,n)=>t in e?HJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mh=(e,t)=>{for(var n in t||(t={}))UJ.call(t,n)&&cj(e,n,t[n]);if(lj)for(var n of lj(t))GJ.call(t,n)&&cj(e,n,t[n]);return e},b1=(e,t)=>WJ(e,VJ(t));const ks={xs:qe(30),sm:qe(36),md:qe(42),lg:qe(50),xl:qe(60)},qJ=["default","filled","unstyled"];function KJ({theme:e,variant:t}){return qJ.includes(t)?t==="default"?{border:`${qe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${qe(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:qe(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var QJ=ko((e,{multiline:t,radius:n,invalid:r,rightSectionWidth:o,withRightSection:s,iconWidth:i,offsetBottom:c,offsetTop:d,pointer:p},{variant:h,size:m})=>{const g=e.fn.variant({variant:"filled",color:"red"}).background,b=h==="default"||h==="filled"?{minHeight:Xt({size:m,sizes:ks}),paddingLeft:`calc(${Xt({size:m,sizes:ks})} / 3)`,paddingRight:s?o||Xt({size:m,sizes:ks}):`calc(${Xt({size:m,sizes:ks})} / 3)`,borderRadius:e.fn.radius(n)}:h==="unstyled"&&s?{paddingRight:o||Xt({size:m,sizes:ks})}:null;return{wrapper:{position:"relative",marginTop:d?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:c?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:b1(mh(mh(b1(mh({},e.fn.fontStyles()),{height:t?h==="unstyled"?void 0:"auto":Xt({size:m,sizes:ks}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${Xt({size:m,sizes:ks})} - ${qe(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Xt({size:m,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:p?"pointer":void 0}),KJ({theme:e,variant:h})),b),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:g,borderColor:g,"&::placeholder":{opacity:1,color:g}},"&[data-with-icon]":{paddingLeft:typeof i=="number"?qe(i):Xt({size:m,sizes:ks})},"&::placeholder":b1(mh({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:i?qe(i):Xt({size:m,sizes:ks}),color:r?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||Xt({size:m,sizes:ks})}}});const XJ=QJ;var YJ=Object.defineProperty,JJ=Object.defineProperties,ZJ=Object.getOwnPropertyDescriptors,zm=Object.getOwnPropertySymbols,pM=Object.prototype.hasOwnProperty,hM=Object.prototype.propertyIsEnumerable,uj=(e,t,n)=>t in e?YJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gh=(e,t)=>{for(var n in t||(t={}))pM.call(t,n)&&uj(e,n,t[n]);if(zm)for(var n of zm(t))hM.call(t,n)&&uj(e,n,t[n]);return e},dj=(e,t)=>JJ(e,ZJ(t)),eZ=(e,t)=>{var n={};for(var r in e)pM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zm)for(var r of zm(e))t.indexOf(r)<0&&hM.call(e,r)&&(n[r]=e[r]);return n};const tZ={size:"sm",variant:"default"},sc=l.forwardRef((e,t)=>{const n=zr("Input",tZ,e),{className:r,error:o,required:s,disabled:i,variant:c,icon:d,style:p,rightSectionWidth:h,iconWidth:m,rightSection:g,rightSectionProps:b,radius:y,size:x,wrapperProps:w,classNames:S,styles:j,__staticSelector:I,multiline:_,sx:M,unstyled:E,pointer:A}=n,R=eZ(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:D,offsetTop:O,describedBy:T}=wJ(),{classes:K,cx:G}=XJ({radius:y,multiline:_,invalid:!!o,rightSectionWidth:h?qe(h):void 0,iconWidth:m,withRightSection:!!g,offsetBottom:D,offsetTop:O,pointer:A},{classNames:S,styles:j,name:["Input",I],unstyled:E,variant:c,size:x}),{systemStyles:X,rest:Z}=Yg(R);return z.createElement(Xo,gh(gh({className:G(K.wrapper,r),sx:M,style:p},X),w),d&&z.createElement("div",{className:K.icon},d),z.createElement(Xo,dj(gh({component:"input"},Z),{ref:t,required:s,"aria-invalid":!!o,"aria-describedby":T,disabled:i,"data-disabled":i||void 0,"data-with-icon":!!d||void 0,"data-invalid":!!o||void 0,className:K.input})),g&&z.createElement("div",dj(gh({},b),{className:K.rightSection}),g))});sc.displayName="@mantine/core/Input";sc.Wrapper=cM;sc.Label=o2;sc.Description=a2;sc.Error=s2;sc.Placeholder=fM;const Su=sc;var nZ=Object.defineProperty,Fm=Object.getOwnPropertySymbols,mM=Object.prototype.hasOwnProperty,gM=Object.prototype.propertyIsEnumerable,fj=(e,t,n)=>t in e?nZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pj=(e,t)=>{for(var n in t||(t={}))mM.call(t,n)&&fj(e,n,t[n]);if(Fm)for(var n of Fm(t))gM.call(t,n)&&fj(e,n,t[n]);return e},rZ=(e,t)=>{var n={};for(var r in e)mM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fm)for(var r of Fm(e))t.indexOf(r)<0&&gM.call(e,r)&&(n[r]=e[r]);return n};const oZ={multiple:!1},vM=l.forwardRef((e,t)=>{const n=zr("FileButton",oZ,e),{onChange:r,children:o,multiple:s,accept:i,name:c,form:d,resetRef:p,disabled:h,capture:m,inputProps:g}=n,b=rZ(n,["onChange","children","multiple","accept","name","form","resetRef","disabled","capture","inputProps"]),y=l.useRef(),x=()=>{!h&&y.current.click()},w=j=>{r(s?Array.from(j.currentTarget.files):j.currentTarget.files[0]||null)};return C6(p,()=>{y.current.value=""}),z.createElement(z.Fragment,null,o(pj({onClick:x},b)),z.createElement("input",pj({style:{display:"none"},type:"file",accept:i,multiple:s,onChange:w,ref:Kf(t,y),name:c,form:d,capture:m},g)))});vM.displayName="@mantine/core/FileButton";const bM={xs:qe(16),sm:qe(22),md:qe(26),lg:qe(30),xl:qe(36)},sZ={xs:qe(10),sm:qe(12),md:qe(14),lg:qe(16),xl:qe(18)};var aZ=ko((e,{disabled:t,radius:n,readOnly:r},{size:o,variant:s})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:t?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:s==="filled"?e.white:e.colors.gray[1],color:t?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:Xt({size:o,sizes:bM}),paddingLeft:`calc(${Xt({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||r?Xt({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:Xt({size:o,sizes:sZ}),borderRadius:Xt({size:n,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${qe(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${Xt({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const iZ=aZ;var lZ=Object.defineProperty,Bm=Object.getOwnPropertySymbols,xM=Object.prototype.hasOwnProperty,yM=Object.prototype.propertyIsEnumerable,hj=(e,t,n)=>t in e?lZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cZ=(e,t)=>{for(var n in t||(t={}))xM.call(t,n)&&hj(e,n,t[n]);if(Bm)for(var n of Bm(t))yM.call(t,n)&&hj(e,n,t[n]);return e},uZ=(e,t)=>{var n={};for(var r in e)xM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bm)for(var r of Bm(e))t.indexOf(r)<0&&yM.call(e,r)&&(n[r]=e[r]);return n};const dZ={xs:16,sm:22,md:24,lg:26,xl:30};function CM(e){var t=e,{label:n,classNames:r,styles:o,className:s,onRemove:i,disabled:c,readOnly:d,size:p,radius:h="sm",variant:m,unstyled:g}=t,b=uZ(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:x}=iZ({disabled:c,readOnly:d,radius:h},{name:"MultiSelect",classNames:r,styles:o,unstyled:g,size:p,variant:m});return z.createElement("div",cZ({className:x(y.defaultValue,s)},b),z.createElement("span",{className:y.defaultValueLabel},n),!c&&!d&&z.createElement(eE,{"aria-hidden":!0,onMouseDown:i,size:dZ[p],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:g}))}CM.displayName="@mantine/core/MultiSelect/DefaultValue";function fZ({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:s,disableSelectedItemFiltering:i}){if(!t&&s.length===0)return e;if(!t){const d=[];for(let p=0;ph===e[p].value&&!e[p].disabled))&&d.push(e[p]);return d}const c=[];for(let d=0;dp===e[d].value&&!e[d].disabled),e[d])&&c.push(e[d]),!(c.length>=n));d+=1);return c}var pZ=Object.defineProperty,Hm=Object.getOwnPropertySymbols,wM=Object.prototype.hasOwnProperty,SM=Object.prototype.propertyIsEnumerable,mj=(e,t,n)=>t in e?pZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gj=(e,t)=>{for(var n in t||(t={}))wM.call(t,n)&&mj(e,n,t[n]);if(Hm)for(var n of Hm(t))SM.call(t,n)&&mj(e,n,t[n]);return e},hZ=(e,t)=>{var n={};for(var r in e)wM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hm)for(var r of Hm(e))t.indexOf(r)<0&&SM.call(e,r)&&(n[r]=e[r]);return n};const mZ={xs:qe(14),sm:qe(18),md:qe(20),lg:qe(24),xl:qe(28)};function gZ(e){var t=e,{size:n,error:r,style:o}=t,s=hZ(t,["size","error","style"]);const i=Ii(),c=Xt({size:n,sizes:mZ});return z.createElement("svg",gj({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:gj({color:r?i.colors.red[6]:i.colors.gray[6],width:c,height:c},o),"data-chevron":!0},s),z.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var vZ=Object.defineProperty,bZ=Object.defineProperties,xZ=Object.getOwnPropertyDescriptors,vj=Object.getOwnPropertySymbols,yZ=Object.prototype.hasOwnProperty,CZ=Object.prototype.propertyIsEnumerable,bj=(e,t,n)=>t in e?vZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wZ=(e,t)=>{for(var n in t||(t={}))yZ.call(t,n)&&bj(e,n,t[n]);if(vj)for(var n of vj(t))CZ.call(t,n)&&bj(e,n,t[n]);return e},SZ=(e,t)=>bZ(e,xZ(t));function kM({shouldClear:e,clearButtonProps:t,onClear:n,size:r,error:o}){return e?z.createElement(eE,SZ(wZ({},t),{variant:"transparent",onClick:n,size:r,onMouseDown:s=>s.preventDefault()})):z.createElement(gZ,{error:o,size:r})}kM.displayName="@mantine/core/SelectRightSection";var kZ=Object.defineProperty,jZ=Object.defineProperties,_Z=Object.getOwnPropertyDescriptors,Wm=Object.getOwnPropertySymbols,jM=Object.prototype.hasOwnProperty,_M=Object.prototype.propertyIsEnumerable,xj=(e,t,n)=>t in e?kZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x1=(e,t)=>{for(var n in t||(t={}))jM.call(t,n)&&xj(e,n,t[n]);if(Wm)for(var n of Wm(t))_M.call(t,n)&&xj(e,n,t[n]);return e},yj=(e,t)=>jZ(e,_Z(t)),IZ=(e,t)=>{var n={};for(var r in e)jM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wm)for(var r of Wm(e))t.indexOf(r)<0&&_M.call(e,r)&&(n[r]=e[r]);return n};function IM(e){var t=e,{styles:n,rightSection:r,rightSectionWidth:o,theme:s}=t,i=IZ(t,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:o,styles:n};const c=typeof n=="function"?n(s):n;return{rightSection:!i.readOnly&&!(i.disabled&&i.shouldClear)&&z.createElement(kM,x1({},i)),styles:yj(x1({},c),{rightSection:yj(x1({},c==null?void 0:c.rightSection),{pointerEvents:i.shouldClear?void 0:"none"})})}}var PZ=Object.defineProperty,EZ=Object.defineProperties,MZ=Object.getOwnPropertyDescriptors,Cj=Object.getOwnPropertySymbols,OZ=Object.prototype.hasOwnProperty,AZ=Object.prototype.propertyIsEnumerable,wj=(e,t,n)=>t in e?PZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RZ=(e,t)=>{for(var n in t||(t={}))OZ.call(t,n)&&wj(e,n,t[n]);if(Cj)for(var n of Cj(t))AZ.call(t,n)&&wj(e,n,t[n]);return e},DZ=(e,t)=>EZ(e,MZ(t)),TZ=ko((e,{invalid:t},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${Xt({size:n,sizes:ks})} - ${qe(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:Xt({size:n,sizes:ks})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${qe(2)}) calc(${e.spacing.xs} / 2)`},searchInput:DZ(RZ({},e.fn.fontStyles()),{flex:1,minWidth:qe(60),backgroundColor:"transparent",border:0,outline:0,fontSize:Xt({size:n,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:Xt({size:n,sizes:bM}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const NZ=TZ;var $Z=Object.defineProperty,LZ=Object.defineProperties,zZ=Object.getOwnPropertyDescriptors,Vm=Object.getOwnPropertySymbols,PM=Object.prototype.hasOwnProperty,EM=Object.prototype.propertyIsEnumerable,Sj=(e,t,n)=>t in e?$Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rc=(e,t)=>{for(var n in t||(t={}))PM.call(t,n)&&Sj(e,n,t[n]);if(Vm)for(var n of Vm(t))EM.call(t,n)&&Sj(e,n,t[n]);return e},kj=(e,t)=>LZ(e,zZ(t)),FZ=(e,t)=>{var n={};for(var r in e)PM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vm)for(var r of Vm(e))t.indexOf(r)<0&&EM.call(e,r)&&(n[r]=e[r]);return n};function BZ(e,t,n){return t?!1:n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function HZ(e,t){return!!e&&!t.some(n=>n.value.toLowerCase()===e.toLowerCase())}function jj(e,t){if(!Array.isArray(e))return;if(t.length===0)return[];const n=t.map(r=>typeof r=="object"?r.value:r);return e.filter(r=>n.includes(r))}const WZ={size:"sm",valueComponent:CM,itemComponent:Ky,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:BZ,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:HZ,switchDirectionOnFlip:!1,zIndex:Vy("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},MM=l.forwardRef((e,t)=>{const n=zr("MultiSelect",WZ,e),{className:r,style:o,required:s,label:i,description:c,size:d,error:p,classNames:h,styles:m,wrapperProps:g,value:b,defaultValue:y,data:x,onChange:w,valueComponent:S,itemComponent:j,id:I,transitionProps:_,maxDropdownHeight:M,shadow:E,nothingFound:A,onFocus:R,onBlur:D,searchable:O,placeholder:T,filter:K,limit:G,clearSearchOnChange:X,clearable:Z,clearSearchOnBlur:te,variant:V,onSearchChange:oe,searchValue:ne,disabled:se,initiallyOpened:re,radius:ae,icon:B,rightSection:Y,rightSectionWidth:$,creatable:F,getCreateLabel:q,shouldCreate:pe,onCreate:W,sx:U,dropdownComponent:ee,onDropdownClose:J,onDropdownOpen:ge,maxSelectedValues:he,withinPortal:de,portalProps:_e,switchDirectionOnFlip:Pe,zIndex:ze,selectOnBlur:ht,name:Je,dropdownPosition:qt,errorProps:Pt,labelProps:jt,descriptionProps:Se,form:Fe,positionDependencies:it,onKeyDown:At,unstyled:ke,inputContainer:lt,inputWrapperOrder:Rt,readOnly:zt,withAsterisk:Re,clearButtonProps:Qe,hoverOnSearchChange:En,disableSelectedItemFiltering:Te}=n,ct=FZ(n,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:ft,cx:tt,theme:en}=NZ({invalid:!!p},{name:"MultiSelect",classNames:h,styles:m,unstyled:ke,size:d,variant:V}),{systemStyles:ar,rest:vn}=Yg(ct),dn=l.useRef(),Tr=l.useRef({}),ir=Gy(I),[$n,Jn]=l.useState(re),[Mn,Fr]=l.useState(-1),[co,Nr]=l.useState("column"),[$r,Lo]=cf({value:ne,defaultValue:"",finalValue:void 0,onChange:oe}),[Br,ts]=l.useState(!1),{scrollIntoView:gs,targetRef:Ga,scrollableRef:fa}=S6({duration:0,offset:5,cancelable:!1,isList:!0}),ie=F&&typeof q=="function";let ue=null;const xe=x.map(Ve=>typeof Ve=="string"?{label:Ve,value:Ve}:Ve),Me=f6({data:xe}),[ye,pt]=cf({value:jj(b,x),defaultValue:jj(y,x),finalValue:[],onChange:w}),at=l.useRef(!!he&&he{if(!zt){const Ct=ye.filter(Ft=>Ft!==Ve);pt(Ct),he&&Ct.length{Lo(Ve.currentTarget.value),!se&&!at.current&&O&&Jn(!0)},wt=Ve=>{typeof R=="function"&&R(Ve),!se&&!at.current&&O&&Jn(!0)},Ge=fZ({data:Me,searchable:O,searchValue:$r,limit:G,filter:K,value:ye,disableSelectedItemFiltering:Te});ie&&pe($r,Me)&&(ue=q($r),Ge.push({label:$r,value:$r,creatable:!0}));const Ee=Math.min(Mn,Ge.length-1),et=(Ve,Ct,Ft)=>{let Qt=Ve;for(;Ft(Qt);)if(Qt=Ct(Qt),!Ge[Qt].disabled)return Qt;return Ve};oa(()=>{Fr(En&&$r?0:-1)},[$r,En]),oa(()=>{!se&&ye.length>x.length&&Jn(!1),he&&ye.length=he&&(at.current=!0,Jn(!1))},[ye]);const Et=Ve=>{if(!zt)if(X&&Lo(""),ye.includes(Ve.value))Kt(Ve.value);else{if(Ve.creatable&&typeof W=="function"){const Ct=W(Ve.value);typeof Ct<"u"&&Ct!==null&&pt(typeof Ct=="string"?[...ye,Ct]:[...ye,Ct.value])}else pt([...ye,Ve.value]);ye.length===he-1&&(at.current=!0,Jn(!1)),Ge.length===1&&Jn(!1)}},$t=Ve=>{typeof D=="function"&&D(Ve),ht&&Ge[Ee]&&$n&&Et(Ge[Ee]),te&&Lo(""),Jn(!1)},Ut=Ve=>{if(Br||(At==null||At(Ve),zt)||Ve.key!=="Backspace"&&he&&at.current)return;const Ct=co==="column",Ft=()=>{Fr(Ln=>{var Jt;const yn=et(Ln,hn=>hn+1,hn=>hn{Fr(Ln=>{var Jt;const yn=et(Ln,hn=>hn-1,hn=>hn>0);return $n&&(Ga.current=Tr.current[(Jt=Ge[yn])==null?void 0:Jt.value],gs({alignment:Ct?"start":"end"})),yn})};switch(Ve.key){case"ArrowUp":{Ve.preventDefault(),Jn(!0),Ct?Qt():Ft();break}case"ArrowDown":{Ve.preventDefault(),Jn(!0),Ct?Ft():Qt();break}case"Enter":{Ve.preventDefault(),Ge[Ee]&&$n?Et(Ge[Ee]):Jn(!0);break}case" ":{O||(Ve.preventDefault(),Ge[Ee]&&$n?Et(Ge[Ee]):Jn(!0));break}case"Backspace":{ye.length>0&&$r.length===0&&(pt(ye.slice(0,-1)),Jn(!0),he&&(at.current=!1));break}case"Home":{if(!O){Ve.preventDefault(),$n||Jn(!0);const Ln=Ge.findIndex(Jt=>!Jt.disabled);Fr(Ln),gs({alignment:Ct?"end":"start"})}break}case"End":{if(!O){Ve.preventDefault(),$n||Jn(!0);const Ln=Ge.map(Jt=>!!Jt.disabled).lastIndexOf(!1);Fr(Ln),gs({alignment:Ct?"end":"start"})}break}case"Escape":Jn(!1)}},tn=ye.map(Ve=>{let Ct=Me.find(Ft=>Ft.value===Ve&&!Ft.disabled);return!Ct&&ie&&(Ct={value:Ve,label:Ve}),Ct}).filter(Ve=>!!Ve).map((Ve,Ct)=>z.createElement(S,kj(Rc({},Ve),{variant:V,disabled:se,className:ft.value,readOnly:zt,onRemove:Ft=>{Ft.preventDefault(),Ft.stopPropagation(),Kt(Ve.value)},key:Ve.value,size:d,styles:m,classNames:h,radius:ae,index:Ct}))),ln=Ve=>ye.includes(Ve),an=()=>{var Ve;Lo(""),pt([]),(Ve=dn.current)==null||Ve.focus(),he&&(at.current=!1)},Yt=!zt&&(Ge.length>0?$n:$n&&!!A);return oa(()=>{const Ve=Yt?ge:J;typeof Ve=="function"&&Ve()},[Yt]),z.createElement(Su.Wrapper,Rc(Rc({required:s,id:ir,label:i,error:p,description:c,size:d,className:r,style:o,classNames:h,styles:m,__staticSelector:"MultiSelect",sx:U,errorProps:Pt,descriptionProps:Se,labelProps:jt,inputContainer:lt,inputWrapperOrder:Rt,unstyled:ke,withAsterisk:Re,variant:V},ar),g),z.createElement(Yi,{opened:Yt,transitionProps:_,shadow:"sm",withinPortal:de,portalProps:_e,__staticSelector:"MultiSelect",onDirectionChange:Nr,switchDirectionOnFlip:Pe,zIndex:ze,dropdownPosition:qt,positionDependencies:[...it,$r],classNames:h,styles:m,unstyled:ke,variant:V},z.createElement(Yi.Target,null,z.createElement("div",{className:ft.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":$n&&Yt?`${ir}-items`:null,"aria-controls":ir,"aria-expanded":$n,onMouseLeave:()=>Fr(-1),tabIndex:-1},z.createElement("input",{type:"hidden",name:Je,value:ye.join(","),form:Fe,disabled:se}),z.createElement(Su,Rc({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:d,variant:V,disabled:se,error:p,required:s,radius:ae,icon:B,unstyled:ke,onMouseDown:Ve=>{var Ct;Ve.preventDefault(),!se&&!at.current&&Jn(!$n),(Ct=dn.current)==null||Ct.focus()},classNames:kj(Rc({},h),{input:tt({[ft.input]:!O},h==null?void 0:h.input)})},IM({theme:en,rightSection:Y,rightSectionWidth:$,styles:m,size:d,shouldClear:Z&&ye.length>0,onClear:an,error:p,disabled:se,clearButtonProps:Qe,readOnly:zt})),z.createElement("div",{className:ft.values,"data-clearable":Z||void 0},tn,z.createElement("input",Rc({ref:Kf(t,dn),type:"search",id:ir,className:tt(ft.searchInput,{[ft.searchInputPointer]:!O,[ft.searchInputInputHidden]:!$n&&ye.length>0||!O&&ye.length>0,[ft.searchInputEmpty]:ye.length===0}),onKeyDown:Ut,value:$r,onChange:gt,onFocus:wt,onBlur:$t,readOnly:!O||at.current||zt,placeholder:ye.length===0?T:void 0,disabled:se,"data-mantine-stop-propagation":$n,autoComplete:"off",onCompositionStart:()=>ts(!0),onCompositionEnd:()=>ts(!1)},vn)))))),z.createElement(Yi.Dropdown,{component:ee||t0,maxHeight:M,direction:co,id:ir,innerRef:fa,__staticSelector:"MultiSelect",classNames:h,styles:m},z.createElement(qy,{data:Ge,hovered:Ee,classNames:h,styles:m,uuid:ir,__staticSelector:"MultiSelect",onItemHover:Fr,onItemSelect:Et,itemsRefs:Tr,itemComponent:j,size:d,nothingFound:A,isItemSelected:ln,creatable:F&&!!ue,createLabel:ue,unstyled:ke,variant:V}))))});MM.displayName="@mantine/core/MultiSelect";var VZ=Object.defineProperty,UZ=Object.defineProperties,GZ=Object.getOwnPropertyDescriptors,Um=Object.getOwnPropertySymbols,OM=Object.prototype.hasOwnProperty,AM=Object.prototype.propertyIsEnumerable,_j=(e,t,n)=>t in e?VZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y1=(e,t)=>{for(var n in t||(t={}))OM.call(t,n)&&_j(e,n,t[n]);if(Um)for(var n of Um(t))AM.call(t,n)&&_j(e,n,t[n]);return e},qZ=(e,t)=>UZ(e,GZ(t)),KZ=(e,t)=>{var n={};for(var r in e)OM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Um)for(var r of Um(e))t.indexOf(r)<0&&AM.call(e,r)&&(n[r]=e[r]);return n};const QZ={type:"text",size:"sm",__staticSelector:"TextInput"},RM=l.forwardRef((e,t)=>{const n=ZE("TextInput",QZ,e),{inputProps:r,wrapperProps:o}=n,s=KZ(n,["inputProps","wrapperProps"]);return z.createElement(Su.Wrapper,y1({},o),z.createElement(Su,qZ(y1(y1({},r),s),{ref:t})))});RM.displayName="@mantine/core/TextInput";function XZ({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:s,filterDataOnExactSearchMatch:i}){if(!t)return e;const c=s!=null&&e.find(p=>p.value===s)||null;if(c&&!i&&(c==null?void 0:c.label)===r){if(n){if(n>=e.length)return e;const p=e.indexOf(c),h=p+n,m=h-e.length;return m>0?e.slice(p-m):e.slice(p,h)}return e}const d=[];for(let p=0;p=n));p+=1);return d}var YZ=ko(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const JZ=YZ;var ZZ=Object.defineProperty,eee=Object.defineProperties,tee=Object.getOwnPropertyDescriptors,Gm=Object.getOwnPropertySymbols,DM=Object.prototype.hasOwnProperty,TM=Object.prototype.propertyIsEnumerable,Ij=(e,t,n)=>t in e?ZZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wd=(e,t)=>{for(var n in t||(t={}))DM.call(t,n)&&Ij(e,n,t[n]);if(Gm)for(var n of Gm(t))TM.call(t,n)&&Ij(e,n,t[n]);return e},C1=(e,t)=>eee(e,tee(t)),nee=(e,t)=>{var n={};for(var r in e)DM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gm)for(var r of Gm(e))t.indexOf(r)<0&&TM.call(e,r)&&(n[r]=e[r]);return n};function ree(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function oee(e,t){return!!e&&!t.some(n=>n.label.toLowerCase()===e.toLowerCase())}const see={required:!1,size:"sm",shadow:"sm",itemComponent:Ky,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:ree,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:oee,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Vy("popover"),positionDependencies:[],dropdownPosition:"flip"},i2=l.forwardRef((e,t)=>{const n=ZE("Select",see,e),{inputProps:r,wrapperProps:o,shadow:s,data:i,value:c,defaultValue:d,onChange:p,itemComponent:h,onKeyDown:m,onBlur:g,onFocus:b,transitionProps:y,initiallyOpened:x,unstyled:w,classNames:S,styles:j,filter:I,maxDropdownHeight:_,searchable:M,clearable:E,nothingFound:A,limit:R,disabled:D,onSearchChange:O,searchValue:T,rightSection:K,rightSectionWidth:G,creatable:X,getCreateLabel:Z,shouldCreate:te,selectOnBlur:V,onCreate:oe,dropdownComponent:ne,onDropdownClose:se,onDropdownOpen:re,withinPortal:ae,portalProps:B,switchDirectionOnFlip:Y,zIndex:$,name:F,dropdownPosition:q,allowDeselect:pe,placeholder:W,filterDataOnExactSearchMatch:U,form:ee,positionDependencies:J,readOnly:ge,clearButtonProps:he,hoverOnSearchChange:de}=n,_e=nee(n,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:Pe,cx:ze,theme:ht}=JZ(),[Je,qt]=l.useState(x),[Pt,jt]=l.useState(-1),Se=l.useRef(),Fe=l.useRef({}),[it,At]=l.useState("column"),ke=it==="column",{scrollIntoView:lt,targetRef:Rt,scrollableRef:zt}=S6({duration:0,offset:5,cancelable:!1,isList:!0}),Re=pe===void 0?E:pe,Qe=ue=>{if(Je!==ue){qt(ue);const xe=ue?re:se;typeof xe=="function"&&xe()}},En=X&&typeof Z=="function";let Te=null;const ct=i.map(ue=>typeof ue=="string"?{label:ue,value:ue}:ue),ft=f6({data:ct}),[tt,en,ar]=cf({value:c,defaultValue:d,finalValue:null,onChange:p}),vn=ft.find(ue=>ue.value===tt),[dn,Tr]=cf({value:T,defaultValue:(vn==null?void 0:vn.label)||"",finalValue:void 0,onChange:O}),ir=ue=>{Tr(ue),M&&typeof O=="function"&&O(ue)},$n=()=>{var ue;ge||(en(null),ar||ir(""),(ue=Se.current)==null||ue.focus())};l.useEffect(()=>{const ue=ft.find(xe=>xe.value===tt);ue?ir(ue.label):(!En||!tt)&&ir("")},[tt]),l.useEffect(()=>{vn&&(!M||!Je)&&ir(vn.label)},[vn==null?void 0:vn.label]);const Jn=ue=>{if(!ge)if(Re&&(vn==null?void 0:vn.value)===ue.value)en(null),Qe(!1);else{if(ue.creatable&&typeof oe=="function"){const xe=oe(ue.value);typeof xe<"u"&&xe!==null&&en(typeof xe=="string"?xe:xe.value)}else en(ue.value);ar||ir(ue.label),jt(-1),Qe(!1),Se.current.focus()}},Mn=XZ({data:ft,searchable:M,limit:R,searchValue:dn,filter:I,filterDataOnExactSearchMatch:U,value:tt});En&&te(dn,Mn)&&(Te=Z(dn),Mn.push({label:dn,value:dn,creatable:!0}));const Fr=(ue,xe,Me)=>{let ye=ue;for(;Me(ye);)if(ye=xe(ye),!Mn[ye].disabled)return ye;return ue};oa(()=>{jt(de&&dn?0:-1)},[dn,de]);const co=tt?Mn.findIndex(ue=>ue.value===tt):0,Nr=!ge&&(Mn.length>0?Je:Je&&!!A),$r=()=>{jt(ue=>{var xe;const Me=Fr(ue,ye=>ye-1,ye=>ye>0);return Rt.current=Fe.current[(xe=Mn[Me])==null?void 0:xe.value],Nr&<({alignment:ke?"start":"end"}),Me})},Lo=()=>{jt(ue=>{var xe;const Me=Fr(ue,ye=>ye+1,ye=>yewindow.setTimeout(()=>{var ue;Rt.current=Fe.current[(ue=Mn[co])==null?void 0:ue.value],lt({alignment:ke?"end":"start"})},50);oa(()=>{Nr&&Br()},[Nr]);const ts=ue=>{switch(typeof m=="function"&&m(ue),ue.key){case"ArrowUp":{ue.preventDefault(),Je?ke?$r():Lo():(jt(co),Qe(!0),Br());break}case"ArrowDown":{ue.preventDefault(),Je?ke?Lo():$r():(jt(co),Qe(!0),Br());break}case"Home":{if(!M){ue.preventDefault(),Je||Qe(!0);const xe=Mn.findIndex(Me=>!Me.disabled);jt(xe),Nr&<({alignment:ke?"end":"start"})}break}case"End":{if(!M){ue.preventDefault(),Je||Qe(!0);const xe=Mn.map(Me=>!!Me.disabled).lastIndexOf(!1);jt(xe),Nr&<({alignment:ke?"end":"start"})}break}case"Escape":{ue.preventDefault(),Qe(!1),jt(-1);break}case" ":{M||(ue.preventDefault(),Mn[Pt]&&Je?Jn(Mn[Pt]):(Qe(!0),jt(co),Br()));break}case"Enter":M||ue.preventDefault(),Mn[Pt]&&Je&&(ue.preventDefault(),Jn(Mn[Pt]))}},gs=ue=>{typeof g=="function"&&g(ue);const xe=ft.find(Me=>Me.value===tt);V&&Mn[Pt]&&Je&&Jn(Mn[Pt]),ir((xe==null?void 0:xe.label)||""),Qe(!1)},Ga=ue=>{typeof b=="function"&&b(ue),M&&Qe(!0)},fa=ue=>{ge||(ir(ue.currentTarget.value),E&&ue.currentTarget.value===""&&en(null),jt(-1),Qe(!0))},ie=()=>{ge||(Qe(!Je),tt&&!Je&&jt(co))};return z.createElement(Su.Wrapper,C1(wd({},o),{__staticSelector:"Select"}),z.createElement(Yi,{opened:Nr,transitionProps:y,shadow:s,withinPortal:ae,portalProps:B,__staticSelector:"Select",onDirectionChange:At,switchDirectionOnFlip:Y,zIndex:$,dropdownPosition:q,positionDependencies:[...J,dn],classNames:S,styles:j,unstyled:w,variant:r.variant},z.createElement(Yi.Target,null,z.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":Nr?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":Nr,onMouseLeave:()=>jt(-1),tabIndex:-1},z.createElement("input",{type:"hidden",name:F,value:tt||"",form:ee,disabled:D}),z.createElement(Su,wd(C1(wd(wd({autoComplete:"off",type:"search"},r),_e),{ref:Kf(t,Se),onKeyDown:ts,__staticSelector:"Select",value:dn,placeholder:W,onChange:fa,"aria-autocomplete":"list","aria-controls":Nr?`${r.id}-items`:null,"aria-activedescendant":Pt>=0?`${r.id}-${Pt}`:null,onMouseDown:ie,onBlur:gs,onFocus:Ga,readOnly:!M||ge,disabled:D,"data-mantine-stop-propagation":Nr,name:null,classNames:C1(wd({},S),{input:ze({[Pe.input]:!M},S==null?void 0:S.input)})}),IM({theme:ht,rightSection:K,rightSectionWidth:G,styles:j,size:r.size,shouldClear:E&&!!vn,onClear:$n,error:o.error,clearButtonProps:he,disabled:D,readOnly:ge}))))),z.createElement(Yi.Dropdown,{component:ne||t0,maxHeight:_,direction:it,id:r.id,innerRef:zt,__staticSelector:"Select",classNames:S,styles:j},z.createElement(qy,{data:Mn,hovered:Pt,classNames:S,styles:j,isItemSelected:ue=>ue===tt,uuid:r.id,__staticSelector:"Select",onItemHover:jt,onItemSelect:Jn,itemsRefs:Fe,itemComponent:h,size:r.size,nothingFound:A,creatable:En&&!!Te,createLabel:Te,"aria-label":o.label,unstyled:w,variant:r.variant}))))});i2.displayName="@mantine/core/Select";const Jf=()=>{const[e,t,n,r,o,s,i,c,d,p,h,m,g,b,y,x,w,S,j,I,_,M,E,A,R,D,O,T,K,G,X,Z,te,V,oe,ne,se,re,ae,B,Y,$,F,q,pe,W,U,ee,J,ge,he,de,_e,Pe,ze,ht,Je,qt,Pt,jt,Se,Fe,it,At,ke,lt,Rt,zt,Re,Qe,En,Te,ct,ft,tt,en]=ea("colors",["base.50","base.100","base.150","base.200","base.250","base.300","base.350","base.400","base.450","base.500","base.550","base.600","base.650","base.700","base.750","base.800","base.850","base.900","base.950","accent.50","accent.100","accent.150","accent.200","accent.250","accent.300","accent.350","accent.400","accent.450","accent.500","accent.550","accent.600","accent.650","accent.700","accent.750","accent.800","accent.850","accent.900","accent.950","baseAlpha.50","baseAlpha.100","baseAlpha.150","baseAlpha.200","baseAlpha.250","baseAlpha.300","baseAlpha.350","baseAlpha.400","baseAlpha.450","baseAlpha.500","baseAlpha.550","baseAlpha.600","baseAlpha.650","baseAlpha.700","baseAlpha.750","baseAlpha.800","baseAlpha.850","baseAlpha.900","baseAlpha.950","accentAlpha.50","accentAlpha.100","accentAlpha.150","accentAlpha.200","accentAlpha.250","accentAlpha.300","accentAlpha.350","accentAlpha.400","accentAlpha.450","accentAlpha.500","accentAlpha.550","accentAlpha.600","accentAlpha.650","accentAlpha.700","accentAlpha.750","accentAlpha.800","accentAlpha.850","accentAlpha.900","accentAlpha.950"]);return{base50:e,base100:t,base150:n,base200:r,base250:o,base300:s,base350:i,base400:c,base450:d,base500:p,base550:h,base600:m,base650:g,base700:b,base750:y,base800:x,base850:w,base900:S,base950:j,accent50:I,accent100:_,accent150:M,accent200:E,accent250:A,accent300:R,accent350:D,accent400:O,accent450:T,accent500:K,accent550:G,accent600:X,accent650:Z,accent700:te,accent750:V,accent800:oe,accent850:ne,accent900:se,accent950:re,baseAlpha50:ae,baseAlpha100:B,baseAlpha150:Y,baseAlpha200:$,baseAlpha250:F,baseAlpha300:q,baseAlpha350:pe,baseAlpha400:W,baseAlpha450:U,baseAlpha500:ee,baseAlpha550:J,baseAlpha600:ge,baseAlpha650:he,baseAlpha700:de,baseAlpha750:_e,baseAlpha800:Pe,baseAlpha850:ze,baseAlpha900:ht,baseAlpha950:Je,accentAlpha50:qt,accentAlpha100:Pt,accentAlpha150:jt,accentAlpha200:Se,accentAlpha250:Fe,accentAlpha300:it,accentAlpha350:At,accentAlpha400:ke,accentAlpha450:lt,accentAlpha500:Rt,accentAlpha550:zt,accentAlpha600:Re,accentAlpha650:Qe,accentAlpha700:En,accentAlpha750:Te,accentAlpha800:ct,accentAlpha850:ft,accentAlpha900:tt,accentAlpha950:en}},Xe=(e,t)=>n=>n==="light"?e:t,NM=()=>{const{base50:e,base100:t,base200:n,base300:r,base400:o,base500:s,base600:i,base700:c,base800:d,base900:p,accent200:h,accent300:m,accent400:g,accent500:b,accent600:y}=Jf(),{colorMode:x}=ji(),[w]=ea("shadows",["dark-lg"]),[S,j,I]=ea("space",[1,2,6]),[_]=ea("radii",["base"]),[M]=ea("lineHeights",["base"]);return l.useCallback(()=>({label:{color:Xe(c,r)(x)},separatorLabel:{color:Xe(s,s)(x),"::after":{borderTopColor:Xe(r,c)(x)}},input:{border:"unset",backgroundColor:Xe(e,p)(x),borderRadius:_,borderStyle:"solid",borderWidth:"2px",borderColor:Xe(n,d)(x),color:Xe(p,t)(x),minHeight:"unset",lineHeight:M,height:"auto",paddingRight:0,paddingLeft:0,paddingInlineStart:j,paddingInlineEnd:I,paddingTop:S,paddingBottom:S,fontWeight:600,"&:hover":{borderColor:Xe(r,i)(x)},"&:focus":{borderColor:Xe(m,y)(x)},"&:is(:focus, :hover)":{borderColor:Xe(o,s)(x)},"&:focus-within":{borderColor:Xe(h,y)(x)},"&[data-disabled]":{backgroundColor:Xe(r,c)(x),color:Xe(i,o)(x),cursor:"not-allowed"}},value:{backgroundColor:Xe(t,p)(x),color:Xe(p,t)(x),button:{color:Xe(p,t)(x)},"&:hover":{backgroundColor:Xe(r,c)(x),cursor:"pointer"}},dropdown:{backgroundColor:Xe(n,d)(x),borderColor:Xe(n,d)(x),boxShadow:w},item:{backgroundColor:Xe(n,d)(x),color:Xe(d,n)(x),padding:6,"&[data-hovered]":{color:Xe(p,t)(x),backgroundColor:Xe(r,c)(x)},"&[data-active]":{backgroundColor:Xe(r,c)(x),"&:hover":{color:Xe(p,t)(x),backgroundColor:Xe(r,c)(x)}},"&[data-selected]":{backgroundColor:Xe(g,y)(x),color:Xe(e,t)(x),fontWeight:600,"&:hover":{backgroundColor:Xe(b,b)(x),color:Xe("white",e)(x)}},"&[data-disabled]":{color:Xe(s,i)(x),cursor:"not-allowed"}},rightSection:{width:32,button:{color:Xe(p,t)(x)}}}),[h,m,g,b,y,t,n,r,o,e,s,i,c,d,p,w,x,M,_,S,j,I])},$M=De((e,t)=>{const{searchable:n=!0,tooltip:r,inputRef:o,onChange:s,label:i,disabled:c,...d}=e,p=le(),[h,m]=l.useState(""),g=l.useCallback(w=>{w.shiftKey&&p(Qo(!0))},[p]),b=l.useCallback(w=>{w.shiftKey||p(Qo(!1))},[p]),y=l.useCallback(w=>{s&&s(w)},[s]),x=NM();return a.jsx(Wn,{label:r,placement:"top",hasArrow:!0,children:a.jsxs(Vn,{ref:t,isDisabled:c,position:"static","data-testid":`select-${i||e.placeholder}`,children:[i&&a.jsx(yr,{children:i}),a.jsx(i2,{ref:o,disabled:c,searchValue:h,onSearchChange:m,onChange:y,onKeyDown:g,onKeyUp:b,searchable:n,maxDropdownHeight:300,styles:x,...d})]})})});$M.displayName="IAIMantineSearchableSelect";const sr=l.memo($M),aee=me([we],({changeBoardModal:e})=>{const{isModalOpen:t,imagesToChange:n}=e;return{isModalOpen:t,imagesToChange:n}},Ie),iee=()=>{const e=le(),[t,n]=l.useState(),{data:r,isFetching:o}=jf(),{imagesToChange:s,isModalOpen:i}=H(aee),[c]=kD(),[d]=jD(),{t:p}=Q(),h=l.useMemo(()=>{const x=[{label:p("boards.uncategorized"),value:"none"}];return(r??[]).forEach(w=>x.push({label:w.board_name,value:w.board_id})),x},[r,p]),m=l.useCallback(()=>{e(Hw()),e(Ax(!1))},[e]),g=l.useCallback(()=>{!s.length||!t||(t==="none"?d({imageDTOs:s}):c({imageDTOs:s,board_id:t}),n(null),e(Hw()))},[c,e,s,d,t]),b=l.useCallback(x=>n(x),[]),y=l.useRef(null);return a.jsx(Wf,{isOpen:i,onClose:m,leastDestructiveRef:y,isCentered:!0,children:a.jsx(Aa,{children:a.jsxs(Vf,{children:[a.jsx(Oa,{fontSize:"lg",fontWeight:"bold",children:p("boards.changeBoard")}),a.jsx(Ra,{children:a.jsxs(N,{sx:{flexDir:"column",gap:4},children:[a.jsxs(je,{children:["Moving ",`${s.length}`," image",`${s.length>1?"s":""}`," to board:"]}),a.jsx(sr,{placeholder:p(o?"boards.loading":"boards.selectBoard"),disabled:o,onChange:b,value:t,data:h})]})}),a.jsxs(pi,{children:[a.jsx(Dt,{ref:y,onClick:m,children:p("boards.cancel")}),a.jsx(Dt,{colorScheme:"accent",onClick:g,ml:3,children:p("boards.move")})]})]})})})},lee=l.memo(iee),LM=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:o,formLabelProps:s,tooltip:i,helperText:c,...d}=e;return a.jsx(Wn,{label:i,hasArrow:!0,placement:"top",isDisabled:!i,children:a.jsx(Vn,{isDisabled:n,width:r,alignItems:"center",...o,children:a.jsxs(N,{sx:{flexDir:"column",w:"full"},children:[a.jsxs(N,{sx:{alignItems:"center",w:"full"},children:[t&&a.jsx(yr,{my:1,flexGrow:1,sx:{cursor:n?"not-allowed":"pointer",...s==null?void 0:s.sx,pe:4},...s,children:t}),a.jsx(Fy,{...d})]}),c&&a.jsx(WP,{children:a.jsx(je,{variant:"subtext",children:c})})]})})})};LM.displayName="IAISwitch";const _r=l.memo(LM),cee=e=>{const{t}=Q(),{imageUsage:n,topMessage:r=t("gallery.currentlyInUse"),bottomMessage:o=t("gallery.featuresWillReset")}=e;return!n||!ta(n)?null:a.jsxs(a.Fragment,{children:[a.jsx(je,{children:r}),a.jsxs(zf,{sx:{paddingInlineStart:6},children:[n.isInitialImage&&a.jsx(Ps,{children:t("common.img2img")}),n.isCanvasImage&&a.jsx(Ps,{children:t("common.unifiedCanvas")}),n.isControlImage&&a.jsx(Ps,{children:t("common.controlNet")}),n.isNodesImage&&a.jsx(Ps,{children:t("common.nodeEditor")})]}),a.jsx(je,{children:o})]})},zM=l.memo(cee),uee=me([we,_D],(e,t)=>{const{system:n,config:r,deleteImageModal:o}=e,{shouldConfirmOnDelete:s}=n,{canRestoreDeletedImagesFromBin:i}=r,{imagesToDelete:c,isModalOpen:d}=o,p=(c??[]).map(({image_name:m})=>MI(e,m)),h={isInitialImage:ta(p,m=>m.isInitialImage),isCanvasImage:ta(p,m=>m.isCanvasImage),isNodesImage:ta(p,m=>m.isNodesImage),isControlImage:ta(p,m=>m.isControlImage)};return{shouldConfirmOnDelete:s,canRestoreDeletedImagesFromBin:i,imagesToDelete:c,imagesUsage:t,isModalOpen:d,imageUsageSummary:h}},Ie),dee=()=>{const e=le(),{t}=Q(),{shouldConfirmOnDelete:n,canRestoreDeletedImagesFromBin:r,imagesToDelete:o,imagesUsage:s,isModalOpen:i,imageUsageSummary:c}=H(uee),d=l.useCallback(g=>e(OI(!g.target.checked)),[e]),p=l.useCallback(()=>{e(Ww()),e(ID(!1))},[e]),h=l.useCallback(()=>{!o.length||!s.length||(e(Ww()),e(PD({imageDTOs:o,imagesUsage:s})))},[e,o,s]),m=l.useRef(null);return a.jsx(Wf,{isOpen:i,onClose:p,leastDestructiveRef:m,isCentered:!0,children:a.jsx(Aa,{children:a.jsxs(Vf,{children:[a.jsx(Oa,{fontSize:"lg",fontWeight:"bold",children:t("gallery.deleteImage")}),a.jsx(Ra,{children:a.jsxs(N,{direction:"column",gap:3,children:[a.jsx(zM,{imageUsage:c}),a.jsx(io,{}),a.jsx(je,{children:t(r?"gallery.deleteImageBin":"gallery.deleteImagePermanent")}),a.jsx(je,{children:t("common.areYouSure")}),a.jsx(_r,{label:t("common.dontAskMeAgain"),isChecked:!n,onChange:d})]})}),a.jsxs(pi,{children:[a.jsx(Dt,{ref:m,onClick:p,children:"Cancel"}),a.jsx(Dt,{colorScheme:"error",onClick:h,ml:3,children:"Delete"})]})]})})})},fee=l.memo(dee),FM=De((e,t)=>{const{role:n,tooltip:r="",tooltipProps:o,isChecked:s,...i}=e;return a.jsx(Wn,{label:r,hasArrow:!0,...o,...o!=null&&o.placement?{placement:o.placement}:{placement:"top"},children:a.jsx(Ia,{ref:t,role:n,colorScheme:s?"accent":"base","data-testid":r,...i})})});FM.displayName="IAIIconButton";const rt=l.memo(FM);var BM={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Pj=z.createContext&&z.createContext(BM),Ji=globalThis&&globalThis.__assign||function(){return Ji=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const t=H(i=>i.config.disabledTabs),n=H(i=>i.config.disabledFeatures),r=H(i=>i.config.disabledSDFeatures),o=l.useMemo(()=>n.includes(e)||r.includes(e)||t.includes(e),[n,r,t,e]),s=l.useMemo(()=>!(n.includes(e)||r.includes(e)||t.includes(e)),[n,r,t,e]);return{isFeatureDisabled:o,isFeatureEnabled:s}};function ete(e){const{title:t,hotkey:n,description:r}=e;return a.jsxs(rl,{sx:{gridTemplateColumns:"auto max-content",justifyContent:"space-between",alignItems:"center"},children:[a.jsxs(rl,{children:[a.jsx(je,{fontWeight:600,children:t}),r&&a.jsx(je,{sx:{fontSize:"sm"},variant:"subtext",children:r})]}),a.jsx(Le,{sx:{fontSize:"sm",fontWeight:600,px:2,py:1},children:n})]})}function tte({children:e}){const{isOpen:t,onOpen:n,onClose:r}=hs(),{t:o}=Q(),s=[{title:o("hotkeys.invoke.title"),desc:o("hotkeys.invoke.desc"),hotkey:"Ctrl+Enter"},{title:o("hotkeys.cancel.title"),desc:o("hotkeys.cancel.desc"),hotkey:"Shift+X"},{title:o("hotkeys.focusPrompt.title"),desc:o("hotkeys.focusPrompt.desc"),hotkey:"Alt+A"},{title:o("hotkeys.toggleOptions.title"),desc:o("hotkeys.toggleOptions.desc"),hotkey:"O"},{title:o("hotkeys.toggleGallery.title"),desc:o("hotkeys.toggleGallery.desc"),hotkey:"G"},{title:o("hotkeys.maximizeWorkSpace.title"),desc:o("hotkeys.maximizeWorkSpace.desc"),hotkey:"F"},{title:o("hotkeys.changeTabs.title"),desc:o("hotkeys.changeTabs.desc"),hotkey:"1-5"}],i=[{title:o("hotkeys.setPrompt.title"),desc:o("hotkeys.setPrompt.desc"),hotkey:"P"},{title:o("hotkeys.setSeed.title"),desc:o("hotkeys.setSeed.desc"),hotkey:"S"},{title:o("hotkeys.setParameters.title"),desc:o("hotkeys.setParameters.desc"),hotkey:"A"},{title:o("hotkeys.upscale.title"),desc:o("hotkeys.upscale.desc"),hotkey:"Shift+U"},{title:o("hotkeys.showInfo.title"),desc:o("hotkeys.showInfo.desc"),hotkey:"I"},{title:o("hotkeys.sendToImageToImage.title"),desc:o("hotkeys.sendToImageToImage.desc"),hotkey:"Shift+I"},{title:o("hotkeys.deleteImage.title"),desc:o("hotkeys.deleteImage.desc"),hotkey:"Del"},{title:o("hotkeys.closePanels.title"),desc:o("hotkeys.closePanels.desc"),hotkey:"Esc"}],c=[{title:o("hotkeys.previousImage.title"),desc:o("hotkeys.previousImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys.nextImage.title"),desc:o("hotkeys.nextImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys.increaseGalleryThumbSize.title"),desc:o("hotkeys.increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:o("hotkeys.decreaseGalleryThumbSize.title"),desc:o("hotkeys.decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],d=[{title:o("hotkeys.selectBrush.title"),desc:o("hotkeys.selectBrush.desc"),hotkey:"B"},{title:o("hotkeys.selectEraser.title"),desc:o("hotkeys.selectEraser.desc"),hotkey:"E"},{title:o("hotkeys.decreaseBrushSize.title"),desc:o("hotkeys.decreaseBrushSize.desc"),hotkey:"["},{title:o("hotkeys.increaseBrushSize.title"),desc:o("hotkeys.increaseBrushSize.desc"),hotkey:"]"},{title:o("hotkeys.decreaseBrushOpacity.title"),desc:o("hotkeys.decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:o("hotkeys.increaseBrushOpacity.title"),desc:o("hotkeys.increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:o("hotkeys.moveTool.title"),desc:o("hotkeys.moveTool.desc"),hotkey:"V"},{title:o("hotkeys.fillBoundingBox.title"),desc:o("hotkeys.fillBoundingBox.desc"),hotkey:"Shift + F"},{title:o("hotkeys.eraseBoundingBox.title"),desc:o("hotkeys.eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:o("hotkeys.colorPicker.title"),desc:o("hotkeys.colorPicker.desc"),hotkey:"C"},{title:o("hotkeys.toggleSnap.title"),desc:o("hotkeys.toggleSnap.desc"),hotkey:"N"},{title:o("hotkeys.quickToggleMove.title"),desc:o("hotkeys.quickToggleMove.desc"),hotkey:"Hold Space"},{title:o("hotkeys.toggleLayer.title"),desc:o("hotkeys.toggleLayer.desc"),hotkey:"Q"},{title:o("hotkeys.clearMask.title"),desc:o("hotkeys.clearMask.desc"),hotkey:"Shift+C"},{title:o("hotkeys.hideMask.title"),desc:o("hotkeys.hideMask.desc"),hotkey:"H"},{title:o("hotkeys.showHideBoundingBox.title"),desc:o("hotkeys.showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:o("hotkeys.mergeVisible.title"),desc:o("hotkeys.mergeVisible.desc"),hotkey:"Shift+M"},{title:o("hotkeys.saveToGallery.title"),desc:o("hotkeys.saveToGallery.desc"),hotkey:"Shift+S"},{title:o("hotkeys.copyToClipboard.title"),desc:o("hotkeys.copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:o("hotkeys.downloadImage.title"),desc:o("hotkeys.downloadImage.desc"),hotkey:"Shift+D"},{title:o("hotkeys.undoStroke.title"),desc:o("hotkeys.undoStroke.desc"),hotkey:"Ctrl+Z"},{title:o("hotkeys.redoStroke.title"),desc:o("hotkeys.redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:o("hotkeys.resetView.title"),desc:o("hotkeys.resetView.desc"),hotkey:"R"},{title:o("hotkeys.previousStagingImage.title"),desc:o("hotkeys.previousStagingImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys.nextStagingImage.title"),desc:o("hotkeys.nextStagingImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys.acceptStagingImage.title"),desc:o("hotkeys.acceptStagingImage.desc"),hotkey:"Enter"}],p=[{title:o("hotkeys.addNodes.title"),desc:o("hotkeys.addNodes.desc"),hotkey:"Shift + A / Space"}],h=m=>a.jsx(N,{flexDir:"column",gap:4,children:m.map((g,b)=>a.jsxs(N,{flexDir:"column",px:2,gap:4,children:[a.jsx(ete,{title:g.title,description:g.desc,hotkey:g.hotkey}),b{const{data:t}=ED(),n=l.useRef(null),r=rO(n);return a.jsxs(N,{alignItems:"center",gap:5,ps:1,ref:n,children:[a.jsx(_i,{src:Rx,alt:"invoke-ai-logo",sx:{w:"32px",h:"32px",minW:"32px",minH:"32px",userSelect:"none"}}),a.jsxs(N,{sx:{gap:3,alignItems:"center"},children:[a.jsxs(je,{sx:{fontSize:"xl",userSelect:"none"},children:["invoke ",a.jsx("strong",{children:"ai"})]}),a.jsx(So,{children:e&&r&&t&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.15}},exit:{opacity:0,transition:{delay:.8}},children:a.jsx(je,{sx:{fontWeight:600,marginTop:1,color:"base.300",fontSize:14},variant:"subtext",children:t.version})},"statusText")})]})]})},cte=l.memo(lte),oO=De((e,t)=>{const{tooltip:n,inputRef:r,label:o,disabled:s,required:i,...c}=e,d=NM();return a.jsx(Wn,{label:n,placement:"top",hasArrow:!0,children:a.jsxs(Vn,{ref:t,isRequired:i,isDisabled:s,position:"static","data-testid":`select-${o||e.placeholder}`,children:[a.jsx(yr,{children:o}),a.jsx(i2,{disabled:s,ref:r,styles:d,...c})]})})});oO.displayName="IAIMantineSelect";const Dr=l.memo(oO),ute={ar:fn.t("common.langArabic",{lng:"ar"}),nl:fn.t("common.langDutch",{lng:"nl"}),en:fn.t("common.langEnglish",{lng:"en"}),fr:fn.t("common.langFrench",{lng:"fr"}),de:fn.t("common.langGerman",{lng:"de"}),he:fn.t("common.langHebrew",{lng:"he"}),it:fn.t("common.langItalian",{lng:"it"}),ja:fn.t("common.langJapanese",{lng:"ja"}),ko:fn.t("common.langKorean",{lng:"ko"}),pl:fn.t("common.langPolish",{lng:"pl"}),pt_BR:fn.t("common.langBrPortuguese",{lng:"pt_BR"}),pt:fn.t("common.langPortuguese",{lng:"pt"}),ru:fn.t("common.langRussian",{lng:"ru"}),zh_CN:fn.t("common.langSimplifiedChinese",{lng:"zh_CN"}),es:fn.t("common.langSpanish",{lng:"es"}),uk:fn.t("common.langUkranian",{lng:"ua"})},dte={CONNECTED:"common.statusConnected",DISCONNECTED:"common.statusDisconnected",PROCESSING:"common.statusProcessing",ERROR:"common.statusError",LOADING_MODEL:"common.statusLoadingModel"},sO=me(we,({system:e})=>e.language,Ie);function Xs(e){const{t}=Q(),{label:n,textProps:r,useBadge:o=!1,badgeLabel:s=t("settings.experimental"),badgeProps:i,...c}=e;return a.jsxs(N,{justifyContent:"space-between",py:1,children:[a.jsxs(N,{gap:2,alignItems:"center",children:[a.jsx(je,{sx:{fontSize:14,_dark:{color:"base.300"}},...r,children:n}),o&&a.jsx(Va,{size:"xs",sx:{px:2,color:"base.700",bg:"accent.200",_dark:{bg:"accent.500",color:"base.200"}},...i,children:s})]}),a.jsx(_r,{...c})]})}const fte=e=>a.jsx(N,{sx:{flexDirection:"column",gap:2,p:4,borderRadius:"base",bg:"base.100",_dark:{bg:"base.900"}},children:e.children}),Bc=l.memo(fte);function pte(){const{t:e}=Q(),t=le(),{data:n}=MD(void 0,{refetchOnMountOrArgChange:!0}),[r,{isLoading:o}]=OD(),{data:s}=Ha(),i=s&&(s.queue.in_progress>0||s.queue.pending>0),c=l.useCallback(()=>{i||r().unwrap().then(d=>{t(AI()),t(RI()),t(Ht({title:e("settings.intermediatesCleared",{count:d}),status:"info"}))}).catch(()=>{t(Ht({title:e("settings.intermediatesClearedFailed"),status:"error"}))})},[e,r,t,i]);return a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:e("settings.clearIntermediates")}),a.jsx(Dt,{tooltip:i?e("settings.clearIntermediatesDisabled"):void 0,colorScheme:"warning",onClick:c,isLoading:o,isDisabled:!n||i,children:e("settings.clearIntermediatesWithCount",{count:n??0})}),a.jsx(je,{fontWeight:"bold",children:e("settings.clearIntermediatesDesc1")}),a.jsx(je,{variant:"subtext",children:e("settings.clearIntermediatesDesc2")}),a.jsx(je,{variant:"subtext",children:e("settings.clearIntermediatesDesc3")})]})}const hte=()=>{const{base50:e,base100:t,base200:n,base300:r,base400:o,base500:s,base600:i,base700:c,base800:d,base900:p,accent200:h,accent300:m,accent400:g,accent500:b,accent600:y}=Jf(),{colorMode:x}=ji(),[w]=ea("shadows",["dark-lg"]);return l.useCallback(()=>({label:{color:Xe(c,r)(x)},separatorLabel:{color:Xe(s,s)(x),"::after":{borderTopColor:Xe(r,c)(x)}},searchInput:{":placeholder":{color:Xe(r,c)(x)}},input:{backgroundColor:Xe(e,p)(x),borderWidth:"2px",borderColor:Xe(n,d)(x),color:Xe(p,t)(x),paddingRight:24,fontWeight:600,"&:hover":{borderColor:Xe(r,i)(x)},"&:focus":{borderColor:Xe(m,y)(x)},"&:is(:focus, :hover)":{borderColor:Xe(o,s)(x)},"&:focus-within":{borderColor:Xe(h,y)(x)},"&[data-disabled]":{backgroundColor:Xe(r,c)(x),color:Xe(i,o)(x),cursor:"not-allowed"}},value:{backgroundColor:Xe(n,d)(x),color:Xe(p,t)(x),button:{color:Xe(p,t)(x)},"&:hover":{backgroundColor:Xe(r,c)(x),cursor:"pointer"}},dropdown:{backgroundColor:Xe(n,d)(x),borderColor:Xe(n,d)(x),boxShadow:w},item:{backgroundColor:Xe(n,d)(x),color:Xe(d,n)(x),padding:6,"&[data-hovered]":{color:Xe(p,t)(x),backgroundColor:Xe(r,c)(x)},"&[data-active]":{backgroundColor:Xe(r,c)(x),"&:hover":{color:Xe(p,t)(x),backgroundColor:Xe(r,c)(x)}},"&[data-selected]":{backgroundColor:Xe(g,y)(x),color:Xe(e,t)(x),fontWeight:600,"&:hover":{backgroundColor:Xe(b,b)(x),color:Xe("white",e)(x)}},"&[data-disabled]":{color:Xe(s,i)(x),cursor:"not-allowed"}},rightSection:{width:24,padding:20,button:{color:Xe(p,t)(x)}}}),[h,m,g,b,y,t,n,r,o,e,s,i,c,d,p,w,x])},aO=De((e,t)=>{const{searchable:n=!0,tooltip:r,inputRef:o,label:s,disabled:i,...c}=e,d=le(),p=l.useCallback(g=>{g.shiftKey&&d(Qo(!0))},[d]),h=l.useCallback(g=>{g.shiftKey||d(Qo(!1))},[d]),m=hte();return a.jsx(Wn,{label:r,placement:"top",hasArrow:!0,isOpen:!0,children:a.jsxs(Vn,{ref:t,isDisabled:i,position:"static",children:[s&&a.jsx(yr,{children:s}),a.jsx(MM,{ref:o,disabled:i,onKeyDown:p,onKeyUp:h,searchable:n,maxDropdownHeight:300,styles:m,...c})]})})});aO.displayName="IAIMantineMultiSelect";const mte=l.memo(aO),gte=To(hg,(e,t)=>({value:t,label:e})).sort((e,t)=>e.label.localeCompare(t.label));function vte(){const e=le(),{t}=Q(),n=H(o=>o.ui.favoriteSchedulers),r=l.useCallback(o=>{e(AD(o))},[e]);return a.jsx(mte,{label:t("settings.favoriteSchedulers"),value:n,data:gte,onChange:r,clearable:!0,searchable:!0,maxSelectedValues:99,placeholder:t("settings.favoriteSchedulersPlaceholder")})}const bte=me([we],({system:e,ui:t})=>{const{shouldConfirmOnDelete:n,enableImageDebugging:r,consoleLogLevel:o,shouldLogToConsole:s,shouldAntialiasProgressImage:i,shouldUseNSFWChecker:c,shouldUseWatermarker:d,shouldEnableInformationalPopovers:p}=e,{shouldUseSliders:h,shouldShowProgressInViewer:m,shouldAutoChangeDimensions:g}=t;return{shouldConfirmOnDelete:n,enableImageDebugging:r,shouldUseSliders:h,shouldShowProgressInViewer:m,consoleLogLevel:o,shouldLogToConsole:s,shouldAntialiasProgressImage:i,shouldUseNSFWChecker:c,shouldUseWatermarker:d,shouldAutoChangeDimensions:g,shouldEnableInformationalPopovers:p}},{memoizeOptions:{resultEqualityCheck:Nn}}),xte=({children:e,config:t})=>{const n=le(),{t:r}=Q(),[o,s]=l.useState(3),i=(t==null?void 0:t.shouldShowDeveloperSettings)??!0,c=(t==null?void 0:t.shouldShowResetWebUiText)??!0,d=(t==null?void 0:t.shouldShowClearIntermediates)??!0,p=(t==null?void 0:t.shouldShowLocalizationToggle)??!0;l.useEffect(()=>{i||n(Vw(!1))},[i,n]);const{isNSFWCheckerAvailable:h,isWatermarkerAvailable:m}=DI(void 0,{selectFromResult:({data:U})=>({isNSFWCheckerAvailable:(U==null?void 0:U.nsfw_methods.includes("nsfw_checker"))??!1,isWatermarkerAvailable:(U==null?void 0:U.watermarking_methods.includes("invisible_watermark"))??!1})}),{isOpen:g,onOpen:b,onClose:y}=hs(),{isOpen:x,onOpen:w,onClose:S}=hs(),{shouldConfirmOnDelete:j,enableImageDebugging:I,shouldUseSliders:_,shouldShowProgressInViewer:M,consoleLogLevel:E,shouldLogToConsole:A,shouldAntialiasProgressImage:R,shouldUseNSFWChecker:D,shouldUseWatermarker:O,shouldAutoChangeDimensions:T,shouldEnableInformationalPopovers:K}=H(bte),G=l.useCallback(()=>{Object.keys(window.localStorage).forEach(U=>{(RD.includes(U)||U.startsWith(DD))&&localStorage.removeItem(U)}),y(),w(),setInterval(()=>s(U=>U-1),1e3)},[y,w]);l.useEffect(()=>{o<=0&&window.location.reload()},[o]);const X=l.useCallback(U=>{n(TD(U))},[n]),Z=l.useCallback(U=>{n(ND(U))},[n]),te=l.useCallback(U=>{n(Vw(U.target.checked))},[n]),{colorMode:V,toggleColorMode:oe}=ji(),ne=Pn("localization").isFeatureEnabled,se=H(sO),re=l.useCallback(U=>{n(OI(U.target.checked))},[n]),ae=l.useCallback(U=>{n($D(U.target.checked))},[n]),B=l.useCallback(U=>{n(LD(U.target.checked))},[n]),Y=l.useCallback(U=>{n(zD(U.target.checked))},[n]),$=l.useCallback(U=>{n(TI(U.target.checked))},[n]),F=l.useCallback(U=>{n(FD(U.target.checked))},[n]),q=l.useCallback(U=>{n(BD(U.target.checked))},[n]),pe=l.useCallback(U=>{n(HD(U.target.checked))},[n]),W=l.useCallback(U=>{n(WD(U.target.checked))},[n]);return a.jsxs(a.Fragment,{children:[l.cloneElement(e,{onClick:b}),a.jsxs(vu,{isOpen:g,onClose:y,size:"2xl",isCentered:!0,children:[a.jsx(Aa,{}),a.jsxs(bu,{children:[a.jsx(Oa,{bg:"none",children:r("common.settingsLabel")}),a.jsx(Rg,{}),a.jsx(Ra,{children:a.jsxs(N,{sx:{gap:4,flexDirection:"column"},children:[a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.general")}),a.jsx(Xs,{label:r("settings.confirmOnDelete"),isChecked:j,onChange:re})]}),a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.generation")}),a.jsx(vte,{}),a.jsx(Xs,{label:r("settings.enableNSFWChecker"),isDisabled:!h,isChecked:D,onChange:ae}),a.jsx(Xs,{label:r("settings.enableInvisibleWatermark"),isDisabled:!m,isChecked:O,onChange:B})]}),a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.ui")}),a.jsx(Xs,{label:r("common.darkMode"),isChecked:V==="dark",onChange:oe}),a.jsx(Xs,{label:r("settings.useSlidersForAll"),isChecked:_,onChange:Y}),a.jsx(Xs,{label:r("settings.showProgressInViewer"),isChecked:M,onChange:$}),a.jsx(Xs,{label:r("settings.antialiasProgressImages"),isChecked:R,onChange:F}),a.jsx(Xs,{label:r("settings.autoChangeDimensions"),isChecked:T,onChange:q}),p&&a.jsx(Dr,{disabled:!ne,label:r("common.languagePickerLabel"),value:se,data:Object.entries(ute).map(([U,ee])=>({value:U,label:ee})),onChange:Z}),a.jsx(Xs,{label:r("settings.enableInformationalPopovers"),isChecked:K,onChange:pe})]}),i&&a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.developer")}),a.jsx(Xs,{label:r("settings.shouldLogToConsole"),isChecked:A,onChange:te}),a.jsx(Dr,{disabled:!A,label:r("settings.consoleLogLevel"),onChange:X,value:E,data:VD.concat()}),a.jsx(Xs,{label:r("settings.enableImageDebugging"),isChecked:I,onChange:W})]}),d&&a.jsx(pte,{}),a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.resetWebUI")}),a.jsx(Dt,{colorScheme:"error",onClick:G,children:r("settings.resetWebUI")}),c&&a.jsxs(a.Fragment,{children:[a.jsx(je,{variant:"subtext",children:r("settings.resetWebUIDesc1")}),a.jsx(je,{variant:"subtext",children:r("settings.resetWebUIDesc2")})]})]})]})}),a.jsx(pi,{children:a.jsx(Dt,{onClick:y,children:r("common.close")})})]})]}),a.jsxs(vu,{closeOnOverlayClick:!1,isOpen:x,onClose:S,isCentered:!0,closeOnEsc:!1,children:[a.jsx(Aa,{backdropFilter:"blur(40px)"}),a.jsxs(bu,{children:[a.jsx(Oa,{}),a.jsx(Ra,{children:a.jsx(N,{justifyContent:"center",children:a.jsx(je,{fontSize:"lg",children:a.jsxs(je,{children:[r("settings.resetComplete")," Reloading in ",o,"..."]})})})}),a.jsx(pi,{})]})]})]})},yte=l.memo(xte),Cte=me(we,({system:e})=>{const{isConnected:t,status:n}=e;return{isConnected:t,statusTranslationKey:dte[n]}},Ie),Aj={ok:"green.400",working:"yellow.400",error:"red.400"},Rj={ok:"green.600",working:"yellow.500",error:"red.500"},wte=()=>{const{isConnected:e,statusTranslationKey:t}=H(Cte),{t:n}=Q(),r=l.useRef(null),{data:o}=Ha(),s=l.useMemo(()=>e?o!=null&&o.queue.in_progress?"working":"ok":"error",[o==null?void 0:o.queue.in_progress,e]),i=rO(r);return a.jsxs(N,{ref:r,h:"full",px:2,alignItems:"center",gap:5,children:[a.jsx(So,{children:i&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.15}},exit:{opacity:0,transition:{delay:.8}},children:a.jsx(je,{sx:{fontSize:"sm",fontWeight:"600",pb:"1px",userSelect:"none",color:Rj[s],_dark:{color:Aj[s]}},children:n(t)})},"statusText")}),a.jsx(Gr,{as:jee,sx:{boxSize:"0.5rem",color:Rj[s],_dark:{color:Aj[s]}}})]})},Ste=l.memo(wte),kte=()=>{const{t:e}=Q(),t=Pn("bugLink").isFeatureEnabled,n=Pn("discordLink").isFeatureEnabled,r=Pn("githubLink").isFeatureEnabled,o="http://github.com/invoke-ai/InvokeAI",s="https://discord.gg/ZmtBAhwWhy";return a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx(cte,{}),a.jsx(Pi,{}),a.jsx(Ste,{}),a.jsxs(Mg,{children:[a.jsx(Og,{as:rt,variant:"link","aria-label":e("accessibility.menu"),icon:a.jsx(See,{}),sx:{boxSize:8}}),a.jsxs(ql,{motionProps:fu,children:[a.jsxs(af,{title:e("common.communityLabel"),children:[r&&a.jsx(Kn,{as:"a",href:o,target:"_blank",icon:a.jsx(gee,{}),children:e("common.githubLabel")}),t&&a.jsx(Kn,{as:"a",href:`${o}/issues`,target:"_blank",icon:a.jsx(kee,{}),children:e("common.reportBugLabel")}),n&&a.jsx(Kn,{as:"a",href:s,target:"_blank",icon:a.jsx(mee,{}),children:e("common.discordLabel")})]}),a.jsxs(af,{title:e("common.settingsLabel"),children:[a.jsx(tte,{children:a.jsx(Kn,{as:"button",icon:a.jsx(zee,{}),children:e("common.hotkeysLabel")})}),a.jsx(yte,{children:a.jsx(Kn,{as:"button",icon:a.jsx(GM,{}),children:e("common.settingsLabel")})})]})]})]})]})},jte=l.memo(kte);/*! - * 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;nt(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(t),t=n(o,Ta(e)?e():e)},()=>r(t)]},mO=(e,t)=>{let n,r,o,s=As;const{v:i,p:c,g:d}=t||{},p=function(y){s(),Jb(n),n=r=void 0,s=As,e.apply(this,y)},h=b=>d&&r?d(r,b):b,m=()=>{s!==As&&p(h(o)||o)},g=function(){const y=Vu(arguments),x=Ta(i)?i():i;if(Ea(x)&&x>=0){const S=Ta(c)?c():c,j=Ea(S)&&S>=0,I=x>0?Xm:hO,_=x>0?Jb:pO,E=h(y)||y,A=p.bind(0,E);s();const R=I(A,x);s=()=>_(R),j&&!n&&(n=Xm(m,S)),r=o=E}else p(y)};return g.m=m,g},zte=/[^\x20\t\r\n\f]+/g,gO=(e,t,n)=>{const r=e&&e.classList;let o,s=0,i=!1;if(r&&t&&Zf(t)){const c=t.match(zte)||[];for(i=c.length>0;o=c[s++];)i=!!n(r,o)&&i}return i},f2=(e,t)=>{gO(e,t,(n,r)=>n.remove(r))},al=(e,t)=>(gO(e,t,(n,r)=>n.add(r)),Gt(f2,e,t)),Fte={opacity:1,zIndex:1},vh=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},Bte=(e,t)=>!Fte[e]&&Ea(t)?`${t}px`:t,$j=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),Hte=(e,t,n)=>{try{const{style:r}=e;fl(r[t])?r.setProperty(t,n):r[t]=Bte(t,n)}catch{}};function Co(e,t){const n=Zf(t);if($s(t)||n){let o=n?"":{};if(e){const s=Yo.getComputedStyle(e,null);o=n?$j(e,s,t):t.reduce((i,c)=>(i[c]=$j(e,s,c),i),o)}return o}e&&Xn(t,(o,s)=>Hte(e,s,t[s]))}const pf=e=>Co(e,"direction")==="rtl",Lj=(e,t,n)=>{const r=t?`${t}-`:"",o=n?`-${n}`:"",s=`${r}top${o}`,i=`${r}right${o}`,c=`${r}bottom${o}`,d=`${r}left${o}`,p=Co(e,[s,i,c,d]);return{t:vh(p[s],!0),r:vh(p[i],!0),b:vh(p[c],!0),l:vh(p[d],!0)}},Dc=(e,t)=>`translate${df(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,vO="paddingTop",p2="paddingRight",h2="paddingLeft",Jm="paddingBottom",Zm="marginLeft",eg="marginRight",Ud="marginBottom",Ad="overflowX",Rd="overflowY",vi="width",bi="height",ju="hidden",Wte={w:0,h:0},h0=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:Wte,Vte=e=>h0("inner",e||Yo),Gd=Gt(h0,"offset"),$h=Gt(h0,"client"),tg=Gt(h0,"scroll"),ng=e=>{const t=parseFloat(Co(e,vi))||0,n=parseFloat(Co(e,bi))||0;return{w:t-ff(t),h:n-ff(n)}},ka=e=>e.getBoundingClientRect(),tx=e=>!!(e&&(e[bi]||e[vi])),bO=(e,t)=>{const n=tx(e);return!tx(t)&&n},m0=(e,t,n,r)=>{if(e&&t){let o=!0;return Xn(n,s=>{const i=r?r(e[s]):e[s],c=r?r(t[s]):t[s];i!==c&&(o=!1)}),o}return!1},xO=(e,t)=>m0(e,t,["w","h"]),yO=(e,t)=>m0(e,t,["x","y"]),Ute=(e,t)=>m0(e,t,["t","r","b","l"]),zj=(e,t,n)=>m0(e,t,[vi,bi],n&&(r=>ff(r)));let bh;const Fj="passive",Gte=()=>{if(fl(bh)){bh=!1;try{Yo.addEventListener(Fj,As,Object.defineProperty({},Fj,{get(){bh=!0}}))}catch{}}return bh},CO=e=>e.split(" "),Bj=(e,t,n,r)=>{Xn(CO(t),o=>{e.removeEventListener(o,n,r)})},Ur=(e,t,n,r)=>{var o;const s=Gte(),i=(o=s&&r&&r.S)!=null?o:s,c=r&&r.$||!1,d=r&&r.O||!1,p=s?{passive:i,capture:c}:c;return Gt(Ls,CO(t).map(h=>{const m=d?g=>{Bj(e,h,m,c),n(g)}:n;return e.addEventListener(h,m,p),Gt(Bj,e,h,m,c)}))},wO=e=>e.stopPropagation(),Hj=e=>e.preventDefault(),qte={x:0,y:0},j1=e=>{const t=e&&ka(e);return t?{x:t.left+Yo.pageYOffset,y:t.top+Yo.pageXOffset}:qte},SO=(e,t,n)=>n?n.n?-e:n.i?t-e:e:e,Kte=(e,t)=>[t&&t.i?e:0,SO(e,e,t)],Yl=(e,t)=>{const{x:n,y:r}=Ea(t)?{x:t,y:t}:t||{};Ea(n)&&(e.scrollLeft=n),Ea(r)&&(e.scrollTop=r)},g0=e=>({x:e.scrollLeft,y:e.scrollTop}),Wj=(e,t)=>{Xn($s(t)?t:[t],e)},nx=e=>{const t=new Map,n=(s,i)=>{if(s){const c=t.get(s);Wj(d=>{c&&c[d?"delete":"clear"](d)},i)}else t.forEach(c=>{c.clear()}),t.clear()},r=(s,i)=>{if(Zf(s)){const p=t.get(s)||new Set;return t.set(s,p),Wj(h=>{Ta(h)&&p.add(h)},i),Gt(n,s,i)}lO(i)&&i&&n();const c=gi(s),d=[];return Xn(c,p=>{const h=s[p];h&&Qn(d,r(p,h))}),Gt(Ls,d)},o=(s,i)=>{Xn(Vu(t.get(s)),c=>{i&&!Km(i)?c.apply(0,i):c()})};return r(e||{}),[r,n,o]},Vj=e=>JSON.stringify(e,(t,n)=>{if(Ta(n))throw 0;return n}),Uj=(e,t)=>e?`${t}`.split(".").reduce((n,r)=>n&&f0(n,r)?n[r]:void 0,e):void 0,Qte={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},kO=(e,t)=>{const n={},r=Qi(gi(t),gi(e));return Xn(r,o=>{const s=e[o],i=t[o];if(df(s)&&df(i))Bn(n[o]={},kO(s,i)),u2(n[o])&&delete n[o];else if(f0(t,o)&&i!==s){let c=!0;if($s(s)||$s(i))try{Vj(s)===Vj(i)&&(c=!1)}catch{}c&&(n[o]=i)}}),n},Xte=(e,t,n)=>r=>[Uj(e,r),n||Uj(t,r)!==void 0],ep="data-overlayscrollbars",jO="os-environment",_O=`${jO}-flexbox-glue`,Yte=`${_O}-max`,IO="os-scrollbar-hidden",_1=`${ep}-initialize`,Zs=ep,PO=`${Zs}-overflow-x`,EO=`${Zs}-overflow-y`,lu="overflowVisible",Jte="scrollbarHidden",Gj="scrollbarPressed",rg="updating",Ui=`${ep}-viewport`,I1="arrange",MO="scrollbarHidden",cu=lu,rx=`${ep}-padding`,Zte=cu,qj=`${ep}-content`,m2="os-size-observer",ene=`${m2}-appear`,tne=`${m2}-listener`,nne="os-trinsic-observer",rne="os-no-css-vars",one="os-theme-none",es="os-scrollbar",sne=`${es}-rtl`,ane=`${es}-horizontal`,ine=`${es}-vertical`,OO=`${es}-track`,g2=`${es}-handle`,lne=`${es}-visible`,cne=`${es}-cornerless`,Kj=`${es}-transitionless`,Qj=`${es}-interaction`,Xj=`${es}-unusable`,ox=`${es}-auto-hide`,Yj=`${ox}-hidden`,Jj=`${es}-wheel`,une=`${OO}-interactive`,dne=`${g2}-interactive`,AO={},RO={},fne=e=>{Xn(e,t=>Xn(t,(n,r)=>{AO[r]=t[r]}))},DO=(e,t,n)=>gi(e).map(r=>{const{static:o,instance:s}=e[r],[i,c,d]=n||[],p=n?s:o;if(p){const h=n?p(i,c,t):p(t);return(d||RO)[r]=h}}),Uu=e=>RO[e],pne="__osOptionsValidationPlugin",hne="__osSizeObserverPlugin",v2="__osScrollbarsHidingPlugin",mne="__osClickScrollPlugin";let P1;const Zj=(e,t,n,r)=>{_s(e,t);const o=$h(t),s=Gd(t),i=ng(n);return r&&ci(t),{x:s.h-o.h+i.h,y:s.w-o.w+i.w}},gne=e=>{let t=!1;const n=al(e,IO);try{t=Co(e,$te("scrollbar-width"))==="none"||Yo.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},vne=(e,t)=>{Co(e,{[Ad]:ju,[Rd]:ju,direction:"rtl"}),Yl(e,{x:0});const n=j1(e),r=j1(t);Yl(e,{x:-999});const o=j1(t);return{i:n.x===r.x,n:r.x!==o.x}},bne=(e,t)=>{const n=al(e,_O),r=ka(e),o=ka(t),s=zj(o,r,!0),i=al(e,Yte),c=ka(e),d=ka(t),p=zj(d,c,!0);return n(),i(),s&&p},xne=()=>{const{body:e}=document,n=fO(`
`)[0],r=n.firstChild,[o,,s]=nx(),[i,c]=Js({o:Zj(e,n,r),u:yO},Gt(Zj,e,n,r,!0)),[d]=c(),p=gne(n),h={x:d.x===0,y:d.y===0},m={elements:{host:null,padding:!p,viewport:w=>p&&w===w.ownerDocument.body&&w,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},g=Bn({},Qte),b=Gt(Bn,{},g),y=Gt(Bn,{},m),x={L:d,I:h,H:p,A:Co(n,"zIndex")==="-1",P:!!ex,V:vne(n,r),U:bne(n,r),B:Gt(o,"r"),j:y,N:w=>Bn(m,w)&&y(),G:b,q:w=>Bn(g,w)&&b(),F:Bn({},m),W:Bn({},g)};return Wo(n,"style"),ci(n),Yo.addEventListener("resize",()=>{let w;if(!p&&(!h.x||!h.y)){const S=Uu(v2);w=!!(S?S.R():As)(x,i)}s("r",[w])}),x},Jo=()=>(P1||(P1=xne()),P1),b2=(e,t)=>Ta(t)?t.apply(0,e):t,yne=(e,t,n,r)=>{const o=fl(r)?n:r;return b2(e,o)||t.apply(0,e)},TO=(e,t,n,r)=>{const o=fl(r)?n:r,s=b2(e,o);return!!s&&(Wd(s)?s:t.apply(0,e))},Cne=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:r}=t||{},{I:o,H:s,j:i}=Jo(),{nativeScrollbarsOverlaid:c,body:d}=i().cancel,p=n??c,h=fl(r)?d:r,m=(o.x||o.y)&&p,g=e&&(l0(h)?!s:h);return!!m||!!g},x2=new WeakMap,wne=(e,t)=>{x2.set(e,t)},Sne=e=>{x2.delete(e)},NO=e=>x2.get(e),kne=(e,t,n)=>{let r=!1;const o=n?new WeakMap:!1,s=()=>{r=!0},i=c=>{if(o&&n){const d=n.map(p=>{const[h,m]=p||[];return[m&&h?(c||dO)(h,e):[],m]});Xn(d,p=>Xn(p[0],h=>{const m=p[1],g=o.get(h)||[];if(e.contains(h)&&m){const y=Ur(h,m.trim(),x=>{r?(y(),o.delete(h)):t(x)});o.set(h,Qn(g,y))}else Ls(g),o.delete(h)}))}};return i(),[s,i]},e_=(e,t,n,r)=>{let o=!1;const{X:s,Y:i,J:c,K:d,Z:p,tt:h}=r||{},m=mO(()=>o&&n(!0),{v:33,p:99}),[g,b]=kne(e,m,c),y=s||[],x=i||[],w=Qi(y,x),S=(I,_)=>{if(!Km(_)){const M=p||As,E=h||As,A=[],R=[];let D=!1,O=!1;if(Xn(_,T=>{const{attributeName:K,target:G,type:X,oldValue:Z,addedNodes:te,removedNodes:V}=T,oe=X==="attributes",ne=X==="childList",se=e===G,re=oe&&K,ae=re?Mo(G,K||""):null,B=re&&Z!==ae,Y=d0(x,K)&&B;if(t&&(ne||!se)){const $=oe&&B,F=$&&d&&Qm(G,d),pe=(F?!M(G,K,Z,ae):!oe||$)&&!E(T,!!F,e,r);Xn(te,W=>Qn(A,W)),Xn(V,W=>Qn(A,W)),O=O||pe}!t&&se&&B&&!M(G,K,Z,ae)&&(Qn(R,K),D=D||Y)}),b(T=>Dj(A).reduce((K,G)=>(Qn(K,dO(T,G)),Qm(G,T)?Qn(K,G):K),[])),t)return!I&&O&&n(!1),[!1];if(!Km(R)||D){const T=[Dj(R),D];return!I&&n.apply(0,T),T}}},j=new Lte(Gt(S,!1));return[()=>(j.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:w,subtree:t,childList:t,characterData:t}),o=!0,()=>{o&&(g(),j.disconnect(),o=!1)}),()=>{if(o)return m.m(),S(!0,j.takeRecords())}]},$O=(e,t,n)=>{const{nt:o,ot:s}=n||{},i=Uu(hne),{V:c}=Jo(),d=Gt(pf,e),[p]=Js({o:!1,_:!0});return()=>{const h=[],g=fO(`
`)[0],b=g.firstChild,y=x=>{const w=x instanceof ResizeObserverEntry,S=!w&&$s(x);let j=!1,I=!1,_=!0;if(w){const[M,,E]=p(x.contentRect),A=tx(M),R=bO(M,E);I=!E||R,j=!I&&!A,_=!j}else S?[,_]=x:I=x===!0;if(o&&_){const M=S?x[0]:pf(g);Yl(g,{x:SO(3333333,3333333,M&&c),y:3333333})}j||t({st:S?x:void 0,et:!S,ot:I})};if(Ym){const x=new Ym(w=>y(w.pop()));x.observe(b),Qn(h,()=>{x.disconnect()})}else if(i){const[x,w]=i(b,y,s);Qn(h,Qi([al(g,ene),Ur(g,"animationstart",x)],w))}else return As;if(o){const[x]=Js({o:void 0},d);Qn(h,Ur(g,"scroll",w=>{const S=x(),[j,I,_]=S;I&&(f2(b,"ltr rtl"),al(b,j?"rtl":"ltr"),y([!!j,I,_])),wO(w)}))}return Gt(Ls,Qn(h,_s(e,g)))}},jne=(e,t)=>{let n;const r=d=>d.h===0||d.isIntersecting||d.intersectionRatio>0,o=Fl(nne),[s]=Js({o:!1}),i=(d,p)=>{if(d){const h=s(r(d)),[,m]=h;return m&&!p&&t(h)&&[h]}},c=(d,p)=>i(p.pop(),d);return[()=>{const d=[];if(Nj)n=new Nj(Gt(c,!1),{root:e}),n.observe(o),Qn(d,()=>{n.disconnect()});else{const p=()=>{const h=Gd(o);i(h)};Qn(d,$O(o,p)()),p()}return Gt(Ls,Qn(d,_s(e,o)))},()=>n&&c(!0,n.takeRecords())]},_ne=(e,t)=>{let n,r,o,s,i;const{H:c}=Jo(),d=`[${Zs}]`,p=`[${Ui}]`,h=["tabindex"],m=["wrap","cols","rows"],g=["id","class","style","open"],b={ct:!1,rt:pf(e.lt)},{lt:y,it:x,ut:w,ft:S,_t:j,dt:I,vt:_}=e,{U:M,B:E}=Jo(),[A]=Js({u:xO,o:{w:0,h:0}},()=>{const re=I(cu,lu),ae=I(I1,""),B=ae&&g0(x);_(cu,lu),_(I1,""),_("",rg,!0);const Y=tg(w),$=tg(x),F=ng(x);return _(cu,lu,re),_(I1,"",ae),_("",rg),Yl(x,B),{w:$.w+Y.w+F.w,h:$.h+Y.h+F.h}}),R=S?m:Qi(g,m),D=mO(t,{v:()=>n,p:()=>r,g(re,ae){const[B]=re,[Y]=ae;return[Qi(gi(B),gi(Y)).reduce(($,F)=>($[F]=B[F]||Y[F],$),{})]}}),O=re=>{Xn(re||h,ae=>{if(d0(h,ae)){const B=Mo(y,ae);Zf(B)?Mo(x,ae,B):Wo(x,ae)}})},T=(re,ae)=>{const[B,Y]=re,$={ht:Y};return Bn(b,{ct:B}),!ae&&t($),$},K=({et:re,st:ae,ot:B})=>{const $=!(re&&!B&&!ae)&&c?D:t,[F,q]=ae||[];ae&&Bn(b,{rt:F}),$({et:re||B,ot:B,gt:q})},G=(re,ae)=>{const[,B]=A(),Y={bt:B};return B&&!ae&&(re?t:D)(Y),Y},X=(re,ae,B)=>{const Y={wt:ae};return ae&&!B?D(Y):j||O(re),Y},[Z,te]=w||!M?jne(y,T):[],V=!j&&$O(y,K,{ot:!0,nt:!0}),[oe,ne]=e_(y,!1,X,{Y:g,X:Qi(g,h)}),se=j&&Ym&&new Ym(re=>{const ae=re[re.length-1].contentRect;K({et:!0,ot:bO(ae,i)}),i=ae});return[()=>{O(),se&&se.observe(y);const re=V&&V(),ae=Z&&Z(),B=oe(),Y=E($=>{const[,F]=A();D({yt:$,bt:F})});return()=>{se&&se.disconnect(),re&&re(),ae&&ae(),s&&s(),B(),Y()}},({St:re,$t:ae,xt:B})=>{const Y={},[$]=re("update.ignoreMutation"),[F,q]=re("update.attributes"),[pe,W]=re("update.elementEvents"),[U,ee]=re("update.debounce"),J=W||q,ge=ae||B,he=de=>Ta($)&&$(de);if(J){o&&o(),s&&s();const[de,_e]=e_(w||x,!0,G,{X:Qi(R,F||[]),J:pe,K:d,tt:(Pe,ze)=>{const{target:ht,attributeName:Je}=Pe;return(!ze&&Je&&!j?Ote(ht,d,p):!1)||!!Kc(ht,`.${es}`)||!!he(Pe)}});s=de(),o=_e}if(ee)if(D.m(),$s(U)){const de=U[0],_e=U[1];n=Ea(de)&&de,r=Ea(_e)&&_e}else Ea(U)?(n=U,r=!1):(n=!1,r=!1);if(ge){const de=ne(),_e=te&&te(),Pe=o&&o();de&&Bn(Y,X(de[0],de[1],ge)),_e&&Bn(Y,T(_e[0],ge)),Pe&&Bn(Y,G(Pe[0],ge))}return Y},b]},sx=(e,t,n)=>Vd(e,Rte(t,n)),Ine=(e,t,n)=>{const r=ff(t),[o,s]=Kte(r,n),i=(s-e)/s,c=e/o,d=e/s,p=n?n.n?i:n.i?c:d:d;return sx(0,1,p)},LO=(e,t,n,r)=>{if(r){const c=n?"x":"y",{Ot:d,Ct:p}=r,h=p[c],m=d[c];return sx(0,1,h/(h+m))}const o=n?vi:bi,s=ka(e)[o],i=ka(t)[o];return sx(0,1,s/i)},t_=(e,t,n,r)=>{const o=LO(e,t,r);return 1/o*(1-o)*n},Pne=(e,t,n)=>{const{j:r,A:o}=Jo(),{scrollbars:s}=r(),{slot:i}=s,{Ht:c,lt:d,it:p,zt:h,It:m,At:g,_t:b}=t,{scrollbars:y}=h?{}:e,{slot:x}=y||{},w=new Map,S=U=>ex&&new ex({source:m,axis:U}),j=S("x"),I=S("y"),_=TO([c,d,p],()=>b&&g?c:d,i,x),M=U=>b&&!g&&li(U)===p,E=U=>{w.forEach((ee,J)=>{(U?d0($s(U)?U:[U],J):!0)&&((ee||[]).forEach(he=>{he&&he.cancel()}),w.delete(J))})},A=(U,ee,J)=>{const ge=J?al:f2;Xn(U,he=>{ge(he.Et,ee)})},R=(U,ee)=>{Xn(U,J=>{const[ge,he]=ee(J);Co(ge,he)})},D=U=>{const ee=U||0;return isFinite(ee)?ee:0},O=U=>`${(D(U)*100).toFixed(3)}%`,T=U=>`${D(U)}px`,K=(U,ee,J)=>{R(U,ge=>{const{Tt:he,kt:de}=ge;return[he,{[J?vi:bi]:O(LO(he,de,J,ee))}]})},G=(U,ee,J)=>{R(U,ge=>{const{Tt:he,kt:de,Et:_e}=ge,{V:Pe}=Jo(),ze=J?"x":"y",ht=J?"Left":"Top",{Ot:Je}=ee,qt=pf(_e),Pt=t_(he,de,Ine(m[`scroll${ht}`],Je[ze],J&&qt&&Pe),J);return[he,{transform:Dc(O(Pt),J)}]})},X=U=>{const{Et:ee}=U,J=M(ee)&&ee,{x:ge,y:he}=g0(m);return[J,{transform:J?Dc({x:T(ge),y:T(he)}):""}]},Z=(U,ee,J,ge)=>ee&&U.animate(J,{timeline:ee,composite:ge}),te=(U,ee,J,ge)=>Z(U,ee,{transform:[Dc(T(0),ge),Dc(T(Vd(0,J-.5)),ge)]},"add"),V=[],oe=[],ne=[],se=(U,ee,J)=>{const ge=lO(J),he=ge?J:!0,de=ge?!J:!0;he&&A(oe,U,ee),de&&A(ne,U,ee)},re=U=>{K(oe,U,!0),K(ne,U)},ae=U=>{!j&&!I&&(G(oe,U,!0),G(ne,U))},B=()=>{const U=(ee,{Et:J,kt:ge,Tt:he})=>{const de=ee&&pf(J),_e=Gt(t_,he,ge),Pe=_e(de?1:0,ee),ze=_e(de?0:1,ee);E(he),w.set(he,[Z(he,ee?j:I,Bn({transform:[Dc(O(Pe),ee),Dc(O(ze),ee)]},de?{clear:["left"]}:{}))])};oe.forEach(Gt(U,!0)),ne.forEach(Gt(U,!1))},Y=()=>{!I&&!I&&(b&&R(oe,X),b&&R(ne,X))},$=({Ot:U})=>{Qi(ne,oe).forEach(({Et:ee})=>{E(ee),M(ee)&&w.set(ee,[te(ee,j,U.x,!0),te(ee,I,U.y)])})},F=U=>{const ee=U?ane:ine,J=U?oe:ne,ge=Km(J)?Kj:"",he=Fl(`${es} ${ee} ${ge}`),de=Fl(OO),_e=Fl(g2),Pe={Et:he,kt:de,Tt:_e};return o||al(he,rne),Qn(J,Pe),Qn(V,[_s(he,de),_s(de,_e),Gt(ci,he),E,n(Pe,se,U)]),Pe},q=Gt(F,!0),pe=Gt(F,!1),W=()=>(_s(_,oe[0].Et),_s(_,ne[0].Et),Xm(()=>{se(Kj)},300),Gt(Ls,V));return q(),pe(),[{Dt:re,Mt:ae,Rt:B,Lt:$,Pt:Y,Vt:se,Ut:{P:j,Bt:oe,jt:q,Nt:Gt(R,oe)},Gt:{P:I,Bt:ne,jt:pe,Nt:Gt(R,ne)}},W]},Ene=(e,t,n)=>{const{lt:r,It:o,qt:s}=t,i=(c,d)=>{const{Tt:p,kt:h}=c,m=`scroll${d?"Left":"Top"}`,g=`client${d?"X":"Y"}`,b=d?vi:bi,y=d?"left":"top",x=d?"w":"h",w=d?"x":"y",S="pointerup pointerleave pointercancel lostpointercapture",j=(I,_)=>M=>{const{Ot:E}=n,A=Gd(h)[x]-Gd(p)[x],D=_*M/A*E[w];o[m]=I+D};return Ur(h,"pointerdown",I=>{const _=Kc(I.target,`.${g2}`)===p,M=_?p:h,E=e.scrollbars,{button:A,isPrimary:R,pointerType:D}=I,{pointers:O}=E,T=A===0&&R&&E[_?"dragScroll":"clickScroll"]&&(O||[]).includes(D);if(zl(r,Zs,Gj,!0),T){const K=!_&&I.shiftKey,G=Gt(ka,p),X=Gt(ka,h),Z=(q,pe)=>(q||G())[y]-(pe||X())[y],te=ff(ka(o)[b])/Gd(o)[x]||1,V=j(o[m]||0,1/te),oe=I[g],ne=G(),se=X(),re=ne[b],ae=Z(ne,se)+re/2,B=oe-se[y],Y=_?0:B-ae,$=q=>{Ls(F),M.releasePointerCapture(q.pointerId)},F=[Gt(zl,r,Zs,Gj),Ur(s,S,$),Ur(s,"selectstart",q=>Hj(q),{S:!1}),Ur(h,S,$),Ur(h,"pointermove",q=>{const pe=q[g]-oe;(_||K)&&V(Y+pe)})];if(K)V(Y);else if(!_){const q=Uu(mne);q&&Qn(F,q(V,Z,Y,re,B))}M.setPointerCapture(I.pointerId)}})};return(c,d,p)=>{const{Et:h}=c,[m,g]=El(333),b=!!o.scrollBy;let y=!0;return Gt(Ls,[Ur(h,"pointerenter",()=>{d(Qj,!0)}),Ur(h,"pointerleave pointercancel",()=>{d(Qj,!1)}),Ur(h,"wheel",x=>{const{deltaX:w,deltaY:S,deltaMode:j}=x;b&&y&&j===0&&li(h)===r&&o.scrollBy({left:w,top:S,behavior:"smooth"}),y=!1,d(Jj,!0),m(()=>{y=!0,d(Jj)}),Hj(x)},{S:!1,$:!0}),Ur(h,"mousedown",Gt(Ur,s,"click",wO,{O:!0,$:!0}),{$:!0}),i(c,p),g])}},Mne=(e,t,n,r,o,s)=>{let i,c,d,p,h,m=As,g=0;const[b,y]=El(),[x,w]=El(),[S,j]=El(100),[I,_]=El(100),[M,E]=El(100),[A,R]=El(()=>g),[D,O]=Pne(e,o,Ene(t,o,r)),{lt:T,Ft:K,At:G}=o,{Vt:X,Dt:Z,Mt:te,Rt:V,Lt:oe,Pt:ne}=D,se=$=>{X(ox,$,!0),X(ox,$,!1)},re=($,F)=>{if(R(),$)X(Yj);else{const q=Gt(X,Yj,!0);g>0&&!F?A(q):q()}},ae=$=>$.pointerType==="mouse",B=$=>{ae($)&&(p=c,p&&re(!0))},Y=[j,R,_,E,w,y,()=>m(),Ur(T,"pointerover",B,{O:!0}),Ur(T,"pointerenter",B),Ur(T,"pointerleave",$=>{ae($)&&(p=!1,c&&re(!1))}),Ur(T,"pointermove",$=>{ae($)&&i&&b(()=>{j(),re(!0),I(()=>{i&&re(!1)})})}),Ur(K,"scroll",$=>{x(()=>{te(r),d&&re(!0),S(()=>{d&&!p&&re(!1)})}),s($),ne()})];return[()=>Gt(Ls,Qn(Y,O())),({St:$,xt:F,Wt:q,Xt:pe})=>{const{Yt:W,Jt:U,Kt:ee}=pe||{},{gt:J,ot:ge}=q||{},{rt:he}=n,{I:de}=Jo(),{Ot:_e,Zt:Pe,Qt:ze}=r,[ht,Je]=$("showNativeOverlaidScrollbars"),[qt,Pt]=$("scrollbars.theme"),[jt,Se]=$("scrollbars.visibility"),[Fe,it]=$("scrollbars.autoHide"),[At,ke]=$("scrollbars.autoHideSuspend"),[lt]=$("scrollbars.autoHideDelay"),[Rt,zt]=$("scrollbars.dragScroll"),[Re,Qe]=$("scrollbars.clickScroll"),En=ge&&!F,Te=ze.x||ze.y,ct=W||U||J||F,ft=ee||Se,tt=ht&&de.x&&de.y,en=(ar,vn)=>{const dn=jt==="visible"||jt==="auto"&&ar==="scroll";return X(lne,dn,vn),dn};if(g=lt,En&&(At&&Te?(se(!1),m(),M(()=>{m=Ur(K,"scroll",Gt(se,!0),{O:!0})})):se(!0)),Je&&X(one,tt),Pt&&(X(h),X(qt,!0),h=qt),ke&&!At&&se(!0),it&&(i=Fe==="move",c=Fe==="leave",d=Fe!=="never",re(!d,!0)),zt&&X(dne,Rt),Qe&&X(une,Re),ft){const ar=en(Pe.x,!0),vn=en(Pe.y,!1);X(cne,!(ar&&vn))}ct&&(Z(r),te(r),V(r),ne(),oe(r),X(Xj,!_e.x,!0),X(Xj,!_e.y,!1),X(sne,he&&!G))},{},D]},One=e=>{const t=Jo(),{j:n,H:r}=t,o=Uu(v2),s=o&&o.C,{elements:i}=n(),{host:c,padding:d,viewport:p,content:h}=i,m=Wd(e),g=m?{}:e,{elements:b}=g,{host:y,padding:x,viewport:w,content:S}=b||{},j=m?e:g.target,I=Qm(j,"textarea"),_=j.ownerDocument,M=_.documentElement,E=j===_.body,A=_.defaultView,R=Gt(yne,[j]),D=Gt(TO,[j]),O=Gt(b2,[j]),T=Gt(Fl,""),K=Gt(R,T,p),G=Gt(D,T,h),X=K(w),Z=X===j,te=Z&&E,V=!Z&&G(S),oe=!Z&&Wd(X)&&X===V,ne=oe&&!!O(h),se=ne?K():X,re=ne?V:G(),B=te?M:oe?se:X,Y=I?R(T,c,y):j,$=te?B:Y,F=oe?re:V,q=_.activeElement,pe=!Z&&A.top===A&&q===j,W={Ht:j,lt:$,it:B,tn:!Z&&D(T,d,x),ut:F,nn:!Z&&!r&&s&&s(t),It:te?M:B,Ft:te?_:B,sn:A,qt:_,ft:I,At:E,zt:m,_t:Z,en:oe,dt:(Se,Fe)=>Ete(B,Z?Zs:Ui,Z?Fe:Se),vt:(Se,Fe,it)=>zl(B,Z?Zs:Ui,Z?Fe:Se,it)},U=gi(W).reduce((Se,Fe)=>{const it=W[Fe];return Qn(Se,it&&Wd(it)&&!li(it)?it:!1)},[]),ee=Se=>Se?d0(U,Se):null,{Ht:J,lt:ge,tn:he,it:de,ut:_e,nn:Pe}=W,ze=[()=>{Wo(ge,Zs),Wo(ge,_1),Wo(J,_1),E&&(Wo(M,Zs),Wo(M,_1))}],ht=I&&ee(ge);let Je=I?J:Yb([_e,de,he,ge,J].find(Se=>ee(Se)===!1));const qt=te?J:_e||de,Pt=Gt(Ls,ze);return[W,()=>{Mo(ge,Zs,Z?"viewport":"host"),Mo(he,rx,""),Mo(_e,qj,""),Z||Mo(de,Ui,"");const Se=E&&!Z?al(li(j),IO):As,Fe=it=>{_s(li(it),Yb(it)),ci(it)};if(ht&&(Tj(J,ge),Qn(ze,()=>{Tj(ge,J),ci(ge)})),_s(qt,Je),_s(ge,he),_s(he||ge,!Z&&de),_s(de,_e),Qn(ze,()=>{Se(),Wo(he,rx),Wo(_e,qj),Wo(de,PO),Wo(de,EO),Wo(de,Ui),ee(_e)&&Fe(_e),ee(de)&&Fe(de),ee(he)&&Fe(he)}),r&&!Z&&(zl(de,Ui,MO,!0),Qn(ze,Gt(Wo,de,Ui))),Pe&&(Ate(de,Pe),Qn(ze,Gt(ci,Pe))),pe){const it="tabindex",At=Mo(de,it);Mo(de,it,"-1"),de.focus();const ke=()=>At?Mo(de,it,At):Wo(de,it),lt=Ur(_,"pointerdown keydown",()=>{ke(),lt()});Qn(ze,[ke,lt])}else q&&q.focus&&q.focus();return Je=0,Pt},Pt]},Ane=({ut:e})=>({Wt:t,cn:n,xt:r})=>{const{U:o}=Jo(),{ht:s}=t||{},{ct:i}=n;(e||!o)&&(s||r)&&Co(e,{[bi]:i?"":"100%"})},Rne=({lt:e,tn:t,it:n,_t:r},o)=>{const[s,i]=Js({u:Ute,o:Lj()},Gt(Lj,e,"padding",""));return({St:c,Wt:d,cn:p,xt:h})=>{let[m,g]=i(h);const{H:b,U:y}=Jo(),{et:x,bt:w,gt:S}=d||{},{rt:j}=p,[I,_]=c("paddingAbsolute");(x||g||(h||!y&&w))&&([m,g]=s(h));const E=!r&&(_||S||g);if(E){const A=!I||!t&&!b,R=m.r+m.l,D=m.t+m.b,O={[eg]:A&&!j?-R:0,[Ud]:A?-D:0,[Zm]:A&&j?-R:0,top:A?-m.t:0,right:A?j?-m.r:"auto":0,left:A?j?"auto":-m.l:0,[vi]:A?`calc(100% + ${R}px)`:""},T={[vO]:A?m.t:0,[p2]:A?m.r:0,[Jm]:A?m.b:0,[h2]:A?m.l:0};Co(t||n,O),Co(n,T),Bn(o,{tn:m,rn:!A,k:t?T:Bn({},O,T)})}return{ln:E}}},Dne=({lt:e,tn:t,it:n,nn:r,_t:o,vt:s,At:i,sn:c},d)=>{const p=Gt(Vd,0),h="visible",m=42,g={u:xO,o:{w:0,h:0}},b={u:yO,o:{x:ju,y:ju}},y=(ae,B)=>{const Y=Yo.devicePixelRatio%1!==0?1:0,$={w:p(ae.w-B.w),h:p(ae.h-B.h)};return{w:$.w>Y?$.w:0,h:$.h>Y?$.h:0}},x=ae=>ae.indexOf(h)===0,{L:w,U:S,H:j,I}=Jo(),_=Uu(v2),M=!o&&!j&&(I.x||I.y),E=i&&o,[A,R]=Js(g,Gt(ng,n)),[D,O]=Js(g,Gt(tg,n)),[T,K]=Js(g),[G,X]=Js(g),[Z]=Js(b),te=(ae,B)=>{if(Co(n,{[bi]:""}),B){const{rn:Y,tn:$}=d,{an:F,D:q}=ae,pe=ng(e),W=$h(e),U=Co(n,"boxSizing")==="content-box",ee=Y||U?$.b+$.t:0,J=!(I.x&&U);Co(n,{[bi]:W.h+pe.h+(F.x&&J?q.x:0)-ee})}},V=(ae,B)=>{const Y=!j&&!ae?m:0,$=(he,de,_e)=>{const Pe=Co(n,he),ht=(B?B[he]:Pe)==="scroll";return[Pe,ht,ht&&!j?de?Y:_e:0,de&&!!Y]},[F,q,pe,W]=$(Ad,I.x,w.x),[U,ee,J,ge]=$(Rd,I.y,w.y);return{Zt:{x:F,y:U},an:{x:q,y:ee},D:{x:pe,y:J},M:{x:W,y:ge}}},oe=(ae,B,Y,$)=>{const F=(ee,J)=>{const ge=x(ee),he=J&&ge&&ee.replace(`${h}-`,"")||"";return[J&&!ge?ee:"",x(he)?"hidden":he]},[q,pe]=F(Y.x,B.x),[W,U]=F(Y.y,B.y);return $[Ad]=pe&&W?pe:q,$[Rd]=U&&q?U:W,V(ae,$)},ne=(ae,B,Y,$)=>{const{D:F,M:q}=ae,{x:pe,y:W}=q,{x:U,y:ee}=F,{k:J}=d,ge=B?Zm:eg,he=B?h2:p2,de=J[ge],_e=J[Ud],Pe=J[he],ze=J[Jm];$[vi]=`calc(100% + ${ee+de*-1}px)`,$[ge]=-ee+de,$[Ud]=-U+_e,Y&&($[he]=Pe+(W?ee:0),$[Jm]=ze+(pe?U:0))},[se,re]=_?_.T(M,S,n,r,d,V,ne):[()=>M,()=>[As]];return({St:ae,Wt:B,cn:Y,xt:$},{ln:F})=>{const{et:q,wt:pe,bt:W,ht:U,gt:ee,yt:J}=B||{},{ct:ge,rt:he}=Y,[de,_e]=ae("showNativeOverlaidScrollbars"),[Pe,ze]=ae("overflow"),ht=de&&I.x&&I.y,Je=!o&&!S&&(q||W||pe||_e||U),qt=q||F||W||ee||J||_e,Pt=x(Pe.x),jt=x(Pe.y),Se=Pt||jt;let Fe=R($),it=O($),At=K($),ke=X($),lt;if(_e&&j&&s(MO,Jte,!ht),Je&&(lt=V(ht),te(lt,ge)),qt){Se&&s(cu,lu,!1);const[Tr,ir]=re(ht,he,lt),[$n,Jn]=Fe=A($),[Mn,Fr]=it=D($),co=$h(n);let Nr=Mn,$r=co;Tr(),(Fr||Jn||_e)&&ir&&!ht&&se(ir,Mn,$n,he)&&($r=$h(n),Nr=tg(n));const Lo=Vte(c),Br={w:p(Vd(Mn.w,Nr.w)+$n.w),h:p(Vd(Mn.h,Nr.h)+$n.h)},ts={w:p((E?Lo.w:$r.w+p(co.w-Mn.w))+$n.w),h:p((E?Lo.h:$r.h+p(co.h-Mn.h))+$n.h)};ke=G(ts),At=T(y(Br,ts),$)}const[Rt,zt]=ke,[Re,Qe]=At,[En,Te]=it,[ct,ft]=Fe,tt={x:Re.w>0,y:Re.h>0},en=Pt&&jt&&(tt.x||tt.y)||Pt&&tt.x&&!tt.y||jt&&tt.y&&!tt.x;if(F||ee||J||ft||Te||zt||Qe||ze||_e||Je||qt){const Tr={[eg]:0,[Ud]:0,[Zm]:0,[vi]:"",[Ad]:"",[Rd]:""},ir=oe(ht,tt,Pe,Tr),$n=se(ir,En,ct,he);o||ne(ir,he,$n,Tr),Je&&te(ir,ge),o?(Mo(e,PO,Tr[Ad]),Mo(e,EO,Tr[Rd])):Co(n,Tr)}zl(e,Zs,lu,en),zl(t,rx,Zte,en),o||zl(n,Ui,cu,Se);const[vn,dn]=Z(V(ht).Zt);return Bn(d,{Zt:vn,Ct:{x:Rt.w,y:Rt.h},Ot:{x:Re.w,y:Re.h},Qt:tt}),{Kt:dn,Yt:zt,Jt:Qe}}},Tne=e=>{const[t,n,r]=One(e),o={tn:{t:0,r:0,b:0,l:0},rn:!1,k:{[eg]:0,[Ud]:0,[Zm]:0,[vO]:0,[p2]:0,[Jm]:0,[h2]:0},Ct:{x:0,y:0},Ot:{x:0,y:0},Zt:{x:ju,y:ju},Qt:{x:!1,y:!1}},{Ht:s,it:i,vt:c,_t:d}=t,{H:p,I:h,U:m}=Jo(),g=!p&&(h.x||h.y),b=[Ane(t),Rne(t,o),Dne(t,o)];return[n,y=>{const x={},S=(g||!m)&&g0(i);return c("",rg,!0),Xn(b,j=>{Bn(x,j(y,x)||{})}),c("",rg),Yl(i,S),!d&&Yl(s,0),x},o,t,r]},Nne=(e,t,n,r)=>{const[o,s,i,c,d]=Tne(e),[p,h,m]=_ne(c,S=>{w({},S)}),[g,b,,y]=Mne(e,t,m,i,c,r),x=S=>gi(S).some(j=>!!S[j]),w=(S,j)=>{const{un:I,xt:_,$t:M,fn:E}=S,A=I||{},R=!!_,D={St:Xte(t,A,R),un:A,xt:R};if(E)return b(D),!1;const O=j||h(Bn({},D,{$t:M})),T=s(Bn({},D,{cn:m,Wt:O}));b(Bn({},D,{Wt:O,Xt:T}));const K=x(O),G=x(T),X=K||G||!u2(A)||R;return X&&n(S,{Wt:O,Xt:T}),X};return[()=>{const{Ht:S,it:j,qt:I,At:_}=c,M=_?I.documentElement:S,E=g0(M),A=[p(),o(),g()];return Yl(j,E),Gt(Ls,A)},w,()=>({_n:m,dn:i}),{vn:c,hn:y},d]},ai=(e,t,n)=>{const{G:r}=Jo(),o=Wd(e),s=o?e:e.target,i=NO(s);if(t&&!i){let c=!1;const d=[],p={},h=O=>{const T=cO(O,!0),K=Uu(pne);return K?K(T,!0):T},m=Bn({},r(),h(t)),[g,b,y]=nx(),[x,w,S]=nx(n),j=(O,T)=>{S(O,T),y(O,T)},[I,_,M,E,A]=Nne(e,m,({un:O,xt:T},{Wt:K,Xt:G})=>{const{et:X,gt:Z,ht:te,bt:V,wt:oe,ot:ne}=K,{Yt:se,Jt:re,Kt:ae}=G;j("updated",[D,{updateHints:{sizeChanged:!!X,directionChanged:!!Z,heightIntrinsicChanged:!!te,overflowEdgeChanged:!!se,overflowAmountChanged:!!re,overflowStyleChanged:!!ae,contentMutation:!!V,hostMutation:!!oe,appear:!!ne},changedOptions:O||{},force:!!T}])},O=>j("scroll",[D,O])),R=O=>{Sne(s),Ls(d),c=!0,j("destroyed",[D,O]),b(),w()},D={options(O,T){if(O){const K=T?r():{},G=kO(m,Bn(K,h(O)));u2(G)||(Bn(m,G),_({un:G}))}return Bn({},m)},on:x,off:(O,T)=>{O&&T&&w(O,T)},state(){const{_n:O,dn:T}=M(),{rt:K}=O,{Ct:G,Ot:X,Zt:Z,Qt:te,tn:V,rn:oe}=T;return Bn({},{overflowEdge:G,overflowAmount:X,overflowStyle:Z,hasOverflow:te,padding:V,paddingAbsolute:oe,directionRTL:K,destroyed:c})},elements(){const{Ht:O,lt:T,tn:K,it:G,ut:X,It:Z,Ft:te}=E.vn,{Ut:V,Gt:oe}=E.hn,ne=re=>{const{Tt:ae,kt:B,Et:Y}=re;return{scrollbar:Y,track:B,handle:ae}},se=re=>{const{Bt:ae,jt:B}=re,Y=ne(ae[0]);return Bn({},Y,{clone:()=>{const $=ne(B());return _({fn:!0}),$}})};return Bn({},{target:O,host:T,padding:K||G,viewport:G,content:X||G,scrollOffsetElement:Z,scrollEventElement:te,scrollbarHorizontal:se(V),scrollbarVertical:se(oe)})},update:O=>_({xt:O,$t:!0}),destroy:Gt(R,!1),plugin:O=>p[gi(O)[0]]};return Qn(d,[A]),wne(s,D),DO(AO,ai,[D,g,p]),Cne(E.vn.At,!o&&e.cancel)?(R(!0),D):(Qn(d,I()),j("initialized",[D]),D.update(!0),D)}return i};ai.plugin=e=>{const t=$s(e),n=t?e:[e],r=n.map(o=>DO(o,ai)[0]);return fne(n),t?r:r[0]};ai.valid=e=>{const t=e&&e.elements,n=Ta(t)&&t();return qm(n)&&!!NO(n.target)};ai.env=()=>{const{L:e,I:t,H:n,V:r,U:o,A:s,P:i,F:c,W:d,j:p,N:h,G:m,q:g}=Jo();return Bn({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:o,cssCustomProperties:s,scrollTimeline:i,staticDefaultInitialization:c,staticDefaultOptions:d,getDefaultInitialization:p,setDefaultInitialization:h,getDefaultOptions:m,setDefaultOptions:g})};const $ne=()=>{if(typeof window>"u"){const p=()=>{};return[p,p]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",o=n.requestAnimationFrame,s=n.cancelAnimationFrame,i=r?n.requestIdleCallback:o,c=r?n.cancelIdleCallback:s,d=()=>{c(e),s(t)};return[(p,h)=>{d(),e=i(r?()=>{d(),t=o(p)}:p,typeof h=="object"?h:{timeout:2233})},d]},y2=e=>{const{options:t,events:n,defer:r}=e||{},[o,s]=l.useMemo($ne,[]),i=l.useRef(null),c=l.useRef(r),d=l.useRef(t),p=l.useRef(n);return l.useEffect(()=>{c.current=r},[r]),l.useEffect(()=>{const{current:h}=i;d.current=t,ai.valid(h)&&h.options(t||{},!0)},[t]),l.useEffect(()=>{const{current:h}=i;p.current=n,ai.valid(h)&&h.on(n||{},!0)},[n]),l.useEffect(()=>()=>{var h;s(),(h=i.current)==null||h.destroy()},[]),l.useMemo(()=>[h=>{const m=i.current;if(ai.valid(m))return;const g=c.current,b=d.current||{},y=p.current||{},x=()=>i.current=ai(h,b,y);g?o(x,g):x()},()=>i.current],[])},Lne=(e,t)=>{const{element:n="div",options:r,events:o,defer:s,children:i,...c}=e,d=n,p=l.useRef(null),h=l.useRef(null),[m,g]=y2({options:r,events:o,defer:s});return l.useEffect(()=>{const{current:b}=p,{current:y}=h;return b&&y&&m({target:b,elements:{viewport:y,content:y}}),()=>{var x;return(x=g())==null?void 0:x.destroy()}},[m,n]),l.useImperativeHandle(t,()=>({osInstance:g,getElement:()=>p.current}),[]),z.createElement(d,{"data-overlayscrollbars-initialize":"",ref:p,...c},z.createElement("div",{"data-overlayscrollbars-contents":"",ref:h},i))},v0=l.forwardRef(Lne);var zO={exports:{}},FO={};const as=Dx(UD),Sd=Dx(GD),zne=Dx(qD);(function(e){var t,n,r=wc&&wc.__generator||function(ie,ue){var xe,Me,ye,pt,at={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return pt={next:Kt(0),throw:Kt(1),return:Kt(2)},typeof Symbol=="function"&&(pt[Symbol.iterator]=function(){return this}),pt;function Kt(gt){return function(wt){return function(Ge){if(xe)throw new TypeError("Generator is already executing.");for(;at;)try{if(xe=1,Me&&(ye=2&Ge[0]?Me.return:Ge[0]?Me.throw||((ye=Me.return)&&ye.call(Me),0):Me.next)&&!(ye=ye.call(Me,Ge[1])).done)return ye;switch(Me=0,ye&&(Ge=[2&Ge[0],ye.value]),Ge[0]){case 0:case 1:ye=Ge;break;case 4:return at.label++,{value:Ge[1],done:!1};case 5:at.label++,Me=Ge[1],Ge=[0];continue;case 7:Ge=at.ops.pop(),at.trys.pop();continue;default:if(!((ye=(ye=at.trys).length>0&&ye[ye.length-1])||Ge[0]!==6&&Ge[0]!==2)){at=0;continue}if(Ge[0]===3&&(!ye||Ge[1]>ye[0]&&Ge[1]=200&&ie.status<=299},K=function(ie){return/ion\/(vnd\.api\+)?json/.test(ie.get("content-type")||"")};function G(ie){if(!(0,D.isPlainObject)(ie))return ie;for(var ue=w({},ie),xe=0,Me=Object.entries(ue);xe"u"&&at===O&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(an,Yt){return M(ue,null,function(){var Ve,Ct,Ft,Qt,Ln,Jt,yn,hn,Hr,pr,Tt,zn,Gn,hr,Pr,er,qn,Cn,An,Rn,jn,Fn,Zt,vt,Mt,nt,mt,St,Bt,Ue,Be,Oe,$e,Ne,Ke,Nt;return r(this,function(Ot){switch(Ot.label){case 0:return Ve=Yt.signal,Ct=Yt.getState,Ft=Yt.extra,Qt=Yt.endpoint,Ln=Yt.forced,Jt=Yt.type,Hr=(hn=typeof an=="string"?{url:an}:an).url,Tt=(pr=hn.headers)===void 0?new Headers(tn.headers):pr,Gn=(zn=hn.params)===void 0?void 0:zn,Pr=(hr=hn.responseHandler)===void 0?$t??"json":hr,qn=(er=hn.validateStatus)===void 0?Ut??T:er,An=(Cn=hn.timeout)===void 0?Et:Cn,Rn=I(hn,["url","headers","params","responseHandler","validateStatus","timeout"]),jn=w(S(w({},tn),{signal:Ve}),Rn),Tt=new Headers(G(Tt)),Fn=jn,[4,ye(Tt,{getState:Ct,extra:Ft,endpoint:Qt,forced:Ln,type:Jt})];case 1:Fn.headers=Ot.sent()||Tt,Zt=function(Ze){return typeof Ze=="object"&&((0,D.isPlainObject)(Ze)||Array.isArray(Ze)||typeof Ze.toJSON=="function")},!jn.headers.has("content-type")&&Zt(jn.body)&&jn.headers.set("content-type",Ee),Zt(jn.body)&&wt(jn.headers)&&(jn.body=JSON.stringify(jn.body,et)),Gn&&(vt=~Hr.indexOf("?")?"&":"?",Mt=Kt?Kt(Gn):new URLSearchParams(G(Gn)),Hr+=vt+Mt),Hr=function(Ze,cn){if(!Ze)return cn;if(!cn)return Ze;if(function(Sn){return new RegExp("(^|:)//").test(Sn)}(cn))return cn;var wn=Ze.endsWith("/")||!cn.startsWith("?")?"/":"";return Ze=function(Sn){return Sn.replace(/\/$/,"")}(Ze),""+Ze+wn+function(Sn){return Sn.replace(/^\//,"")}(cn)}(xe,Hr),nt=new Request(Hr,jn),mt=new Request(Hr,jn),yn={request:mt},Bt=!1,Ue=An&&setTimeout(function(){Bt=!0,Yt.abort()},An),Ot.label=2;case 2:return Ot.trys.push([2,4,5,6]),[4,at(nt)];case 3:return St=Ot.sent(),[3,6];case 4:return Be=Ot.sent(),[2,{error:{status:Bt?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Be)},meta:yn}];case 5:return Ue&&clearTimeout(Ue),[7];case 6:Oe=St.clone(),yn.response=Oe,Ne="",Ot.label=7;case 7:return Ot.trys.push([7,9,,10]),[4,Promise.all([ln(St,Pr).then(function(Ze){return $e=Ze},function(Ze){return Ke=Ze}),Oe.text().then(function(Ze){return Ne=Ze},function(){})])];case 8:if(Ot.sent(),Ke)throw Ke;return[3,10];case 9:return Nt=Ot.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:St.status,data:Ne,error:String(Nt)},meta:yn}];case 10:return[2,qn(St,$e)?{data:$e,meta:yn}:{error:{status:St.status,data:$e},meta:yn}]}})})};function ln(an,Yt){return M(this,null,function(){var Ve;return r(this,function(Ct){switch(Ct.label){case 0:return typeof Yt=="function"?[2,Yt(an)]:(Yt==="content-type"&&(Yt=wt(an.headers)?"json":"text"),Yt!=="json"?[3,2]:[4,an.text()]);case 1:return[2,(Ve=Ct.sent()).length?JSON.parse(Ve):null];case 2:return[2,an.text()]}})})}}var Z=function(ie,ue){ue===void 0&&(ue=void 0),this.value=ie,this.meta=ue};function te(ie,ue){return ie===void 0&&(ie=0),ue===void 0&&(ue=5),M(this,null,function(){var xe,Me;return r(this,function(ye){switch(ye.label){case 0:return xe=Math.min(ie,ue),Me=~~((Math.random()+.4)*(300<=$e)}var jn=(0,ze.createAsyncThunk)(Gn+"/executeQuery",An,{getPendingMeta:function(){var vt;return(vt={startedTimeStamp:Date.now()})[ze.SHOULD_AUTOBATCH]=!0,vt},condition:function(vt,Mt){var nt,mt,St,Bt=(0,Mt.getState)(),Ue=(mt=(nt=Bt[Gn])==null?void 0:nt.queries)==null?void 0:mt[vt.queryCacheKey],Be=Ue==null?void 0:Ue.fulfilledTimeStamp,Oe=vt.originalArgs,$e=Ue==null?void 0:Ue.originalArgs,Ne=Pr[vt.endpointName];return!(!de(vt)&&((Ue==null?void 0:Ue.status)==="pending"||!Rn(vt,Bt)&&(!W(Ne)||!((St=Ne==null?void 0:Ne.forceRefetch)!=null&&St.call(Ne,{currentArg:Oe,previousArg:$e,endpointState:Ue,state:Bt})))&&Be))},dispatchConditionRejection:!0}),Fn=(0,ze.createAsyncThunk)(Gn+"/executeMutation",An,{getPendingMeta:function(){var vt;return(vt={startedTimeStamp:Date.now()})[ze.SHOULD_AUTOBATCH]=!0,vt}});function Zt(vt){return function(Mt){var nt,mt;return((mt=(nt=Mt==null?void 0:Mt.meta)==null?void 0:nt.arg)==null?void 0:mt.endpointName)===vt}}return{queryThunk:jn,mutationThunk:Fn,prefetch:function(vt,Mt,nt){return function(mt,St){var Bt=function(Ne){return"force"in Ne}(nt)&&nt.force,Ue=function(Ne){return"ifOlderThan"in Ne}(nt)&&nt.ifOlderThan,Be=function(Ne){return Ne===void 0&&(Ne=!0),qn.endpoints[vt].initiate(Mt,{forceRefetch:Ne})},Oe=qn.endpoints[vt].select(Mt)(St());if(Bt)mt(Be());else if(Ue){var $e=Oe==null?void 0:Oe.fulfilledTimeStamp;if(!$e)return void mt(Be());(Number(new Date)-Number(new Date($e)))/1e3>=Ue&&mt(Be())}else mt(Be(!1))}},updateQueryData:function(vt,Mt,nt,mt){return mt===void 0&&(mt=!0),function(St,Bt){var Ue,Be,Oe,$e=qn.endpoints[vt].select(Mt)(Bt()),Ne={patches:[],inversePatches:[],undo:function(){return St(qn.util.patchQueryData(vt,Mt,Ne.inversePatches,mt))}};if($e.status===t.uninitialized)return Ne;if("data"in $e)if((0,Pe.isDraftable)($e.data)){var Ke=(0,Pe.produceWithPatches)($e.data,nt),Nt=Ke[0],Ot=Ke[2];(Ue=Ne.patches).push.apply(Ue,Ke[1]),(Be=Ne.inversePatches).push.apply(Be,Ot),Oe=Nt}else Oe=nt($e.data),Ne.patches.push({op:"replace",path:[],value:Oe}),Ne.inversePatches.push({op:"replace",path:[],value:$e.data});return St(qn.util.patchQueryData(vt,Mt,Ne.patches,mt)),Ne}},upsertQueryData:function(vt,Mt,nt){return function(mt){var St;return mt(qn.endpoints[vt].initiate(Mt,((St={subscribe:!1,forceRefetch:!0})[he]=function(){return{data:nt}},St)))}},patchQueryData:function(vt,Mt,nt,mt){return function(St,Bt){var Ue=Pr[vt],Be=er({queryArgs:Mt,endpointDefinition:Ue,endpointName:vt});if(St(qn.internalActions.queryResultPatched({queryCacheKey:Be,patches:nt})),mt){var Oe=qn.endpoints[vt].select(Mt)(Bt()),$e=U(Ue.providesTags,Oe.data,void 0,Mt,{},Cn);St(qn.internalActions.updateProvidedBy({queryCacheKey:Be,providedTags:$e}))}}},buildMatchThunkActions:function(vt,Mt){return{matchPending:(0,_e.isAllOf)((0,_e.isPending)(vt),Zt(Mt)),matchFulfilled:(0,_e.isAllOf)((0,_e.isFulfilled)(vt),Zt(Mt)),matchRejected:(0,_e.isAllOf)((0,_e.isRejected)(vt),Zt(Mt))}}}}({baseQuery:Me,reducerPath:ye,context:xe,api:ie,serializeQueryArgs:pt,assertTagType:Ge}),et=Ee.queryThunk,Et=Ee.mutationThunk,$t=Ee.patchQueryData,Ut=Ee.updateQueryData,tn=Ee.upsertQueryData,ln=Ee.prefetch,an=Ee.buildMatchThunkActions,Yt=function(Tt){var zn=Tt.reducerPath,Gn=Tt.queryThunk,hr=Tt.mutationThunk,Pr=Tt.context,er=Pr.endpointDefinitions,qn=Pr.apiUid,Cn=Pr.extractRehydrationInfo,An=Pr.hasRehydrationInfo,Rn=Tt.assertTagType,jn=Tt.config,Fn=(0,J.createAction)(zn+"/resetApiState"),Zt=(0,J.createSlice)({name:zn+"/queries",initialState:it,reducers:{removeQueryResult:{reducer:function(Ue,Be){delete Ue[Be.payload.queryCacheKey]},prepare:(0,J.prepareAutoBatched)()},queryResultPatched:{reducer:function(Ue,Be){var Oe=Be.payload,$e=Oe.patches;jt(Ue,Oe.queryCacheKey,function(Ne){Ne.data=(0,Pt.applyPatches)(Ne.data,$e.concat())})},prepare:(0,J.prepareAutoBatched)()}},extraReducers:function(Ue){Ue.addCase(Gn.pending,function(Be,Oe){var $e,Ne=Oe.meta,Ke=Oe.meta.arg,Nt=de(Ke);(Ke.subscribe||Nt)&&(Be[$e=Ke.queryCacheKey]!=null||(Be[$e]={status:t.uninitialized,endpointName:Ke.endpointName})),jt(Be,Ke.queryCacheKey,function(Ot){Ot.status=t.pending,Ot.requestId=Nt&&Ot.requestId?Ot.requestId:Ne.requestId,Ke.originalArgs!==void 0&&(Ot.originalArgs=Ke.originalArgs),Ot.startedTimeStamp=Ne.startedTimeStamp})}).addCase(Gn.fulfilled,function(Be,Oe){var $e=Oe.meta,Ne=Oe.payload;jt(Be,$e.arg.queryCacheKey,function(Ke){var Nt;if(Ke.requestId===$e.requestId||de($e.arg)){var Ot=er[$e.arg.endpointName].merge;if(Ke.status=t.fulfilled,Ot)if(Ke.data!==void 0){var Ze=$e.fulfilledTimeStamp,cn=$e.arg,wn=$e.baseQueryMeta,Sn=$e.requestId,Er=(0,J.createNextState)(Ke.data,function(cr){return Ot(cr,Ne,{arg:cn.originalArgs,baseQueryMeta:wn,fulfilledTimeStamp:Ze,requestId:Sn})});Ke.data=Er}else Ke.data=Ne;else Ke.data=(Nt=er[$e.arg.endpointName].structuralSharing)==null||Nt?R((0,qt.isDraft)(Ke.data)?(0,Pt.original)(Ke.data):Ke.data,Ne):Ne;delete Ke.error,Ke.fulfilledTimeStamp=$e.fulfilledTimeStamp}})}).addCase(Gn.rejected,function(Be,Oe){var $e=Oe.meta,Ne=$e.condition,Ke=$e.requestId,Nt=Oe.error,Ot=Oe.payload;jt(Be,$e.arg.queryCacheKey,function(Ze){if(!Ne){if(Ze.requestId!==Ke)return;Ze.status=t.rejected,Ze.error=Ot??Nt}})}).addMatcher(An,function(Be,Oe){for(var $e=Cn(Oe).queries,Ne=0,Ke=Object.entries($e);Ne"u"||navigator.onLine===void 0||navigator.onLine,focused:typeof document>"u"||document.visibilityState!=="hidden",middlewareRegistered:!1},jn),reducers:{middlewareRegistered:function(Ue,Be){Ue.middlewareRegistered=Ue.middlewareRegistered!=="conflict"&&qn===Be.payload||"conflict"}},extraReducers:function(Ue){Ue.addCase(ae,function(Be){Be.online=!0}).addCase(B,function(Be){Be.online=!1}).addCase(se,function(Be){Be.focused=!0}).addCase(re,function(Be){Be.focused=!1}).addMatcher(An,function(Be){return w({},Be)})}}),Bt=(0,J.combineReducers)({queries:Zt.reducer,mutations:vt.reducer,provided:Mt.reducer,subscriptions:mt.reducer,config:St.reducer});return{reducer:function(Ue,Be){return Bt(Fn.match(Be)?void 0:Ue,Be)},actions:S(w(w(w(w(w(w({},St.actions),Zt.actions),nt.actions),mt.actions),vt.actions),Mt.actions),{unsubscribeMutationResult:vt.actions.removeMutationResult,resetApiState:Fn})}}({context:xe,queryThunk:et,mutationThunk:Et,reducerPath:ye,assertTagType:Ge,config:{refetchOnFocus:gt,refetchOnReconnect:wt,refetchOnMountOrArgChange:Kt,keepUnusedDataFor:at,reducerPath:ye}}),Ve=Yt.reducer,Ct=Yt.actions;Br(ie.util,{patchQueryData:$t,updateQueryData:Ut,upsertQueryData:tn,prefetch:ln,resetApiState:Ct.resetApiState}),Br(ie.internalActions,Ct);var Ft=function(Tt){var zn=Tt.reducerPath,Gn=Tt.queryThunk,hr=Tt.api,Pr=Tt.context,er=Pr.apiUid,qn={invalidateTags:(0,ar.createAction)(zn+"/invalidateTags")},Cn=[Nr,vn,Tr,ir,Mn,co];return{middleware:function(Rn){var jn=!1,Fn=S(w({},Tt),{internalState:{currentSubscriptions:{}},refetchQuery:An}),Zt=Cn.map(function(nt){return nt(Fn)}),vt=function(nt){var mt=nt.api,St=nt.queryThunk,Bt=nt.internalState,Ue=mt.reducerPath+"/subscriptions",Be=null,Oe=!1,$e=mt.internalActions,Ne=$e.updateSubscriptionOptions,Ke=$e.unsubscribeQueryResult;return function(Nt,Ot){var Ze,cn;if(Be||(Be=JSON.parse(JSON.stringify(Bt.currentSubscriptions))),mt.util.resetApiState.match(Nt))return Be=Bt.currentSubscriptions={},[!0,!1];if(mt.internalActions.internal_probeSubscription.match(Nt)){var wn=Nt.payload;return[!1,!!((Ze=Bt.currentSubscriptions[wn.queryCacheKey])!=null&&Ze[wn.requestId])]}var Sn=function(_n,ur){var po,dr,mn,Qr,Xr,Ai,ap,ns,qa;if(Ne.match(ur)){var pa=ur.payload,Ka=pa.queryCacheKey,jo=pa.requestId;return(po=_n==null?void 0:_n[Ka])!=null&&po[jo]&&(_n[Ka][jo]=pa.options),!0}if(Ke.match(ur)){var _o=ur.payload;return jo=_o.requestId,_n[Ka=_o.queryCacheKey]&&delete _n[Ka][jo],!0}if(mt.internalActions.removeQueryResult.match(ur))return delete _n[ur.payload.queryCacheKey],!0;if(St.pending.match(ur)){var Io=ur.meta;if(jo=Io.requestId,(ho=Io.arg).subscribe)return(vs=(mn=_n[dr=ho.queryCacheKey])!=null?mn:_n[dr]={})[jo]=(Xr=(Qr=ho.subscriptionOptions)!=null?Qr:vs[jo])!=null?Xr:{},!0}if(St.rejected.match(ur)){var vs,rs=ur.meta,ho=rs.arg;if(jo=rs.requestId,rs.condition&&ho.subscribe)return(vs=(ap=_n[Ai=ho.queryCacheKey])!=null?ap:_n[Ai]={})[jo]=(qa=(ns=ho.subscriptionOptions)!=null?ns:vs[jo])!=null?qa:{},!0}return!1}(Bt.currentSubscriptions,Nt);if(Sn){Oe||(Lo(function(){var _n=JSON.parse(JSON.stringify(Bt.currentSubscriptions)),ur=(0,$r.produceWithPatches)(Be,function(){return _n});Ot.next(mt.internalActions.subscriptionsUpdated(ur[1])),Be=_n,Oe=!1}),Oe=!0);var Er=!!((cn=Nt.type)!=null&&cn.startsWith(Ue)),cr=St.rejected.match(Nt)&&Nt.meta.condition&&!!Nt.meta.arg.subscribe;return[!Er&&!cr,!1]}return[!0,!1]}}(Fn),Mt=function(nt){var mt=nt.reducerPath,St=nt.context,Bt=nt.refetchQuery,Ue=nt.internalState,Be=nt.api.internalActions.removeQueryResult;function Oe($e,Ne){var Ke=$e.getState()[mt],Nt=Ke.queries,Ot=Ue.currentSubscriptions;St.batch(function(){for(var Ze=0,cn=Object.keys(Ot);Ze{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 Gne=me([we],({gallery:e})=>{const{boardSearchText:t}=e;return{boardSearchText:t}},Ie),qne=()=>{const e=le(),{boardSearchText:t}=H(Gne),n=l.useRef(null),{t:r}=Q(),o=l.useCallback(d=>{e(Uw(d))},[e]),s=l.useCallback(()=>{e(Uw(""))},[e]),i=l.useCallback(d=>{d.key==="Escape"&&s()},[s]),c=l.useCallback(d=>{o(d.target.value)},[o]);return l.useEffect(()=>{n.current&&n.current.focus()},[]),a.jsxs(B5,{children:[a.jsx(_g,{ref:n,placeholder:r("boards.searchBoard"),value:t,onKeyDown:i,onChange:c,"data-testid":"board-search-input"}),t&&t.length&&a.jsx(wy,{children:a.jsx(Ia,{onClick:s,size:"xs",variant:"ghost","aria-label":r("boards.clearSearch"),opacity:.5,icon:a.jsx(Vne,{boxSize:2})})})]})},Kne=l.memo(qne);function HO(e){return JD(e)}function Qne(e){return ZD(e)}const WO=(e,t)=>{var o,s;if(!e||!(t!=null&&t.data.current))return!1;const{actionType:n}=e,{payloadType:r}=t.data.current;if(e.id===t.data.current.id)return!1;switch(n){case"ADD_FIELD_TO_LINEAR":return r==="NODE_FIELD";case"SET_CURRENT_IMAGE":return r==="IMAGE_DTO";case"SET_INITIAL_IMAGE":return r==="IMAGE_DTO";case"SET_CONTROL_ADAPTER_IMAGE":return r==="IMAGE_DTO";case"SET_CANVAS_INITIAL_IMAGE":return r==="IMAGE_DTO";case"SET_NODES_IMAGE":return r==="IMAGE_DTO";case"SET_MULTI_NODES_IMAGE":return r==="IMAGE_DTO"||"IMAGE_DTOS";case"ADD_TO_BATCH":return r==="IMAGE_DTO"||"IMAGE_DTOS";case"ADD_TO_BOARD":{if(!(r==="IMAGE_DTO"||"IMAGE_DTOS"))return!1;if(r==="IMAGE_DTO"){const{imageDTO:c}=t.data.current.payload,d=c.board_id??"none",p=e.context.boardId;return d!==p}if(r==="IMAGE_DTOS"){const{imageDTOs:c}=t.data.current.payload,d=((o=c[0])==null?void 0:o.board_id)??"none",p=e.context.boardId;return d!==p}return!1}case"REMOVE_FROM_BOARD":{if(!(r==="IMAGE_DTO"||"IMAGE_DTOS"))return!1;if(r==="IMAGE_DTO"){const{imageDTO:c}=t.data.current.payload;return(c.board_id??"none")!=="none"}if(r==="IMAGE_DTOS"){const{imageDTOs:c}=t.data.current.payload;return(((s=c[0])==null?void 0:s.board_id)??"none")!=="none"}return!1}default:return!1}},Xne=e=>{const{isOver:t,label:n="Drop"}=e,r=l.useRef(Jc()),{colorMode:o}=ji();return a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsxs(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full"},children:[a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",bg:Xe("base.700","base.900")(o),opacity:.7,borderRadius:"base",alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"0.1s"}}),a.jsx(N,{sx:{position:"absolute",top:.5,insetInlineStart:.5,insetInlineEnd:.5,bottom:.5,opacity:1,borderWidth:2,borderColor:t?Xe("base.50","base.50")(o):Xe("base.200","base.300")(o),borderRadius:"lg",borderStyle:"dashed",transitionProperty:"common",transitionDuration:"0.1s",alignItems:"center",justifyContent:"center"},children:a.jsx(Le,{sx:{fontSize:"2xl",fontWeight:600,transform:t?"scale(1.1)":"scale(1)",color:t?Xe("base.50","base.50")(o):Xe("base.200","base.300")(o),transitionProperty:"common",transitionDuration:"0.1s"},children:n})})]})},r.current)},VO=l.memo(Xne),Yne=e=>{const{dropLabel:t,data:n,disabled:r}=e,o=l.useRef(Jc()),{isOver:s,setNodeRef:i,active:c}=HO({id:o.current,disabled:r,data:n});return a.jsx(Le,{ref:i,position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",pointerEvents:c?"auto":"none",children:a.jsx(So,{children:WO(n,c)&&a.jsx(VO,{isOver:s,label:t})})})},C2=l.memo(Yne),Jne=({isSelected:e,isHovered:t})=>a.jsx(Le,{className:"selection-box",sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",opacity:e?1:.7,transitionProperty:"common",transitionDuration:"0.1s",pointerEvents:"none",shadow:e?t?"hoverSelected.light":"selected.light":t?"hoverUnselected.light":void 0,_dark:{shadow:e?t?"hoverSelected.dark":"selected.dark":t?"hoverUnselected.dark":void 0}}}),w2=l.memo(Jne),Zne=()=>{const{t:e}=Q();return a.jsx(N,{sx:{position:"absolute",insetInlineEnd:0,top:0,p:1},children:a.jsx(Va,{variant:"solid",sx:{bg:"accent.400",_dark:{bg:"accent.500"}},children:e("common.auto")})})},UO=l.memo(Zne);function S2(e){const[t,n]=l.useState(!1),[r,o]=l.useState(!1),[s,i]=l.useState(!1),[c,d]=l.useState([0,0]),p=l.useRef(null),h=H(g=>g.ui.globalContextMenuCloseTrigger);l.useEffect(()=>{if(t)setTimeout(()=>{o(!0),setTimeout(()=>{i(!0)})});else{i(!1);const g=setTimeout(()=>{o(t)},1e3);return()=>clearTimeout(g)}},[t]),l.useEffect(()=>{n(!1),i(!1),o(!1)},[h]),WF("contextmenu",g=>{var b;(b=p.current)!=null&&b.contains(g.target)||g.target===p.current?(g.preventDefault(),n(!0),d([g.pageX,g.pageY])):n(!1)});const m=l.useCallback(()=>{var g,b;(b=(g=e.menuProps)==null?void 0:g.onClose)==null||b.call(g),n(!1)},[e.menuProps]);return a.jsxs(a.Fragment,{children:[e.children(p),r&&a.jsx(Au,{...e.portalProps,children:a.jsxs(Mg,{isOpen:s,gutter:0,...e.menuProps,onClose:m,children:[a.jsx(Og,{"aria-hidden":!0,w:1,h:1,style:{position:"absolute",left:c[0],top:c[1],cursor:"default"},...e.menuButtonProps}),e.renderMenu()]})})]})}const x0=e=>{const{boardName:t}=jf(void 0,{selectFromResult:({data:n})=>{const r=n==null?void 0:n.find(s=>s.board_id===e);return{boardName:(r==null?void 0:r.board_name)||NI("boards.uncategorized")}}});return t},ere=({board:e,setBoardToDelete:t})=>{const{t:n}=Q(),r=l.useCallback(()=>{t&&t(e)},[e,t]);return a.jsxs(a.Fragment,{children:[e.image_count>0&&a.jsx(a.Fragment,{}),a.jsx(Kn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(Zo,{}),onClick:r,children:n("boards.deleteBoard")})]})},tre=l.memo(ere),nre=()=>a.jsx(a.Fragment,{}),rre=l.memo(nre),ore=({board:e,board_id:t,setBoardToDelete:n,children:r})=>{const{t:o}=Q(),s=le(),i=l.useMemo(()=>me(we,({gallery:w})=>{const S=w.autoAddBoardId===t,j=w.autoAssignBoardOnClick;return{isAutoAdd:S,autoAssignBoardOnClick:j}},Ie),[t]),{isAutoAdd:c,autoAssignBoardOnClick:d}=H(i),p=x0(t),h=Pn("bulkDownload").isFeatureEnabled,[m]=$I(),g=l.useCallback(()=>{s(mg(t))},[t,s]),b=l.useCallback(async()=>{try{const w=await m({image_names:[],board_id:t}).unwrap();s(Ht({title:o("gallery.preparingDownload"),status:"success",...w.response?{description:w.response}:{}}))}catch{s(Ht({title:o("gallery.preparingDownloadFailed"),status:"error"}))}},[o,t,m,s]),y=l.useCallback(w=>{w.preventDefault()},[]),x=l.useCallback(()=>a.jsx(ql,{sx:{visibility:"visible !important"},motionProps:fu,onContextMenu:y,children:a.jsxs(af,{title:p,children:[a.jsx(Kn,{icon:a.jsx(Zi,{}),isDisabled:c||d,onClick:g,children:o("boards.menuItemAutoAdd")}),h&&a.jsx(Kn,{icon:a.jsx(Wu,{}),onClickCapture:b,children:o("boards.downloadBoard")}),!e&&a.jsx(rre,{}),e&&a.jsx(tre,{board:e,setBoardToDelete:n})]})}),[d,e,p,b,g,c,h,n,y,o]);return a.jsx(S2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:x,children:r})},GO=l.memo(ore),sre=({board:e,isSelected:t,setBoardToDelete:n})=>{const r=le(),o=l.useMemo(()=>me(we,({gallery:D})=>{const O=e.board_id===D.autoAddBoardId,T=D.autoAssignBoardOnClick;return{isSelectedForAutoAdd:O,autoAssignBoardOnClick:T}},Ie),[e.board_id]),{isSelectedForAutoAdd:s,autoAssignBoardOnClick:i}=H(o),[c,d]=l.useState(!1),p=l.useCallback(()=>{d(!0)},[]),h=l.useCallback(()=>{d(!1)},[]),{data:m}=Tx(e.board_id),{data:g}=Nx(e.board_id),b=l.useMemo(()=>{if(!((m==null?void 0:m.total)===void 0||(g==null?void 0:g.total)===void 0))return`${m.total} image${m.total===1?"":"s"}, ${g.total} asset${g.total===1?"":"s"}`},[g,m]),{currentData:y}=Rs(e.cover_image_name??zs.skipToken),{board_name:x,board_id:w}=e,[S,j]=l.useState(x),I=l.useCallback(()=>{r(LI({boardId:w})),i&&r(mg(w))},[w,i,r]),[_,{isLoading:M}]=e7(),E=l.useMemo(()=>({id:w,actionType:"ADD_TO_BOARD",context:{boardId:w}}),[w]),A=l.useCallback(async D=>{if(!D.trim()){j(x);return}if(D!==x)try{const{board_name:O}=await _({board_id:w,changes:{board_name:D}}).unwrap();j(O)}catch{j(x)}},[w,x,_]),R=l.useCallback(D=>{j(D)},[]);return a.jsx(Le,{sx:{w:"full",h:"full",touchAction:"none",userSelect:"none"},children:a.jsx(N,{onMouseOver:p,onMouseOut:h,sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1",w:"full",h:"full"},children:a.jsx(GO,{board:e,board_id:w,setBoardToDelete:n,children:D=>a.jsx(Wn,{label:b,openDelay:1e3,hasArrow:!0,children:a.jsxs(N,{ref:D,onClick:I,sx:{w:"full",h:"full",position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",cursor:"pointer",bg:"base.200",_dark:{bg:"base.800"}},children:[y!=null&&y.thumbnail_url?a.jsx(_i,{src:y==null?void 0:y.thumbnail_url,draggable:!1,sx:{objectFit:"cover",w:"full",h:"full",maxH:"full",borderRadius:"base",borderBottomRadius:"lg"}}):a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center"},children:a.jsx(Gr,{boxSize:12,as:Zee,sx:{mt:-6,opacity:.7,color:"base.500",_dark:{color:"base.500"}}})}),s&&a.jsx(UO,{}),a.jsx(w2,{isSelected:t,isHovered:c}),a.jsx(N,{sx:{position:"absolute",bottom:0,left:0,p:1,justifyContent:"center",alignItems:"center",w:"full",maxW:"full",borderBottomRadius:"base",bg:t?"accent.400":"base.500",color:t?"base.50":"base.100",_dark:{bg:t?"accent.500":"base.600",color:t?"base.50":"base.100"},lineHeight:"short",fontSize:"xs"},children:a.jsxs(Lf,{value:S,isDisabled:M,submitOnBlur:!0,onChange:R,onSubmit:A,sx:{w:"full"},children:[a.jsx($f,{sx:{p:0,fontWeight:t?700:500,textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1}),a.jsx(Nf,{sx:{p:0,_focusVisible:{p:0,textAlign:"center",boxShadow:"none"}}})]})}),a.jsx(C2,{data:E,dropLabel:a.jsx(je,{fontSize:"md",children:"Move"})})]})})})})})},are=l.memo(sre),ire=me(we,({gallery:e})=>{const{autoAddBoardId:t,autoAssignBoardOnClick:n}=e;return{autoAddBoardId:t,autoAssignBoardOnClick:n}},Ie),qO=l.memo(({isSelected:e})=>{const t=le(),{autoAddBoardId:n,autoAssignBoardOnClick:r}=H(ire),o=x0("none"),s=l.useCallback(()=>{t(LI({boardId:"none"})),r&&t(mg("none"))},[t,r]),[i,c]=l.useState(!1),{data:d}=Tx("none"),{data:p}=Nx("none"),h=l.useMemo(()=>{if(!((d==null?void 0:d.total)===void 0||(p==null?void 0:p.total)===void 0))return`${d.total} image${d.total===1?"":"s"}, ${p.total} asset${p.total===1?"":"s"}`},[p,d]),m=l.useCallback(()=>{c(!0)},[]),g=l.useCallback(()=>{c(!1)},[]),b=l.useMemo(()=>({id:"no_board",actionType:"REMOVE_FROM_BOARD"}),[]);return a.jsx(Le,{sx:{w:"full",h:"full",touchAction:"none",userSelect:"none"},children:a.jsx(N,{onMouseOver:m,onMouseOut:g,sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1",borderRadius:"base",w:"full",h:"full"},children:a.jsx(GO,{board_id:"none",children:y=>a.jsx(Wn,{label:h,openDelay:1e3,hasArrow:!0,children:a.jsxs(N,{ref:y,onClick:s,sx:{w:"full",h:"full",position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",cursor:"pointer",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center"},children:a.jsx(_i,{src:Rx,alt:"invoke-ai-logo",sx:{opacity:.4,filter:"grayscale(1)",mt:-6,w:16,h:16,minW:16,minH:16,userSelect:"none"}})}),n==="none"&&a.jsx(UO,{}),a.jsx(N,{sx:{position:"absolute",bottom:0,left:0,p:1,justifyContent:"center",alignItems:"center",w:"full",maxW:"full",borderBottomRadius:"base",bg:e?"accent.400":"base.500",color:e?"base.50":"base.100",_dark:{bg:e?"accent.500":"base.600",color:e?"base.50":"base.100"},lineHeight:"short",fontSize:"xs",fontWeight:e?700:500},children:o}),a.jsx(w2,{isSelected:e,isHovered:i}),a.jsx(C2,{data:b,dropLabel:a.jsx(je,{fontSize:"md",children:"Move"})})]})})})})})});qO.displayName="HoverableBoard";const lre=l.memo(qO),cre=me([we],({gallery:e})=>{const{selectedBoardId:t,boardSearchText:n}=e;return{selectedBoardId:t,boardSearchText:n}},Ie),ure=e=>{const{isOpen:t}=e,{selectedBoardId:n,boardSearchText:r}=H(cre),{data:o}=jf(),s=r?o==null?void 0:o.filter(d=>d.board_name.toLowerCase().includes(r.toLowerCase())):o,[i,c]=l.useState();return a.jsxs(a.Fragment,{children:[a.jsx(Af,{in:t,animateOpacity:!0,children:a.jsxs(N,{layerStyle:"first",sx:{flexDir:"column",gap:2,p:2,mt:2,borderRadius:"base"},children:[a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx(Kne,{}),a.jsx(Wne,{})]}),a.jsx(v0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"move",autoHideDelay:1300,theme:"os-theme-dark"}},children:a.jsxs(rl,{className:"list-container","data-testid":"boards-list",sx:{gridTemplateColumns:"repeat(auto-fill, minmax(108px, 1fr));",maxH:346},children:[a.jsx(rf,{sx:{p:1.5},"data-testid":"no-board",children:a.jsx(lre,{isSelected:n==="none"})}),s&&s.map((d,p)=>a.jsx(rf,{sx:{p:1.5},"data-testid":`board-${p}`,children:a.jsx(are,{board:d,isSelected:n===d.board_id,setBoardToDelete:c})},d.board_id))]})})]})}),a.jsx(Bne,{boardToDelete:i,setBoardToDelete:c})]})},dre=l.memo(ure),fre=me([we],e=>{const{selectedBoardId:t}=e.gallery;return{selectedBoardId:t}},Ie),pre=e=>{const{isOpen:t,onToggle:n}=e,{selectedBoardId:r}=H(fre),o=x0(r),s=l.useMemo(()=>o.length>20?`${o.substring(0,20)}...`:o,[o]);return a.jsxs(N,{as:nl,onClick:n,size:"sm",sx:{position:"relative",gap:2,w:"full",justifyContent:"space-between",alignItems:"center",px:2},children:[a.jsx(je,{noOfLines:1,sx:{fontWeight:600,w:"100%",textAlign:"center",color:"base.800",_dark:{color:"base.200"}},children:s}),a.jsx(b0,{sx:{transform:t?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})]})},hre=l.memo(pre),mre=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:o=!0,...s}=e;return a.jsxs(Uf,{isLazy:o,...s,children:[a.jsx(Bg,{children:t}),a.jsxs(Gf,{shadow:"dark-lg",children:[r&&a.jsx(C3,{}),n]})]})},tp=l.memo(mre);function gre(e){return Ye({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-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}const KO=De((e,t)=>{const[n,r]=l.useState(!1),{label:o,value:s,min:i=1,max:c=100,step:d=1,onChange:p,tooltipSuffix:h="",withSliderMarks:m=!1,withInput:g=!1,isInteger:b=!1,inputWidth:y=16,withReset:x=!1,hideTooltip:w=!1,isCompact:S=!1,isDisabled:j=!1,sliderMarks:I,handleReset:_,sliderFormControlProps:M,sliderFormLabelProps:E,sliderMarkProps:A,sliderTrackProps:R,sliderThumbProps:D,sliderNumberInputProps:O,sliderNumberInputFieldProps:T,sliderNumberInputStepperProps:K,sliderTooltipProps:G,sliderIAIIconButtonProps:X,...Z}=e,te=le(),{t:V}=Q(),[oe,ne]=l.useState(String(s));l.useEffect(()=>{ne(s)},[s]);const se=l.useMemo(()=>O!=null&&O.min?O.min:i,[i,O==null?void 0:O.min]),re=l.useMemo(()=>O!=null&&O.max?O.max:c,[c,O==null?void 0:O.max]),ae=l.useCallback(J=>{p(J)},[p]),B=l.useCallback(J=>{J.target.value===""&&(J.target.value=String(se));const ge=Hl(b?Math.floor(Number(J.target.value)):Number(oe),se,re),he=Pd(ge,d);p(he),ne(he)},[b,oe,se,re,p,d]),Y=l.useCallback(J=>{ne(J)},[]),$=l.useCallback(()=>{_&&_()},[_]),F=l.useCallback(J=>{J.target instanceof HTMLDivElement&&J.target.focus()},[]),q=l.useCallback(J=>{J.shiftKey&&te(Qo(!0))},[te]),pe=l.useCallback(J=>{J.shiftKey||te(Qo(!1))},[te]),W=l.useCallback(()=>r(!0),[]),U=l.useCallback(()=>r(!1),[]),ee=l.useCallback(()=>p(Number(oe)),[oe,p]);return a.jsxs(Vn,{ref:t,onClick:F,sx:S?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:4,margin:0,padding:0}:{},isDisabled:j,...M,children:[o&&a.jsx(yr,{sx:g?{mb:-1.5}:{},...E,children:o}),a.jsxs(Pg,{w:"100%",gap:2,alignItems:"center",children:[a.jsxs(Ny,{"aria-label":o,value:s,min:i,max:c,step:d,onChange:ae,onMouseEnter:W,onMouseLeave:U,focusThumbOnChange:!1,isDisabled:j,...Z,children:[m&&!I&&a.jsxs(a.Fragment,{children:[a.jsx(Fc,{value:i,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},...A,children:i}),a.jsx(Fc,{value:c,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},...A,children:c})]}),m&&I&&a.jsx(a.Fragment,{children:I.map((J,ge)=>ge===0?a.jsx(Fc,{value:J,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},...A,children:J},J):ge===I.length-1?a.jsx(Fc,{value:J,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},...A,children:J},J):a.jsx(Fc,{value:J,sx:{transform:"translateX(-50%)"},...A,children:J},J))}),a.jsx(Ly,{...R,children:a.jsx(zy,{})}),a.jsx(Wn,{hasArrow:!0,placement:"top",isOpen:n,label:`${s}${h}`,hidden:w,...G,children:a.jsx($y,{...D,zIndex:0})})]}),g&&a.jsxs(Tg,{min:se,max:re,step:d,value:oe,onChange:Y,onBlur:B,focusInputOnChange:!1,...O,children:[a.jsx($g,{onKeyDown:q,onKeyUp:pe,minWidth:y,...T}),a.jsxs(Ng,{...K,children:[a.jsx(zg,{onClick:ee}),a.jsx(Lg,{onClick:ee})]})]}),x&&a.jsx(rt,{size:"sm","aria-label":V("accessibility.reset"),tooltip:V("accessibility.reset"),icon:a.jsx(gre,{}),isDisabled:j,onClick:$,...X})]})]})});KO.displayName="IAISlider";const It=l.memo(KO),QO=l.forwardRef(({label:e,tooltip:t,description:n,disabled:r,...o},s)=>a.jsx(Wn,{label:t,placement:"top",hasArrow:!0,openDelay:500,children:a.jsx(Le,{ref:s,...o,children:a.jsxs(Le,{children:[a.jsx(xu,{children:e}),n&&a.jsx(xu,{size:"xs",color:"base.600",children:n})]})})}));QO.displayName="IAIMantineSelectItemWithTooltip";const pl=l.memo(QO),vre=me([we],({gallery:e})=>{const{autoAddBoardId:t,autoAssignBoardOnClick:n}=e;return{autoAddBoardId:t,autoAssignBoardOnClick:n}},Ie),bre=()=>{const e=le(),{t}=Q(),{autoAddBoardId:n,autoAssignBoardOnClick:r}=H(vre),o=l.useRef(null),{boards:s,hasBoards:i}=jf(void 0,{selectFromResult:({data:p})=>{const h=[{label:"None",value:"none"}];return p==null||p.forEach(({board_id:m,board_name:g})=>{h.push({label:g,value:m})}),{boards:h,hasBoards:h.length>1}}}),c=l.useCallback(p=>{p&&e(mg(p))},[e]),d=l.useCallback((p,h)=>{var m;return((m=h.label)==null?void 0:m.toLowerCase().includes(p.toLowerCase().trim()))||h.value.toLowerCase().includes(p.toLowerCase().trim())},[]);return a.jsx(sr,{label:t("boards.autoAddBoard"),inputRef:o,autoFocus:!0,placeholder:t("boards.selectBoard"),value:n,data:s,nothingFound:t("boards.noMatching"),itemComponent:pl,disabled:!i||r,filter:d,onChange:c})},xre=l.memo(bre),yre=e=>{const{label:t,...n}=e,{colorMode:r}=ji();return a.jsx(Tf,{colorScheme:"accent",...n,children:a.jsx(je,{sx:{fontSize:"sm",color:Xe("base.800","base.200")(r)},children:t})})},Eo=l.memo(yre),Cre=me([we],e=>{const{galleryImageMinimumWidth:t,shouldAutoSwitch:n,autoAssignBoardOnClick:r}=e.gallery;return{galleryImageMinimumWidth:t,shouldAutoSwitch:n,autoAssignBoardOnClick:r}},Ie),wre=()=>{const e=le(),{t}=Q(),{galleryImageMinimumWidth:n,shouldAutoSwitch:r,autoAssignBoardOnClick:o}=H(Cre),s=l.useCallback(p=>{e(Gw(p))},[e]),i=l.useCallback(()=>{e(Gw(64))},[e]),c=l.useCallback(p=>{e(t7(p.target.checked))},[e]),d=l.useCallback(p=>e(n7(p.target.checked)),[e]);return a.jsx(tp,{triggerComponent:a.jsx(rt,{tooltip:t("gallery.gallerySettings"),"aria-label":t("gallery.gallerySettings"),size:"sm",icon:a.jsx(nO,{})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(It,{value:n,onChange:s,min:45,max:256,hideTooltip:!0,label:t("gallery.galleryImageSize"),withReset:!0,handleReset:i}),a.jsx(_r,{label:t("gallery.autoSwitchNewImages"),isChecked:r,onChange:c}),a.jsx(Eo,{label:t("gallery.autoAssignBoardOnClick"),isChecked:o,onChange:d}),a.jsx(xre,{})]})})},Sre=l.memo(wre),kre=e=>e.image?a.jsx(Wg,{sx:{w:`${e.image.width}px`,h:"auto",objectFit:"contain",aspectRatio:`${e.image.width}/${e.image.height}`}}):a.jsx(N,{sx:{opacity:.7,w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",bg:"base.200",_dark:{bg:"base.900"}},children:a.jsx(Ci,{size:"xl"})}),eo=e=>{const{icon:t=Xl,boxSize:n=16,sx:r,...o}=e;return a.jsxs(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",flexDir:"column",gap:2,userSelect:"none",opacity:.7,color:"base.700",_dark:{color:"base.500"},...r},...o,children:[t&&a.jsx(Gr,{as:t,boxSize:n,opacity:.7}),e.label&&a.jsx(je,{textAlign:"center",children:e.label})]})},jre=e=>{const{sx:t,...n}=e;return a.jsxs(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",flexDir:"column",gap:2,userSelect:"none",opacity:.7,color:"base.700",_dark:{color:"base.500"},...t},...n,children:[a.jsx(Ci,{size:"xl"}),e.label&&a.jsx(je,{textAlign:"center",children:e.label})]})},y0=0,hl=1,Gu=2,XO=4;function YO(e,t){return n=>e(t(n))}function _re(e,t){return t(e)}function JO(e,t){return n=>e(t,n)}function n_(e,t){return()=>e(t)}function C0(e,t){return t(e),e}function Cr(...e){return e}function Ire(e){e()}function r_(e){return()=>e}function Pre(...e){return()=>{e.map(Ire)}}function k2(e){return e!==void 0}function qu(){}function Zn(e,t){return e(hl,t)}function pn(e,t){e(y0,t)}function j2(e){e(Gu)}function us(e){return e(XO)}function Lt(e,t){return Zn(e,JO(t,y0))}function xi(e,t){const n=e(hl,r=>{n(),t(r)});return n}function On(){const e=[];return(t,n)=>{switch(t){case Gu:e.splice(0,e.length);return;case hl:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case y0:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function st(e){let t=e;const n=On();return(r,o)=>{switch(r){case hl:o(t);break;case y0:t=o;break;case XO:return t}return n(r,o)}}function Ere(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case hl:return s?n===s?void 0:(r(),n=s,t=Zn(e,s),t):(r(),qu);case Gu:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function fs(e){return C0(On(),t=>Lt(e,t))}function Oo(e,t){return C0(st(t),n=>Lt(e,n))}function Mre(...e){return t=>e.reduceRight(_re,t)}function He(e,...t){const n=Mre(...t);return(r,o)=>{switch(r){case hl:return Zn(e,n(o));case Gu:j2(e);return}}}function ZO(e,t){return e===t}function br(e=ZO){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function rn(e){return t=>n=>{e(n)&&t(n)}}function yt(e){return t=>YO(t,e)}function ti(e){return t=>()=>t(e)}function ja(e,t){return n=>r=>n(t=e(t,r))}function _u(e){return t=>n=>{e>0?e--:t(n)}}function Xi(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function o_(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function bn(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const c=Math.pow(2,i);Zn(s,d=>{const p=n;n=n|c,t[i]=d,p!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const c=()=>s([i].concat(t));n===o?c():r=c}}function s_(...e){return function(t,n){switch(t){case hl:return Pre(...e.map(r=>Zn(r,n)));case Gu:return;default:throw new Error(`unrecognized action ${t}`)}}}function nn(e,t=ZO){return He(e,br(t))}function ao(...e){const t=On(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const c=Math.pow(2,i);Zn(s,d=>{n[i]=d,r=r|c,r===o&&pn(t,n)})}),function(s,i){switch(s){case hl:return r===o&&i(n),Zn(t,i);case Gu:return j2(t);default:throw new Error(`unrecognized action ${s}`)}}}function Yn(e,t=[],{singleton:n}={singleton:!0}){return{id:Ore(),constructor:e,dependencies:t,singleton:n}}const Ore=()=>Symbol();function Are(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const c=o(s.map(d=>n(d)));return i&&t.set(r,c),c};return n(e)}function Rre(e,t){const n={},r={};let o=0;const s=e.length;for(;o(w[S]=j=>{const I=x[t.methods[S]];pn(I,j)},w),{})}function h(x){return i.reduce((w,S)=>(w[S]=Ere(x[t.events[S]]),w),{})}return{Component:z.forwardRef((x,w)=>{const{children:S,...j}=x,[I]=z.useState(()=>C0(Are(e),M=>d(M,j))),[_]=z.useState(n_(h,I));return xh(()=>{for(const M of i)M in j&&Zn(_[M],j[M]);return()=>{Object.values(_).map(j2)}},[j,_,I]),xh(()=>{d(I,j)}),z.useImperativeHandle(w,r_(p(I))),z.createElement(c.Provider,{value:I},n?z.createElement(n,Rre([...r,...o,...i],j),S):S)}),usePublisher:x=>z.useCallback(JO(pn,z.useContext(c)[x]),[x]),useEmitterValue:x=>{const S=z.useContext(c)[x],[j,I]=z.useState(n_(us,S));return xh(()=>Zn(S,_=>{_!==j&&I(r_(_))}),[S,j]),j},useEmitter:(x,w)=>{const j=z.useContext(c)[x];xh(()=>Zn(j,w),[w,j])}}}const Dre=typeof document<"u"?z.useLayoutEffect:z.useEffect,Tre=Dre;var ps=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(ps||{});const Nre={0:"debug",1:"log",2:"warn",3:"error"},$re=()=>typeof globalThis>"u"?window:globalThis,ml=Yn(()=>{const e=st(3);return{log:st((n,r,o=1)=>{var s;const i=(s=$re().VIRTUOSO_LOG_LEVEL)!=null?s:us(e);o>=i&&console[Nre[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function _2(e,t=!0){const n=z.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=z.useMemo(()=>new ResizeObserver(s=>{const i=s[0].target;i.offsetParent!==null&&e(i)}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function ac(e,t=!0){return _2(e,t).callbackRef}function Lre(e,t,n,r,o,s,i){const c=z.useCallback(d=>{const p=zre(d.children,t,"offsetHeight",o);let h=d.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const m=h.lastElementChild.dataset.viewportType==="window",g=i?i.scrollTop:m?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,b=i?i.scrollHeight:m?document.documentElement.scrollHeight:h.scrollHeight,y=i?i.offsetHeight:m?window.innerHeight:h.offsetHeight;r({scrollTop:Math.max(g,0),scrollHeight:b,viewportHeight:y}),s==null||s(Fre("row-gap",getComputedStyle(d).rowGap,o)),p!==null&&e(p)},[e,t,o,s,i,r]);return _2(c,n)}function zre(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i{const g=m.target,b=g===window||g===document,y=b?window.pageYOffset||document.documentElement.scrollTop:g.scrollTop,x=b?document.documentElement.scrollHeight:g.scrollHeight,w=b?window.innerHeight:g.offsetHeight,S=()=>{e({scrollTop:Math.max(y,0),scrollHeight:x,viewportHeight:w})};m.suppressFlushSync?S():r7.flushSync(S),i.current!==null&&(y===i.current||y<=0||y===x-w)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t]);z.useEffect(()=>{const m=o||s.current;return r(o||s.current),d({target:m,suppressFlushSync:!0}),m.addEventListener("scroll",d,{passive:!0}),()=>{r(null),m.removeEventListener("scroll",d)}},[s,d,n,r,o]);function p(m){const g=s.current;if(!g||"offsetHeight"in g&&g.offsetHeight===0)return;const b=m.behavior==="smooth";let y,x,w;g===window?(x=Math.max(il(document.documentElement,"height"),document.documentElement.scrollHeight),y=window.innerHeight,w=document.documentElement.scrollTop):(x=g.scrollHeight,y=il(g,"height"),w=g.scrollTop);const S=x-y;if(m.top=Math.ceil(Math.max(Math.min(S,m.top),0)),t8(y,x)||m.top===w){e({scrollTop:w,scrollHeight:x,viewportHeight:y}),b&&t(!0);return}b?(i.current=m.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,g.scrollTo(m)}function h(m){s.current.scrollBy(m)}return{scrollerRef:s,scrollByCallback:h,scrollToCallback:p}}const $o=Yn(()=>{const e=On(),t=On(),n=st(0),r=On(),o=st(0),s=On(),i=On(),c=st(0),d=st(0),p=st(0),h=st(0),m=On(),g=On(),b=st(!1);return Lt(He(e,yt(({scrollTop:y})=>y)),t),Lt(He(e,yt(({scrollHeight:y})=>y)),i),Lt(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:c,fixedHeaderHeight:d,fixedFooterHeight:p,footerHeight:h,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:m,scrollBy:g,statefulScrollTop:o,deviation:n,scrollingInProgress:b}},[],{singleton:!0}),hf={lvl:0};function r8(e,t,n,r=hf,o=hf){return{k:e,v:t,lvl:n,l:r,r:o}}function or(e){return e===hf}function uu(){return hf}function ax(e,t){if(or(e))return hf;const{k:n,l:r,r:o}=e;if(t===n){if(or(r))return o;if(or(o))return r;{const[s,i]=o8(r);return Lh(Zr(e,{k:s,v:i,l:s8(r)}))}}else return tt&&(c=c.concat(ix(s,t,n))),r>=t&&r<=n&&c.push({k:r,v:o}),r<=n&&(c=c.concat(ix(i,t,n))),c}function Rl(e){return or(e)?[]:[...Rl(e.l),{k:e.k,v:e.v},...Rl(e.r)]}function o8(e){return or(e.r)?[e.k,e.v]:o8(e.r)}function s8(e){return or(e.r)?e.l:Lh(Zr(e,{r:s8(e.r)}))}function Zr(e,t){return r8(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function E1(e){return or(e)||e.lvl>e.r.lvl}function a_(e){return lx(i8(e))}function Lh(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(E1(t))return i8(Zr(e,{lvl:r-1}));if(!or(t)&&!or(t.r))return Zr(t.r,{l:Zr(t,{r:t.r.l}),r:Zr(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(E1(e))return lx(Zr(e,{lvl:r-1}));if(!or(n)&&!or(n.l)){const o=n.l,s=E1(o)?n.lvl-1:n.lvl;return Zr(o,{l:Zr(e,{r:o.l,lvl:r-1}),r:lx(Zr(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function w0(e,t,n){if(or(e))return[];const r=ca(e,t)[0];return Bre(ix(e,r,n))}function a8(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i({index:t,value:n}))}function lx(e){const{r:t,lvl:n}=e;return!or(t)&&!or(t.r)&&t.lvl===n&&t.r.lvl===n?Zr(t,{l:Zr(e,{r:t.l}),lvl:n+1}):e}function i8(e){const{l:t}=e;return!or(t)&&t.lvl===e.lvl?Zr(t,{r:Zr(e,{l:t.r})}):e}function og(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],c=n(i,t);if(c===0)return s;if(c===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function l8(e,t,n){return e[og(e,t,n)]}function Hre(e,t,n,r){const o=og(e,t,r),s=og(e,n,r,o);return e.slice(o,s+1)}const I2=Yn(()=>({recalcInProgress:st(!1)}),[],{singleton:!0});function Wre(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function i_(e,t){let n=0,r=0;for(;n=h||o===g)&&(e=ax(e,h)):(p=g!==o,d=!0),m>i&&i>=h&&g!==o&&(e=cs(e,i+1,g));p&&(e=cs(e,s,o))}return[e,n]}function Ure(){return{offsetTree:[],sizeTree:uu(),groupOffsetTree:uu(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function P2({index:e},t){return t===e?0:t0&&(t=Math.max(t,l8(e,r,P2).offset)),a8(Hre(e,t,n,Gre),qre)}function cx(e,t,n,r){let o=e,s=0,i=0,c=0,d=0;if(t!==0){d=og(o,t-1,P2),c=o[d].offset;const h=ca(n,t-1);s=h[0],i=h[1],o.length&&o[d].size===ca(n,t)[1]&&(d-=1),o=o.slice(0,d+1)}else o=[];for(const{start:p,value:h}of w0(n,t,1/0)){const m=p-s,g=m*i+c+m*r;o.push({offset:g,size:h,index:p}),s=p,c=g,i=h}return{offsetTree:o,lastIndex:s,lastOffset:c,lastSize:i}}function Qre(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,ps.DEBUG);const s=e.sizeTree;let i=s,c=0;if(n.length>0&&or(s)&&t.length===2){const g=t[0].size,b=t[1].size;i=n.reduce((y,x)=>cs(cs(y,x,g),x+1,b),i)}else[i,c]=Vre(i,t);if(i===s)return e;const{offsetTree:d,lastIndex:p,lastSize:h,lastOffset:m}=cx(e.offsetTree,c,i,o);return{sizeTree:i,offsetTree:d,lastIndex:p,lastOffset:m,lastSize:h,groupOffsetTree:n.reduce((g,b)=>cs(g,b,gf(b,d,o)),uu()),groupIndices:n}}function gf(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=l8(t,e,P2),i=e-o,c=s*i+(i-1)*n+r;return c>0?c+n:c}function Xre(e){return typeof e.groupIndex<"u"}function c8(e,t,n){if(Xre(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=u8(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function u8(e,t){if(!S0(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function S0(e){return!or(e.groupOffsetTree)}function Yre(e){return Rl(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const Jre={offsetHeight:"height",offsetWidth:"width"},Ua=Yn(([{log:e},{recalcInProgress:t}])=>{const n=On(),r=On(),o=Oo(r,0),s=On(),i=On(),c=st(0),d=st([]),p=st(void 0),h=st(void 0),m=st((M,E)=>il(M,Jre[E])),g=st(void 0),b=st(0),y=Ure(),x=Oo(He(n,bn(d,e,b),ja(Qre,y),br()),y),w=Oo(He(d,br(),ja((M,E)=>({prev:M.current,current:E}),{prev:[],current:[]}),yt(({prev:M})=>M)),[]);Lt(He(d,rn(M=>M.length>0),bn(x,b),yt(([M,E,A])=>{const R=M.reduce((D,O,T)=>cs(D,O,gf(O,E.offsetTree,A)||T),uu());return{...E,groupIndices:M,groupOffsetTree:R}})),x),Lt(He(r,bn(x),rn(([M,{lastIndex:E}])=>M[{startIndex:M,endIndex:E,size:A}])),n),Lt(p,h);const S=Oo(He(p,yt(M=>M===void 0)),!0);Lt(He(h,rn(M=>M!==void 0&&or(us(x).sizeTree)),yt(M=>[{startIndex:0,endIndex:0,size:M}])),n);const j=fs(He(n,bn(x),ja(({sizes:M},[E,A])=>({changed:A!==M,sizes:A}),{changed:!1,sizes:y}),yt(M=>M.changed)));Zn(He(c,ja((M,E)=>({diff:M.prev-E,prev:E}),{diff:0,prev:0}),yt(M=>M.diff)),M=>{const{groupIndices:E}=us(x);if(M>0)pn(t,!0),pn(s,M+i_(M,E));else if(M<0){const A=us(w);A.length>0&&(M-=i_(-M,A)),pn(i,M)}}),Zn(He(c,bn(e)),([M,E])=>{M<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:c},ps.ERROR)});const I=fs(s);Lt(He(s,bn(x),yt(([M,E])=>{const A=E.groupIndices.length>0,R=[],D=E.lastSize;if(A){const O=mf(E.sizeTree,0);let T=0,K=0;for(;T{let oe=Z.ranges;return Z.prevSize!==0&&(oe=[...Z.ranges,{startIndex:Z.prevIndex,endIndex:te+M-1,size:Z.prevSize}]),{ranges:oe,prevIndex:te+M,prevSize:V}},{ranges:R,prevIndex:M,prevSize:0}).ranges}return Rl(E.sizeTree).reduce((O,{k:T,v:K})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:T+M-1,size:O.prevSize}],prevIndex:T+M,prevSize:K}),{ranges:[],prevIndex:0,prevSize:D}).ranges})),n);const _=fs(He(i,bn(x,b),yt(([M,{offsetTree:E},A])=>{const R=-M;return gf(R,E,A)})));return Lt(He(i,bn(x,b),yt(([M,E,A])=>{if(E.groupIndices.length>0){if(or(E.sizeTree))return E;let D=uu();const O=us(w);let T=0,K=0,G=0;for(;T<-M;){G=O[K];const Z=O[K+1]-G-1;K++,T+=Z+1}if(D=Rl(E.sizeTree).reduce((Z,{k:te,v:V})=>cs(Z,Math.max(0,te+M),V),D),T!==-M){const Z=mf(E.sizeTree,G);D=cs(D,0,Z);const te=ca(E.sizeTree,-M+1)[1];D=cs(D,1,te)}return{...E,sizeTree:D,...cx(E.offsetTree,0,D,A)}}else{const D=Rl(E.sizeTree).reduce((O,{k:T,v:K})=>cs(O,Math.max(0,T+M),K),uu());return{...E,sizeTree:D,...cx(E.offsetTree,0,D,A)}}})),x),{data:g,totalCount:r,sizeRanges:n,groupIndices:d,defaultItemSize:h,fixedItemSize:p,unshiftWith:s,shiftWith:i,shiftWithOffset:_,beforeUnshiftWith:I,firstItemIndex:c,gap:b,sizes:x,listRefresh:j,statefulTotalCount:o,trackItemSizes:S,itemSize:m}},Cr(ml,I2),{singleton:!0}),Zre=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function d8(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Zre)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const np=Yn(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:c,headerHeight:d,footerHeight:p,fixedHeaderHeight:h,fixedFooterHeight:m},{log:g}])=>{const b=On(),y=st(0);let x=null,w=null,S=null;function j(){x&&(x(),x=null),S&&(S(),S=null),w&&(clearTimeout(w),w=null),pn(o,!1)}return Lt(He(b,bn(e,s,t,y,d,p,g),bn(r,h,m),yt(([[I,_,M,E,A,R,D,O],T,K,G])=>{const X=d8(I),{align:Z,behavior:te,offset:V}=X,oe=E-1,ne=c8(X,_,oe);let se=gf(ne,_.offsetTree,T)+R;Z==="end"?(se+=K+ca(_.sizeTree,ne)[1]-M+G,ne===oe&&(se+=D)):Z==="center"?se+=(K+ca(_.sizeTree,ne)[1]-M+G)/2:se-=A,V&&(se+=V);const re=ae=>{j(),ae?(O("retrying to scroll to",{location:I},ps.DEBUG),pn(b,I)):O("list did not change, scroll successful",{},ps.DEBUG)};if(j(),te==="smooth"){let ae=!1;S=Zn(n,B=>{ae=ae||B}),x=xi(c,()=>{re(ae)})}else x=xi(He(n,eoe(150)),re);return w=setTimeout(()=>{j()},1200),pn(o,!0),O("scrolling from index to",{index:ne,top:se,behavior:te},ps.DEBUG),{top:se,behavior:te}})),i),{scrollToIndex:b,topListHeight:y}},Cr(Ua,$o,ml),{singleton:!0});function eoe(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const vf="up",qd="down",toe="none",noe={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},roe=0,rp=Yn(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=st(!1),c=st(!0),d=On(),p=On(),h=st(4),m=st(roe),g=Oo(He(s_(He(nn(t),_u(1),ti(!0)),He(nn(t),_u(1),ti(!1),o_(100))),br()),!1),b=Oo(He(s_(He(s,ti(!0)),He(s,ti(!1),o_(200))),br()),!1);Lt(He(ao(nn(t),nn(m)),yt(([j,I])=>j<=I),br()),c),Lt(He(c,Xi(50)),p);const y=fs(He(ao(e,nn(n),nn(r),nn(o),nn(h)),ja((j,[{scrollTop:I,scrollHeight:_},M,E,A,R])=>{const D=I+M-_>-R,O={viewportHeight:M,scrollTop:I,scrollHeight:_};if(D){let K,G;return I>j.state.scrollTop?(K="SCROLLED_DOWN",G=j.state.scrollTop-I):(K="SIZE_DECREASED",G=j.state.scrollTop-I||j.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:K,scrollTopDelta:G}}let T;return O.scrollHeight>j.state.scrollHeight?T="SIZE_INCREASED":Mj&&j.atBottom===I.atBottom))),x=Oo(He(e,ja((j,{scrollTop:I,scrollHeight:_,viewportHeight:M})=>{if(t8(j.scrollHeight,_))return{scrollTop:I,scrollHeight:_,jump:0,changed:!1};{const E=_-(I+M)<1;return j.scrollTop!==I&&E?{scrollHeight:_,scrollTop:I,jump:j.scrollTop-I,changed:!0}:{scrollHeight:_,scrollTop:I,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),rn(j=>j.changed),yt(j=>j.jump)),0);Lt(He(y,yt(j=>j.atBottom)),i),Lt(He(i,Xi(50)),d);const w=st(qd);Lt(He(e,yt(({scrollTop:j})=>j),br(),ja((j,I)=>us(b)?{direction:j.direction,prevScrollTop:I}:{direction:Ij.direction)),w),Lt(He(e,Xi(50),ti(toe)),w);const S=st(0);return Lt(He(g,rn(j=>!j),ti(0)),S),Lt(He(t,Xi(100),bn(g),rn(([j,I])=>!!I),ja(([j,I],[_])=>[I,_],[0,0]),yt(([j,I])=>I-j)),S),{isScrolling:g,isAtTop:c,isAtBottom:i,atBottomState:y,atTopStateChange:p,atBottomStateChange:d,scrollDirection:w,atBottomThreshold:h,atTopThreshold:m,scrollVelocity:S,lastJumpDueToItemResize:x}},Cr($o)),gl=Yn(([{log:e}])=>{const t=st(!1),n=fs(He(t,rn(r=>r),br()));return Zn(t,r=>{r&&us(e)("props updated",{},ps.DEBUG)}),{propsReady:t,didMount:n}},Cr(ml),{singleton:!0});function E2(e,t){e==0?t():requestAnimationFrame(()=>E2(e-1,t))}function M2(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const op=Yn(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o},{didMount:s}])=>{const i=st(!0),c=st(0),d=st(!1);return Lt(He(s,bn(c),rn(([p,h])=>!!h),ti(!1)),i),Zn(He(ao(t,s),bn(i,e,n,d),rn(([[,p],h,{sizeTree:m},g,b])=>p&&(!or(m)||k2(g))&&!h&&!b),bn(c)),([,p])=>{pn(d,!0),E2(3,()=>{xi(r,()=>pn(i,!0)),pn(o,p)})}),{scrolledToInitialItem:i,initialTopMostItemIndex:c}},Cr(Ua,$o,np,gl),{singleton:!0});function l_(e){return e?e==="smooth"?"smooth":"auto":!1}const ooe=(e,t)=>typeof e=="function"?l_(e(t)):t&&l_(e),soe=Yn(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:c},{log:d},{scrollingInProgress:p}])=>{const h=st(!1),m=On();let g=null;function b(x){pn(o,{index:"LAST",align:"end",behavior:x})}Zn(He(ao(He(nn(e),_u(1)),c),bn(nn(h),n,s,p),yt(([[x,w],S,j,I,_])=>{let M=w&&I,E="auto";return M&&(E=ooe(S,j||_),M=M&&!!E),{totalCount:x,shouldFollow:M,followOutputBehavior:E}}),rn(({shouldFollow:x})=>x)),({totalCount:x,followOutputBehavior:w})=>{g&&(g(),g=null),g=xi(t,()=>{us(d)("following output to ",{totalCount:x},ps.DEBUG),b(w),g=null})});function y(x){const w=xi(r,S=>{x&&!S.atBottom&&S.notAtBottomBecause==="SIZE_INCREASED"&&!g&&(us(d)("scrolling to bottom due to increased size",{},ps.DEBUG),b("auto"))});setTimeout(w,100)}return Zn(He(ao(nn(h),e,i),rn(([x,,w])=>x&&w),ja(({value:x},[,w])=>({refreshed:x===w,value:w}),{refreshed:!1,value:0}),rn(({refreshed:x})=>x),bn(h,e)),([,x])=>{y(x!==!1)}),Zn(m,()=>{y(us(h)!==!1)}),Zn(ao(nn(h),r),([x,w])=>{x&&!w.atBottom&&w.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&b("auto")}),{followOutput:h,autoscrollToBottom:m}},Cr(Ua,rp,np,op,gl,ml,$o));function aoe(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const f8=Yn(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=On(),i=On(),c=fs(He(s,yt(aoe)));return Lt(He(c,yt(d=>d.totalCount)),e),Lt(He(c,yt(d=>d.groupIndices)),t),Lt(He(ao(r,n,o),rn(([d,p])=>S0(p)),yt(([d,p,h])=>ca(p.groupOffsetTree,Math.max(d-h,0),"v")[0]),br(),yt(d=>[d])),i),{groupCounts:s,topItemsIndexes:i}},Cr(Ua,$o));function bf(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function p8(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const sg="top",ag="bottom",c_="none";function u_(e,t,n){return typeof e=="number"?n===vf&&t===sg||n===qd&&t===ag?e:0:n===vf?t===sg?e.main:e.reverse:t===ag?e.main:e.reverse}function d_(e,t){return typeof e=="number"?e:e[t]||0}const O2=Yn(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=On(),i=st(0),c=st(0),d=st(0),p=Oo(He(ao(nn(e),nn(t),nn(r),nn(s,bf),nn(d),nn(i),nn(o),nn(n),nn(c)),yt(([h,m,g,[b,y],x,w,S,j,I])=>{const _=h-j,M=w+S,E=Math.max(g-_,0);let A=c_;const R=d_(I,sg),D=d_(I,ag);return b-=j,b+=g+S,y+=g+S,y-=j,b>h+M-R&&(A=vf),yh!=null),br(bf)),[0,0]);return{listBoundary:s,overscan:d,topListHeight:i,increaseViewportBy:c,visibleRange:p}},Cr($o),{singleton:!0});function ioe(e,t,n){if(S0(t)){const r=u8(e,t);return[{index:ca(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const M1={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function f_(e,t,n){if(e.length===0)return[];if(!S0(t))return e.map(p=>({...p,index:p.index+n,originalIndex:p.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=w0(t.groupOffsetTree,r,o);let c,d=0;for(const p of e){(!c||c.end0){p=e[0].offset;const x=e[e.length-1];h=x.offset+x.size}const m=n-d,g=c+m*i+(m-1)*r,b=p,y=g-h;return{items:f_(e,o,s),topItems:f_(t,o,s),topListHeight:t.reduce((x,w)=>w.size+x,0),offsetTop:p,offsetBottom:y,top:b,bottom:h,totalCount:n,firstItemIndex:s}}function h8(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const h of n.groupIndices){if(h-i>=e)break;i++}const c=e+i,d=M2(t,c),p=Array.from({length:c}).map((h,m)=>({index:m+d,size:0,offset:0,data:s[m+d]}));return zh(p,[],c,o,n,r)}const ic=Yn(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:c,topListHeight:d},{scrolledToInitialItem:p,initialTopMostItemIndex:h},{topListHeight:m},g,{didMount:b},{recalcInProgress:y}])=>{const x=st([]),w=st(0),S=On();Lt(s.topItemsIndexes,x);const j=Oo(He(ao(b,y,nn(i,bf),nn(t),nn(e),nn(h),p,nn(x),nn(r),nn(o),n),rn(([E,A,,R,,,,,,,D])=>{const O=D&&D.length!==R;return E&&!A&&!O}),yt(([,,[E,A],R,D,O,T,K,G,X,Z])=>{const te=D,{sizeTree:V,offsetTree:oe}=te,ne=us(w);if(R===0)return{...M1,totalCount:R};if(E===0&&A===0)return ne===0?{...M1,totalCount:R}:h8(ne,O,D,G,X,Z||[]);if(or(V))return ne>0?null:zh(ioe(M2(O,R),te,Z),[],R,X,te,G);const se=[];if(K.length>0){const $=K[0],F=K[K.length-1];let q=0;for(const pe of w0(V,$,F)){const W=pe.value,U=Math.max(pe.start,$),ee=Math.min(pe.end,F);for(let J=U;J<=ee;J++)se.push({index:J,size:W,offset:q,data:Z&&Z[J]}),q+=W}}if(!T)return zh([],se,R,X,te,G);const re=K.length>0?K[K.length-1]+1:0,ae=Kre(oe,E,A,re);if(ae.length===0)return null;const B=R-1,Y=C0([],$=>{for(const F of ae){const q=F.value;let pe=q.offset,W=F.start;const U=q.size;if(q.offset=A);J++)$.push({index:J,size:U,offset:pe,data:Z&&Z[J]}),pe+=U+X}});return zh(Y,se,R,X,te,G)}),rn(E=>E!==null),br()),M1);Lt(He(n,rn(k2),yt(E=>E==null?void 0:E.length)),t),Lt(He(j,yt(E=>E.topListHeight)),m),Lt(m,d),Lt(He(j,yt(E=>[E.top,E.bottom])),c),Lt(He(j,yt(E=>E.items)),S);const I=fs(He(j,rn(({items:E})=>E.length>0),bn(t,n),rn(([{items:E},A])=>E[E.length-1].originalIndex===A-1),yt(([,E,A])=>[E-1,A]),br(bf),yt(([E])=>E))),_=fs(He(j,Xi(200),rn(({items:E,topItems:A})=>E.length>0&&E[0].originalIndex===A.length),yt(({items:E})=>E[0].index),br())),M=fs(He(j,rn(({items:E})=>E.length>0),yt(({items:E})=>{let A=0,R=E.length-1;for(;E[A].type==="group"&&AA;)R--;return{startIndex:E[A].index,endIndex:E[R].index}}),br(p8)));return{listState:j,topItemsIndexes:x,endReached:I,startReached:_,rangeChanged:M,itemsRendered:S,initialItemCount:w,...g}},Cr(Ua,f8,O2,op,np,rp,gl,I2),{singleton:!0}),loe=Yn(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:c}])=>(Lt(He(c,bn(s),rn(([,d])=>d!==0),bn(o,e,t,r,n),yt(([[,d],p,h,m,g,b=[]])=>h8(d,p,h,m,g,b))),i),{}),Cr(Ua,op,ic,gl),{singleton:!0}),m8=Yn(([{scrollVelocity:e}])=>{const t=st(!1),n=On(),r=st(!1);return Lt(He(e,bn(r,t,n),rn(([o,s])=>!!s),yt(([o,s,i,c])=>{const{exit:d,enter:p}=s;if(i){if(d(o,c))return!1}else if(p(o,c))return!0;return i}),br()),t),Zn(He(ao(t,e,n),bn(r)),([[o,s,i],c])=>o&&c&&c.change&&c.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Cr(rp),{singleton:!0}),coe=Yn(([{topItemsIndexes:e}])=>{const t=st(0);return Lt(He(t,rn(n=>n>0),yt(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Cr(ic)),g8=Yn(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=On(),i=Oo(He(ao(e,r,t,n,o),yt(([c,d,p,h,m])=>c+d+p+h+m.offsetBottom+m.bottom)),0);return Lt(nn(i),s),{totalListHeight:i,totalListHeightChanged:s}},Cr($o,ic),{singleton:!0});function v8(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const uoe=v8(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),doe=Yn(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:c},{listState:d},{beforeUnshiftWith:p,shiftWithOffset:h,sizes:m,gap:g},{log:b},{recalcInProgress:y}])=>{const x=fs(He(d,bn(c),ja(([,S,j,I],[{items:_,totalCount:M,bottom:E,offsetBottom:A},R])=>{const D=E+A;let O=0;return j===M&&S.length>0&&_.length>0&&(_[0].originalIndex===0&&S[0].originalIndex===0||(O=D-I,O!==0&&(O+=R))),[O,_,M,D]},[0,[],0,0]),rn(([S])=>S!==0),bn(t,i,r,s,b,y),rn(([,S,j,I,,,_])=>!_&&!I&&S!==0&&j===vf),yt(([[S],,,,,j])=>(j("Upward scrolling compensation",{amount:S},ps.DEBUG),S))));function w(S){S>0?(pn(e,{top:-S,behavior:"auto"}),pn(n,0)):(pn(n,0),pn(e,{top:-S,behavior:"auto"}))}return Zn(He(x,bn(n,o)),([S,j,I])=>{I&&uoe()?pn(n,j-S):w(-S)}),Zn(He(ao(Oo(o,!1),n,y),rn(([S,j,I])=>!S&&!I&&j!==0),yt(([S,j])=>j),Xi(1)),w),Lt(He(h,yt(S=>({top:-S}))),e),Zn(He(p,bn(m,g),yt(([S,{lastSize:j,groupIndices:I,sizeTree:_},M])=>{function E(A){return A*(j+M)}if(I.length===0)return E(S);{let A=0;const R=mf(_,0);let D=0,O=0;for(;DS&&(A-=R,T=S-D+1),D+=T,A+=E(T),O++}return A}})),S=>{pn(n,S),requestAnimationFrame(()=>{pn(e,{top:S}),requestAnimationFrame(()=>{pn(n,0),pn(y,!1)})})}),{deviation:n}},Cr($o,rp,ic,Ua,ml,I2)),foe=Yn(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=st(0);return Zn(He(e,bn(r),rn(([,o])=>o!==0),yt(([,o])=>({top:o}))),o=>{xi(He(n,_u(1),rn(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{pn(t,o)})})}),{initialScrollTop:r}},Cr(gl,$o,ic),{singleton:!0}),poe=Yn(([{viewportHeight:e},{totalListHeight:t}])=>{const n=st(!1),r=Oo(He(ao(n,e,t),rn(([o])=>o),yt(([,o,s])=>Math.max(0,o-s)),Xi(0),br()),0);return{alignToBottom:n,paddingTopAddition:r}},Cr($o,g8),{singleton:!0}),A2=Yn(([{scrollTo:e,scrollContainerState:t}])=>{const n=On(),r=On(),o=On(),s=st(!1),i=st(void 0);return Lt(He(ao(n,r),yt(([{viewportHeight:c,scrollTop:d,scrollHeight:p},{offsetTop:h}])=>({scrollTop:Math.max(0,d-h),scrollHeight:p,viewportHeight:c}))),t),Lt(He(e,bn(r),yt(([c,{offsetTop:d}])=>({...c,top:c.top+d}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Cr($o)),hoe=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>er?{...i,behavior:o,align:s??"end"}:null,moe=Yn(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:c,scrollingInProgress:d},{scrollToIndex:p}])=>{const h=On();return Lt(He(h,bn(e,o,t,s,i,c,r),bn(n),yt(([[m,g,b,y,x,w,S,j],I])=>{const{done:_,behavior:M,align:E,calculateViewLocation:A=hoe,...R}=m,D=c8(m,g,y-1),O=gf(D,g.offsetTree,I)+x+w,T=O+ca(g.sizeTree,D)[1],K=j+w,G=j+b-S,X=A({itemTop:O,itemBottom:T,viewportTop:K,viewportBottom:G,locationParams:{behavior:M,align:E,...R}});return X?_&&xi(He(d,rn(Z=>Z===!1),_u(us(d)?1:2)),_):_&&_(),X}),rn(m=>m!==null)),p),{scrollIntoView:h}},Cr(Ua,$o,np,ic,ml),{singleton:!0}),goe=Yn(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:s,windowScrollContainerState:i,windowViewportRect:c}])=>{const d=On(),p=st(void 0),h=st(null),m=st(null);return Lt(i,h),Lt(c,m),Zn(He(d,bn(e,n,s,h,m)),([g,b,y,x,w,S])=>{const j=Yre(b.sizeTree);x&&w!==null&&S!==null&&(y=w.scrollTop-S.offsetTop),g({ranges:j,scrollTop:y})}),Lt(He(p,rn(k2),yt(voe)),r),Lt(He(o,bn(p),rn(([,g])=>g!==void 0),br(),yt(([,g])=>g.ranges)),t),{getState:d,restoreStateFrom:p}},Cr(Ua,$o,op,gl,A2));function voe(e){return{offset:e.scrollTop,index:0,align:"start"}}const boe=Yn(([e,t,n,r,o,s,i,c,d,p])=>({...e,...t,...n,...r,...o,...s,...i,...c,...d,...p}),Cr(O2,loe,gl,m8,g8,foe,poe,A2,moe,ml)),xoe=Yn(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:c,groupIndices:d,statefulTotalCount:p,gap:h,sizes:m},{initialTopMostItemIndex:g,scrolledToInitialItem:b},y,x,w,{listState:S,topItemsIndexes:j,...I},{scrollToIndex:_},M,{topItemCount:E},{groupCounts:A},R])=>(Lt(I.rangeChanged,R.scrollSeekRangeChanged),Lt(He(R.windowViewportRect,yt(D=>D.visibleHeight)),y.viewportHeight),{totalCount:e,data:i,firstItemIndex:c,sizeRanges:t,initialTopMostItemIndex:g,scrolledToInitialItem:b,topItemsIndexes:j,topItemCount:E,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:h,...w,statefulTotalCount:p,listState:S,scrollToIndex:_,trackItemSizes:o,itemSize:s,groupIndices:d,...I,...R,...y,sizes:m,...x}),Cr(Ua,op,$o,goe,soe,ic,np,doe,coe,f8,boe)),O1="-webkit-sticky",p_="sticky",b8=v8(()=>{if(typeof document>"u")return p_;const e=document.createElement("div");return e.style.position=O1,e.style.position===O1?O1:p_});function x8(e,t){const n=z.useRef(null),r=z.useCallback(c=>{if(c===null||!c.offsetParent)return;const d=c.getBoundingClientRect(),p=d.width;let h,m;if(t){const g=t.getBoundingClientRect(),b=d.top-g.top;h=g.height-Math.max(0,b),m=b+t.scrollTop}else h=window.innerHeight-Math.max(0,d.top),m=d.top+window.pageYOffset;n.current={offsetTop:m,visibleHeight:h,visibleWidth:p},e(n.current)},[e,t]),{callbackRef:o,ref:s}=_2(r),i=z.useCallback(()=>{r(s.current)},[r,s]);return z.useEffect(()=>{if(t){t.addEventListener("scroll",i);const c=new ResizeObserver(i);return c.observe(t),()=>{t.removeEventListener("scroll",i),c.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const y8=z.createContext(void 0),C8=z.createContext(void 0);function w8(e){return e}const yoe=Yn(()=>{const e=st(d=>`Item ${d}`),t=st(null),n=st(d=>`Group ${d}`),r=st({}),o=st(w8),s=st("div"),i=st(qu),c=(d,p=null)=>Oo(He(r,yt(h=>h[d]),br()),p);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:c("Footer"),HeaderComponent:c("Header"),TopItemListComponent:c("TopItemList"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),GroupComponent:c("Group","div"),ScrollerComponent:c("Scroller","div"),EmptyPlaceholder:c("EmptyPlaceholder"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder")}}),Coe=Yn(([e,t])=>({...e,...t}),Cr(xoe,yoe)),woe=({height:e})=>z.createElement("div",{style:{height:e}}),Soe={position:b8(),zIndex:1,overflowAnchor:"none"},koe={overflowAnchor:"none"},h_=z.memo(function({showTopList:t=!1}){const n=In("listState"),r=Es("sizeRanges"),o=In("useWindowScroll"),s=In("customScrollParent"),i=Es("windowScrollContainerState"),c=Es("scrollContainerState"),d=s||o?i:c,p=In("itemContent"),h=In("context"),m=In("groupContent"),g=In("trackItemSizes"),b=In("itemSize"),y=In("log"),x=Es("gap"),{callbackRef:w}=Lre(r,b,g,t?qu:d,y,x,s),[S,j]=z.useState(0);R2("deviation",X=>{S!==X&&j(X)});const I=In("EmptyPlaceholder"),_=In("ScrollSeekPlaceholder")||woe,M=In("ListComponent"),E=In("ItemComponent"),A=In("GroupComponent"),R=In("computeItemKey"),D=In("isSeeking"),O=In("groupIndices").length>0,T=In("paddingTopAddition"),K=In("scrolledToInitialItem"),G=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+T,paddingBottom:n.offsetBottom,marginTop:S,...K?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&I?z.createElement(I,Uo(I,h)):z.createElement(M,{...Uo(M,h),ref:w,style:G,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(X=>{const Z=X.originalIndex,te=R(Z+n.firstItemIndex,X.data,h);return D?z.createElement(_,{...Uo(_,h),key:te,index:X.index,height:X.size,type:X.type||"item",...X.type==="group"?{}:{groupIndex:X.groupIndex}}):X.type==="group"?z.createElement(A,{...Uo(A,h),key:te,"data-index":Z,"data-known-size":X.size,"data-item-index":X.index,style:Soe},m(X.index,h)):z.createElement(E,{...Uo(E,h),...Ioe(E,X.data),key:te,"data-index":Z,"data-known-size":X.size,"data-item-index":X.index,"data-item-group-index":X.groupIndex,style:koe},O?p(X.index,X.groupIndex,X.data,h):p(X.index,X.data,h))}))}),joe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},k0={width:"100%",height:"100%",position:"absolute",top:0},_oe={width:"100%",position:b8(),top:0,zIndex:1};function Uo(e,t){if(typeof e!="string")return{context:t}}function Ioe(e,t){return{item:typeof e=="string"?void 0:t}}const Poe=z.memo(function(){const t=In("HeaderComponent"),n=Es("headerHeight"),r=In("headerFooterTag"),o=ac(i=>n(il(i,"height"))),s=In("context");return t?z.createElement(r,{ref:o},z.createElement(t,Uo(t,s))):null}),Eoe=z.memo(function(){const t=In("FooterComponent"),n=Es("footerHeight"),r=In("headerFooterTag"),o=ac(i=>n(il(i,"height"))),s=In("context");return t?z.createElement(r,{ref:o},z.createElement(t,Uo(t,s))):null});function S8({usePublisher:e,useEmitter:t,useEmitterValue:n}){return z.memo(function({style:s,children:i,...c}){const d=e("scrollContainerState"),p=n("ScrollerComponent"),h=e("smoothScrollTargetReached"),m=n("scrollerRef"),g=n("context"),{scrollerRef:b,scrollByCallback:y,scrollToCallback:x}=n8(d,h,p,m);return t("scrollTo",x),t("scrollBy",y),z.createElement(p,{ref:b,style:{...joe,...s},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...c,...Uo(p,g)},i)})}function k8({usePublisher:e,useEmitter:t,useEmitterValue:n}){return z.memo(function({style:s,children:i,...c}){const d=e("windowScrollContainerState"),p=n("ScrollerComponent"),h=e("smoothScrollTargetReached"),m=n("totalListHeight"),g=n("deviation"),b=n("customScrollParent"),y=n("context"),{scrollerRef:x,scrollByCallback:w,scrollToCallback:S}=n8(d,h,p,qu,b);return Tre(()=>(x.current=b||window,()=>{x.current=null}),[x,b]),t("windowScrollTo",S),t("scrollBy",w),z.createElement(p,{style:{position:"relative",...s,...m!==0?{height:m+g}:{}},"data-virtuoso-scroller":!0,...c,...Uo(p,y)},i)})}const Moe=({children:e})=>{const t=z.useContext(y8),n=Es("viewportHeight"),r=Es("fixedItemHeight"),o=ac(YO(n,s=>il(s,"height")));return z.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),z.createElement("div",{style:k0,ref:o,"data-viewport-type":"element"},e)},Ooe=({children:e})=>{const t=z.useContext(y8),n=Es("windowViewportRect"),r=Es("fixedItemHeight"),o=In("customScrollParent"),s=x8(n,o);return z.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),z.createElement("div",{ref:s,style:k0,"data-viewport-type":"window"},e)},Aoe=({children:e})=>{const t=In("TopItemListComponent"),n=In("headerHeight"),r={..._oe,marginTop:`${n}px`},o=In("context");return z.createElement(t||"div",{style:r,context:o},e)},Roe=z.memo(function(t){const n=In("useWindowScroll"),r=In("topItemsIndexes").length>0,o=In("customScrollParent"),s=o||n?Noe:Toe,i=o||n?Ooe:Moe;return z.createElement(s,{...t},r&&z.createElement(Aoe,null,z.createElement(h_,{showTopList:!0})),z.createElement(i,null,z.createElement(Poe,null),z.createElement(h_,null),z.createElement(Eoe,null)))}),{Component:Doe,usePublisher:Es,useEmitterValue:In,useEmitter:R2}=e8(Coe,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Roe),Toe=S8({usePublisher:Es,useEmitterValue:In,useEmitter:R2}),Noe=k8({usePublisher:Es,useEmitterValue:In,useEmitter:R2}),$oe=Doe,m_={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Loe={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:g_,ceil:v_,floor:ig,min:A1,max:Kd}=Math;function zoe(e){return{...Loe,items:e}}function b_(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function Foe(e,t){return e&&e.column===t.column&&e.row===t.row}function yh(e,t){return e&&e.width===t.width&&e.height===t.height}const Boe=Yn(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:c,scrollContainerState:d,footerHeight:p,headerHeight:h},m,g,{propsReady:b,didMount:y},{windowViewportRect:x,useWindowScroll:w,customScrollParent:S,windowScrollContainerState:j,windowScrollTo:I},_])=>{const M=st(0),E=st(0),A=st(m_),R=st({height:0,width:0}),D=st({height:0,width:0}),O=On(),T=On(),K=st(0),G=st(null),X=st({row:0,column:0}),Z=On(),te=On(),V=st(!1),oe=st(0),ne=st(!0),se=st(!1);Zn(He(y,bn(oe),rn(([F,q])=>!!q)),()=>{pn(ne,!1),pn(E,0)}),Zn(He(ao(y,ne,D,R,oe,se),rn(([F,q,pe,W,,U])=>F&&!q&&pe.height!==0&&W.height!==0&&!U)),([,,,,F])=>{pn(se,!0),E2(1,()=>{pn(O,F)}),xi(He(r),()=>{pn(n,[0,0]),pn(ne,!0)})}),Lt(He(te,rn(F=>F!=null&&F.scrollTop>0),ti(0)),E),Zn(He(y,bn(te),rn(([,F])=>F!=null)),([,F])=>{F&&(pn(R,F.viewport),pn(D,F==null?void 0:F.item),pn(X,F.gap),F.scrollTop>0&&(pn(V,!0),xi(He(r,_u(1)),q=>{pn(V,!1)}),pn(i,{top:F.scrollTop})))}),Lt(He(R,yt(({height:F})=>F)),o),Lt(He(ao(nn(R,yh),nn(D,yh),nn(X,(F,q)=>F&&F.column===q.column&&F.row===q.row),nn(r)),yt(([F,q,pe,W])=>({viewport:F,item:q,gap:pe,scrollTop:W}))),Z),Lt(He(ao(nn(M),t,nn(X,Foe),nn(D,yh),nn(R,yh),nn(G),nn(E),nn(V),nn(ne),nn(oe)),rn(([,,,,,,,F])=>!F),yt(([F,[q,pe],W,U,ee,J,ge,,he,de])=>{const{row:_e,column:Pe}=W,{height:ze,width:ht}=U,{width:Je}=ee;if(ge===0&&(F===0||Je===0))return m_;if(ht===0){const Rt=M2(de,F),zt=Rt===0?Math.max(ge-1,0):Rt;return zoe(b_(Rt,zt,J))}const qt=j8(Je,ht,Pe);let Pt,jt;he?q===0&&pe===0&&ge>0?(Pt=0,jt=ge-1):(Pt=qt*ig((q+_e)/(ze+_e)),jt=qt*v_((pe+_e)/(ze+_e))-1,jt=A1(F-1,Kd(jt,qt-1)),Pt=A1(jt,Kd(0,Pt))):(Pt=0,jt=-1);const Se=b_(Pt,jt,J),{top:Fe,bottom:it}=x_(ee,W,U,Se),At=v_(F/qt),lt=At*ze+(At-1)*_e-it;return{items:Se,offsetTop:Fe,offsetBottom:lt,top:Fe,bottom:it,itemHeight:ze,itemWidth:ht}})),A),Lt(He(G,rn(F=>F!==null),yt(F=>F.length)),M),Lt(He(ao(R,D,A,X),rn(([F,q,{items:pe}])=>pe.length>0&&q.height!==0&&F.height!==0),yt(([F,q,{items:pe},W])=>{const{top:U,bottom:ee}=x_(F,W,q,pe);return[U,ee]}),br(bf)),n);const re=st(!1);Lt(He(r,bn(re),yt(([F,q])=>q||F!==0)),re);const ae=fs(He(nn(A),rn(({items:F})=>F.length>0),bn(M,re),rn(([{items:F},q,pe])=>pe&&F[F.length-1].index===q-1),yt(([,F])=>F-1),br())),B=fs(He(nn(A),rn(({items:F})=>F.length>0&&F[0].index===0),ti(0),br())),Y=fs(He(nn(A),bn(V),rn(([{items:F},q])=>F.length>0&&!q),yt(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),br(p8),Xi(0)));Lt(Y,g.scrollSeekRangeChanged),Lt(He(O,bn(R,D,M,X),yt(([F,q,pe,W,U])=>{const ee=d8(F),{align:J,behavior:ge,offset:he}=ee;let de=ee.index;de==="LAST"&&(de=W-1),de=Kd(0,de,A1(W-1,de));let _e=ux(q,U,pe,de);return J==="end"?_e=g_(_e-q.height+pe.height):J==="center"&&(_e=g_(_e-q.height/2+pe.height/2)),he&&(_e+=he),{top:_e,behavior:ge}})),i);const $=Oo(He(A,yt(F=>F.offsetBottom+F.bottom)),0);return Lt(He(x,yt(F=>({width:F.visibleWidth,height:F.visibleHeight}))),R),{data:G,totalCount:M,viewportDimensions:R,itemDimensions:D,scrollTop:r,scrollHeight:T,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:c,windowViewportRect:x,windowScrollTo:I,useWindowScroll:w,customScrollParent:S,windowScrollContainerState:j,deviation:K,scrollContainerState:d,footerHeight:p,headerHeight:h,initialItemCount:E,gap:X,restoreStateFrom:te,...g,initialTopMostItemIndex:oe,gridState:A,totalListHeight:$,...m,startReached:B,endReached:ae,rangeChanged:Y,stateChanged:Z,propsReady:b,stateRestoreInProgress:V,..._}},Cr(O2,$o,rp,m8,gl,A2,ml));function x_(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=ux(e,t,n,r[0].index),i=ux(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function ux(e,t,n,r){const o=j8(e.width,n.width,t.column),s=ig(r/o),i=s*n.height+Kd(0,s-1)*t.row;return i>0?i+t.row:i}function j8(e,t,n){return Kd(1,ig((e+n)/(ig(t)+n)))}const Hoe=Yn(()=>{const e=st(p=>`Item ${p}`),t=st({}),n=st(null),r=st("virtuoso-grid-item"),o=st("virtuoso-grid-list"),s=st(w8),i=st("div"),c=st(qu),d=(p,h=null)=>Oo(He(t,yt(m=>m[p]),br()),h);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:c,FooterComponent:d("Footer"),HeaderComponent:d("Header"),ListComponent:d("List","div"),ItemComponent:d("Item","div"),ScrollerComponent:d("Scroller","div"),ScrollSeekPlaceholder:d("ScrollSeekPlaceholder","div")}}),Woe=Yn(([e,t])=>({...e,...t}),Cr(Boe,Hoe)),Voe=z.memo(function(){const t=jr("gridState"),n=jr("listClassName"),r=jr("itemClassName"),o=jr("itemContent"),s=jr("computeItemKey"),i=jr("isSeeking"),c=sa("scrollHeight"),d=jr("ItemComponent"),p=jr("ListComponent"),h=jr("ScrollSeekPlaceholder"),m=jr("context"),g=sa("itemDimensions"),b=sa("gap"),y=jr("log"),x=jr("stateRestoreInProgress"),w=ac(S=>{const j=S.parentElement.parentElement.scrollHeight;c(j);const I=S.firstChild;if(I){const{width:_,height:M}=I.getBoundingClientRect();g({width:_,height:M})}b({row:y_("row-gap",getComputedStyle(S).rowGap,y),column:y_("column-gap",getComputedStyle(S).columnGap,y)})});return x?null:z.createElement(p,{ref:w,className:n,...Uo(p,m),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(S=>{const j=s(S.index,S.data,m);return i?z.createElement(h,{key:j,...Uo(h,m),index:S.index,height:t.itemHeight,width:t.itemWidth}):z.createElement(d,{...Uo(d,m),className:r,"data-index":S.index,key:j},o(S.index,S.data,m))}))}),Uoe=z.memo(function(){const t=jr("HeaderComponent"),n=sa("headerHeight"),r=jr("headerFooterTag"),o=ac(i=>n(il(i,"height"))),s=jr("context");return t?z.createElement(r,{ref:o},z.createElement(t,Uo(t,s))):null}),Goe=z.memo(function(){const t=jr("FooterComponent"),n=sa("footerHeight"),r=jr("headerFooterTag"),o=ac(i=>n(il(i,"height"))),s=jr("context");return t?z.createElement(r,{ref:o},z.createElement(t,Uo(t,s))):null}),qoe=({children:e})=>{const t=z.useContext(C8),n=sa("itemDimensions"),r=sa("viewportDimensions"),o=ac(s=>{r(s.getBoundingClientRect())});return z.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),z.createElement("div",{style:k0,ref:o},e)},Koe=({children:e})=>{const t=z.useContext(C8),n=sa("windowViewportRect"),r=sa("itemDimensions"),o=jr("customScrollParent"),s=x8(n,o);return z.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),z.createElement("div",{ref:s,style:k0},e)},Qoe=z.memo(function({...t}){const n=jr("useWindowScroll"),r=jr("customScrollParent"),o=r||n?Joe:Yoe,s=r||n?Koe:qoe;return z.createElement(o,{...t},z.createElement(s,null,z.createElement(Uoe,null),z.createElement(Voe,null),z.createElement(Goe,null)))}),{Component:Xoe,usePublisher:sa,useEmitterValue:jr,useEmitter:_8}=e8(Woe,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},Qoe),Yoe=S8({usePublisher:sa,useEmitterValue:jr,useEmitter:_8}),Joe=k8({usePublisher:sa,useEmitterValue:jr,useEmitter:_8});function y_(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,ps.WARN),t==="normal"?0:parseInt(t??"0",10)}const Zoe=Xoe,ese=e=>{const t=H(s=>s.gallery.galleryView),{data:n}=Tx(e),{data:r}=Nx(e),o=l.useMemo(()=>t==="images"?n==null?void 0:n.total:r==null?void 0:r.total,[t,r,n]);return{totalImages:n,totalAssets:r,currentViewTotal:o}},tse=({imageDTO:e})=>a.jsx(N,{sx:{pointerEvents:"none",flexDirection:"column",position:"absolute",top:0,insetInlineStart:0,p:2,alignItems:"flex-start",gap:2},children:a.jsxs(Va,{variant:"solid",colorScheme:"base",children:[e.width," × ",e.height]})}),nse=l.memo(tse),D2=({postUploadAction:e,isDisabled:t})=>{const n=H(d=>d.gallery.autoAddBoardId),[r]=EI(),o=l.useCallback(d=>{const p=d[0];p&&r({file:p,image_category:"user",is_intermediate:!1,postUploadAction:e??{type:"TOAST"},board_id:n==="none"?void 0:n})},[n,e,r]),{getRootProps:s,getInputProps:i,open:c}=Hy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},onDropAccepted:o,disabled:t,noDrag:!0,multiple:!1});return{getUploadButtonProps:s,getUploadInputProps:i,openUploader:c}},rse=me(we,({generation:e})=>e.model,Ie),j0=()=>{const e=le(),t=Zl(),{t:n}=Q(),r=H(rse),o=l.useCallback(()=>{t({title:n("toast.parameterSet"),status:"info",duration:2500,isClosable:!0})},[n,t]),s=l.useCallback(B=>{t({title:n("toast.parameterNotSet"),description:B,status:"warning",duration:2500,isClosable:!0})},[n,t]),i=l.useCallback(()=>{t({title:n("toast.parametersSet"),status:"info",duration:2500,isClosable:!0})},[n,t]),c=l.useCallback(B=>{t({title:n("toast.parametersNotSet"),status:"warning",description:B,duration:2500,isClosable:!0})},[n,t]),d=l.useCallback((B,Y,$,F)=>{if(Wp(B)||Vp(Y)||md($)||Bv(F)){Wp(B)&&e($d(B)),Vp(Y)&&e(Ld(Y)),md($)&&e(zd($)),md(F)&&e(Fd(F)),o();return}s()},[e,o,s]),p=l.useCallback(B=>{if(!Wp(B)){s();return}e($d(B)),o()},[e,o,s]),h=l.useCallback(B=>{if(!Vp(B)){s();return}e(Ld(B)),o()},[e,o,s]),m=l.useCallback(B=>{if(!md(B)){s();return}e(zd(B)),o()},[e,o,s]),g=l.useCallback(B=>{if(!Bv(B)){s();return}e(Fd(B)),o()},[e,o,s]),b=l.useCallback(B=>{if(!qw(B)){s();return}e(Hh(B)),o()},[e,o,s]),y=l.useCallback(B=>{if(!Hv(B)){s();return}e(Wh(B)),o()},[e,o,s]),x=l.useCallback(B=>{if(!Kw(B)){s();return}e(X1(B)),o()},[e,o,s]),w=l.useCallback(B=>{if(!Wv(B)){s();return}e(Y1(B)),o()},[e,o,s]),S=l.useCallback(B=>{if(!Qw(B)&&!si(B)){s();return}si(B)?e(Vc(null)):e(Vc(B)),o()},[e,o,s]),j=l.useCallback(B=>{if(!Vv(B)){s();return}e(Vh(B)),o()},[e,o,s]),I=l.useCallback(B=>{if(!Xw(B)){s();return}e(Wl(B)),o()},[e,o,s]),_=l.useCallback(B=>{if(!Yw(B)){s();return}e(Vl(B)),o()},[e,o,s]),M=l.useCallback(B=>{if(!Up(B)){s();return}e(Uh(B)),o()},[e,o,s]),E=l.useCallback(B=>{if(!Jw(B)){s();return}e(J1(B)),o()},[e,o,s]),A=l.useCallback(B=>{if(!Up(B)){s();return}e(Gh(B)),o()},[e,o,s]),R=l.useCallback(B=>{if(!Zw(B)){s();return}e(Z1(B)),o()},[e,o,s]),{data:D}=_f(void 0),O=l.useCallback(B=>{if(!zI(B.lora))return{lora:null,error:"Invalid LoRA model"};const{base_model:Y,model_name:$}=B.lora,F=D?o7.getSelectors().selectById(D,`${Y}/lora/${$}`):void 0;return F?(F==null?void 0:F.base_model)===(r==null?void 0:r.base_model)?{lora:F,error:null}:{lora:null,error:"LoRA incompatible with currently-selected model"}:{lora:null,error:"LoRA model is not installed"}},[D,r==null?void 0:r.base_model]),T=l.useCallback(B=>{const Y=O(B);if(!Y.lora){s(Y.error);return}e(eS({...Y.lora,weight:B.weight})),o()},[O,e,o,s]),{data:K}=$x(void 0),G=l.useCallback(B=>{if(!qh(B.control_model))return{controlnet:null,error:"Invalid ControlNet model"};const{image:Y,control_model:$,control_weight:F,begin_step_percent:q,end_step_percent:pe,control_mode:W,resize_mode:U}=B,ee=K?FI.getSelectors().selectById(K,`${$.base_model}/controlnet/${$.model_name}`):void 0;if(!ee)return{controlnet:null,error:"ControlNet model is not installed"};if(!((ee==null?void 0:ee.base_model)===(r==null?void 0:r.base_model)))return{controlnet:null,error:"ControlNet incompatible with currently-selected model"};const ge="none",he=Do.none.default;return{controlnet:{type:"controlnet",isEnabled:!0,model:ee,weight:typeof F=="number"?F:gd.weight,beginStepPct:q||gd.beginStepPct,endStepPct:pe||gd.endStepPct,controlMode:W||gd.controlMode,resizeMode:U||gd.resizeMode,controlImage:(Y==null?void 0:Y.image_name)||null,processedControlImage:(Y==null?void 0:Y.image_name)||null,processorType:ge,processorNode:he,shouldAutoConfig:!0,id:Jc()},error:null}},[K,r==null?void 0:r.base_model]),X=l.useCallback(B=>{const Y=G(B);if(!Y.controlnet){s(Y.error);return}e(Sc(Y.controlnet)),o()},[G,e,o,s]),{data:Z}=Lx(void 0),te=l.useCallback(B=>{if(!qh(B.t2i_adapter_model))return{controlnet:null,error:"Invalid ControlNet model"};const{image:Y,t2i_adapter_model:$,weight:F,begin_step_percent:q,end_step_percent:pe,resize_mode:W}=B,U=Z?BI.getSelectors().selectById(Z,`${$.base_model}/t2i_adapter/${$.model_name}`):void 0;if(!U)return{controlnet:null,error:"ControlNet model is not installed"};if(!((U==null?void 0:U.base_model)===(r==null?void 0:r.base_model)))return{t2iAdapter:null,error:"ControlNet incompatible with currently-selected model"};const J="none",ge=Do.none.default;return{t2iAdapter:{type:"t2i_adapter",isEnabled:!0,model:U,weight:typeof F=="number"?F:Gp.weight,beginStepPct:q||Gp.beginStepPct,endStepPct:pe||Gp.endStepPct,resizeMode:W||Gp.resizeMode,controlImage:(Y==null?void 0:Y.image_name)||null,processedControlImage:(Y==null?void 0:Y.image_name)||null,processorType:J,processorNode:ge,shouldAutoConfig:!0,id:Jc()},error:null}},[r==null?void 0:r.base_model,Z]),V=l.useCallback(B=>{const Y=te(B);if(!Y.t2iAdapter){s(Y.error);return}e(Sc(Y.t2iAdapter)),o()},[te,e,o,s]),{data:oe}=zx(void 0),ne=l.useCallback(B=>{if(!s7(B==null?void 0:B.ip_adapter_model))return{ipAdapter:null,error:"Invalid IP Adapter model"};const{image:Y,ip_adapter_model:$,weight:F,begin_step_percent:q,end_step_percent:pe}=B,W=oe?HI.getSelectors().selectById(oe,`${$.base_model}/ip_adapter/${$.model_name}`):void 0;return W?(W==null?void 0:W.base_model)===(r==null?void 0:r.base_model)?{ipAdapter:{id:Jc(),type:"ip_adapter",isEnabled:!0,controlImage:(Y==null?void 0:Y.image_name)??null,model:W,weight:F??Uv.weight,beginStepPct:q??Uv.beginStepPct,endStepPct:pe??Uv.endStepPct},error:null}:{ipAdapter:null,error:"IP Adapter incompatible with currently-selected model"}:{ipAdapter:null,error:"IP Adapter model is not installed"}},[oe,r==null?void 0:r.base_model]),se=l.useCallback(B=>{const Y=ne(B);if(!Y.ipAdapter){s(Y.error);return}e(Sc(Y.ipAdapter)),o()},[ne,e,o,s]),re=l.useCallback(B=>{e(gg(B))},[e]),ae=l.useCallback(B=>{if(!B){c();return}const{cfg_scale:Y,height:$,model:F,positive_prompt:q,negative_prompt:pe,scheduler:W,vae:U,seed:ee,steps:J,width:ge,strength:he,hrf_enabled:de,hrf_strength:_e,hrf_method:Pe,positive_style_prompt:ze,negative_style_prompt:ht,refiner_model:Je,refiner_cfg_scale:qt,refiner_steps:Pt,refiner_scheduler:jt,refiner_positive_aesthetic_score:Se,refiner_negative_aesthetic_score:Fe,refiner_start:it,loras:At,controlnets:ke,ipAdapters:lt,t2iAdapters:Rt}=B;Hv(Y)&&e(Wh(Y)),Kw(F)&&e(X1(F)),Wp(q)&&e($d(q)),Vp(pe)&&e(Ld(pe)),Wv(W)&&e(Y1(W)),(Qw(U)||si(U))&&(si(U)?e(Vc(null)):e(Vc(U))),qw(ee)&&e(Hh(ee)),Vv(J)&&e(Vh(J)),Xw(ge)&&e(Wl(ge)),Yw($)&&e(Vl($)),Up(he)&&e(Uh(he)),Jw(de)&&e(J1(de)),Up(_e)&&e(Gh(_e)),Zw(Pe)&&e(Z1(Pe)),md(ze)&&e(zd(ze)),Bv(ht)&&e(Fd(ht)),a7(Je)&&e(WI(Je)),Vv(Pt)&&e(eb(Pt)),Hv(qt)&&e(tb(qt)),Wv(jt)&&e(VI(jt)),i7(Se)&&e(nb(Se)),l7(Fe)&&e(rb(Fe)),c7(it)&&e(ob(it)),e(u7()),At==null||At.forEach(zt=>{const Re=O(zt);Re.lora&&e(eS({...Re.lora,weight:zt.weight}))}),e(AI()),ke==null||ke.forEach(zt=>{const Re=G(zt);Re.controlnet&&e(Sc(Re.controlnet))}),lt==null||lt.forEach(zt=>{const Re=ne(zt);Re.ipAdapter&&e(Sc(Re.ipAdapter))}),Rt==null||Rt.forEach(zt=>{const Re=te(zt);Re.t2iAdapter&&e(Sc(Re.t2iAdapter))}),i()},[e,i,c,O,G,ne,te]);return{recallBothPrompts:d,recallPositivePrompt:p,recallNegativePrompt:h,recallSDXLPositiveStylePrompt:m,recallSDXLNegativeStylePrompt:g,recallSeed:b,recallCfgScale:y,recallModel:x,recallScheduler:w,recallVaeModel:S,recallSteps:j,recallWidth:I,recallHeight:_,recallStrength:M,recallHrfEnabled:E,recallHrfStrength:A,recallHrfMethod:R,recallLoRA:T,recallControlNet:X,recallIPAdapter:se,recallT2IAdapter:V,recallAllParameters:ae,sendToImageToImage:re}},ose=()=>l.useCallback(async t=>new Promise(n=>{const r=new Image;r.onload=()=>{const o=document.createElement("canvas");o.width=r.width,o.height=r.height;const s=o.getContext("2d");s&&(s.drawImage(r,0,0),n(new Promise(i=>{o.toBlob(function(c){i(c)},"image/png")})))},r.crossOrigin=UI.get()?"use-credentials":"anonymous",r.src=t}),[]),I8=()=>{const e=Zl(),{t}=Q(),n=ose(),r=l.useMemo(()=>!!navigator.clipboard&&!!window.ClipboardItem,[]),o=l.useCallback(async s=>{r||e({title:t("toast.problemCopyingImage"),description:"Your browser doesn't support the Clipboard API.",status:"error",duration:2500,isClosable:!0});try{const i=await n(s);if(!i)throw new Error("Unable to create Blob");d7(i),e({title:t("toast.imageCopied"),status:"success",duration:2500,isClosable:!0})}catch(i){e({title:t("toast.problemCopyingImage"),description:String(i),status:"error",duration:2500,isClosable:!0})}},[n,r,t,e]);return{isClipboardAPIAvailable:r,copyImageToClipboard:o}};function sse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"}}]})(e)}function ase(e){return Ye({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M0 256L28.5 28c2-16 15.6-28 31.8-28H228.9c15 0 27.1 12.1 27.1 27.1c0 3.2-.6 6.5-1.7 9.5L208 160H347.3c20.2 0 36.7 16.4 36.7 36.7c0 7.4-2.2 14.6-6.4 20.7l-192.2 281c-5.9 8.6-15.6 13.7-25.9 13.7h-2.9c-15.7 0-28.5-12.8-28.5-28.5c0-2.3 .3-4.6 .9-6.9L176 288H32c-17.7 0-32-14.3-32-32z"}}]})(e)}function ise(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"}}]})(e)}function T2(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M418.4 157.9c35.3-8.3 61.6-40 61.6-77.9c0-44.2-35.8-80-80-80c-43.4 0-78.7 34.5-80 77.5L136.2 151.1C121.7 136.8 101.9 128 80 128c-44.2 0-80 35.8-80 80s35.8 80 80 80c12.2 0 23.8-2.7 34.1-7.6L259.7 407.8c-2.4 7.6-3.7 15.8-3.7 24.2c0 44.2 35.8 80 80 80s80-35.8 80-80c0-27.7-14-52.1-35.4-66.4l37.8-207.7zM156.3 232.2c2.2-6.9 3.5-14.2 3.7-21.7l183.8-73.5c3.6 3.5 7.4 6.7 11.6 9.5L317.6 354.1c-5.5 1.3-10.8 3.1-15.8 5.5L156.3 232.2z"}}]})(e)}function lse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"}}]})(e)}function cse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM136 184c-13.3 0-24 10.7-24 24s10.7 24 24 24H280c13.3 0 24-10.7 24-24s-10.7-24-24-24H136z"}}]})(e)}function use(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM184 296c0 13.3 10.7 24 24 24s24-10.7 24-24V232h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H232V120c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"}}]})(e)}function dse(e){return Ye({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 fse(e){return Ye({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 pse(e){return Ye({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 N2(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}}]})(e)}function $2(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}}]})(e)}function P8(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"}}]})(e)}function hse(e,t,n){var r=this,o=l.useRef(null),s=l.useRef(0),i=l.useRef(null),c=l.useRef([]),d=l.useRef(),p=l.useRef(),h=l.useRef(e),m=l.useRef(!0);h.current=e;var g=typeof window<"u",b=!t&&t!==0&&g;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var y=!!(n=n||{}).leading,x=!("trailing"in n)||!!n.trailing,w="maxWait"in n,S="debounceOnServer"in n&&!!n.debounceOnServer,j=w?Math.max(+n.maxWait||0,t):null;l.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var I=l.useMemo(function(){var _=function(O){var T=c.current,K=d.current;return c.current=d.current=null,s.current=O,p.current=h.current.apply(K,T)},M=function(O,T){b&&cancelAnimationFrame(i.current),i.current=b?requestAnimationFrame(O):setTimeout(O,T)},E=function(O){if(!m.current)return!1;var T=O-o.current;return!o.current||T>=t||T<0||w&&O-s.current>=j},A=function(O){return i.current=null,x&&c.current?_(O):(c.current=d.current=null,p.current)},R=function O(){var T=Date.now();if(E(T))return A(T);if(m.current){var K=t-(T-o.current),G=w?Math.min(K,j-(T-s.current)):K;M(O,G)}},D=function(){if(g||S){var O=Date.now(),T=E(O);if(c.current=[].slice.call(arguments),d.current=r,o.current=O,T){if(!i.current&&m.current)return s.current=o.current,M(R,t),y?_(o.current):p.current;if(w)return M(R,t),_(o.current)}return i.current||M(R,t),p.current}};return D.cancel=function(){i.current&&(b?cancelAnimationFrame(i.current):clearTimeout(i.current)),s.current=0,c.current=o.current=d.current=i.current=null},D.isPending=function(){return!!i.current},D.flush=function(){return i.current?A(Date.now()):p.current},D},[y,w,t,j,x,b,g,S]);return I}function mse(e,t){return e===t}function gse(e,t){return t}function L2(e,t,n){var r=n&&n.equalityFn||mse,o=l.useReducer(gse,e),s=o[0],i=o[1],c=hse(l.useCallback(function(p){return i(p)},[i]),t,n),d=l.useRef(e);return r(d.current,e)||(c(e),d.current=e),[s,c]}const z2=e=>{const t=H(s=>s.config.metadataFetchDebounce),[n]=L2(e,t??0),{data:r,isLoading:o}=GI(n??qI);return{metadata:r,isLoading:o}},vse=f7.injectEndpoints({endpoints:e=>({getWorkflow:e.query({query:t=>`workflows/i/${t}`,providesTags:(t,n,r)=>[{type:"Workflow",id:r}],transformResponse:t=>{if(t){const n=KI.safeParse(t);if(n.success)return n.data;ki("images").warn("Problem parsing workflow")}}})})}),{useGetWorkflowQuery:bse}=vse,F2=e=>{const t=H(s=>s.config.workflowFetchDebounce),[n]=L2(e,t??0),{data:r,isLoading:o}=bse(n??qI);return{workflow:r,isLoading:o}};Fx("gallery/requestedBoardImagesDeletion");const xse=Fx("gallery/sentImageToCanvas"),E8=Fx("gallery/sentImageToImg2Img"),yse=e=>{const{imageDTO:t}=e,n=le(),{t:r}=Q(),o=Zl(),s=Pn("unifiedCanvas").isFeatureEnabled,i=Xg(Bx),{metadata:c,isLoading:d}=z2(t==null?void 0:t.image_name),{workflow:p,isLoading:h}=F2(t==null?void 0:t.workflow_id),[m]=Hx(),[g]=Wx(),{isClipboardAPIAvailable:b,copyImageToClipboard:y}=I8(),x=l.useCallback(()=>{t&&n(vg([t]))},[n,t]),{recallBothPrompts:w,recallSeed:S,recallAllParameters:j}=j0(),I=l.useCallback(()=>{w(c==null?void 0:c.positive_prompt,c==null?void 0:c.negative_prompt,c==null?void 0:c.positive_style_prompt,c==null?void 0:c.negative_style_prompt)},[c==null?void 0:c.negative_prompt,c==null?void 0:c.positive_prompt,c==null?void 0:c.positive_style_prompt,c==null?void 0:c.negative_style_prompt,w]),_=l.useCallback(()=>{S(c==null?void 0:c.seed)},[c==null?void 0:c.seed,S]),M=l.useCallback(()=>{p&&n(Vx(p))},[n,p]),E=l.useCallback(()=>{n(E8()),n(gg(t))},[n,t]),A=l.useCallback(()=>{n(xse()),ls.flushSync(()=>{n(ni("unifiedCanvas"))}),n(QI(t)),o({title:r("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},[n,t,r,o]),R=l.useCallback(()=>{j(c)},[c,j]),D=l.useCallback(()=>{n(XI([t])),n(Ax(!0))},[n,t]),O=l.useCallback(()=>{y(t.image_url)},[y,t.image_url]),T=l.useCallback(()=>{t&&m({imageDTOs:[t]})},[m,t]),K=l.useCallback(()=>{t&&g({imageDTOs:[t]})},[g,t]);return a.jsxs(a.Fragment,{children:[a.jsx(Kn,{as:"a",href:t.image_url,target:"_blank",icon:a.jsx(l2,{}),children:r("common.openInNewTab")}),b&&a.jsx(Kn,{icon:a.jsx(Hu,{}),onClickCapture:O,children:r("parameters.copyImage")}),a.jsx(Kn,{as:"a",download:!0,href:t.image_url,target:"_blank",icon:a.jsx(Wu,{}),w:"100%",children:r("parameters.downloadImage")}),a.jsx(Kn,{icon:h?a.jsx(Ch,{}):a.jsx(T2,{}),onClickCapture:M,isDisabled:h||!p,children:r("nodes.loadWorkflow")}),a.jsx(Kn,{icon:d?a.jsx(Ch,{}):a.jsx(ZM,{}),onClickCapture:I,isDisabled:d||(c==null?void 0:c.positive_prompt)===void 0&&(c==null?void 0:c.negative_prompt)===void 0,children:r("parameters.usePrompt")}),a.jsx(Kn,{icon:d?a.jsx(Ch,{}):a.jsx(eO,{}),onClickCapture:_,isDisabled:d||(c==null?void 0:c.seed)===void 0,children:r("parameters.useSeed")}),a.jsx(Kn,{icon:d?a.jsx(Ch,{}):a.jsx(WM,{}),onClickCapture:R,isDisabled:d||!c,children:r("parameters.useAll")}),a.jsx(Kn,{icon:a.jsx(Ej,{}),onClickCapture:E,id:"send-to-img2img",children:r("parameters.sendToImg2Img")}),s&&a.jsx(Kn,{icon:a.jsx(Ej,{}),onClickCapture:A,id:"send-to-canvas",children:r("parameters.sendToUnifiedCanvas")}),a.jsx(Kn,{icon:a.jsx(KM,{}),onClickCapture:D,children:r("boards.changeBoard")}),t.starred?a.jsx(Kn,{icon:i?i.off.icon:a.jsx($2,{}),onClickCapture:K,children:i?i.off.text:r("controlnet.unstarImage")}):a.jsx(Kn,{icon:i?i.on.icon:a.jsx(N2,{}),onClickCapture:T,children:i?i.on.text:"Star Image"}),a.jsx(Kn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(Zo,{}),onClickCapture:x,children:r("gallery.deleteImage")})]})},M8=l.memo(yse),Ch=()=>a.jsx(N,{w:"14px",alignItems:"center",justifyContent:"center",children:a.jsx(Ci,{size:"xs"})}),Cse=()=>{const{t:e}=Q(),t=le(),n=H(x=>x.gallery.selection),r=Xg(Bx),o=Pn("bulkDownload").isFeatureEnabled,[s]=Hx(),[i]=Wx(),[c]=$I(),d=l.useCallback(()=>{t(XI(n)),t(Ax(!0))},[t,n]),p=l.useCallback(()=>{t(vg(n))},[t,n]),h=l.useCallback(()=>{s({imageDTOs:n})},[s,n]),m=l.useCallback(()=>{i({imageDTOs:n})},[i,n]),g=l.useCallback(async()=>{try{const x=await c({image_names:n.map(w=>w.image_name)}).unwrap();t(Ht({title:e("gallery.preparingDownload"),status:"success",...x.response?{description:x.response}:{}}))}catch{t(Ht({title:e("gallery.preparingDownloadFailed"),status:"error"}))}},[e,n,c,t]),b=l.useMemo(()=>n.every(x=>x.starred),[n]),y=l.useMemo(()=>n.every(x=>!x.starred),[n]);return a.jsxs(a.Fragment,{children:[b&&a.jsx(Kn,{icon:r?r.on.icon:a.jsx(N2,{}),onClickCapture:m,children:r?r.off.text:"Unstar All"}),(y||!b&&!y)&&a.jsx(Kn,{icon:r?r.on.icon:a.jsx($2,{}),onClickCapture:h,children:r?r.on.text:"Star All"}),o&&a.jsx(Kn,{icon:a.jsx(Wu,{}),onClickCapture:g,children:e("gallery.downloadSelection")}),a.jsx(Kn,{icon:a.jsx(KM,{}),onClickCapture:d,children:e("boards.changeBoard")}),a.jsx(Kn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(Zo,{}),onClickCapture:p,children:"Delete Selection"})]})},wse=l.memo(Cse),Sse=me([we],({gallery:e})=>({selectionCount:e.selection.length}),Ie),kse=({imageDTO:e,children:t})=>{const{selectionCount:n}=H(Sse),r=l.useCallback(s=>{s.preventDefault()},[]),o=l.useCallback(()=>e?n>1?a.jsx(ql,{sx:{visibility:"visible !important"},motionProps:fu,onContextMenu:r,children:a.jsx(wse,{})}):a.jsx(ql,{sx:{visibility:"visible !important"},motionProps:fu,onContextMenu:r,children:a.jsx(M8,{imageDTO:e})}):null,[e,n,r]);return a.jsx(S2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:o,children:t})},jse=l.memo(kse),_se=e=>{const{data:t,disabled:n,...r}=e,o=l.useRef(Jc()),{attributes:s,listeners:i,setNodeRef:c}=Qne({id:o.current,disabled:n,data:t});return a.jsx(Le,{ref:c,position:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,...s,...i,...r})},Ise=l.memo(_se),Pse=a.jsx(Gr,{as:i0,sx:{boxSize:16}}),Ese=a.jsx(eo,{icon:Xl}),Mse=e=>{const{imageDTO:t,onError:n,onClick:r,withMetadataOverlay:o=!1,isDropDisabled:s=!1,isDragDisabled:i=!1,isUploadDisabled:c=!1,minSize:d=24,postUploadAction:p,imageSx:h,fitContainer:m=!1,droppableData:g,draggableData:b,dropLabel:y,isSelected:x=!1,thumbnail:w=!1,noContentFallback:S=Ese,uploadElement:j=Pse,useThumbailFallback:I,withHoverOverlay:_=!1,children:M,onMouseOver:E,onMouseOut:A,dataTestId:R}=e,{colorMode:D}=ji(),[O,T]=l.useState(!1),K=l.useCallback(V=>{E&&E(V),T(!0)},[E]),G=l.useCallback(V=>{A&&A(V),T(!1)},[A]),{getUploadButtonProps:X,getUploadInputProps:Z}=D2({postUploadAction:p,isDisabled:c}),te=c?{}:{cursor:"pointer",bg:Xe("base.200","base.700")(D),_hover:{bg:Xe("base.300","base.650")(D),color:Xe("base.500","base.300")(D)}};return a.jsx(jse,{imageDTO:t,children:V=>a.jsxs(N,{ref:V,onMouseOver:K,onMouseOut:G,sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",position:"relative",minW:d||void 0,minH:d||void 0,userSelect:"none",cursor:i||!t?"default":"pointer"},children:[t&&a.jsxs(N,{sx:{w:"full",h:"full",position:m?"absolute":"relative",alignItems:"center",justifyContent:"center"},children:[a.jsx(_i,{src:w?t.thumbnail_url:t.image_url,fallbackStrategy:"beforeLoadOrError",fallbackSrc:I?t.thumbnail_url:void 0,fallback:I?void 0:a.jsx(kre,{image:t}),onError:n,draggable:!1,sx:{w:t.width,objectFit:"contain",maxW:"full",maxH:"full",borderRadius:"base",...h},"data-testid":R}),o&&a.jsx(nse,{imageDTO:t}),a.jsx(w2,{isSelected:x,isHovered:_?O:!1})]}),!t&&!c&&a.jsx(a.Fragment,{children:a.jsxs(N,{sx:{minH:d,w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",transitionProperty:"common",transitionDuration:"0.1s",color:Xe("base.500","base.500")(D),...te},...X(),children:[a.jsx("input",{...Z()}),j]})}),!t&&c&&S,t&&!i&&a.jsx(Ise,{data:b,disabled:i||!t,onClick:r}),M,!s&&a.jsx(C2,{data:g,disabled:s,dropLabel:y})]})})},ll=l.memo(Mse),Ose=()=>a.jsx(Wg,{sx:{position:"relative",height:"full",width:"full","::before":{content:"''",display:"block",pt:"100%"}},children:a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineStart:0,height:"full",width:"full"}})}),Ase=l.memo(Ose),Rse=me([we,Ux],({gallery:e},t)=>{const n=e.selection;return{queryArgs:t,selection:n}},Ie),Dse=e=>{const t=le(),{queryArgs:n,selection:r}=H(Rse),{imageDTOs:o}=YI(n,{selectFromResult:p=>({imageDTOs:p.data?p7.selectAll(p.data):[]})}),s=Pn("multiselect").isFeatureEnabled,i=l.useCallback(p=>{var h;if(e){if(!s){t(vd([e]));return}if(p.shiftKey){const m=e.image_name,g=(h=r[r.length-1])==null?void 0:h.image_name,b=o.findIndex(x=>x.image_name===g),y=o.findIndex(x=>x.image_name===m);if(b>-1&&y>-1){const x=Math.min(b,y),w=Math.max(b,y),S=o.slice(x,w+1);t(vd(r.concat(S)))}}else p.ctrlKey||p.metaKey?r.some(m=>m.image_name===e.image_name)&&r.length>1?t(vd(r.filter(m=>m.image_name!==e.image_name))):t(vd(r.concat(e))):t(vd([e]))}},[t,e,o,r,s]),c=l.useMemo(()=>e?r.some(p=>p.image_name===e.image_name):!1,[e,r]),d=l.useMemo(()=>r.length,[r.length]);return{selection:r,selectionCount:d,isSelected:c,handleClick:i}},Tse=e=>{const{onClick:t,tooltip:n,icon:r,styleOverrides:o}=e,s=di("drop-shadow(0px 0px 0.1rem var(--invokeai-colors-base-600))","drop-shadow(0px 0px 0.1rem var(--invokeai-colors-base-800))");return a.jsx(rt,{onClick:t,"aria-label":n,tooltip:n,icon:r,size:"sm",variant:"link",sx:{position:"absolute",top:1,insetInlineEnd:1,p:0,minW:0,svg:{transitionProperty:"common",transitionDuration:"normal",fill:"base.100",_hover:{fill:"base.50"},filter:s},...o},"data-testid":n})},du=l.memo(Tse),Nse=e=>{const t=le(),{imageName:n}=e,{currentData:r}=Rs(n),o=H(E=>E.hotkeys.shift),{t:s}=Q(),{handleClick:i,isSelected:c,selection:d,selectionCount:p}=Dse(r),h=Xg(Bx),m=l.useCallback(E=>{E.stopPropagation(),r&&t(vg([r]))},[t,r]),g=l.useMemo(()=>{if(p>1)return{id:"gallery-image",payloadType:"IMAGE_DTOS",payload:{imageDTOs:d}};if(r)return{id:"gallery-image",payloadType:"IMAGE_DTO",payload:{imageDTO:r}}},[r,d,p]),[b]=Hx(),[y]=Wx(),x=l.useCallback(()=>{r&&(r.starred&&y({imageDTOs:[r]}),r.starred||b({imageDTOs:[r]}))},[b,y,r]),[w,S]=l.useState(!1),j=l.useCallback(()=>{S(!0)},[]),I=l.useCallback(()=>{S(!1)},[]),_=l.useMemo(()=>{if(r!=null&&r.starred)return h?h.on.icon:a.jsx($2,{size:"20"});if(!(r!=null&&r.starred)&&w)return h?h.off.icon:a.jsx(N2,{size:"20"})},[r==null?void 0:r.starred,w,h]),M=l.useMemo(()=>r!=null&&r.starred?h?h.off.text:"Unstar":r!=null&&r.starred?"":h?h.on.text:"Star",[r==null?void 0:r.starred,h]);return r?a.jsx(Le,{sx:{w:"full",h:"full",touchAction:"none"},"data-testid":`image-${r.image_name}`,children:a.jsx(N,{userSelect:"none",sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1"},children:a.jsx(ll,{onClick:i,imageDTO:r,draggableData:g,isSelected:c,minSize:0,imageSx:{w:"full",h:"full"},isDropDisabled:!0,isUploadDisabled:!0,thumbnail:!0,withHoverOverlay:!0,onMouseOver:j,onMouseOut:I,children:a.jsxs(a.Fragment,{children:[a.jsx(du,{onClick:x,icon:_,tooltip:M}),w&&o&&a.jsx(du,{onClick:m,icon:a.jsx(Zo,{}),tooltip:s("gallery.deleteImage"),styleOverrides:{bottom:2,top:"auto"}})]})})})}):a.jsx(Ase,{})},$se=l.memo(Nse),Lse=De((e,t)=>a.jsx(Le,{className:"item-container",ref:t,p:1.5,"data-testid":"image-item-container",children:e.children})),zse=l.memo(Lse),Fse=De((e,t)=>{const n=H(r=>r.gallery.galleryImageMinimumWidth);return a.jsx(rl,{...e,className:"list-container",ref:t,sx:{gridTemplateColumns:`repeat(auto-fill, minmax(${n}px, 1fr));`},"data-testid":"image-list-container",children:e.children})}),Bse=l.memo(Fse),Hse={defer:!0,options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}}},Wse=()=>{const{t:e}=Q(),t=l.useRef(null),[n,r]=l.useState(null),[o,s]=y2(Hse),i=H(S=>S.gallery.selectedBoardId),{currentViewTotal:c}=ese(i),d=H(Ux),{currentData:p,isFetching:h,isSuccess:m,isError:g}=YI(d),[b]=JI(),y=l.useMemo(()=>!p||!c?!1:p.ids.length{y&&b({...d,offset:(p==null?void 0:p.ids.length)??0,limit:ZI})},[y,b,d,p==null?void 0:p.ids.length]),w=l.useCallback((S,j)=>a.jsx($se,{imageName:j},j),[]);return l.useEffect(()=>{const{current:S}=t;return n&&S&&o({target:S,elements:{viewport:n}}),()=>{var j;return(j=s())==null?void 0:j.destroy()}},[n,o,s]),p?m&&(p==null?void 0:p.ids.length)===0?a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(eo,{label:e("gallery.noImagesInGallery"),icon:Xl})}):m&&p?a.jsxs(a.Fragment,{children:[a.jsx(Le,{ref:t,"data-overlayscrollbars":"",h:"100%",children:a.jsx(Zoe,{style:{height:"100%"},data:p.ids,endReached:x,components:{Item:zse,List:Bse},scrollerRef:r,itemContent:w})}),a.jsx(Dt,{onClick:x,isDisabled:!y,isLoading:h,loadingText:e("gallery.loading"),flexShrink:0,children:`Load More (${p.ids.length} of ${c})`})]}):g?a.jsx(Le,{sx:{w:"full",h:"full"},children:a.jsx(eo,{label:e("gallery.unableToLoad"),icon:Mee})}):null:a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(eo,{label:e("gallery.loading"),icon:Xl})})},Vse=l.memo(Wse),Use=me([we],e=>{const{galleryView:t}=e.gallery;return{galleryView:t}},Ie),Gse=()=>{const{t:e}=Q(),t=l.useRef(null),n=l.useRef(null),{galleryView:r}=H(Use),o=le(),{isOpen:s,onToggle:i}=hs({defaultIsOpen:!0}),c=l.useCallback(()=>{o(tS("images"))},[o]),d=l.useCallback(()=>{o(tS("assets"))},[o]);return a.jsxs(q5,{layerStyle:"first",sx:{flexDirection:"column",h:"full",w:"full",borderRadius:"base",p:2},children:[a.jsxs(Le,{sx:{w:"full"},children:[a.jsxs(N,{ref:t,sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:[a.jsx(hre,{isOpen:s,onToggle:i}),a.jsx(Sre,{})]}),a.jsx(Le,{children:a.jsx(dre,{isOpen:s})})]}),a.jsxs(N,{ref:n,direction:"column",gap:2,h:"full",w:"full",children:[a.jsx(N,{sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:a.jsx(tc,{index:r==="images"?0:1,variant:"unstyled",size:"sm",sx:{w:"full"},children:a.jsx(nc,{children:a.jsxs(Hn,{isAttached:!0,sx:{w:"full"},children:[a.jsx(wo,{as:Dt,size:"sm",isChecked:r==="images",onClick:c,sx:{w:"full"},leftIcon:a.jsx(Lee,{}),"data-testid":"images-tab",children:e("gallery.images")}),a.jsx(wo,{as:Dt,size:"sm",isChecked:r==="assets",onClick:d,sx:{w:"full"},leftIcon:a.jsx(Xee,{}),"data-testid":"assets-tab",children:e("gallery.assets")})]})})})}),a.jsx(Vse,{})]})]})},qse=l.memo(Gse),Kse=()=>{const e=H(p=>p.system.isConnected),{data:t}=Ha(),[n,{isLoading:r}]=Gx(),o=le(),{t:s}=Q(),i=l.useMemo(()=>t==null?void 0:t.queue.item_id,[t==null?void 0:t.queue.item_id]),c=l.useCallback(async()=>{if(i)try{await n(i).unwrap(),o(Ht({title:s("queue.cancelSucceeded"),status:"success"}))}catch{o(Ht({title:s("queue.cancelFailed"),status:"error"}))}},[i,o,s,n]),d=l.useMemo(()=>!e||si(i),[e,i]);return{cancelQueueItem:c,isLoading:r,currentQueueItemId:i,isDisabled:d}},Qse=({label:e,tooltip:t,icon:n,onClick:r,isDisabled:o,colorScheme:s,asIconButton:i,isLoading:c,loadingText:d,sx:p})=>i?a.jsx(rt,{"aria-label":e,tooltip:t,icon:n,onClick:r,isDisabled:o,colorScheme:s,isLoading:c,sx:p,"data-testid":e}):a.jsx(Dt,{"aria-label":e,tooltip:t,leftIcon:n,onClick:r,isDisabled:o,colorScheme:s,isLoading:c,loadingText:d??e,flexGrow:1,sx:p,"data-testid":e,children:e}),lc=l.memo(Qse),Xse=({asIconButton:e,sx:t})=>{const{t:n}=Q(),{cancelQueueItem:r,isLoading:o,isDisabled:s}=Kse();return a.jsx(lc,{isDisabled:s,isLoading:o,asIconButton:e,label:n("queue.cancel"),tooltip:n("queue.cancelTooltip"),icon:a.jsx(ku,{}),onClick:r,colorScheme:"error",sx:t})},O8=l.memo(Xse),Yse=()=>{const{t:e}=Q(),t=le(),{data:n}=Ha(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=eP({fixedCacheKey:"clearQueue"}),i=l.useCallback(async()=>{if(n!=null&&n.queue.total)try{await o().unwrap(),t(Ht({title:e("queue.clearSucceeded"),status:"success"})),t(qx(void 0)),t(Kx(void 0))}catch{t(Ht({title:e("queue.clearFailed"),status:"error"}))}},[n==null?void 0:n.queue.total,o,t,e]),c=l.useMemo(()=>!r||!(n!=null&&n.queue.total),[r,n==null?void 0:n.queue.total]);return{clearQueue:i,isLoading:s,queueStatus:n,isDisabled:c}},Jse=De((e,t)=>{const{t:n}=Q(),{acceptButtonText:r=n("common.accept"),acceptCallback:o,cancelButtonText:s=n("common.cancel"),cancelCallback:i,children:c,title:d,triggerComponent:p}=e,{isOpen:h,onOpen:m,onClose:g}=hs(),b=l.useRef(null),y=l.useCallback(()=>{o(),g()},[o,g]),x=l.useCallback(()=>{i&&i(),g()},[i,g]);return a.jsxs(a.Fragment,{children:[l.cloneElement(p,{onClick:m,ref:t}),a.jsx(Wf,{isOpen:h,leastDestructiveRef:b,onClose:g,isCentered:!0,children:a.jsx(Aa,{children:a.jsxs(Vf,{children:[a.jsx(Oa,{fontSize:"lg",fontWeight:"bold",children:d}),a.jsx(Ra,{children:c}),a.jsxs(pi,{children:[a.jsx(Dt,{ref:b,onClick:x,children:s}),a.jsx(Dt,{colorScheme:"error",onClick:y,ml:3,children:r})]})]})})})]})}),_0=l.memo(Jse),Zse=({asIconButton:e,sx:t})=>{const{t:n}=Q(),{clearQueue:r,isLoading:o,isDisabled:s}=Yse();return a.jsxs(_0,{title:n("queue.clearTooltip"),acceptCallback:r,acceptButtonText:n("queue.clear"),triggerComponent:a.jsx(lc,{isDisabled:s,isLoading:o,asIconButton:e,label:n("queue.clear"),tooltip:n("queue.clearTooltip"),icon:a.jsx(Zo,{}),colorScheme:"error",sx:t}),children:[a.jsx(je,{children:n("queue.clearQueueAlertDialog")}),a.jsx("br",{}),a.jsx(je,{children:n("queue.clearQueueAlertDialog2")})]})},B2=l.memo(Zse),eae=()=>{const e=le(),{t}=Q(),n=H(p=>p.system.isConnected),{data:r}=Ha(),[o,{isLoading:s}]=tP({fixedCacheKey:"pauseProcessor"}),i=l.useMemo(()=>!!(r!=null&&r.processor.is_started),[r==null?void 0:r.processor.is_started]),c=l.useCallback(async()=>{if(i)try{await o().unwrap(),e(Ht({title:t("queue.pauseSucceeded"),status:"success"}))}catch{e(Ht({title:t("queue.pauseFailed"),status:"error"}))}},[i,o,e,t]),d=l.useMemo(()=>!n||!i,[n,i]);return{pauseProcessor:c,isLoading:s,isStarted:i,isDisabled:d}},tae=({asIconButton:e})=>{const{t}=Q(),{pauseProcessor:n,isLoading:r,isDisabled:o}=eae();return a.jsx(lc,{asIconButton:e,label:t("queue.pause"),tooltip:t("queue.pauseTooltip"),isDisabled:o,isLoading:r,icon:a.jsx(Vee,{}),onClick:n,colorScheme:"gold"})},A8=l.memo(tae),nae=me([we,lo],({controlAdapters:e,generation:t,system:n,nodes:r,dynamicPrompts:o},s)=>{const{initialImage:i,model:c}=t,{isConnected:d}=n,p=[];return d||p.push(fn.t("parameters.invoke.systemDisconnected")),s==="img2img"&&!i&&p.push(fn.t("parameters.invoke.noInitialImageSelected")),s==="nodes"?r.shouldValidateGraph&&(r.nodes.length||p.push(fn.t("parameters.invoke.noNodesInGraph")),r.nodes.forEach(h=>{if(!Rr(h))return;const m=r.nodeTemplates[h.data.type];if(!m){p.push(fn.t("parameters.invoke.missingNodeTemplate"));return}const g=h7([h],r.edges);to(h.data.inputs,b=>{const y=m.inputs[b.name],x=g.some(w=>w.target===h.id&&w.targetHandle===b.name);if(!y){p.push(fn.t("parameters.invoke.missingFieldTemplate"));return}if(y.required&&b.value===void 0&&!x){p.push(fn.t("parameters.invoke.missingInputForField",{nodeLabel:h.data.label||m.title,fieldLabel:b.label||y.title}));return}})})):(o.prompts.length===0&&p.push(fn.t("parameters.invoke.noPrompts")),c||p.push(fn.t("parameters.invoke.noModelSelected")),m7(e).forEach((h,m)=>{h.isEnabled&&(h.model?h.model.base_model!==(c==null?void 0:c.base_model)&&p.push(fn.t("parameters.invoke.incompatibleBaseModelForControlAdapter",{number:m+1})):p.push(fn.t("parameters.invoke.noModelForControlAdapter",{number:m+1})),(!h.controlImage||Ru(h)&&!h.processedControlImage&&h.processorType!=="none")&&p.push(fn.t("parameters.invoke.noControlImageForControlAdapter",{number:m+1})))})),{isReady:!p.length,reasons:p}},Ie),H2=()=>{const{isReady:e,reasons:t}=H(nae);return{isReady:e,reasons:t}},R8=()=>{const e=le(),t=H(lo),{isReady:n}=H2(),[r,{isLoading:o}]=bg({fixedCacheKey:"enqueueBatch"}),s=l.useMemo(()=>!n,[n]);return{queueBack:l.useCallback(()=>{s||(e(Qx()),e(nP({tabName:t,prepend:!1})))},[e,s,t]),isLoading:o,isDisabled:s}},rae=me([we],({gallery:e})=>{const{autoAddBoardId:t}=e;return{autoAddBoardId:t}},Ie),oae=({prepend:e=!1})=>{const{t}=Q(),{isReady:n,reasons:r}=H2(),{autoAddBoardId:o}=H(rae),s=x0(o),[i,{isLoading:c}]=bg({fixedCacheKey:"enqueueBatch"}),d=l.useMemo(()=>t(c?"queue.enqueueing":n?e?"queue.queueFront":"queue.queueBack":"queue.notReady"),[c,n,e,t]);return a.jsxs(N,{flexDir:"column",gap:1,children:[a.jsx(je,{fontWeight:600,children:d}),r.length>0&&a.jsx(zf,{children:r.map((p,h)=>a.jsx(Ps,{children:a.jsx(je,{fontWeight:400,children:p})},`${p}.${h}`))}),a.jsx(T8,{}),a.jsxs(je,{fontWeight:400,fontStyle:"oblique 10deg",children:[t("parameters.invoke.addingImagesTo")," ",a.jsx(je,{as:"span",fontWeight:600,children:s||t("boards.uncategorized")})]})]})},D8=l.memo(oae),T8=l.memo(()=>a.jsx(io,{opacity:.2,borderColor:"base.50",_dark:{borderColor:"base.900"}}));T8.displayName="StyledDivider";const sae=()=>a.jsx(Le,{pos:"relative",w:4,h:4,children:a.jsx(_i,{src:Rx,alt:"invoke-ai-logo",pos:"absolute",top:-.5,insetInlineStart:-.5,w:5,h:5,minW:5,minH:5,filter:"saturate(0)"})}),aae=l.memo(sae),iae=({asIconButton:e,sx:t})=>{const{t:n}=Q(),{queueBack:r,isLoading:o,isDisabled:s}=R8();return a.jsx(lc,{asIconButton:e,colorScheme:"accent",label:n("parameters.invoke.invoke"),isDisabled:s,isLoading:o,onClick:r,tooltip:a.jsx(D8,{}),sx:t,icon:e?a.jsx(aae,{}):void 0})},N8=l.memo(iae),$8=()=>{const e=le(),t=H(lo),{isReady:n}=H2(),[r,{isLoading:o}]=bg({fixedCacheKey:"enqueueBatch"}),s=Pn("prependQueue").isFeatureEnabled,i=l.useMemo(()=>!n||!s,[n,s]);return{queueFront:l.useCallback(()=>{i||(e(Qx()),e(nP({tabName:t,prepend:!0})))},[e,i,t]),isLoading:o,isDisabled:i}},lae=({asIconButton:e,sx:t})=>{const{t:n}=Q(),{queueFront:r,isLoading:o,isDisabled:s}=$8();return a.jsx(lc,{asIconButton:e,colorScheme:"base",label:n("queue.queueFront"),isDisabled:s,isLoading:o,onClick:r,tooltip:a.jsx(D8,{prepend:!0}),icon:a.jsx(ase,{}),sx:t})},cae=l.memo(lae),uae=()=>{const e=le(),t=H(p=>p.system.isConnected),{data:n}=Ha(),{t:r}=Q(),[o,{isLoading:s}]=rP({fixedCacheKey:"resumeProcessor"}),i=l.useMemo(()=>!!(n!=null&&n.processor.is_started),[n==null?void 0:n.processor.is_started]),c=l.useCallback(async()=>{if(!i)try{await o().unwrap(),e(Ht({title:r("queue.resumeSucceeded"),status:"success"}))}catch{e(Ht({title:r("queue.resumeFailed"),status:"error"}))}},[i,o,e,r]),d=l.useMemo(()=>!t||i,[t,i]);return{resumeProcessor:c,isLoading:s,isStarted:i,isDisabled:d}},dae=({asIconButton:e})=>{const{t}=Q(),{resumeProcessor:n,isLoading:r,isDisabled:o}=uae();return a.jsx(lc,{asIconButton:e,label:t("queue.resume"),tooltip:t("queue.resumeTooltip"),isDisabled:o,isLoading:r,icon:a.jsx(Uee,{}),onClick:n,colorScheme:"green"})},L8=l.memo(dae),fae=me(we,({system:e})=>{var t;return{isConnected:e.isConnected,hasSteps:!!e.denoiseProgress,value:(((t=e.denoiseProgress)==null?void 0:t.percentage)??0)*100}},Ie),pae=()=>{const{t:e}=Q(),{data:t}=Ha(),{hasSteps:n,value:r,isConnected:o}=H(fae);return a.jsx(_3,{value:r,"aria-label":e("accessibility.invokeProgressBar"),isIndeterminate:o&&!!(t!=null&&t.queue.in_progress)&&!n,h:"full",w:"full",borderRadius:2,colorScheme:"accent"})},hae=l.memo(pae),mae=()=>{const e=Pn("pauseQueue").isFeatureEnabled,t=Pn("resumeQueue").isFeatureEnabled,n=Pn("prependQueue").isFeatureEnabled;return a.jsxs(N,{layerStyle:"first",sx:{w:"full",position:"relative",borderRadius:"base",p:2,gap:2,flexDir:"column"},children:[a.jsxs(N,{gap:2,w:"full",children:[a.jsxs(Hn,{isAttached:!0,flexGrow:2,children:[a.jsx(N8,{}),n?a.jsx(cae,{asIconButton:!0}):a.jsx(a.Fragment,{}),a.jsx(O8,{asIconButton:!0})]}),a.jsxs(Hn,{isAttached:!0,children:[t?a.jsx(L8,{asIconButton:!0}):a.jsx(a.Fragment,{}),e?a.jsx(A8,{asIconButton:!0}):a.jsx(a.Fragment,{})]}),a.jsx(B2,{asIconButton:!0})]}),a.jsx(N,{h:3,w:"full",children:a.jsx(hae,{})}),a.jsx(F8,{})]})},z8=l.memo(mae),F8=l.memo(()=>{const{t:e}=Q(),t=le(),{hasItems:n,pending:r}=Ha(void 0,{selectFromResult:({data:s})=>{if(!s)return{hasItems:!1,pending:0};const{pending:i,in_progress:c}=s.queue;return{hasItems:i+c>0,pending:i}}}),o=l.useCallback(()=>{t(ni("queue"))},[t]);return a.jsxs(N,{justifyContent:"space-between",alignItems:"center",pe:1,"data-testid":"queue-count",children:[a.jsx(Pi,{}),a.jsx(nl,{onClick:o,size:"sm",variant:"link",fontWeight:400,opacity:.7,fontStyle:"oblique 10deg",children:n?e("queue.queuedCount",{pending:r}):e("queue.queueEmpty")})]})});F8.displayName="QueueCounts";const{createElement:Iu,createContext:gae,forwardRef:B8,useCallback:Za,useContext:H8,useEffect:ui,useImperativeHandle:W8,useLayoutEffect:vae,useMemo:bae,useRef:is,useState:Qd}=Ox,C_=Ox["useId".toString()],Xd=vae,xae=typeof C_=="function"?C_:()=>null;let yae=0;function W2(e=null){const t=xae(),n=is(e||t||null);return n.current===null&&(n.current=""+yae++),n.current}const I0=gae(null);I0.displayName="PanelGroupContext";function V8({children:e=null,className:t="",collapsedSize:n=0,collapsible:r=!1,defaultSize:o=null,forwardedRef:s,id:i=null,maxSize:c=null,minSize:d,onCollapse:p=null,onResize:h=null,order:m=null,style:g={},tagName:b="div"}){const y=H8(I0);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const x=W2(i),{collapsePanel:w,expandPanel:S,getPanelSize:j,getPanelStyle:I,registerPanel:_,resizePanel:M,units:E,unregisterPanel:A}=y;d==null&&(E==="percentages"?d=10:d=0);const R=is({onCollapse:p,onResize:h});ui(()=>{R.current.onCollapse=p,R.current.onResize=h});const D=I(x,o),O=is({size:w_(D)}),T=is({callbacksRef:R,collapsedSize:n,collapsible:r,defaultSize:o,id:x,idWasAutoGenerated:i==null,maxSize:c,minSize:d,order:m});return Xd(()=>{O.current.size=w_(D),T.current.callbacksRef=R,T.current.collapsedSize=n,T.current.collapsible=r,T.current.defaultSize=o,T.current.id=x,T.current.idWasAutoGenerated=i==null,T.current.maxSize=c,T.current.minSize=d,T.current.order=m}),Xd(()=>(_(x,T),()=>{A(x)}),[m,x,_,A]),W8(s,()=>({collapse:()=>w(x),expand:()=>S(x),getCollapsed(){return O.current.size===0},getId(){return x},getSize(K){return j(x,K)},resize:(K,G)=>M(x,K,G)}),[w,S,j,x,M]),Iu(b,{children:e,className:t,"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-id":x,"data-panel-size":parseFloat(""+D.flexGrow).toFixed(1),id:`data-panel-id-${x}`,style:{...D,...g}})}const el=B8((e,t)=>Iu(V8,{...e,forwardedRef:t}));V8.displayName="Panel";el.displayName="forwardRef(Panel)";function w_(e){const{flexGrow:t}=e;return typeof t=="string"?parseFloat(t):t}const Jl=10;function Dd(e,t,n,r,o,s,i,c){const{id:d,panels:p,units:h}=t,m=h==="pixels"?Gi(d):NaN,{sizes:g}=c||{},b=g||s,y=Vo(p),x=b.concat();let w=0;{const I=o<0?r:n,_=y.findIndex(R=>R.current.id===I),M=y[_],E=b[_],A=dx(h,m,M,E,E+Math.abs(o),e);if(E===A)return b;A===0&&E>0&&i.set(I,E),o=o<0?E-A:A-E}let S=o<0?n:r,j=y.findIndex(I=>I.current.id===S);for(;;){const I=y[j],_=b[j],M=Math.abs(o)-Math.abs(w),E=dx(h,m,I,_,_-M,e);if(_!==E&&(E===0&&_>0&&i.set(I.current.id,_),w+=_-E,x[j]=E,w.toPrecision(Jl).localeCompare(Math.abs(o).toPrecision(Jl),void 0,{numeric:!0})>=0))break;if(o<0){if(--j<0)break}else if(++j>=y.length)break}return w===0?b:(S=o<0?r:n,j=y.findIndex(I=>I.current.id===S),x[j]=b[j]+w,x)}function Tc(e,t,n){t.forEach((r,o)=>{const s=e[o];if(!s)return;const{callbacksRef:i,collapsedSize:c,collapsible:d,id:p}=s.current,h=n[p];if(h!==r){n[p]=r;const{onCollapse:m,onResize:g}=i.current;g&&g(r,h),d&&m&&((h==null||h===c)&&r!==c?m(!1):h!==c&&r===c&&m(!0))}})}function Cae({groupId:e,panels:t,units:n}){const r=n==="pixels"?Gi(e):NaN,o=Vo(t),s=Array(o.length);let i=0,c=100;for(let d=0;di.current.id===e);if(n<0)return[null,null];const r=n===t.length-1,o=r?t[n-1].current.id:e,s=r?e:t[n+1].current.id;return[o,s]}function Gi(e){const t=xf(e);if(t==null)return NaN;const n=t.getAttribute("data-panel-group-direction"),r=V2(e);return n==="horizontal"?t.offsetWidth-r.reduce((o,s)=>o+s.offsetWidth,0):t.offsetHeight-r.reduce((o,s)=>o+s.offsetHeight,0)}function U8(e,t,n){if(e.size===1)return"100";const o=Vo(e).findIndex(i=>i.current.id===t),s=n[o];return s==null?"0":s.toPrecision(Jl)}function wae(e){const t=document.querySelector(`[data-panel-id="${e}"]`);return t||null}function xf(e){const t=document.querySelector(`[data-panel-group-id="${e}"]`);return t||null}function P0(e){const t=document.querySelector(`[data-panel-resize-handle-id="${e}"]`);return t||null}function Sae(e){return G8().findIndex(r=>r.getAttribute("data-panel-resize-handle-id")===e)??null}function G8(){return Array.from(document.querySelectorAll("[data-panel-resize-handle-id]"))}function V2(e){return Array.from(document.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${e}"]`))}function U2(e,t,n){var d,p,h,m;const r=P0(t),o=V2(e),s=r?o.indexOf(r):-1,i=((p=(d=n[s])==null?void 0:d.current)==null?void 0:p.id)??null,c=((m=(h=n[s+1])==null?void 0:h.current)==null?void 0:m.id)??null;return[i,c]}function Vo(e){return Array.from(e.values()).sort((t,n)=>{const r=t.current.order,o=n.current.order;return r==null&&o==null?0:r==null?-1:o==null?1:r-o})}function dx(e,t,n,r,o,s=null){var h;let{collapsedSize:i,collapsible:c,maxSize:d,minSize:p}=n.current;if(e==="pixels"&&(i=i/t*100,d!=null&&(d=d/t*100),p=p/t*100),c){if(r>i){if(o<=p/2+i)return i}else if(!((h=s==null?void 0:s.type)==null?void 0:h.startsWith("key"))&&o100)&&(t.current.minSize=0),o!=null&&(o<0||e==="percentages"&&o>100)&&(t.current.maxSize=null),r!==null&&(r<0||e==="percentages"&&r>100?t.current.defaultSize=null:ro&&(t.current.defaultSize=o))}function D1({groupId:e,panels:t,nextSizes:n,prevSizes:r,units:o}){n=[...n];const s=Vo(t),i=o==="pixels"?Gi(e):NaN;let c=0;for(let d=0;d{const{direction:i,panels:c}=e.current,d=xf(t);q8(d!=null,`No group found for id "${t}"`);const{height:p,width:h}=d.getBoundingClientRect(),g=V2(t).map(b=>{const y=b.getAttribute("data-panel-resize-handle-id"),x=Vo(c),[w,S]=U2(t,y,x);if(w==null||S==null)return()=>{};let j=0,I=100,_=0,M=0;x.forEach(T=>{const{id:K,maxSize:G,minSize:X}=T.current;K===w?(j=X,I=G??100):(_+=X,M+=G??100)});const E=Math.min(I,100-_),A=Math.max(j,(x.length-1)*100-M),R=U8(c,w,o);b.setAttribute("aria-valuemax",""+Math.round(E)),b.setAttribute("aria-valuemin",""+Math.round(A)),b.setAttribute("aria-valuenow",""+Math.round(parseInt(R)));const D=T=>{if(!T.defaultPrevented)switch(T.key){case"Enter":{T.preventDefault();const K=x.findIndex(G=>G.current.id===w);if(K>=0){const G=x[K],X=o[K];if(X!=null){let Z=0;X.toPrecision(Jl)<=G.current.minSize.toPrecision(Jl)?Z=i==="horizontal"?h:p:Z=-(i==="horizontal"?h:p);const te=Dd(T,e.current,w,S,Z,o,s.current,null);o!==te&&r(te)}}break}}};b.addEventListener("keydown",D);const O=wae(w);return O!=null&&b.setAttribute("aria-controls",O.id),()=>{b.removeAttribute("aria-valuemax"),b.removeAttribute("aria-valuemin"),b.removeAttribute("aria-valuenow"),b.removeEventListener("keydown",D),O!=null&&b.removeAttribute("aria-controls")}});return()=>{g.forEach(b=>b())}},[e,t,n,s,r,o])}function _ae({disabled:e,handleId:t,resizeHandler:n}){ui(()=>{if(e||n==null)return;const r=P0(t);if(r==null)return;const o=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),n(s);break}case"F6":{s.preventDefault();const i=G8(),c=Sae(t);q8(c!==null);const d=s.shiftKey?c>0?c-1:i.length-1:c+1{r.removeEventListener("keydown",o)}},[e,t,n])}function T1(e,t){if(e.length!==t.length)return!1;for(let n=0;nA.current.id===_),E=r[M];if(E.current.collapsible){const A=h[M];(A===0||A.toPrecision(Jl)===E.current.minSize.toPrecision(Jl))&&(S=S<0?-E.current.minSize*y:E.current.minSize*y)}return S}else return K8(e,n,o,c,d)}function Pae(e){return e.type==="keydown"}function fx(e){return e.type.startsWith("mouse")}function px(e){return e.type.startsWith("touch")}let hx=null,Dl=null;function Q8(e){switch(e){case"horizontal":return"ew-resize";case"horizontal-max":return"w-resize";case"horizontal-min":return"e-resize";case"vertical":return"ns-resize";case"vertical-max":return"n-resize";case"vertical-min":return"s-resize"}}function Eae(){Dl!==null&&(document.head.removeChild(Dl),hx=null,Dl=null)}function N1(e){if(hx===e)return;hx=e;const t=Q8(e);Dl===null&&(Dl=document.createElement("style"),document.head.appendChild(Dl)),Dl.innerHTML=`*{cursor: ${t}!important;}`}function Mae(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function X8(e){return e.map(t=>{const{minSize:n,order:r}=t.current;return r?`${r}:${n}`:`${n}`}).sort((t,n)=>t.localeCompare(n)).join(",")}function Y8(e,t){try{const n=t.getItem(`PanelGroup:sizes:${e}`);if(n){const r=JSON.parse(n);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Oae(e,t,n){const r=Y8(e,n);if(r){const o=X8(t);return r[o]??null}return null}function Aae(e,t,n,r){const o=X8(t),s=Y8(e,r)||{};s[o]=n;try{r.setItem(`PanelGroup:sizes:${e}`,JSON.stringify(s))}catch(i){console.error(i)}}const $1={};function S_(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}const Td={getItem:e=>(S_(Td),Td.getItem(e)),setItem:(e,t)=>{S_(Td),Td.setItem(e,t)}};function J8({autoSaveId:e,children:t=null,className:n="",direction:r,disablePointerEventsDuringResize:o=!1,forwardedRef:s,id:i=null,onLayout:c,storage:d=Td,style:p={},tagName:h="div",units:m="percentages"}){const g=W2(i),[b,y]=Qd(null),[x,w]=Qd(new Map),S=is(null);is({didLogDefaultSizeWarning:!1,didLogIdAndOrderWarning:!1,didLogInvalidLayoutWarning:!1,prevPanelIds:[]});const j=is({onLayout:c});ui(()=>{j.current.onLayout=c});const I=is({}),[_,M]=Qd([]),E=is(new Map),A=is(0),R=is({direction:r,id:g,panels:x,sizes:_,units:m});W8(s,()=>({getId:()=>g,getLayout:ne=>{const{sizes:se,units:re}=R.current;if((ne??re)==="pixels"){const B=Gi(g);return se.map(Y=>Y/100*B)}else return se},setLayout:(ne,se)=>{const{id:re,panels:ae,sizes:B,units:Y}=R.current;if((se||Y)==="pixels"){const pe=Gi(re);ne=ne.map(W=>W/pe*100)}const $=I.current,F=Vo(ae),q=D1({groupId:re,panels:ae,nextSizes:ne,prevSizes:B,units:Y});T1(B,q)||(M(q),Tc(F,q,$))}}),[g]),Xd(()=>{R.current.direction=r,R.current.id=g,R.current.panels=x,R.current.sizes=_,R.current.units=m}),jae({committedValuesRef:R,groupId:g,panels:x,setSizes:M,sizes:_,panelSizeBeforeCollapse:E}),ui(()=>{const{onLayout:ne}=j.current,{panels:se,sizes:re}=R.current;if(re.length>0){ne&&ne(re);const ae=I.current,B=Vo(se);Tc(B,re,ae)}},[_]),Xd(()=>{const{id:ne,sizes:se,units:re}=R.current;if(se.length===x.size)return;let ae=null;if(e){const B=Vo(x);ae=Oae(e,B,d)}if(ae!=null){const B=D1({groupId:ne,panels:x,nextSizes:ae,prevSizes:ae,units:re});M(B)}else{const B=Cae({groupId:ne,panels:x,units:re});M(B)}},[e,x,d]),ui(()=>{if(e){if(_.length===0||_.length!==x.size)return;const ne=Vo(x);$1[e]||($1[e]=Mae(Aae,100)),$1[e](e,ne,_,d)}},[e,x,_,d]),Xd(()=>{if(m==="pixels"){const ne=new ResizeObserver(()=>{const{panels:se,sizes:re}=R.current,ae=D1({groupId:g,panels:se,nextSizes:re,prevSizes:re,units:m});T1(re,ae)||M(ae)});return ne.observe(xf(g)),()=>{ne.disconnect()}}},[g,m]);const D=Za((ne,se)=>{const{panels:re,units:ae}=R.current,Y=Vo(re).findIndex(q=>q.current.id===ne),$=_[Y];if((se??ae)==="pixels"){const q=Gi(g);return $/100*q}else return $},[g,_]),O=Za((ne,se)=>{const{panels:re}=R.current;return re.size===0?{flexBasis:0,flexGrow:se??void 0,flexShrink:1,overflow:"hidden"}:{flexBasis:0,flexGrow:U8(re,ne,_),flexShrink:1,overflow:"hidden",pointerEvents:o&&b!==null?"none":void 0}},[b,o,_]),T=Za((ne,se)=>{const{units:re}=R.current;kae(re,se),w(ae=>{if(ae.has(ne))return ae;const B=new Map(ae);return B.set(ne,se),B})},[]),K=Za(ne=>re=>{re.preventDefault();const{direction:ae,panels:B,sizes:Y}=R.current,$=Vo(B),[F,q]=U2(g,ne,$);if(F==null||q==null)return;let pe=Iae(re,g,ne,$,ae,Y,S.current);if(pe===0)return;const U=xf(g).getBoundingClientRect(),ee=ae==="horizontal";document.dir==="rtl"&&ee&&(pe=-pe);const J=ee?U.width:U.height,ge=pe/J*100,he=Dd(re,R.current,F,q,ge,Y,E.current,S.current),de=!T1(Y,he);if((fx(re)||px(re))&&A.current!=ge&&N1(de?ee?"horizontal":"vertical":ee?pe<0?"horizontal-min":"horizontal-max":pe<0?"vertical-min":"vertical-max"),de){const _e=I.current;M(he),Tc($,he,_e)}A.current=ge},[g]),G=Za(ne=>{w(se=>{if(!se.has(ne))return se;const re=new Map(se);return re.delete(ne),re})},[]),X=Za(ne=>{const{panels:se,sizes:re}=R.current,ae=se.get(ne);if(ae==null)return;const{collapsedSize:B,collapsible:Y}=ae.current;if(!Y)return;const $=Vo(se),F=$.indexOf(ae);if(F<0)return;const q=re[F];if(q===B)return;E.current.set(ne,q);const[pe,W]=R1(ne,$);if(pe==null||W==null)return;const ee=F===$.length-1?q:B-q,J=Dd(null,R.current,pe,W,ee,re,E.current,null);if(re!==J){const ge=I.current;M(J),Tc($,J,ge)}},[]),Z=Za(ne=>{const{panels:se,sizes:re}=R.current,ae=se.get(ne);if(ae==null)return;const{collapsedSize:B,minSize:Y}=ae.current,$=E.current.get(ne)||Y;if(!$)return;const F=Vo(se),q=F.indexOf(ae);if(q<0||re[q]!==B)return;const[W,U]=R1(ne,F);if(W==null||U==null)return;const J=q===F.length-1?B-$:$,ge=Dd(null,R.current,W,U,J,re,E.current,null);if(re!==ge){const he=I.current;M(ge),Tc(F,ge,he)}},[]),te=Za((ne,se,re)=>{const{id:ae,panels:B,sizes:Y,units:$}=R.current;if((re||$)==="pixels"){const ht=Gi(ae);se=se/ht*100}const F=B.get(ne);if(F==null)return;let{collapsedSize:q,collapsible:pe,maxSize:W,minSize:U}=F.current;if($==="pixels"){const ht=Gi(ae);U=U/ht*100,W!=null&&(W=W/ht*100)}const ee=Vo(B),J=ee.indexOf(F);if(J<0)return;const ge=Y[J];if(ge===se)return;pe&&se===q||(se=Math.min(W??100,Math.max(U,se)));const[he,de]=R1(ne,ee);if(he==null||de==null)return;const Pe=J===ee.length-1?ge-se:se-ge,ze=Dd(null,R.current,he,de,Pe,Y,E.current,null);if(Y!==ze){const ht=I.current;M(ze),Tc(ee,ze,ht)}},[]),V=bae(()=>({activeHandleId:b,collapsePanel:X,direction:r,expandPanel:Z,getPanelSize:D,getPanelStyle:O,groupId:g,registerPanel:T,registerResizeHandle:K,resizePanel:te,startDragging:(ne,se)=>{if(y(ne),fx(se)||px(se)){const re=P0(ne);S.current={dragHandleRect:re.getBoundingClientRect(),dragOffset:K8(se,ne,r),sizes:R.current.sizes}}},stopDragging:()=>{Eae(),y(null),S.current=null},units:m,unregisterPanel:G}),[b,X,r,Z,D,O,g,T,K,te,m,G]),oe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Iu(I0.Provider,{children:Iu(h,{children:t,className:n,"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":g,"data-panel-group-units":m,style:{...oe,...p}}),value:V})}const E0=B8((e,t)=>Iu(J8,{...e,forwardedRef:t}));J8.displayName="PanelGroup";E0.displayName="forwardRef(PanelGroup)";function mx({children:e=null,className:t="",disabled:n=!1,id:r=null,onDragging:o,style:s={},tagName:i="div"}){const c=is(null),d=is({onDragging:o});ui(()=>{d.current.onDragging=o});const p=H8(I0);if(p===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{activeHandleId:h,direction:m,groupId:g,registerResizeHandle:b,startDragging:y,stopDragging:x}=p,w=W2(r),S=h===w,[j,I]=Qd(!1),[_,M]=Qd(null),E=Za(()=>{c.current.blur(),x();const{onDragging:D}=d.current;D&&D(!1)},[x]);ui(()=>{if(n)M(null);else{const R=b(w);M(()=>R)}},[n,w,b]),ui(()=>{if(n||_==null||!S)return;const R=K=>{_(K)},D=K=>{_(K)},T=c.current.ownerDocument;return T.body.addEventListener("contextmenu",E),T.body.addEventListener("mousemove",R),T.body.addEventListener("touchmove",R),T.body.addEventListener("mouseleave",D),window.addEventListener("mouseup",E),window.addEventListener("touchend",E),()=>{T.body.removeEventListener("contextmenu",E),T.body.removeEventListener("mousemove",R),T.body.removeEventListener("touchmove",R),T.body.removeEventListener("mouseleave",D),window.removeEventListener("mouseup",E),window.removeEventListener("touchend",E)}},[m,n,S,_,E]),_ae({disabled:n,handleId:w,resizeHandler:_});const A={cursor:Q8(m),touchAction:"none",userSelect:"none"};return Iu(i,{children:e,className:t,"data-resize-handle-active":S?"pointer":j?"keyboard":void 0,"data-panel-group-direction":m,"data-panel-group-id":g,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":w,onBlur:()=>I(!1),onFocus:()=>I(!0),onMouseDown:R=>{y(w,R.nativeEvent);const{onDragging:D}=d.current;D&&D(!0)},onMouseUp:E,onTouchCancel:E,onTouchEnd:E,onTouchStart:R=>{y(w,R.nativeEvent);const{onDragging:D}=d.current;D&&D(!0)},ref:c,role:"separator",style:{...A,...s},tabIndex:0})}mx.displayName="PanelResizeHandle";const Rae=e=>{const{direction:t="horizontal",collapsedDirection:n,isCollapsed:r=!1,...o}=e,s=di("base.100","base.850"),i=di("base.300","base.700");return t==="horizontal"?a.jsx(mx,{style:{visibility:r?"hidden":"visible",width:r?0:"auto"},children:a.jsx(N,{className:"resize-handle-horizontal",sx:{w:n?2.5:4,h:"full",justifyContent:n?n==="left"?"flex-start":"flex-end":"center",alignItems:"center",div:{bg:s},_hover:{div:{bg:i}}},...o,children:a.jsx(Le,{sx:{w:1,h:"calc(100% - 1rem)",borderRadius:"base",transitionProperty:"common",transitionDuration:"normal"}})})}):a.jsx(mx,{style:{visibility:r?"hidden":"visible",width:r?0:"auto"},children:a.jsx(N,{className:"resize-handle-vertical",sx:{w:"full",h:n?2.5:4,alignItems:n?n==="top"?"flex-start":"flex-end":"center",justifyContent:"center",div:{bg:s},_hover:{div:{bg:i}}},...o,children:a.jsx(Le,{sx:{h:1,w:"calc(100% - 1rem)",borderRadius:"base",transitionProperty:"common",transitionDuration:"normal"}})})})},lg=l.memo(Rae),G2=()=>{const e=le(),t=H(o=>o.ui.panels),n=l.useCallback(o=>t[o]??"",[t]),r=l.useCallback((o,s)=>{e(g7({name:o,value:s}))},[e]);return{getItem:n,setItem:r}};const Dae=e=>{const{label:t,data:n,fileName:r,withDownload:o=!0,withCopy:s=!0}=e,i=l.useMemo(()=>v7(n)?n:JSON.stringify(n,null,2),[n]),c=l.useCallback(()=>{navigator.clipboard.writeText(i)},[i]),d=l.useCallback(()=>{const h=new Blob([i]),m=document.createElement("a");m.href=URL.createObjectURL(h),m.download=`${r||t}.json`,document.body.appendChild(m),m.click(),m.remove()},[i,t,r]),{t:p}=Q();return a.jsxs(N,{layerStyle:"second",sx:{borderRadius:"base",flexGrow:1,w:"full",h:"full",position:"relative"},children:[a.jsx(Le,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"auto",p:4,fontSize:"sm"},children:a.jsx(v0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"}},children:a.jsx("pre",{children:i})})}),a.jsxs(N,{sx:{position:"absolute",top:0,insetInlineEnd:0,p:2},children:[o&&a.jsx(Wn,{label:`${p("gallery.download")} ${t} JSON`,children:a.jsx(Ia,{"aria-label":`${p("gallery.download")} ${t} JSON`,icon:a.jsx(Wu,{}),variant:"ghost",opacity:.7,onClick:d})}),s&&a.jsx(Wn,{label:`${p("gallery.copy")} ${t} JSON`,children:a.jsx(Ia,{"aria-label":`${p("gallery.copy")} ${t} JSON`,icon:a.jsx(Hu,{}),variant:"ghost",opacity:.7,onClick:c})})]})]})},tl=l.memo(Dae),Tae=me(we,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(r=>r.id===t);return{data:n==null?void 0:n.data}},Ie),Nae=()=>{const{data:e}=H(Tae);return e?a.jsx(tl,{data:e,label:"Node Data"}):a.jsx(eo,{label:"No node selected",icon:null})},$ae=l.memo(Nae),Lae=({children:e,maxHeight:t})=>a.jsx(N,{sx:{w:"full",h:"full",maxHeight:t,position:"relative"},children:a.jsx(Le,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0},children:a.jsx(v0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}},children:e})})}),cc=l.memo(Lae),zae=({output:e})=>{const{image:t}=e,{data:n}=Rs(t.image_name);return a.jsx(ll,{imageDTO:n})},Fae=l.memo(zae),Bae=me(we,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(s=>s.id===t),r=n?e.nodeTemplates[n.data.type]:void 0,o=e.nodeExecutionStates[t??"__UNKNOWN_NODE__"];return{node:n,template:r,nes:o}},Ie),Hae=()=>{const{node:e,template:t,nes:n}=H(Bae),{t:r}=Q();return!e||!n||!Rr(e)?a.jsx(eo,{label:r("nodes.noNodeSelected"),icon:null}):n.outputs.length===0?a.jsx(eo,{label:r("nodes.noOutputRecorded"),icon:null}):a.jsx(Le,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(cc,{children:a.jsx(N,{sx:{position:"relative",flexDir:"column",alignItems:"flex-start",p:1,gap:2,h:"full",w:"full"},children:(t==null?void 0:t.outputType)==="image_output"?n.outputs.map((o,s)=>a.jsx(Fae,{output:o},Vae(o,s))):a.jsx(tl,{data:n.outputs,label:r("nodes.nodeOutputs")})})})})},Wae=l.memo(Hae),Vae=(e,t)=>`${e.type}-${t}`,Uae=me(we,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(o=>o.id===t);return{template:n?e.nodeTemplates[n.data.type]:void 0}},Ie),Gae=()=>{const{template:e}=H(Uae),{t}=Q();return e?a.jsx(tl,{data:e,label:t("nodes.nodeTemplate")}):a.jsx(eo,{label:t("nodes.noNodeSelected"),icon:null})},qae=l.memo(Gae),q2=e=>{e.stopPropagation()},Kae=De((e,t)=>{const n=le(),r=l.useCallback(s=>{s.shiftKey&&n(Qo(!0))},[n]),o=l.useCallback(s=>{s.shiftKey||n(Qo(!1))},[n]);return a.jsx(K3,{ref:t,onPaste:q2,onKeyDown:r,onKeyUp:o,...e})}),yi=l.memo(Kae),K2=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return o==null?void 0:o.data},Ie),[e]);return H(t)},Qae=({nodeId:e})=>{const t=le(),n=K2(e),{t:r}=Q(),o=l.useCallback(s=>{t(b7({nodeId:e,notes:s.target.value}))},[t,e]);return Kh(n)?a.jsxs(Vn,{children:[a.jsx(yr,{children:r("nodes.notes")}),a.jsx(yi,{value:n==null?void 0:n.notes,onChange:o,rows:10})]}):null},Xae=l.memo(Qae),Z8=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.label:!1},Ie),[e]);return H(t)},eA=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return!1;const s=o?r.nodeTemplates[o.data.type]:void 0;return s==null?void 0:s.title},Ie),[e]);return H(t)},Yae=({nodeId:e,title:t})=>{const n=le(),r=Z8(e),o=eA(e),{t:s}=Q(),[i,c]=l.useState(""),d=l.useCallback(async h=>{n(oP({nodeId:e,label:h})),c(r||t||o||s("nodes.problemSettingTitle"))},[n,e,t,o,r,s]),p=l.useCallback(h=>{c(h)},[]);return l.useEffect(()=>{c(r||t||o||s("nodes.problemSettingTitle"))},[r,o,t,s]),a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsxs(Lf,{as:N,value:i,onChange:p,onSubmit:d,w:"full",fontWeight:600,children:[a.jsx($f,{noOfLines:1}),a.jsx(Nf,{className:"nodrag",_focusVisible:{boxShadow:"none"}})]})})},Jae=l.memo(Yae),Zae=me(we,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(o=>o.id===t),r=n?e.nodeTemplates[n.data.type]:void 0;return{node:n,template:r}},Ie),eie=()=>{const{node:e,template:t}=H(Zae),{t:n}=Q();return!t||!Rr(e)?a.jsx(eo,{label:n("nodes.noNodeSelected"),icon:null}):a.jsx(nie,{node:e,template:t})},tie=l.memo(eie),nie=e=>{const{t}=Q(),{needsUpdate:n,updateNode:r}=sP(e.node.id);return a.jsx(Le,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(cc,{children:a.jsxs(N,{sx:{flexDir:"column",position:"relative",p:1,gap:2,w:"full"},children:[a.jsx(Jae,{nodeId:e.node.data.id}),a.jsxs(Pg,{children:[a.jsxs(Vn,{children:[a.jsx(yr,{children:"Node Type"}),a.jsx(je,{fontSize:"sm",fontWeight:600,children:e.template.title})]}),a.jsxs(N,{flexDir:"row",alignItems:"center",justifyContent:"space-between",w:"full",children:[a.jsxs(Vn,{isInvalid:n,children:[a.jsx(yr,{children:"Node Version"}),a.jsx(je,{fontSize:"sm",fontWeight:600,children:e.node.data.version})]}),n&&a.jsx(rt,{"aria-label":t("nodes.updateNode"),tooltip:t("nodes.updateNode"),icon:a.jsx(s0,{}),onClick:r})]})]}),a.jsx(Xae,{nodeId:e.node.data.id})]})})})},rie=()=>{const{t:e}=Q();return a.jsx(N,{layerStyle:"first",sx:{flexDir:"column",w:"full",h:"full",borderRadius:"base",p:2,gap:2},children:a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(wo,{children:e("common.details")}),a.jsx(wo,{children:e("common.outputs")}),a.jsx(wo,{children:e("common.data")}),a.jsx(wo,{children:e("common.template")})]}),a.jsxs($u,{children:[a.jsx(Go,{children:a.jsx(tie,{})}),a.jsx(Go,{children:a.jsx(Wae,{})}),a.jsx(Go,{children:a.jsx($ae,{})}),a.jsx(Go,{children:a.jsx(qae,{})})]})]})})},oie=l.memo(rie),sie={display:"flex",flexDirection:"row",alignItems:"center",gap:10},aie=e=>{const{label:t="",labelPos:n="top",isDisabled:r=!1,isInvalid:o,formControlProps:s,...i}=e,c=le(),d=l.useCallback(h=>{h.shiftKey&&c(Qo(!0))},[c]),p=l.useCallback(h=>{h.shiftKey||c(Qo(!1))},[c]);return a.jsxs(Vn,{isInvalid:o,isDisabled:r,...s,style:n==="side"?sie:void 0,children:[t!==""&&a.jsx(yr,{children:t}),a.jsx(_g,{...i,onPaste:q2,onKeyDown:d,onKeyUp:p})]})},Is=l.memo(aie),iie=me(we,({nodes:e})=>{const{author:t,name:n,description:r,tags:o,version:s,contact:i,notes:c}=e.workflow;return{name:n,author:t,description:r,tags:o,version:s,contact:i,notes:c}},Ie),lie=()=>{const{author:e,name:t,description:n,tags:r,version:o,contact:s,notes:i}=H(iie),c=le(),d=l.useCallback(w=>{c(x7(w.target.value))},[c]),p=l.useCallback(w=>{c(y7(w.target.value))},[c]),h=l.useCallback(w=>{c(C7(w.target.value))},[c]),m=l.useCallback(w=>{c(w7(w.target.value))},[c]),g=l.useCallback(w=>{c(S7(w.target.value))},[c]),b=l.useCallback(w=>{c(k7(w.target.value))},[c]),y=l.useCallback(w=>{c(j7(w.target.value))},[c]),{t:x}=Q();return a.jsx(cc,{children:a.jsxs(N,{sx:{flexDir:"column",alignItems:"flex-start",gap:2,h:"full"},children:[a.jsxs(N,{sx:{gap:2,w:"full"},children:[a.jsx(Is,{label:x("nodes.workflowName"),value:t,onChange:d}),a.jsx(Is,{label:x("nodes.workflowVersion"),value:o,onChange:m})]}),a.jsxs(N,{sx:{gap:2,w:"full"},children:[a.jsx(Is,{label:x("nodes.workflowAuthor"),value:e,onChange:p}),a.jsx(Is,{label:x("nodes.workflowContact"),value:s,onChange:h})]}),a.jsx(Is,{label:x("nodes.workflowTags"),value:r,onChange:b}),a.jsxs(Vn,{as:N,sx:{flexDir:"column"},children:[a.jsx(yr,{children:x("nodes.workflowDescription")}),a.jsx(yi,{onChange:g,value:n,fontSize:"sm",sx:{resize:"none"}})]}),a.jsxs(Vn,{as:N,sx:{flexDir:"column",h:"full"},children:[a.jsx(yr,{children:x("nodes.workflowNotes")}),a.jsx(yi,{onChange:y,value:i,fontSize:"sm",sx:{h:"full",resize:"none"}})]})]})})},cie=l.memo(lie),tA=()=>{const e=H(r=>r.nodes),[t]=L2(e,300);return l.useMemo(()=>_7(t),[t])},uie=()=>{const e=tA(),{t}=Q();return a.jsx(N,{sx:{flexDir:"column",alignItems:"flex-start",gap:2,h:"full"},children:a.jsx(tl,{data:e,label:t("nodes.workflow")})})},die=l.memo(uie),fie=({isSelected:e,isHovered:t})=>{const n=l.useMemo(()=>{if(e&&t)return"nodeHoveredSelected.light";if(e)return"nodeSelected.light";if(t)return"nodeHovered.light"},[t,e]),r=l.useMemo(()=>{if(e&&t)return"nodeHoveredSelected.dark";if(e)return"nodeSelected.dark";if(t)return"nodeHovered.dark"},[t,e]);return a.jsx(Le,{className:"selection-box",sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",opacity:e||t?1:.5,transitionProperty:"common",transitionDuration:"0.1s",pointerEvents:"none",shadow:n,_dark:{shadow:r}}})},nA=l.memo(fie),rA=e=>{const t=le(),n=l.useMemo(()=>me(we,({nodes:i})=>i.mouseOverNode===e,Ie),[e]),r=H(n),o=l.useCallback(()=>{!r&&t(nS(e))},[t,e,r]),s=l.useCallback(()=>{r&&t(nS(null))},[t,r]);return{isMouseOverNode:r,handleMouseOver:o,handleMouseOut:s}},oA=(e,t)=>{const n=l.useMemo(()=>me(we,({nodes:o})=>{var i;const s=o.nodes.find(c=>c.id===e);if(Rr(s))return(i=s==null?void 0:s.data.inputs[t])==null?void 0:i.label},Ie),[t,e]);return H(n)},sA=(e,t,n)=>{const r=l.useMemo(()=>me(we,({nodes:s})=>{var d;const i=s.nodes.find(p=>p.id===e);if(!Rr(i))return;const c=s.nodeTemplates[(i==null?void 0:i.data.type)??""];return(d=c==null?void 0:c[Xx[n]][t])==null?void 0:d.title},Ie),[t,n,e]);return H(r)},aA=(e,t)=>{const n=l.useMemo(()=>me(we,({nodes:o})=>{const s=o.nodes.find(i=>i.id===e);if(Rr(s))return s==null?void 0:s.data.inputs[t]},Ie),[t,e]);return H(n)},M0=(e,t,n)=>{const r=l.useMemo(()=>me(we,({nodes:s})=>{const i=s.nodes.find(d=>d.id===e);if(!Rr(i))return;const c=s.nodeTemplates[(i==null?void 0:i.data.type)??""];return c==null?void 0:c[Xx[n]][t]},Ie),[t,n,e]);return H(r)},pie=({nodeId:e,fieldName:t,kind:n})=>{const r=aA(e,t),o=M0(e,t,n),s=I7(o),{t:i}=Q(),c=l.useMemo(()=>P7(r)?r.label&&(o!=null&&o.title)?`${r.label} (${o.title})`:r.label&&!o?r.label:!r.label&&o?o.title:i("nodes.unknownField"):(o==null?void 0:o.title)||i("nodes.unknownField"),[r,o,i]);return a.jsxs(N,{sx:{flexDir:"column"},children:[a.jsx(je,{sx:{fontWeight:600},children:c}),o&&a.jsx(je,{sx:{opacity:.7,fontStyle:"oblique 5deg"},children:o.description}),o&&a.jsxs(je,{children:["Type: ",If[o.type].title]}),s&&a.jsxs(je,{children:["Input: ",E7(o.input)]})]})},Q2=l.memo(pie),hie=De((e,t)=>{const{nodeId:n,fieldName:r,kind:o,isMissingInput:s=!1,withTooltip:i=!1}=e,c=oA(n,r),d=sA(n,r,o),{t:p}=Q(),h=le(),[m,g]=l.useState(c||d||p("nodes.unknownField")),b=l.useCallback(async x=>{x&&(x===c||x===d)||(g(x||d||p("nodes.unknownField")),h(M7({nodeId:n,fieldName:r,label:x})))},[c,d,h,n,r,p]),y=l.useCallback(x=>{g(x)},[]);return l.useEffect(()=>{g(c||d||p("nodes.unknownField"))},[c,d,p]),a.jsx(Wn,{label:i?a.jsx(Q2,{nodeId:n,fieldName:r,kind:"input"}):void 0,openDelay:xg,placement:"top",hasArrow:!0,children:a.jsx(N,{ref:t,sx:{position:"relative",overflow:"hidden",alignItems:"center",justifyContent:"flex-start",gap:1,h:"full"},children:a.jsxs(Lf,{value:m,onChange:y,onSubmit:b,as:N,sx:{position:"relative",alignItems:"center",h:"full"},children:[a.jsx($f,{sx:{p:0,fontWeight:s?600:400,textAlign:"left",_hover:{fontWeight:"600 !important"}},noOfLines:1}),a.jsx(Nf,{className:"nodrag",sx:{p:0,w:"full",fontWeight:600,color:"base.900",_dark:{color:"base.100"},_focusVisible:{p:0,textAlign:"left",boxShadow:"none"}}}),a.jsx(lA,{})]})})})}),iA=l.memo(hie),lA=l.memo(()=>{const{isEditing:e,getEditButtonProps:t}=e5(),n=l.useCallback(r=>{const{onClick:o}=t();o&&(o(r),r.preventDefault())},[t]);return e?null:a.jsx(N,{onClick:n,position:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,cursor:"text"})});lA.displayName="EditableControls";const mie=e=>{const{nodeId:t,field:n}=e,r=le(),o=l.useCallback(s=>{r(O7({nodeId:t,fieldName:n.name,value:s.target.checked}))},[r,n.name,t]);return a.jsx(Fy,{className:"nodrag",onChange:o,isChecked:n.value})},gie=l.memo(mie);function O0(){return(O0=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function gx(e){var t=l.useRef(e),n=l.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Pu=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:w.buttons>0)&&o.current?s(k_(o.current,w,c.current)):x(!1)},y=function(){return x(!1)};function x(w){var S=d.current,j=vx(o.current),I=w?j.addEventListener:j.removeEventListener;I(S?"touchmove":"mousemove",b),I(S?"touchend":"mouseup",y)}return[function(w){var S=w.nativeEvent,j=o.current;if(j&&(j_(S),!function(_,M){return M&&!Yd(_)}(S,d.current)&&j)){if(Yd(S)){d.current=!0;var I=S.changedTouches||[];I.length&&(c.current=I[0].identifier)}j.focus(),s(k_(j,S,c.current)),x(!0)}},function(w){var S=w.which||w.keyCode;S<37||S>40||(w.preventDefault(),i({left:S===39?.05:S===37?-.05:0,top:S===40?.05:S===38?-.05:0}))},x]},[i,s]),h=p[0],m=p[1],g=p[2];return l.useEffect(function(){return g},[g]),z.createElement("div",O0({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:o,onKeyDown:m,tabIndex:0,role:"slider"}))}),A0=function(e){return e.filter(Boolean).join(" ")},Y2=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,s=A0(["react-colorful__pointer",e.className]);return z.createElement("div",{className:s,style:{top:100*o+"%",left:100*n+"%"}},z.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Ao=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},uA=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:Ao(e.h),s:Ao(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:Ao(o/2),a:Ao(r,2)}},bx=function(e){var t=uA(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},L1=function(e){var t=uA(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},vie=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),i=r*(1-n),c=r*(1-(t-s)*n),d=r*(1-(1-t+s)*n),p=s%6;return{r:Ao(255*[r,c,i,i,d,r][p]),g:Ao(255*[d,r,r,c,i,i][p]),b:Ao(255*[i,i,d,r,r,c][p]),a:Ao(o,2)}},bie=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,s=Math.max(t,n,r),i=s-Math.min(t,n,r),c=i?s===t?(n-r)/i:s===n?2+(r-t)/i:4+(t-n)/i:0;return{h:Ao(60*(c<0?c+6:c)),s:Ao(s?i/s*100:0),v:Ao(s/255*100),a:o}},xie=z.memo(function(e){var t=e.hue,n=e.onChange,r=A0(["react-colorful__hue",e.className]);return z.createElement("div",{className:r},z.createElement(X2,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:Pu(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":Ao(t),"aria-valuemax":"360","aria-valuemin":"0"},z.createElement(Y2,{className:"react-colorful__hue-pointer",left:t/360,color:bx({h:t,s:100,v:100,a:1})})))}),yie=z.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:bx({h:t.h,s:100,v:100,a:1})};return z.createElement("div",{className:"react-colorful__saturation",style:r},z.createElement(X2,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:Pu(t.s+100*o.left,0,100),v:Pu(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Ao(t.s)+"%, Brightness "+Ao(t.v)+"%"},z.createElement(Y2,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:bx(t)})))}),dA=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function Cie(e,t,n){var r=gx(n),o=l.useState(function(){return e.toHsva(t)}),s=o[0],i=o[1],c=l.useRef({color:t,hsva:s});l.useEffect(function(){if(!e.equal(t,c.current.color)){var p=e.toHsva(t);c.current={hsva:p,color:t},i(p)}},[t,e]),l.useEffect(function(){var p;dA(s,c.current.hsva)||e.equal(p=e.fromHsva(s),c.current.color)||(c.current={hsva:s,color:p},r(p))},[s,e,r]);var d=l.useCallback(function(p){i(function(h){return Object.assign({},h,p)})},[]);return[s,d]}var wie=typeof window<"u"?l.useLayoutEffect:l.useEffect,Sie=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},__=new Map,kie=function(e){wie(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!__.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,__.set(t,n);var r=Sie();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},jie=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+L1(Object.assign({},n,{a:0}))+", "+L1(Object.assign({},n,{a:1}))+")"},s=A0(["react-colorful__alpha",t]),i=Ao(100*n.a);return z.createElement("div",{className:s},z.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),z.createElement(X2,{onMove:function(c){r({a:c.left})},onKey:function(c){r({a:Pu(n.a+c.left)})},"aria-label":"Alpha","aria-valuetext":i+"%","aria-valuenow":i,"aria-valuemin":"0","aria-valuemax":"100"},z.createElement(Y2,{className:"react-colorful__alpha-pointer",left:n.a,color:L1(n)})))},_ie=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,s=e.onChange,i=cA(e,["className","colorModel","color","onChange"]),c=l.useRef(null);kie(c);var d=Cie(n,o,s),p=d[0],h=d[1],m=A0(["react-colorful",t]);return z.createElement("div",O0({},i,{ref:c,className:m}),z.createElement(yie,{hsva:p,onChange:h}),z.createElement(xie,{hue:p.h,onChange:h}),z.createElement(jie,{hsva:p,onChange:h,className:"react-colorful__last-control"}))},Iie={defaultColor:{r:0,g:0,b:0,a:1},toHsva:bie,fromHsva:vie,equal:dA},fA=function(e){return z.createElement(_ie,O0({},e,{colorModel:Iie}))};const Pie=e=>{const{nodeId:t,field:n}=e,r=le(),o=l.useCallback(s=>{r(A7({nodeId:t,fieldName:n.name,value:s}))},[r,n.name,t]);return a.jsx(fA,{className:"nodrag",color:n.value,onChange:o})},Eie=l.memo(Pie),pA=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=R7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({controlNetModelId:e,errors:s.error.format()},"Failed to parse ControlNet model id");return}return s.data},Mie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=$x(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/controlnet/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return to(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=pA(p);h&&o(D7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Dr,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},Oie=l.memo(Mie),Aie=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=le(),s=l.useCallback(i=>{o(T7({nodeId:t,fieldName:n.name,value:i.target.value}))},[o,n.name,t]);return a.jsx(E3,{className:"nowheel nodrag",onChange:s,value:n.value,children:r.options.map(i=>a.jsx("option",{value:i,children:r.ui_choice_labels?r.ui_choice_labels[i]:i},i))})},Rie=l.memo(Aie),Die=e=>{var p;const{nodeId:t,field:n}=e,r=le(),{currentData:o}=Rs(((p=n.value)==null?void 0:p.image_name)??zs.skipToken),s=l.useCallback(()=>{r(N7({nodeId:t,fieldName:n.name,value:void 0}))},[r,n.name,t]),i=l.useMemo(()=>{if(o)return{id:`node-${t}-${n.name}`,payloadType:"IMAGE_DTO",payload:{imageDTO:o}}},[n.name,o,t]),c=l.useMemo(()=>({id:`node-${t}-${n.name}`,actionType:"SET_NODES_IMAGE",context:{nodeId:t,fieldName:n.name}}),[n.name,t]),d=l.useMemo(()=>({type:"SET_NODES_IMAGE",nodeId:t,fieldName:n.name}),[t,n.name]);return a.jsx(N,{className:"nodrag",sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(ll,{imageDTO:o,droppableData:c,draggableData:i,postUploadAction:d,useThumbailFallback:!0,uploadElement:a.jsx(hA,{}),dropLabel:a.jsx(mA,{}),minSize:8,children:a.jsx(du,{onClick:s,icon:o?a.jsx(a0,{}):void 0,tooltip:"Reset Image"})})})},Tie=l.memo(Die),hA=l.memo(()=>a.jsx(je,{fontSize:16,fontWeight:600,children:"Drop or Upload"}));hA.displayName="UploadElement";const mA=l.memo(()=>a.jsx(je,{fontSize:16,fontWeight:600,children:"Drop"}));mA.displayName="DropLabel";const Nie=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=$7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({loraModelId:e,errors:s.error.format()},"Failed to parse LoRA model id");return}return s.data},$ie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=_f(),{t:i}=Q(),c=l.useMemo(()=>{if(!s)return[];const m=[];return to(s.entities,(g,b)=>{g&&m.push({value:b,label:g.model_name,group:xr[g.base_model]})}),m.sort((g,b)=>g.disabled&&!b.disabled?1:-1)},[s]),d=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/lora/${r==null?void 0:r.model_name}`])??null,[s==null?void 0:s.entities,r==null?void 0:r.base_model,r==null?void 0:r.model_name]),p=l.useCallback(m=>{if(!m)return;const g=Nie(m);g&&o(L7({nodeId:t,fieldName:n.name,value:g}))},[o,n.name,t]),h=l.useCallback((m,g)=>{var b;return((b=g.label)==null?void 0:b.toLowerCase().includes(m.toLowerCase().trim()))||g.value.toLowerCase().includes(m.toLowerCase().trim())},[]);return(s==null?void 0:s.ids.length)===0?a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(je,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:"No LoRAs Loaded"})}):a.jsx(sr,{className:"nowheel nodrag",value:(d==null?void 0:d.id)??null,placeholder:c.length>0?i("models.selectLoRA"):i("models.noLoRAsAvailable"),data:c,nothingFound:i("models.noMatchingLoRAs"),itemComponent:pl,disabled:c.length===0,filter:h,error:!d,onChange:p,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}})},Lie=l.memo($ie),R0=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=z7.safeParse({base_model:n,model_name:o,model_type:r});if(!s.success){t.error({mainModelId:e,errors:s.error.format()},"Failed to parse main model id");return}return s.data};function Ku(e){const{iconMode:t=!1,...n}=e,r=le(),{t:o}=Q(),[s,{isLoading:i}]=F7(),c=l.useCallback(()=>{s().unwrap().then(d=>{r(Ht(rr({title:`${o("modelManager.modelsSynced")}`,status:"success"})))}).catch(d=>{d&&r(Ht(rr({title:`${o("modelManager.modelSyncFailed")}`,status:"error"})))})},[r,s,o]);return t?a.jsx(rt,{icon:a.jsx(s0,{}),tooltip:o("modelManager.syncModels"),"aria-label":o("modelManager.syncModels"),isLoading:i,onClick:c,size:"sm",...n}):a.jsx(Dt,{isLoading:i,onClick:c,minW:"max-content",...n,children:o("modelManager.syncModels")})}const zie=e=>{var y,x;const{nodeId:t,field:n}=e,r=le(),o=Pn("syncModels").isFeatureEnabled,{t:s}=Q(),{data:i,isLoading:c}=Jd(rS),{data:d,isLoading:p}=aa(rS),h=l.useMemo(()=>c||p,[c,p]),m=l.useMemo(()=>{if(!d)return[];const w=[];return to(d.entities,(S,j)=>{S&&w.push({value:j,label:S.model_name,group:xr[S.base_model]})}),i&&to(i.entities,(S,j)=>{S&&w.push({value:j,label:S.model_name,group:xr[S.base_model]})}),w},[d,i]),g=l.useMemo(()=>{var w,S,j,I;return((d==null?void 0:d.entities[`${(w=n.value)==null?void 0:w.base_model}/main/${(S=n.value)==null?void 0:S.model_name}`])||(i==null?void 0:i.entities[`${(j=n.value)==null?void 0:j.base_model}/onnx/${(I=n.value)==null?void 0:I.model_name}`]))??null},[(y=n.value)==null?void 0:y.base_model,(x=n.value)==null?void 0:x.model_name,d==null?void 0:d.entities,i==null?void 0:i.entities]),b=l.useCallback(w=>{if(!w)return;const S=R0(w);S&&r(aP({nodeId:t,fieldName:n.name,value:S}))},[r,n.name,t]);return a.jsxs(N,{sx:{w:"full",alignItems:"center",gap:2},children:[h?a.jsx(je,{variant:"subtext",children:"Loading..."}):a.jsx(sr,{className:"nowheel nodrag",tooltip:g==null?void 0:g.description,value:g==null?void 0:g.id,placeholder:m.length>0?s("models.selectModel"):s("models.noModelsAvailable"),data:m,error:!g,disabled:m.length===0,onChange:b,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),o&&a.jsx(Ku,{className:"nodrag",iconMode:!0})]})},Fie=l.memo(zie),cg=/^-?(0\.)?\.?$/,gA=De((e,t)=>{const{label:n,isDisabled:r=!1,showStepper:o=!0,isInvalid:s,value:i,onChange:c,min:d,max:p,isInteger:h=!0,formControlProps:m,formLabelProps:g,numberInputFieldProps:b,numberInputStepperProps:y,tooltipProps:x,...w}=e,S=le(),[j,I]=l.useState(String(i));l.useEffect(()=>{!j.match(cg)&&i!==Number(j)&&I(String(i))},[i,j]);const _=l.useCallback(R=>{I(R),R.match(cg)||c(h?Math.floor(Number(R)):Number(R))},[h,c]),M=l.useCallback(R=>{const D=Hl(h?Math.floor(Number(R.target.value)):Number(R.target.value),d,p);I(String(D)),c(D)},[h,p,d,c]),E=l.useCallback(R=>{R.shiftKey&&S(Qo(!0))},[S]),A=l.useCallback(R=>{R.shiftKey||S(Qo(!1))},[S]);return a.jsx(Wn,{...x,children:a.jsxs(Vn,{ref:t,isDisabled:r,isInvalid:s,...m,children:[n&&a.jsx(yr,{...g,children:n}),a.jsxs(Tg,{value:j,min:d,max:p,keepWithinRange:!0,clampValueOnBlur:!1,onChange:_,onBlur:M,...w,onPaste:q2,children:[a.jsx($g,{...b,onKeyDown:E,onKeyUp:A}),o&&a.jsxs(Ng,{children:[a.jsx(zg,{...y}),a.jsx(Lg,{...y})]})]})]})})});gA.displayName="IAINumberInput";const _a=l.memo(gA),Bie=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=le(),[s,i]=l.useState(String(n.value)),c=l.useMemo(()=>r.type==="integer",[r.type]),d=l.useCallback(p=>{i(p),p.match(cg)||o(B7({nodeId:t,fieldName:n.name,value:c?Math.floor(Number(p)):Number(p)}))},[o,n.name,c,t]);return l.useEffect(()=>{!s.match(cg)&&n.value!==Number(s)&&i(String(n.value))},[n.value,s]),a.jsxs(Tg,{onChange:d,value:s,step:c?1:.1,precision:c?0:3,children:[a.jsx($g,{className:"nodrag"}),a.jsxs(Ng,{children:[a.jsx(zg,{}),a.jsx(Lg,{})]})]})},Hie=l.memo(Bie),Wie=e=>{var m,g;const{nodeId:t,field:n}=e,r=le(),{t:o}=Q(),s=Pn("syncModels").isFeatureEnabled,{data:i,isLoading:c}=aa(Yx),d=l.useMemo(()=>{if(!i)return[];const b=[];return to(i.entities,(y,x)=>{y&&b.push({value:x,label:y.model_name,group:xr[y.base_model]})}),b},[i]),p=l.useMemo(()=>{var b,y;return(i==null?void 0:i.entities[`${(b=n.value)==null?void 0:b.base_model}/main/${(y=n.value)==null?void 0:y.model_name}`])??null},[(m=n.value)==null?void 0:m.base_model,(g=n.value)==null?void 0:g.model_name,i==null?void 0:i.entities]),h=l.useCallback(b=>{if(!b)return;const y=R0(b);y&&r(H7({nodeId:t,fieldName:n.name,value:y}))},[r,n.name,t]);return c?a.jsx(sr,{label:o("modelManager.model"),placeholder:o("models.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(sr,{className:"nowheel nodrag",tooltip:p==null?void 0:p.description,value:p==null?void 0:p.id,placeholder:d.length>0?o("models.selectModel"):o("models.noModelsAvailable"),data:d,error:!p,disabled:d.length===0,onChange:h,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),s&&a.jsx(Ku,{className:"nodrag",iconMode:!0})]})},Vie=l.memo(Wie),Uie=e=>{var g,b;const{nodeId:t,field:n}=e,r=le(),{t:o}=Q(),s=Pn("syncModels").isFeatureEnabled,{data:i}=Jd(oS),{data:c,isLoading:d}=aa(oS),p=l.useMemo(()=>{if(!c)return[];const y=[];return to(c.entities,(x,w)=>{!x||x.base_model!=="sdxl"||y.push({value:w,label:x.model_name,group:xr[x.base_model]})}),i&&to(i.entities,(x,w)=>{!x||x.base_model!=="sdxl"||y.push({value:w,label:x.model_name,group:xr[x.base_model]})}),y},[c,i]),h=l.useMemo(()=>{var y,x,w,S;return((c==null?void 0:c.entities[`${(y=n.value)==null?void 0:y.base_model}/main/${(x=n.value)==null?void 0:x.model_name}`])||(i==null?void 0:i.entities[`${(w=n.value)==null?void 0:w.base_model}/onnx/${(S=n.value)==null?void 0:S.model_name}`]))??null},[(g=n.value)==null?void 0:g.base_model,(b=n.value)==null?void 0:b.model_name,c==null?void 0:c.entities,i==null?void 0:i.entities]),m=l.useCallback(y=>{if(!y)return;const x=R0(y);x&&r(aP({nodeId:t,fieldName:n.name,value:x}))},[r,n.name,t]);return d?a.jsx(sr,{label:o("modelManager.model"),placeholder:o("models.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(sr,{className:"nowheel nodrag",tooltip:h==null?void 0:h.description,value:h==null?void 0:h.id,placeholder:p.length>0?o("models.selectModel"):o("models.noModelsAvailable"),data:p,error:!h,disabled:p.length===0,onChange:m,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),s&&a.jsx(Ku,{className:"nodrag",iconMode:!0})]})},Gie=l.memo(Uie),qie=me([we],({ui:e})=>{const{favoriteSchedulers:t}=e;return{data:To(hg,(r,o)=>({value:o,label:r,group:t.includes(o)?"Favorites":void 0})).sort((r,o)=>r.label.localeCompare(o.label))}},Ie),Kie=e=>{const{nodeId:t,field:n}=e,r=le(),{data:o}=H(qie),s=l.useCallback(i=>{i&&r(W7({nodeId:t,fieldName:n.name,value:i}))},[r,n.name,t]);return a.jsx(sr,{className:"nowheel nodrag",value:n.value,data:o,onChange:s})},Qie=l.memo(Kie),Xie=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=le(),s=l.useCallback(i=>{o(V7({nodeId:t,fieldName:n.name,value:i.target.value}))},[o,n.name,t]);return r.ui_component==="textarea"?a.jsx(yi,{className:"nodrag",onChange:s,value:n.value,rows:5,resize:"none"}):a.jsx(Is,{onChange:s,value:n.value})},Yie=l.memo(Xie),vA=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=U7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({vaeModelId:e,errors:s.error.format()},"Failed to parse VAE model id");return}return s.data},Jie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=iP(),i=l.useMemo(()=>{if(!s)return[];const p=[{value:"default",label:"Default",group:"Default"}];return to(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p.sort((h,m)=>h.disabled&&!m.disabled?1:-1)},[s]),c=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/vae/${r==null?void 0:r.model_name}`])??null,[s==null?void 0:s.entities,r]),d=l.useCallback(p=>{if(!p)return;const h=vA(p);h&&o(G7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(sr,{className:"nowheel nodrag",itemComponent:pl,tooltip:c==null?void 0:c.description,value:(c==null?void 0:c.id)??"default",placeholder:"Default",data:i,onChange:d,disabled:i.length===0,error:!c,clearable:!0,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}})},Zie=l.memo(Jie),ele=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=q7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({ipAdapterModelId:e,errors:s.error.format()},"Failed to parse IP-Adapter model id");return}return s.data},tle=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=zx(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/ip_adapter/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return to(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=ele(p);h&&o(K7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Dr,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},nle=l.memo(tle),rle=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=Q7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({t2iAdapterModelId:e,errors:s.error.format()},"Failed to parse T2I-Adapter model id");return}return s.data},ole=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=Lx(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/t2i_adapter/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return to(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=rle(p);h&&o(X7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Dr,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},sle=l.memo(ole),ale=e=>{var c;const{nodeId:t,field:n}=e,r=le(),{data:o,hasBoards:s}=jf(void 0,{selectFromResult:({data:d})=>{const p=[{label:"None",value:"none"}];return d==null||d.forEach(({board_id:h,board_name:m})=>{p.push({label:m,value:h})}),{data:p,hasBoards:p.length>1}}}),i=l.useCallback(d=>{r(Y7({nodeId:t,fieldName:n.name,value:d&&d!=="none"?{board_id:d}:void 0}))},[r,n.name,t]);return a.jsx(sr,{className:"nowheel nodrag",value:((c=n.value)==null?void 0:c.board_id)??"none",data:o,onChange:i,disabled:!s})},ile=l.memo(ale),lle=({nodeId:e,fieldName:t})=>{const n=aA(e,t),r=M0(e,t,"input");return(r==null?void 0:r.fieldKind)==="output"?a.jsxs(Le,{p:2,children:["Output field in input: ",n==null?void 0:n.type]}):(n==null?void 0:n.type)==="string"&&(r==null?void 0:r.type)==="string"||(n==null?void 0:n.type)==="StringPolymorphic"&&(r==null?void 0:r.type)==="StringPolymorphic"?a.jsx(Yie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="boolean"&&(r==null?void 0:r.type)==="boolean"||(n==null?void 0:n.type)==="BooleanPolymorphic"&&(r==null?void 0:r.type)==="BooleanPolymorphic"?a.jsx(gie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="integer"&&(r==null?void 0:r.type)==="integer"||(n==null?void 0:n.type)==="float"&&(r==null?void 0:r.type)==="float"||(n==null?void 0:n.type)==="FloatPolymorphic"&&(r==null?void 0:r.type)==="FloatPolymorphic"||(n==null?void 0:n.type)==="IntegerPolymorphic"&&(r==null?void 0:r.type)==="IntegerPolymorphic"?a.jsx(Hie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="enum"&&(r==null?void 0:r.type)==="enum"?a.jsx(Rie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ImageField"&&(r==null?void 0:r.type)==="ImageField"||(n==null?void 0:n.type)==="ImagePolymorphic"&&(r==null?void 0:r.type)==="ImagePolymorphic"?a.jsx(Tie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="BoardField"&&(r==null?void 0:r.type)==="BoardField"?a.jsx(ile,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="MainModelField"&&(r==null?void 0:r.type)==="MainModelField"?a.jsx(Fie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="SDXLRefinerModelField"&&(r==null?void 0:r.type)==="SDXLRefinerModelField"?a.jsx(Vie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="VaeModelField"&&(r==null?void 0:r.type)==="VaeModelField"?a.jsx(Zie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="LoRAModelField"&&(r==null?void 0:r.type)==="LoRAModelField"?a.jsx(Lie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ControlNetModelField"&&(r==null?void 0:r.type)==="ControlNetModelField"?a.jsx(Oie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="IPAdapterModelField"&&(r==null?void 0:r.type)==="IPAdapterModelField"?a.jsx(nle,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="T2IAdapterModelField"&&(r==null?void 0:r.type)==="T2IAdapterModelField"?a.jsx(sle,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ColorField"&&(r==null?void 0:r.type)==="ColorField"?a.jsx(Eie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="SDXLMainModelField"&&(r==null?void 0:r.type)==="SDXLMainModelField"?a.jsx(Gie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="Scheduler"&&(r==null?void 0:r.type)==="Scheduler"?a.jsx(Qie,{nodeId:e,field:n,fieldTemplate:r}):n&&r?null:a.jsx(Le,{p:1,children:a.jsxs(je,{sx:{fontSize:"sm",fontWeight:600,color:"error.400",_dark:{color:"error.300"}},children:["Unknown field type: ",n==null?void 0:n.type]})})},bA=l.memo(lle),cle=({nodeId:e,fieldName:t})=>{const n=le(),{isMouseOverNode:r,handleMouseOut:o,handleMouseOver:s}=rA(e),{t:i}=Q(),c=l.useCallback(()=>{n(lP({nodeId:e,fieldName:t}))},[n,t,e]);return a.jsxs(N,{onMouseEnter:s,onMouseLeave:o,layerStyle:"second",sx:{position:"relative",borderRadius:"base",w:"full",p:2},children:[a.jsxs(Vn,{as:N,sx:{flexDir:"column",gap:1,flexShrink:1},children:[a.jsxs(yr,{sx:{display:"flex",alignItems:"center",mb:0},children:[a.jsx(iA,{nodeId:e,fieldName:t,kind:"input"}),a.jsx(Pi,{}),a.jsx(Wn,{label:a.jsx(Q2,{nodeId:e,fieldName:t,kind:"input"}),openDelay:xg,placement:"top",hasArrow:!0,children:a.jsx(N,{h:"full",alignItems:"center",children:a.jsx(Gr,{as:QM})})}),a.jsx(rt,{"aria-label":i("nodes.removeLinearView"),tooltip:i("nodes.removeLinearView"),variant:"ghost",size:"sm",onClick:c,icon:a.jsx(Zo,{})})]}),a.jsx(bA,{nodeId:e,fieldName:t})]}),a.jsx(nA,{isSelected:!1,isHovered:r})]})},ule=l.memo(cle),dle=me(we,({nodes:e})=>({fields:e.workflow.exposedFields}),Ie),fle=()=>{const{fields:e}=H(dle),{t}=Q();return a.jsx(Le,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(cc,{children:a.jsx(N,{sx:{position:"relative",flexDir:"column",alignItems:"flex-start",p:1,gap:2,h:"full",w:"full"},children:e.length?e.map(({nodeId:n,fieldName:r})=>a.jsx(ule,{nodeId:n,fieldName:r},`${n}.${r}`)):a.jsx(eo,{label:t("nodes.noFieldsLinearview"),icon:null})})})})},ple=l.memo(fle),hle=()=>{const{t:e}=Q();return a.jsx(N,{layerStyle:"first",sx:{flexDir:"column",w:"full",h:"full",borderRadius:"base",p:2,gap:2},children:a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(wo,{children:e("common.linear")}),a.jsx(wo,{children:e("common.details")}),a.jsx(wo,{children:"JSON"})]}),a.jsxs($u,{children:[a.jsx(Go,{children:a.jsx(ple,{})}),a.jsx(Go,{children:a.jsx(cie,{})}),a.jsx(Go,{children:a.jsx(die,{})})]})]})})},mle=l.memo(hle),gle={paramNegativeConditioning:{placement:"right"},controlNet:{href:"https://support.invoke.ai/support/solutions/articles/151000105880"},lora:{href:"https://support.invoke.ai/support/solutions/articles/151000159072"},compositingCoherenceMode:{href:"https://support.invoke.ai/support/solutions/articles/151000158838"},infillMethod:{href:"https://support.invoke.ai/support/solutions/articles/151000158841"},scaleBeforeProcessing:{href:"https://support.invoke.ai/support/solutions/articles/151000158841"},paramIterations:{href:"https://support.invoke.ai/support/solutions/articles/151000159073"},paramPositiveConditioning:{href:"https://support.invoke.ai/support/solutions/articles/151000096606-tips-on-crafting-prompts",placement:"right"},paramScheduler:{placement:"right",href:"https://support.invoke.ai/support/solutions/articles/151000159073"},paramModel:{placement:"right",href:"https://support.invoke.ai/support/solutions/articles/151000096601-what-is-a-model-which-should-i-use-"},paramRatio:{gutter:16},controlNetControlMode:{placement:"right"},controlNetResizeMode:{placement:"right"},paramVAE:{placement:"right"},paramVAEPrecision:{placement:"right"}},vle=1e3,ble=[{name:"preventOverflow",options:{padding:10}}],xA=De(({feature:e,children:t,wrapperProps:n,...r},o)=>{const{t:s}=Q(),i=H(g=>g.system.shouldEnableInformationalPopovers),c=l.useMemo(()=>gle[e],[e]),d=l.useMemo(()=>J7(Z7(c,["image","href","buttonLabel"]),r),[c,r]),p=l.useMemo(()=>s(`popovers.${e}.heading`),[e,s]),h=l.useMemo(()=>s(`popovers.${e}.paragraphs`,{returnObjects:!0})??[],[e,s]),m=l.useCallback(()=>{c!=null&&c.href&&window.open(c.href)},[c==null?void 0:c.href]);return i?a.jsxs(Uf,{isLazy:!0,closeOnBlur:!1,trigger:"hover",variant:"informational",openDelay:vle,modifiers:ble,placement:"top",...d,children:[a.jsx(Bg,{children:a.jsx(Le,{ref:o,w:"full",...n,children:t})}),a.jsx(Au,{children:a.jsxs(Gf,{w:96,children:[a.jsx(w3,{}),a.jsx(Hg,{children:a.jsxs(N,{sx:{gap:2,flexDirection:"column",alignItems:"flex-start"},children:[p&&a.jsxs(a.Fragment,{children:[a.jsx(yo,{size:"sm",children:p}),a.jsx(io,{})]}),(c==null?void 0:c.image)&&a.jsxs(a.Fragment,{children:[a.jsx(_i,{sx:{objectFit:"contain",maxW:"60%",maxH:"60%",backgroundColor:"white"},src:c.image,alt:"Optional Image"}),a.jsx(io,{})]}),h.map(g=>a.jsx(je,{children:g},g)),(c==null?void 0:c.href)&&a.jsxs(a.Fragment,{children:[a.jsx(io,{}),a.jsx(nl,{pt:1,onClick:m,leftIcon:a.jsx(l2,{}),alignSelf:"flex-end",variant:"link",children:s("common.learnMore")??p})]})]})})]})})]}):a.jsx(Le,{ref:o,w:"full",...n,children:t})});xA.displayName="IAIInformationalPopover";const kn=l.memo(xA),xle=me([we],e=>{const{initial:t,min:n,sliderMax:r,inputMax:o,fineStep:s,coarseStep:i}=e.config.sd.iterations,{iterations:c}=e.generation,{shouldUseSliders:d}=e.ui,p=e.hotkeys.shift?s:i;return{iterations:c,initial:t,min:n,sliderMax:r,inputMax:o,step:p,shouldUseSliders:d}},Ie),yle=({asSlider:e})=>{const{iterations:t,initial:n,min:r,sliderMax:o,inputMax:s,step:i,shouldUseSliders:c}=H(xle),d=le(),{t:p}=Q(),h=l.useCallback(g=>{d(sS(g))},[d]),m=l.useCallback(()=>{d(sS(n))},[d,n]);return e||c?a.jsx(kn,{feature:"paramIterations",children:a.jsx(It,{label:p("parameters.iterations"),step:i,min:r,max:o,onChange:h,handleReset:m,value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s}})}):a.jsx(kn,{feature:"paramIterations",children:a.jsx(_a,{label:p("parameters.iterations"),step:i,min:r,max:s,onChange:h,value:t,numberInputFieldProps:{textAlign:"center"}})})},ua=l.memo(yle),Cle=()=>{const[e,t]=l.useState(!1),[n,r]=l.useState(!1),o=l.useRef(null),s=G2(),i=l.useCallback(()=>{o.current&&o.current.setLayout([50,50])},[]);return a.jsxs(N,{sx:{flexDir:"column",gap:2,height:"100%",width:"100%"},children:[a.jsx(z8,{}),a.jsx(N,{layerStyle:"first",sx:{w:"full",position:"relative",borderRadius:"base",p:2,pb:3,gap:2,flexDir:"column"},children:a.jsx(ua,{asSlider:!0})}),a.jsxs(E0,{ref:o,id:"workflow-panel-group",autoSaveId:"workflow-panel-group",direction:"vertical",style:{height:"100%",width:"100%"},storage:s,children:[a.jsx(el,{id:"workflow",collapsible:!0,onCollapse:t,minSize:25,children:a.jsx(mle,{})}),a.jsx(lg,{direction:"vertical",onDoubleClick:i,collapsedDirection:e?"top":n?"bottom":void 0}),a.jsx(el,{id:"inspector",collapsible:!0,onCollapse:r,minSize:25,children:a.jsx(oie,{})})]})]})},wle=l.memo(Cle),I_=(e,t)=>{const n=l.useRef(null),[r,o]=l.useState(()=>{var p;return!!((p=n.current)!=null&&p.getCollapsed())}),s=l.useCallback(()=>{var p;(p=n.current)!=null&&p.getCollapsed()?ls.flushSync(()=>{var h;(h=n.current)==null||h.expand()}):ls.flushSync(()=>{var h;(h=n.current)==null||h.collapse()})},[]),i=l.useCallback(()=>{ls.flushSync(()=>{var p;(p=n.current)==null||p.expand()})},[]),c=l.useCallback(()=>{ls.flushSync(()=>{var p;(p=n.current)==null||p.collapse()})},[]),d=l.useCallback(()=>{ls.flushSync(()=>{var p;(p=n.current)==null||p.resize(e,t)})},[e,t]);return{ref:n,minSize:e,isCollapsed:r,setIsCollapsed:o,reset:d,toggle:s,expand:i,collapse:c}},Sle=({isGalleryCollapsed:e,galleryPanelRef:t})=>{const{t:n}=Q(),r=l.useCallback(()=>{var o;(o=t.current)==null||o.expand()},[t]);return e?a.jsx(Au,{children:a.jsx(N,{pos:"absolute",transform:"translate(0, -50%)",minW:8,top:"50%",insetInlineEnd:"1.63rem",children:a.jsx(rt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":n("accessibility.showGalleryPanel"),onClick:r,icon:a.jsx(pse,{}),sx:{p:0,px:3,h:48,borderEndRadius:0}})})}):null},kle=l.memo(Sle),wh={borderStartRadius:0,flexGrow:1},jle=({isSidePanelCollapsed:e,sidePanelRef:t})=>{const{t:n}=Q(),r=l.useCallback(()=>{var o;(o=t.current)==null||o.expand()},[t]);return e?a.jsx(Au,{children:a.jsxs(N,{pos:"absolute",transform:"translate(0, -50%)",minW:8,top:"50%",insetInlineStart:"5.13rem",direction:"column",gap:2,h:48,children:[a.jsxs(Hn,{isAttached:!0,orientation:"vertical",flexGrow:3,children:[a.jsx(rt,{tooltip:n("parameters.showOptionsPanel"),"aria-label":n("parameters.showOptionsPanel"),onClick:r,sx:wh,icon:a.jsx(tO,{})}),a.jsx(N8,{asIconButton:!0,sx:wh}),a.jsx(O8,{asIconButton:!0,sx:wh})]}),a.jsx(B2,{asIconButton:!0,sx:wh})]})}):null},_le=l.memo(jle),Ile=e=>{const{label:t,activeLabel:n,children:r,defaultIsOpen:o=!1}=e,{isOpen:s,onToggle:i}=hs({defaultIsOpen:o}),{colorMode:c}=ji();return a.jsxs(Le,{children:[a.jsxs(N,{onClick:i,sx:{alignItems:"center",p:2,px:4,gap:2,borderTopRadius:"base",borderBottomRadius:s?0:"base",bg:Xe("base.250","base.750")(c),color:Xe("base.900","base.100")(c),_hover:{bg:Xe("base.300","base.700")(c)},fontSize:"sm",fontWeight:600,cursor:"pointer",transitionProperty:"common",transitionDuration:"normal",userSelect:"none"},"data-testid":`${t} collapsible`,children:[t,a.jsx(So,{children:n&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(je,{sx:{color:"accent.500",_dark:{color:"accent.300"}},children:n})},"statusText")}),a.jsx(Pi,{}),a.jsx(b0,{sx:{w:"1rem",h:"1rem",transform:s?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})]}),a.jsx(Af,{in:s,animateOpacity:!0,style:{overflow:"unset"},children:a.jsx(Le,{sx:{p:4,pb:4,borderBottomRadius:"base",bg:"base.150",_dark:{bg:"base.800"}},children:r})})]})},No=l.memo(Ile),Ple=me(we,e=>{const{maxPrompts:t,combinatorial:n}=e.dynamicPrompts,{min:r,sliderMax:o,inputMax:s}=e.config.sd.dynamicPrompts.maxPrompts;return{maxPrompts:t,min:r,sliderMax:o,inputMax:s,isDisabled:!n}},Ie),Ele=()=>{const{maxPrompts:e,min:t,sliderMax:n,inputMax:r,isDisabled:o}=H(Ple),s=le(),{t:i}=Q(),c=l.useCallback(p=>{s(eT(p))},[s]),d=l.useCallback(()=>{s(tT())},[s]);return a.jsx(kn,{feature:"dynamicPromptsMaxPrompts",children:a.jsx(It,{label:i("dynamicPrompts.maxPrompts"),isDisabled:o,min:t,max:n,value:e,onChange:c,sliderNumberInputProps:{max:r},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})})},Mle=l.memo(Ele),Ole=me(we,e=>{const{isLoading:t,isError:n,prompts:r,parsingError:o}=e.dynamicPrompts;return{prompts:r,parsingError:o,isError:n,isLoading:t}},Ie),Ale={"&::marker":{color:"base.500",_dark:{color:"base.500"}}},Rle=()=>{const{t:e}=Q(),{prompts:t,parsingError:n,isLoading:r,isError:o}=H(Ole);return o?a.jsx(kn,{feature:"dynamicPrompts",children:a.jsx(N,{w:"full",h:"full",layerStyle:"second",alignItems:"center",justifyContent:"center",p:8,children:a.jsx(eo,{icon:ise,label:"Problem generating prompts"})})}):a.jsx(kn,{feature:"dynamicPrompts",children:a.jsxs(Vn,{isInvalid:!!n,children:[a.jsxs(yr,{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:[e("dynamicPrompts.promptsPreview")," (",t.length,")",n&&` - ${n}`]}),a.jsxs(N,{h:64,pos:"relative",layerStyle:"third",borderRadius:"base",p:2,children:[a.jsx(cc,{children:a.jsx(V5,{stylePosition:"inside",ms:0,children:t.map((s,i)=>a.jsx(Ps,{fontSize:"sm",sx:Ale,children:a.jsx(je,{as:"span",children:s})},`${s}.${i}`))})}),r&&a.jsx(N,{pos:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,layerStyle:"second",opacity:.7,alignItems:"center",justifyContent:"center",children:a.jsx(Ci,{})})]})]})})},Dle=l.memo(Rle),yA=l.forwardRef(({label:e,description:t,...n},r)=>a.jsx(Le,{ref:r,...n,children:a.jsxs(Le,{children:[a.jsx(je,{fontWeight:600,children:e}),t&&a.jsx(je,{size:"xs",variant:"subtext",children:t})]})}));yA.displayName="IAIMantineSelectItemWithDescription";const Tle=l.memo(yA),Nle=()=>{const e=le(),{t}=Q(),n=H(s=>s.dynamicPrompts.seedBehaviour),r=l.useMemo(()=>[{value:"PER_ITERATION",label:t("dynamicPrompts.seedBehaviour.perIterationLabel"),description:t("dynamicPrompts.seedBehaviour.perIterationDesc")},{value:"PER_PROMPT",label:t("dynamicPrompts.seedBehaviour.perPromptLabel"),description:t("dynamicPrompts.seedBehaviour.perPromptDesc")}],[t]),o=l.useCallback(s=>{s&&e(nT(s))},[e]);return a.jsx(kn,{feature:"dynamicPromptsSeedBehaviour",children:a.jsx(Dr,{label:t("dynamicPrompts.seedBehaviour.label"),value:n,data:r,itemComponent:Tle,onChange:o})})},$le=l.memo(Nle),Lle=()=>{const{t:e}=Q(),t=l.useMemo(()=>me(we,({dynamicPrompts:o})=>{const s=o.prompts.length;if(s>1)return e("dynamicPrompts.promptsWithCount_other",{count:s})}),[e]),n=H(t);return Pn("dynamicPrompting").isFeatureEnabled?a.jsx(No,{label:e("dynamicPrompts.dynamicPrompts"),activeLabel:n,children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(Dle,{}),a.jsx($le,{}),a.jsx(Mle,{})]})}):null},Qu=l.memo(Lle),zle=e=>{const t=le(),{lora:n}=e,r=l.useCallback(i=>{t(rT({id:n.id,weight:i}))},[t,n.id]),o=l.useCallback(()=>{t(oT(n.id))},[t,n.id]),s=l.useCallback(()=>{t(sT(n.id))},[t,n.id]);return a.jsx(kn,{feature:"lora",children:a.jsxs(N,{sx:{gap:2.5,alignItems:"flex-end"},children:[a.jsx(It,{label:n.model_name,value:n.weight,onChange:r,min:-1,max:2,step:.01,withInput:!0,withReset:!0,handleReset:o,withSliderMarks:!0,sliderMarks:[-1,0,1,2],sliderNumberInputProps:{min:-50,max:50}}),a.jsx(rt,{size:"sm",onClick:s,tooltip:"Remove LoRA","aria-label":"Remove LoRA",icon:a.jsx(Zo,{}),colorScheme:"error"})]})})},Fle=l.memo(zle),Ble=me(we,({lora:e})=>({lorasArray:To(e.loras)}),Ie),Hle=()=>{const{lorasArray:e}=H(Ble);return a.jsx(a.Fragment,{children:e.map((t,n)=>a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[n>0&&a.jsx(io,{pt:1}),a.jsx(Fle,{lora:t})]},t.model_name))})},Wle=l.memo(Hle),Vle=me(we,({lora:e})=>({loras:e.loras}),Ie),Ule=()=>{const e=le(),{loras:t}=H(Vle),{data:n}=_f(),{t:r}=Q(),o=H(d=>d.generation.model),s=l.useMemo(()=>{if(!n)return[];const d=[];return to(n.entities,(p,h)=>{if(!p||h in t)return;const m=(o==null?void 0:o.base_model)!==p.base_model;d.push({value:h,label:p.model_name,disabled:m,group:xr[p.base_model],tooltip:m?`Incompatible base model: ${p.base_model}`:void 0})}),d.sort((p,h)=>p.label&&!h.label?1:-1),d.sort((p,h)=>p.disabled&&!h.disabled?1:-1)},[t,n,o==null?void 0:o.base_model]),i=l.useCallback(d=>{if(!d)return;const p=n==null?void 0:n.entities[d];p&&e(aT(p))},[e,n==null?void 0:n.entities]),c=l.useCallback((d,p)=>{var h;return((h=p.label)==null?void 0:h.toLowerCase().includes(d.toLowerCase().trim()))||p.value.toLowerCase().includes(d.toLowerCase().trim())},[]);return(n==null?void 0:n.ids.length)===0?a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(je,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:r("models.noLoRAsInstalled")})}):a.jsx(sr,{placeholder:s.length===0?"All LoRAs added":r("models.addLora"),value:null,data:s,nothingFound:"No matching LoRAs",itemComponent:pl,disabled:s.length===0,filter:c,onChange:i,"data-testid":"add-lora"})},Gle=l.memo(Ule),qle=me(we,e=>{const t=cP(e.lora.loras);return{activeLabel:t>0?`${t} Active`:void 0}},Ie),Kle=()=>{const{t:e}=Q(),{activeLabel:t}=H(qle);return Pn("lora").isFeatureEnabled?a.jsx(No,{label:e("modelManager.loraModels"),activeLabel:t,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(Gle,{}),a.jsx(Wle,{})]})}):null},Xu=l.memo(Kle),Qle=()=>{const e=le(),t=H(o=>o.generation.shouldUseCpuNoise),{t:n}=Q(),r=l.useCallback(o=>{e(iT(o.target.checked))},[e]);return a.jsx(kn,{feature:"noiseUseCPU",children:a.jsx(_r,{label:n("parameters.useCpuNoise"),isChecked:t,onChange:r})})},da=e=>e.generation,Xle=me(da,e=>{const{seamlessXAxis:t}=e;return{seamlessXAxis:t}},Ie),Yle=()=>{const{t:e}=Q(),{seamlessXAxis:t}=H(Xle),n=le(),r=l.useCallback(o=>{n(lT(o.target.checked))},[n]);return a.jsx(_r,{label:e("parameters.seamlessXAxis"),"aria-label":e("parameters.seamlessXAxis"),isChecked:t,onChange:r})},Jle=l.memo(Yle),Zle=me(da,e=>{const{seamlessYAxis:t}=e;return{seamlessYAxis:t}},Ie),ece=()=>{const{t:e}=Q(),{seamlessYAxis:t}=H(Zle),n=le(),r=l.useCallback(o=>{n(cT(o.target.checked))},[n]);return a.jsx(_r,{label:e("parameters.seamlessYAxis"),"aria-label":e("parameters.seamlessYAxis"),isChecked:t,onChange:r})},tce=l.memo(ece),nce=()=>{const{t:e}=Q();return Pn("seamless").isFeatureEnabled?a.jsxs(Vn,{children:[a.jsx(yr,{children:e("parameters.seamlessTiling")})," ",a.jsxs(N,{sx:{gap:5},children:[a.jsx(Le,{flexGrow:1,children:a.jsx(Jle,{})}),a.jsx(Le,{flexGrow:1,children:a.jsx(tce,{})})]})]}):null},rce=l.memo(nce);function oce(){const e=H(d=>d.generation.clipSkip),{model:t}=H(d=>d.generation),n=le(),{t:r}=Q(),o=l.useCallback(d=>{n(aS(d))},[n]),s=l.useCallback(()=>{n(aS(0))},[n]),i=l.useMemo(()=>t?qp[t.base_model].maxClip:qp["sd-1"].maxClip,[t]),c=l.useMemo(()=>t?qp[t.base_model].markers:qp["sd-1"].markers,[t]);return(t==null?void 0:t.base_model)==="sdxl"?null:a.jsx(kn,{feature:"clipSkip",placement:"top",children:a.jsx(It,{label:r("parameters.clipSkip"),"aria-label":r("parameters.clipSkip"),min:0,max:i,step:1,value:e,onChange:o,withSliderMarks:!0,sliderMarks:c,withInput:!0,withReset:!0,handleReset:s})})}const sce=me(we,e=>{const{clipSkip:t,model:n,seamlessXAxis:r,seamlessYAxis:o,shouldUseCpuNoise:s}=e.generation;return{clipSkip:t,model:n,seamlessXAxis:r,seamlessYAxis:o,shouldUseCpuNoise:s}},Ie);function Yu(){const{clipSkip:e,model:t,seamlessXAxis:n,seamlessYAxis:r,shouldUseCpuNoise:o}=H(sce),{t:s}=Q(),i=l.useMemo(()=>{const c=[];return o||c.push(s("parameters.gpuNoise")),e>0&&t&&t.base_model!=="sdxl"&&c.push(s("parameters.clipSkipWithLayerCount",{layerCount:e})),n&&r?c.push(s("parameters.seamlessX&Y")):n?c.push(s("parameters.seamlessX")):r&&c.push(s("parameters.seamlessY")),c.join(", ")},[e,t,n,r,o,s]);return a.jsx(No,{label:s("common.advanced"),activeLabel:i,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(rce,{}),a.jsx(io,{}),t&&(t==null?void 0:t.base_model)!=="sdxl"&&a.jsxs(a.Fragment,{children:[a.jsx(oce,{}),a.jsx(io,{pt:2})]}),a.jsx(Qle,{})]})})}const Oi=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return((o=Fs(r,e))==null?void 0:o.isEnabled)??!1},Ie),[e]);return H(t)},ace=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return(o=Fs(r,e))==null?void 0:o.model},Ie),[e]);return H(t)},CA=e=>{const{data:t}=$x(),n=l.useMemo(()=>t?FI.getSelectors().selectAll(t):[],[t]),{data:r}=Lx(),o=l.useMemo(()=>r?BI.getSelectors().selectAll(r):[],[r]),{data:s}=zx(),i=l.useMemo(()=>s?HI.getSelectors().selectAll(s):[],[s]);return e==="controlnet"?n:e==="t2i_adapter"?o:e==="ip_adapter"?i:[]},wA=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return(o=Fs(r,e))==null?void 0:o.type},Ie),[e]);return H(t)},ice=me(we,({generation:e})=>{const{model:t}=e;return{mainModel:t}},Ie),lce=({id:e})=>{const t=Oi(e),n=wA(e),r=ace(e),o=le(),{mainModel:s}=H(ice),{t:i}=Q(),c=CA(n),d=l.useMemo(()=>{if(!c)return[];const m=[];return c.forEach(g=>{if(!g)return;const b=(g==null?void 0:g.base_model)!==(s==null?void 0:s.base_model);m.push({value:g.id,label:g.model_name,group:xr[g.base_model],disabled:b,tooltip:b?`${i("controlnet.incompatibleBaseModel")} ${g.base_model}`:void 0})}),m.sort((g,b)=>g.disabled?1:b.disabled?-1:g.label.localeCompare(b.label)),m},[s==null?void 0:s.base_model,c,i]),p=l.useMemo(()=>c.find(m=>(m==null?void 0:m.id)===`${r==null?void 0:r.base_model}/${n}/${r==null?void 0:r.model_name}`),[n,r==null?void 0:r.base_model,r==null?void 0:r.model_name,c]),h=l.useCallback(m=>{if(!m)return;const g=pA(m);g&&o(uT({id:e,model:g}))},[o,e]);return a.jsx(sr,{itemComponent:pl,data:d,error:!p||(s==null?void 0:s.base_model)!==p.base_model,placeholder:i("controlnet.selectModel"),value:(p==null?void 0:p.id)??null,onChange:h,disabled:!t,tooltip:p==null?void 0:p.description})},cce=l.memo(lce),uce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return(o=Fs(r,e))==null?void 0:o.weight},Ie),[e]);return H(t)},dce=({id:e})=>{const t=Oi(e),n=uce(e),r=le(),{t:o}=Q(),s=l.useCallback(i=>{r(dT({id:e,weight:i}))},[r,e]);return si(n)?null:a.jsx(kn,{feature:"controlNetWeight",children:a.jsx(It,{isDisabled:!t,label:o("controlnet.weight"),value:n,onChange:s,min:0,max:2,step:.01,withSliderMarks:!0,sliderMarks:[0,1,2]})})},fce=l.memo(dce),pce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return(o=Fs(r,e))==null?void 0:o.controlImage},Ie),[e]);return H(t)},hce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);return o&&Ru(o)?o.processedControlImage:void 0},Ie),[e]);return H(t)},mce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);return o&&Ru(o)?o.processorType:void 0},Ie),[e]);return H(t)},gce=me(we,({controlAdapters:e,gallery:t})=>{const{pendingControlImages:n}=e,{autoAddBoardId:r}=t;return{pendingControlImages:n,autoAddBoardId:r}},Ie),vce=({isSmall:e,id:t})=>{const n=pce(t),r=hce(t),o=mce(t),s=le(),{t:i}=Q(),{pendingControlImages:c,autoAddBoardId:d}=H(gce),p=H(lo),[h,m]=l.useState(!1),{currentData:g}=Rs(n??zs.skipToken),{currentData:b}=Rs(r??zs.skipToken),[y]=fT(),[x]=pT(),[w]=hT(),S=l.useCallback(()=>{s(mT({id:t,controlImage:null}))},[t,s]),j=l.useCallback(async()=>{b&&(await y({imageDTO:b,is_intermediate:!1}).unwrap(),d!=="none"?x({imageDTO:b,board_id:d}):w({imageDTO:b}))},[b,y,d,x,w]),I=l.useCallback(()=>{g&&(p==="unifiedCanvas"?s(na({width:g.width,height:g.height})):(s(Wl(g.width)),s(Vl(g.height))))},[g,p,s]),_=l.useCallback(()=>{m(!0)},[]),M=l.useCallback(()=>{m(!1)},[]),E=l.useMemo(()=>{if(g)return{id:t,payloadType:"IMAGE_DTO",payload:{imageDTO:g}}},[g,t]),A=l.useMemo(()=>({id:t,actionType:"SET_CONTROL_ADAPTER_IMAGE",context:{id:t}}),[t]),R=l.useMemo(()=>({type:"SET_CONTROL_ADAPTER_IMAGE",id:t}),[t]),D=g&&b&&!h&&!c.includes(t)&&o!=="none";return a.jsxs(N,{onMouseEnter:_,onMouseLeave:M,sx:{position:"relative",w:"full",h:e?28:366,alignItems:"center",justifyContent:"center"},children:[a.jsx(ll,{draggableData:E,droppableData:A,imageDTO:g,isDropDisabled:D,postUploadAction:R}),a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",opacity:D?1:0,transitionProperty:"common",transitionDuration:"normal",pointerEvents:"none"},children:a.jsx(ll,{draggableData:E,droppableData:A,imageDTO:b,isUploadDisabled:!0})}),a.jsxs(a.Fragment,{children:[a.jsx(du,{onClick:S,icon:g?a.jsx(a0,{}):void 0,tooltip:i("controlnet.resetControlImage")}),a.jsx(du,{onClick:j,icon:g?a.jsx(o0,{size:16}):void 0,tooltip:i("controlnet.saveControlImage"),styleOverrides:{marginTop:6}}),a.jsx(du,{onClick:I,icon:g?a.jsx(Kee,{size:16}):void 0,tooltip:i("controlnet.setControlImageDimensions"),styleOverrides:{marginTop:12}})]}),c.includes(t)&&a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",alignItems:"center",justifyContent:"center",opacity:.8,borderRadius:"base",bg:"base.400",_dark:{bg:"base.900"}},children:a.jsx(Ci,{size:"xl",sx:{color:"base.100",_dark:{color:"base.400"}}})})]})},P_=l.memo(vce),Hs=()=>{const e=le();return l.useCallback((n,r)=>{e(gT({id:n,params:r}))},[e])};function Ws(e){return a.jsx(N,{sx:{flexDirection:"column",gap:2,pb:2},children:e.children})}const E_=Do.canny_image_processor.default,bce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{low_threshold:o,high_threshold:s}=n,i=Hs(),{t:c}=Q(),d=l.useCallback(g=>{i(t,{low_threshold:g})},[t,i]),p=l.useCallback(()=>{i(t,{low_threshold:E_.low_threshold})},[t,i]),h=l.useCallback(g=>{i(t,{high_threshold:g})},[t,i]),m=l.useCallback(()=>{i(t,{high_threshold:E_.high_threshold})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{isDisabled:!r,label:c("controlnet.lowThreshold"),value:o,onChange:d,handleReset:p,withReset:!0,min:0,max:255,withInput:!0,withSliderMarks:!0}),a.jsx(It,{isDisabled:!r,label:c("controlnet.highThreshold"),value:s,onChange:h,handleReset:m,withReset:!0,min:0,max:255,withInput:!0,withSliderMarks:!0})]})},xce=l.memo(bce),yce=Do.color_map_image_processor.default,Cce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{color_map_tile_size:o}=n,s=Hs(),{t:i}=Q(),c=l.useCallback(p=>{s(t,{color_map_tile_size:p})},[t,s]),d=l.useCallback(()=>{s(t,{color_map_tile_size:yce.color_map_tile_size})},[t,s]);return a.jsx(Ws,{children:a.jsx(It,{isDisabled:!r,label:i("controlnet.colorMapTileSize"),value:o,onChange:c,handleReset:d,withReset:!0,min:1,max:256,step:1,withInput:!0,withSliderMarks:!0,sliderNumberInputProps:{max:4096}})})},wce=l.memo(Cce),kd=Do.content_shuffle_image_processor.default,Sce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,w:i,h:c,f:d}=n,p=Hs(),{t:h}=Q(),m=l.useCallback(M=>{p(t,{detect_resolution:M})},[t,p]),g=l.useCallback(()=>{p(t,{detect_resolution:kd.detect_resolution})},[t,p]),b=l.useCallback(M=>{p(t,{image_resolution:M})},[t,p]),y=l.useCallback(()=>{p(t,{image_resolution:kd.image_resolution})},[t,p]),x=l.useCallback(M=>{p(t,{w:M})},[t,p]),w=l.useCallback(()=>{p(t,{w:kd.w})},[t,p]),S=l.useCallback(M=>{p(t,{h:M})},[t,p]),j=l.useCallback(()=>{p(t,{h:kd.h})},[t,p]),I=l.useCallback(M=>{p(t,{f:M})},[t,p]),_=l.useCallback(()=>{p(t,{f:kd.f})},[t,p]);return a.jsxs(Ws,{children:[a.jsx(It,{label:h("controlnet.detectResolution"),value:s,onChange:m,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:h("controlnet.imageResolution"),value:o,onChange:b,handleReset:y,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:h("controlnet.w"),value:i,onChange:x,handleReset:w,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:h("controlnet.h"),value:c,onChange:S,handleReset:j,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:h("controlnet.f"),value:d,onChange:I,handleReset:_,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},kce=l.memo(Sce),M_=Do.hed_image_processor.default,jce=e=>{const{controlNetId:t,processorNode:{detect_resolution:n,image_resolution:r,scribble:o},isEnabled:s}=e,i=Hs(),{t:c}=Q(),d=l.useCallback(b=>{i(t,{detect_resolution:b})},[t,i]),p=l.useCallback(b=>{i(t,{image_resolution:b})},[t,i]),h=l.useCallback(b=>{i(t,{scribble:b.target.checked})},[t,i]),m=l.useCallback(()=>{i(t,{detect_resolution:M_.detect_resolution})},[t,i]),g=l.useCallback(()=>{i(t,{image_resolution:M_.image_resolution})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.detectResolution"),value:n,onChange:d,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!s}),a.jsx(It,{label:c("controlnet.imageResolution"),value:r,onChange:p,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!s}),a.jsx(_r,{label:c("controlnet.scribble"),isChecked:o,onChange:h,isDisabled:!s})]})},_ce=l.memo(jce),O_=Do.lineart_anime_image_processor.default,Ice=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s}=n,i=Hs(),{t:c}=Q(),d=l.useCallback(g=>{i(t,{detect_resolution:g})},[t,i]),p=l.useCallback(g=>{i(t,{image_resolution:g})},[t,i]),h=l.useCallback(()=>{i(t,{detect_resolution:O_.detect_resolution})},[t,i]),m=l.useCallback(()=>{i(t,{image_resolution:O_.image_resolution})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.detectResolution"),value:s,onChange:d,handleReset:h,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:c("controlnet.imageResolution"),value:o,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Pce=l.memo(Ice),A_=Do.lineart_image_processor.default,Ece=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,coarse:i}=n,c=Hs(),{t:d}=Q(),p=l.useCallback(y=>{c(t,{detect_resolution:y})},[t,c]),h=l.useCallback(y=>{c(t,{image_resolution:y})},[t,c]),m=l.useCallback(()=>{c(t,{detect_resolution:A_.detect_resolution})},[t,c]),g=l.useCallback(()=>{c(t,{image_resolution:A_.image_resolution})},[t,c]),b=l.useCallback(y=>{c(t,{coarse:y.target.checked})},[t,c]);return a.jsxs(Ws,{children:[a.jsx(It,{label:d("controlnet.detectResolution"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:d("controlnet.imageResolution"),value:o,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(_r,{label:d("controlnet.coarse"),isChecked:i,onChange:b,isDisabled:!r})]})},Mce=l.memo(Ece),R_=Do.mediapipe_face_processor.default,Oce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{max_faces:o,min_confidence:s}=n,i=Hs(),{t:c}=Q(),d=l.useCallback(g=>{i(t,{max_faces:g})},[t,i]),p=l.useCallback(g=>{i(t,{min_confidence:g})},[t,i]),h=l.useCallback(()=>{i(t,{max_faces:R_.max_faces})},[t,i]),m=l.useCallback(()=>{i(t,{min_confidence:R_.min_confidence})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.maxFaces"),value:o,onChange:d,handleReset:h,withReset:!0,min:1,max:20,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:c("controlnet.minConfidence"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Ace=l.memo(Oce),D_=Do.midas_depth_image_processor.default,Rce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{a_mult:o,bg_th:s}=n,i=Hs(),{t:c}=Q(),d=l.useCallback(g=>{i(t,{a_mult:g})},[t,i]),p=l.useCallback(g=>{i(t,{bg_th:g})},[t,i]),h=l.useCallback(()=>{i(t,{a_mult:D_.a_mult})},[t,i]),m=l.useCallback(()=>{i(t,{bg_th:D_.bg_th})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.amult"),value:o,onChange:d,handleReset:h,withReset:!0,min:0,max:20,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:c("controlnet.bgth"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:20,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Dce=l.memo(Rce),Sh=Do.mlsd_image_processor.default,Tce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,thr_d:i,thr_v:c}=n,d=Hs(),{t:p}=Q(),h=l.useCallback(j=>{d(t,{detect_resolution:j})},[t,d]),m=l.useCallback(j=>{d(t,{image_resolution:j})},[t,d]),g=l.useCallback(j=>{d(t,{thr_d:j})},[t,d]),b=l.useCallback(j=>{d(t,{thr_v:j})},[t,d]),y=l.useCallback(()=>{d(t,{detect_resolution:Sh.detect_resolution})},[t,d]),x=l.useCallback(()=>{d(t,{image_resolution:Sh.image_resolution})},[t,d]),w=l.useCallback(()=>{d(t,{thr_d:Sh.thr_d})},[t,d]),S=l.useCallback(()=>{d(t,{thr_v:Sh.thr_v})},[t,d]);return a.jsxs(Ws,{children:[a.jsx(It,{label:p("controlnet.detectResolution"),value:s,onChange:h,handleReset:y,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:p("controlnet.imageResolution"),value:o,onChange:m,handleReset:x,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:p("controlnet.w"),value:i,onChange:g,handleReset:w,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:p("controlnet.h"),value:c,onChange:b,handleReset:S,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Nce=l.memo(Tce),T_=Do.normalbae_image_processor.default,$ce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s}=n,i=Hs(),{t:c}=Q(),d=l.useCallback(g=>{i(t,{detect_resolution:g})},[t,i]),p=l.useCallback(g=>{i(t,{image_resolution:g})},[t,i]),h=l.useCallback(()=>{i(t,{detect_resolution:T_.detect_resolution})},[t,i]),m=l.useCallback(()=>{i(t,{image_resolution:T_.image_resolution})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.detectResolution"),value:s,onChange:d,handleReset:h,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:c("controlnet.imageResolution"),value:o,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Lce=l.memo($ce),N_=Do.openpose_image_processor.default,zce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,hand_and_face:i}=n,c=Hs(),{t:d}=Q(),p=l.useCallback(y=>{c(t,{detect_resolution:y})},[t,c]),h=l.useCallback(y=>{c(t,{image_resolution:y})},[t,c]),m=l.useCallback(()=>{c(t,{detect_resolution:N_.detect_resolution})},[t,c]),g=l.useCallback(()=>{c(t,{image_resolution:N_.image_resolution})},[t,c]),b=l.useCallback(y=>{c(t,{hand_and_face:y.target.checked})},[t,c]);return a.jsxs(Ws,{children:[a.jsx(It,{label:d("controlnet.detectResolution"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:d("controlnet.imageResolution"),value:o,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(_r,{label:d("controlnet.handAndFace"),isChecked:i,onChange:b,isDisabled:!r})]})},Fce=l.memo(zce),$_=Do.pidi_image_processor.default,Bce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,scribble:i,safe:c}=n,d=Hs(),{t:p}=Q(),h=l.useCallback(w=>{d(t,{detect_resolution:w})},[t,d]),m=l.useCallback(w=>{d(t,{image_resolution:w})},[t,d]),g=l.useCallback(()=>{d(t,{detect_resolution:$_.detect_resolution})},[t,d]),b=l.useCallback(()=>{d(t,{image_resolution:$_.image_resolution})},[t,d]),y=l.useCallback(w=>{d(t,{scribble:w.target.checked})},[t,d]),x=l.useCallback(w=>{d(t,{safe:w.target.checked})},[t,d]);return a.jsxs(Ws,{children:[a.jsx(It,{label:p("controlnet.detectResolution"),value:s,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:p("controlnet.imageResolution"),value:o,onChange:m,handleReset:b,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(_r,{label:p("controlnet.scribble"),isChecked:i,onChange:y}),a.jsx(_r,{label:p("controlnet.safe"),isChecked:c,onChange:x,isDisabled:!r})]})},Hce=l.memo(Bce),Wce=e=>null,Vce=l.memo(Wce),SA=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);return o&&Ru(o)?o.processorNode:void 0},Ie),[e]);return H(t)},Uce=({id:e})=>{const t=Oi(e),n=SA(e);return n?n.type==="canny_image_processor"?a.jsx(xce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="color_map_image_processor"?a.jsx(wce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="hed_image_processor"?a.jsx(_ce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="lineart_image_processor"?a.jsx(Mce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="content_shuffle_image_processor"?a.jsx(kce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="lineart_anime_image_processor"?a.jsx(Pce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="mediapipe_face_processor"?a.jsx(Ace,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="midas_depth_image_processor"?a.jsx(Dce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="mlsd_image_processor"?a.jsx(Nce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="normalbae_image_processor"?a.jsx(Lce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="openpose_image_processor"?a.jsx(Fce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="pidi_image_processor"?a.jsx(Hce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="zoe_depth_image_processor"?a.jsx(Vce,{controlNetId:e,processorNode:n,isEnabled:t}):null:null},Gce=l.memo(Uce),qce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);if(o&&Ru(o))return o.shouldAutoConfig},Ie),[e]);return H(t)},Kce=({id:e})=>{const t=Oi(e),n=qce(e),r=le(),{t:o}=Q(),s=l.useCallback(()=>{r(vT({id:e}))},[e,r]);return si(n)?null:a.jsx(_r,{label:o("controlnet.autoConfigure"),"aria-label":o("controlnet.autoConfigure"),isChecked:n,onChange:s,isDisabled:!t})},Qce=l.memo(Kce),Xce=e=>{const{id:t}=e,n=le(),{t:r}=Q(),o=l.useCallback(()=>{n(bT({id:t}))},[t,n]),s=l.useCallback(()=>{n(xT({id:t}))},[t,n]);return a.jsxs(N,{sx:{gap:2},children:[a.jsx(rt,{size:"sm",icon:a.jsx(Xl,{}),tooltip:r("controlnet.importImageFromCanvas"),"aria-label":r("controlnet.importImageFromCanvas"),onClick:o}),a.jsx(rt,{size:"sm",icon:a.jsx(JM,{}),tooltip:r("controlnet.importMaskFromCanvas"),"aria-label":r("controlnet.importMaskFromCanvas"),onClick:s})]})},Yce=l.memo(Xce),Jce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);return o?{beginStepPct:o.beginStepPct,endStepPct:o.endStepPct}:void 0},Ie),[e]);return H(t)},L_=e=>`${Math.round(e*100)}%`,Zce=({id:e})=>{const t=Oi(e),n=Jce(e),r=le(),{t:o}=Q(),s=l.useCallback(i=>{r(yT({id:e,beginStepPct:i[0]})),r(CT({id:e,endStepPct:i[1]}))},[r,e]);return n?a.jsx(kn,{feature:"controlNetBeginEnd",children:a.jsxs(Vn,{isDisabled:!t,children:[a.jsx(yr,{children:o("controlnet.beginEndStepPercent")}),a.jsx(Pg,{w:"100%",gap:2,alignItems:"center",children:a.jsxs(L3,{"aria-label":["Begin Step %","End Step %!"],value:[n.beginStepPct,n.endStepPct],onChange:s,min:0,max:1,step:.01,minStepsBetweenThumbs:5,isDisabled:!t,children:[a.jsx(z3,{children:a.jsx(F3,{})}),a.jsx(Wn,{label:L_(n.beginStepPct),placement:"top",hasArrow:!0,children:a.jsx(Ob,{index:0})}),a.jsx(Wn,{label:L_(n.endStepPct),placement:"top",hasArrow:!0,children:a.jsx(Ob,{index:1})}),a.jsx(Rh,{value:0,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},children:"0%"}),a.jsx(Rh,{value:.5,sx:{insetInlineStart:"50% !important",transform:"translateX(-50%)"},children:"50%"}),a.jsx(Rh,{value:1,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},children:"100%"})]})})]})}):null},eue=l.memo(Zce),tue=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);if(o&&wT(o))return o.controlMode},Ie),[e]);return H(t)};function nue({id:e}){const t=Oi(e),n=tue(e),r=le(),{t:o}=Q(),s=[{label:o("controlnet.balanced"),value:"balanced"},{label:o("controlnet.prompt"),value:"more_prompt"},{label:o("controlnet.control"),value:"more_control"},{label:o("controlnet.megaControl"),value:"unbalanced"}],i=l.useCallback(c=>{r(ST({id:e,controlMode:c}))},[e,r]);return n?a.jsx(kn,{feature:"controlNetControlMode",children:a.jsx(Dr,{disabled:!t,label:o("controlnet.controlMode"),data:s,value:n,onChange:i})}):null}const rue=e=>e.config,oue=me(rue,e=>To(Do,n=>({value:n.type,label:n.label})).sort((n,r)=>n.value==="none"?-1:r.value==="none"?1:n.label.localeCompare(r.label)).filter(n=>!e.sd.disabledControlNetProcessors.includes(n.value)),Ie),sue=({id:e})=>{const t=Oi(e),n=SA(e),r=le(),o=H(oue),{t:s}=Q(),i=l.useCallback(c=>{r(kT({id:e,processorType:c}))},[e,r]);return n?a.jsx(sr,{label:s("controlnet.processor"),value:n.type??"canny_image_processor",data:o,onChange:i,disabled:!t}):null},aue=l.memo(sue),iue=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);if(o&&Ru(o))return o.resizeMode},Ie),[e]);return H(t)};function lue({id:e}){const t=Oi(e),n=iue(e),r=le(),{t:o}=Q(),s=[{label:o("controlnet.resize"),value:"just_resize"},{label:o("controlnet.crop"),value:"crop_resize"},{label:o("controlnet.fill"),value:"fill_resize"}],i=l.useCallback(c=>{r(jT({id:e,resizeMode:c}))},[e,r]);return n?a.jsx(kn,{feature:"controlNetResizeMode",children:a.jsx(Dr,{disabled:!t,label:o("controlnet.resizeMode"),data:s,value:n,onChange:i})}):null}const cue=e=>{const{id:t,number:n}=e,r=wA(t),o=le(),{t:s}=Q(),i=H(lo),c=Oi(t),[d,p]=ote(!1),h=l.useCallback(()=>{o(_T({id:t}))},[t,o]),m=l.useCallback(()=>{o(IT(t))},[t,o]),g=l.useCallback(b=>{o(PT({id:t,isEnabled:b.target.checked}))},[t,o]);return r?a.jsxs(N,{sx:{flexDir:"column",gap:3,p:2,borderRadius:"base",position:"relative",bg:"base.250",_dark:{bg:"base.750"}},children:[a.jsx(N,{sx:{gap:2,alignItems:"center",justifyContent:"space-between"},children:a.jsx(_r,{label:s(`controlnet.${r}`,{number:n}),"aria-label":s("controlnet.toggleControlNet"),isChecked:c,onChange:g,formControlProps:{w:"full"},formLabelProps:{fontWeight:600}})}),a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx(Le,{sx:{w:"full",minW:0,transitionProperty:"common",transitionDuration:"0.1s"},children:a.jsx(cce,{id:t})}),i==="unifiedCanvas"&&a.jsx(Yce,{id:t}),a.jsx(rt,{size:"sm",tooltip:s("controlnet.duplicate"),"aria-label":s("controlnet.duplicate"),onClick:m,icon:a.jsx(Hu,{})}),a.jsx(rt,{size:"sm",tooltip:s("controlnet.delete"),"aria-label":s("controlnet.delete"),colorScheme:"error",onClick:h,icon:a.jsx(Zo,{})}),a.jsx(rt,{size:"sm",tooltip:s(d?"controlnet.hideAdvanced":"controlnet.showAdvanced"),"aria-label":s(d?"controlnet.hideAdvanced":"controlnet.showAdvanced"),onClick:p,variant:"ghost",sx:{_hover:{bg:"none"}},icon:a.jsx(b0,{sx:{boxSize:4,color:"base.700",transform:d?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal",_dark:{color:"base.300"}}})})]}),a.jsxs(N,{sx:{w:"full",flexDirection:"column",gap:3},children:[a.jsxs(N,{sx:{gap:4,w:"full",alignItems:"center"},children:[a.jsxs(N,{sx:{flexDir:"column",gap:3,h:28,w:"full",paddingInlineStart:1,paddingInlineEnd:d?1:0,pb:2,justifyContent:"space-between"},children:[a.jsx(fce,{id:t}),a.jsx(eue,{id:t})]}),!d&&a.jsx(N,{sx:{alignItems:"center",justifyContent:"center",h:28,w:28,aspectRatio:"1/1"},children:a.jsx(P_,{id:t,isSmall:!0})})]}),a.jsxs(N,{sx:{gap:2},children:[a.jsx(nue,{id:t}),a.jsx(lue,{id:t})]}),a.jsx(aue,{id:t})]}),d&&a.jsxs(a.Fragment,{children:[a.jsx(P_,{id:t}),a.jsx(Qce,{id:t}),a.jsx(Gce,{id:t})]})]}):null},uue=l.memo(cue),z1=e=>{const t=H(c=>{var d;return(d=c.generation.model)==null?void 0:d.base_model}),n=le(),r=CA(e),o=l.useMemo(()=>{const c=r.filter(d=>t?d.base_model===t:!0)[0];return c||r[0]},[t,r]),s=l.useMemo(()=>!o,[o]);return[l.useCallback(()=>{s||n(ET({type:e,overrides:{model:o}}))},[n,o,s,e]),s]},due=me([we],({controlAdapters:e})=>{const t=[];let n=!1;const r=MT(e).filter(h=>h.isEnabled).length,o=OT(e).length;r>0&&t.push(`${r} IP`),r>o&&(n=!0);const s=AT(e).filter(h=>h.isEnabled).length,i=RT(e).length;s>0&&t.push(`${s} ControlNet`),s>i&&(n=!0);const c=DT(e).filter(h=>h.isEnabled).length,d=TT(e).length;return c>0&&t.push(`${c} T2I`),c>d&&(n=!0),{controlAdapterIds:NT(e).map(String),activeLabel:t.join(", "),isError:n}},Ie),fue=()=>{const{t:e}=Q(),{controlAdapterIds:t,activeLabel:n}=H(due),r=Pn("controlNet").isFeatureDisabled,[o,s]=z1("controlnet"),[i,c]=z1("ip_adapter"),[d,p]=z1("t2i_adapter");return r?null:a.jsx(No,{label:e("controlnet.controlAdapter_other"),activeLabel:n,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsxs(Hn,{size:"sm",w:"full",justifyContent:"space-between",children:[a.jsx(Dt,{tooltip:e("controlnet.addControlNet"),leftIcon:a.jsx(Zi,{}),onClick:o,"data-testid":"add controlnet",flexGrow:1,isDisabled:s,children:e("common.controlNet")}),a.jsx(Dt,{tooltip:e("controlnet.addIPAdapter"),leftIcon:a.jsx(Zi,{}),onClick:i,"data-testid":"add ip adapter",flexGrow:1,isDisabled:c,children:e("common.ipAdapter")}),a.jsx(Dt,{tooltip:e("controlnet.addT2IAdapter"),leftIcon:a.jsx(Zi,{}),onClick:d,"data-testid":"add t2i adapter",flexGrow:1,isDisabled:p,children:e("common.t2iAdapter")})]}),t.map((h,m)=>a.jsxs(l.Fragment,{children:[a.jsx(io,{}),a.jsx(uue,{id:h,number:m+1})]},h))]})})},Ju=l.memo(fue),pue=e=>{const{onClick:t}=e,{t:n}=Q();return a.jsx(rt,{size:"sm","aria-label":n("embedding.addEmbedding"),tooltip:n("embedding.addEmbedding"),icon:a.jsx(UM,{}),sx:{p:2,color:"base.500",_hover:{color:"base.600"},_active:{color:"base.700"},_dark:{color:"base.500",_hover:{color:"base.400"},_active:{color:"base.300"}}},variant:"link",onClick:t})},D0=l.memo(pue),hue="28rem",mue=e=>{const{onSelect:t,isOpen:n,onClose:r,children:o}=e,{data:s}=$T(),i=l.useRef(null),{t:c}=Q(),d=H(g=>g.generation.model),p=l.useMemo(()=>{if(!s)return[];const g=[];return to(s.entities,(b,y)=>{if(!b)return;const x=(d==null?void 0:d.base_model)!==b.base_model;g.push({value:b.model_name,label:b.model_name,group:xr[b.base_model],disabled:x,tooltip:x?`${c("embedding.incompatibleModel")} ${b.base_model}`:void 0})}),g.sort((b,y)=>{var x;return b.label&&y.label?(x=b.label)!=null&&x.localeCompare(y.label)?-1:1:-1}),g.sort((b,y)=>b.disabled&&!y.disabled?1:-1)},[s,d==null?void 0:d.base_model,c]),h=l.useCallback(g=>{g&&t(g)},[t]),m=l.useCallback((g,b)=>{var y;return((y=b.label)==null?void 0:y.toLowerCase().includes(g.toLowerCase().trim()))||b.value.toLowerCase().includes(g.toLowerCase().trim())},[]);return a.jsxs(Uf,{initialFocusRef:i,isOpen:n,onClose:r,placement:"bottom",openDelay:0,closeDelay:0,closeOnBlur:!0,returnFocusOnClose:!0,children:[a.jsx(Bg,{children:o}),a.jsx(Gf,{sx:{p:0,top:-1,shadow:"dark-lg",borderColor:"accent.300",borderWidth:"2px",borderStyle:"solid",_dark:{borderColor:"accent.400"}},children:a.jsx(Hg,{sx:{p:0,w:`calc(${hue} - 2rem )`},children:p.length===0?a.jsx(N,{sx:{justifyContent:"center",p:2,fontSize:"sm",color:"base.500",_dark:{color:"base.700"}},children:a.jsx(je,{children:"No Embeddings Loaded"})}):a.jsx(sr,{inputRef:i,autoFocus:!0,placeholder:c("embedding.addEmbedding"),value:null,data:p,nothingFound:c("embedding.noMatchingEmbedding"),itemComponent:pl,disabled:p.length===0,onDropdownClose:r,filter:m,onChange:h})})})]})},T0=l.memo(mue),gue=()=>{const e=H(m=>m.generation.negativePrompt),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=hs(),s=le(),{t:i}=Q(),c=l.useCallback(m=>{s(Ld(m.target.value))},[s]),d=l.useCallback(m=>{m.key==="<"&&o()},[o]),p=l.useCallback(m=>{if(!t.current)return;const g=t.current.selectionStart;if(g===void 0)return;let b=e.slice(0,g);b[b.length-1]!=="<"&&(b+="<"),b+=`${m}>`;const y=b.length;b+=e.slice(g),ls.flushSync(()=>{s(Ld(b))}),t.current.selectionEnd=y,r()},[s,r,e]),h=Pn("embedding").isFeatureEnabled;return a.jsxs(Vn,{children:[a.jsx(T0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(kn,{feature:"paramNegativeConditioning",placement:"right",children:a.jsx(yi,{id:"negativePrompt",name:"negativePrompt",ref:t,value:e,placeholder:i("parameters.negativePromptPlaceholder"),onChange:c,resize:"vertical",fontSize:"sm",minH:16,...h&&{onKeyDown:d}})})}),!n&&h&&a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(D0,{onClick:o})})]})},kA=l.memo(gue),vue=me([we],({generation:e})=>({prompt:e.positivePrompt}),{memoizeOptions:{resultEqualityCheck:Nn}}),bue=()=>{const e=le(),{prompt:t}=H(vue),n=l.useRef(null),{isOpen:r,onClose:o,onOpen:s}=hs(),{t:i}=Q(),c=l.useCallback(m=>{e($d(m.target.value))},[e]);_t("alt+a",()=>{var m;(m=n.current)==null||m.focus()},[]);const d=l.useCallback(m=>{if(!n.current)return;const g=n.current.selectionStart;if(g===void 0)return;let b=t.slice(0,g);b[b.length-1]!=="<"&&(b+="<"),b+=`${m}>`;const y=b.length;b+=t.slice(g),ls.flushSync(()=>{e($d(b))}),n.current.selectionStart=y,n.current.selectionEnd=y,o()},[e,o,t]),p=Pn("embedding").isFeatureEnabled,h=l.useCallback(m=>{p&&m.key==="<"&&s()},[s,p]);return a.jsxs(Le,{position:"relative",children:[a.jsx(Vn,{children:a.jsx(T0,{isOpen:r,onClose:o,onSelect:d,children:a.jsx(kn,{feature:"paramPositiveConditioning",placement:"right",children:a.jsx(yi,{id:"prompt",name:"prompt",ref:n,value:t,placeholder:i("parameters.positivePromptPlaceholder"),onChange:c,onKeyDown:h,resize:"vertical",minH:32})})})}),!r&&p&&a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(D0,{onClick:s})})]})},jA=l.memo(bue);function xue(){const e=H(o=>o.sdxl.shouldConcatSDXLStylePrompt),t=le(),{t:n}=Q(),r=l.useCallback(()=>{t(LT(!e))},[t,e]);return a.jsx(rt,{"aria-label":n("sdxl.concatPromptStyle"),tooltip:n("sdxl.concatPromptStyle"),variant:"outline",isChecked:e,onClick:r,icon:a.jsx(XM,{}),size:"xs",sx:{position:"absolute",insetInlineEnd:1,top:6,border:"none",color:e?"accent.500":"base.500",_hover:{bg:"none"}}})}const z_={position:"absolute",bg:"none",w:"full",minH:2,borderRadius:0,borderLeft:"none",borderRight:"none",zIndex:2,maskImage:"radial-gradient(circle at center, black, black 65%, black 30%, black 15%, transparent)"};function _A(){return a.jsxs(N,{children:[a.jsx(Le,{as:Ar.div,initial:{scaleX:0,borderWidth:0,display:"none"},animate:{display:["block","block","block","none"],scaleX:[0,.25,.5,1],borderWidth:[0,3,3,0],transition:{duration:.37,times:[0,.25,.5,1]}},sx:{top:"1px",borderTop:"none",borderColor:"base.400",...z_,_dark:{borderColor:"accent.500"}}}),a.jsx(Le,{as:Ar.div,initial:{opacity:0,scale:0},animate:{opacity:[0,1,1,1],scale:[0,.75,1.5,1],transition:{duration:.42,times:[0,.25,.5,1]}},exit:{opacity:0,scale:0},sx:{zIndex:3,position:"absolute",left:"48%",top:"3px",p:1,borderRadius:4,bg:"accent.400",color:"base.50",_dark:{bg:"accent.500"}},children:a.jsx(XM,{size:12})}),a.jsx(Le,{as:Ar.div,initial:{scaleX:0,borderWidth:0,display:"none"},animate:{display:["block","block","block","none"],scaleX:[0,.25,.5,1],borderWidth:[0,3,3,0],transition:{duration:.37,times:[0,.25,.5,1]}},sx:{top:"17px",borderBottom:"none",borderColor:"base.400",...z_,_dark:{borderColor:"accent.500"}}})]})}const yue=me([we],({sdxl:e})=>{const{negativeStylePrompt:t,shouldConcatSDXLStylePrompt:n}=e;return{prompt:t,shouldConcatSDXLStylePrompt:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Cue=()=>{const e=le(),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=hs(),{t:s}=Q(),{prompt:i,shouldConcatSDXLStylePrompt:c}=H(yue),d=l.useCallback(g=>{e(Fd(g.target.value))},[e]),p=l.useCallback(g=>{if(!t.current)return;const b=t.current.selectionStart;if(b===void 0)return;let y=i.slice(0,b);y[y.length-1]!=="<"&&(y+="<"),y+=`${g}>`;const x=y.length;y+=i.slice(b),ls.flushSync(()=>{e(Fd(y))}),t.current.selectionStart=x,t.current.selectionEnd=x,r()},[e,r,i]),h=Pn("embedding").isFeatureEnabled,m=l.useCallback(g=>{h&&g.key==="<"&&o()},[o,h]);return a.jsxs(Le,{position:"relative",children:[a.jsx(So,{children:c&&a.jsx(Le,{sx:{position:"absolute",left:"3",w:"94%",top:"-17px"},children:a.jsx(_A,{})})}),a.jsx(Vn,{children:a.jsx(T0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(yi,{id:"prompt",name:"prompt",ref:t,value:i,placeholder:s("sdxl.negStylePrompt"),onChange:d,onKeyDown:m,resize:"vertical",fontSize:"sm",minH:16})})}),!n&&h&&a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(D0,{onClick:o})})]})},wue=l.memo(Cue),Sue=me([we],({sdxl:e})=>{const{positiveStylePrompt:t,shouldConcatSDXLStylePrompt:n}=e;return{prompt:t,shouldConcatSDXLStylePrompt:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),kue=()=>{const e=le(),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=hs(),{t:s}=Q(),{prompt:i,shouldConcatSDXLStylePrompt:c}=H(Sue),d=l.useCallback(g=>{e(zd(g.target.value))},[e]),p=l.useCallback(g=>{if(!t.current)return;const b=t.current.selectionStart;if(b===void 0)return;let y=i.slice(0,b);y[y.length-1]!=="<"&&(y+="<"),y+=`${g}>`;const x=y.length;y+=i.slice(b),ls.flushSync(()=>{e(zd(y))}),t.current.selectionStart=x,t.current.selectionEnd=x,r()},[e,r,i]),h=Pn("embedding").isFeatureEnabled,m=l.useCallback(g=>{h&&g.key==="<"&&o()},[o,h]);return a.jsxs(Le,{position:"relative",children:[a.jsx(So,{children:c&&a.jsx(Le,{sx:{position:"absolute",left:"3",w:"94%",top:"-17px"},children:a.jsx(_A,{})})}),a.jsx(Vn,{children:a.jsx(T0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(yi,{id:"prompt",name:"prompt",ref:t,value:i,placeholder:s("sdxl.posStylePrompt"),onChange:d,onKeyDown:m,resize:"vertical",minH:16})})}),!n&&h&&a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(D0,{onClick:o})})]})},jue=l.memo(kue);function J2(){return a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(jA,{}),a.jsx(xue,{}),a.jsx(jue,{}),a.jsx(kA,{}),a.jsx(wue,{})]})}const vl=()=>{const{isRefinerAvailable:e}=aa(Yx,{selectFromResult:({data:t})=>({isRefinerAvailable:t?t.ids.length>0:!1})});return e},_ue=me([we],({sdxl:e,ui:t,hotkeys:n})=>{const{refinerCFGScale:r}=e,{shouldUseSliders:o}=t,{shift:s}=n;return{refinerCFGScale:r,shouldUseSliders:o,shift:s}},Ie),Iue=()=>{const{refinerCFGScale:e,shouldUseSliders:t,shift:n}=H(_ue),r=vl(),o=le(),{t:s}=Q(),i=l.useCallback(d=>o(tb(d)),[o]),c=l.useCallback(()=>o(tb(7)),[o]);return t?a.jsx(It,{label:s("sdxl.cfgScale"),step:n?.1:.5,min:1,max:20,onChange:i,handleReset:c,value:e,sliderNumberInputProps:{max:200},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!r}):a.jsx(_a,{label:s("sdxl.cfgScale"),step:.5,min:1,max:200,onChange:i,value:e,isInteger:!1,numberInputFieldProps:{textAlign:"center"},isDisabled:!r})},Pue=l.memo(Iue),Eue=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=zT.safeParse({base_model:n,model_name:o,model_type:r});if(!s.success){t.error({mainModelId:e,errors:s.error.format()},"Failed to parse main model id");return}return s.data},Mue=me(we,e=>({model:e.sdxl.refinerModel}),Ie),Oue=()=>{const e=le(),t=Pn("syncModels").isFeatureEnabled,{model:n}=H(Mue),{t:r}=Q(),{data:o,isLoading:s}=aa(Yx),i=l.useMemo(()=>{if(!o)return[];const p=[];return to(o.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p},[o]),c=l.useMemo(()=>(o==null?void 0:o.entities[`${n==null?void 0:n.base_model}/main/${n==null?void 0:n.model_name}`])??null,[o==null?void 0:o.entities,n]),d=l.useCallback(p=>{if(!p)return;const h=Eue(p);h&&e(WI(h))},[e]);return s?a.jsx(sr,{label:r("sdxl.refinermodel"),placeholder:r("sdxl.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(sr,{tooltip:c==null?void 0:c.description,label:r("sdxl.refinermodel"),value:c==null?void 0:c.id,placeholder:i.length>0?r("sdxl.selectAModel"):r("sdxl.noModelsAvailable"),data:i,error:i.length===0,disabled:i.length===0,onChange:d,w:"100%"}),t&&a.jsx(Le,{mt:7,children:a.jsx(Ku,{iconMode:!0})})]})},Aue=l.memo(Oue),Rue=me([we],({sdxl:e,hotkeys:t})=>{const{refinerNegativeAestheticScore:n}=e,{shift:r}=t;return{refinerNegativeAestheticScore:n,shift:r}},Ie),Due=()=>{const{refinerNegativeAestheticScore:e,shift:t}=H(Rue),n=vl(),r=le(),{t:o}=Q(),s=l.useCallback(c=>r(rb(c)),[r]),i=l.useCallback(()=>r(rb(2.5)),[r]);return a.jsx(It,{label:o("sdxl.negAestheticScore"),step:t?.1:.5,min:1,max:10,onChange:s,handleReset:i,value:e,sliderNumberInputProps:{max:10},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},Tue=l.memo(Due),Nue=me([we],({sdxl:e,hotkeys:t})=>{const{refinerPositiveAestheticScore:n}=e,{shift:r}=t;return{refinerPositiveAestheticScore:n,shift:r}},Ie),$ue=()=>{const{refinerPositiveAestheticScore:e,shift:t}=H(Nue),n=vl(),r=le(),{t:o}=Q(),s=l.useCallback(c=>r(nb(c)),[r]),i=l.useCallback(()=>r(nb(6)),[r]);return a.jsx(It,{label:o("sdxl.posAestheticScore"),step:t?.1:.5,min:1,max:10,onChange:s,handleReset:i,value:e,sliderNumberInputProps:{max:10},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},Lue=l.memo($ue),zue=me(we,({ui:e,sdxl:t})=>{const{refinerScheduler:n}=t,{favoriteSchedulers:r}=e,o=To(hg,(s,i)=>({value:i,label:s,group:r.includes(i)?"Favorites":void 0})).sort((s,i)=>s.label.localeCompare(i.label));return{refinerScheduler:n,data:o}},Ie),Fue=()=>{const e=le(),{t}=Q(),{refinerScheduler:n,data:r}=H(zue),o=vl(),s=l.useCallback(i=>{i&&e(VI(i))},[e]);return a.jsx(sr,{w:"100%",label:t("sdxl.scheduler"),value:n,data:r,onChange:s,disabled:!o})},Bue=l.memo(Fue),Hue=me([we],({sdxl:e})=>{const{refinerStart:t}=e;return{refinerStart:t}},Ie),Wue=()=>{const{refinerStart:e}=H(Hue),t=le(),n=vl(),r=l.useCallback(i=>t(ob(i)),[t]),{t:o}=Q(),s=l.useCallback(()=>t(ob(.8)),[t]);return a.jsx(It,{label:o("sdxl.refinerStart"),step:.01,min:0,max:1,onChange:r,handleReset:s,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},Vue=l.memo(Wue),Uue=me([we],({sdxl:e,ui:t})=>{const{refinerSteps:n}=e,{shouldUseSliders:r}=t;return{refinerSteps:n,shouldUseSliders:r}},Ie),Gue=()=>{const{refinerSteps:e,shouldUseSliders:t}=H(Uue),n=vl(),r=le(),{t:o}=Q(),s=l.useCallback(c=>{r(eb(c))},[r]),i=l.useCallback(()=>{r(eb(20))},[r]);return t?a.jsx(It,{label:o("sdxl.steps"),min:1,max:100,step:1,onChange:s,handleReset:i,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:500},isDisabled:!n}):a.jsx(_a,{label:o("sdxl.steps"),min:1,max:500,step:1,onChange:s,value:e,numberInputFieldProps:{textAlign:"center"},isDisabled:!n})},que=l.memo(Gue);function Kue(){const e=H(s=>s.sdxl.shouldUseSDXLRefiner),t=vl(),n=le(),{t:r}=Q(),o=l.useCallback(s=>{n(FT(s.target.checked))},[n]);return a.jsx(_r,{label:r("sdxl.useRefiner"),isChecked:e,onChange:o,isDisabled:!t})}const Que=me(we,e=>{const{shouldUseSDXLRefiner:t}=e.sdxl,{shouldUseSliders:n}=e.ui;return{activeLabel:t?"Enabled":void 0,shouldUseSliders:n}},Ie),Xue=()=>{const{activeLabel:e,shouldUseSliders:t}=H(Que),{t:n}=Q();return vl()?a.jsx(No,{label:n("sdxl.refiner"),activeLabel:e,children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(Kue,{}),a.jsx(Aue,{}),a.jsxs(N,{gap:2,flexDirection:t?"column":"row",children:[a.jsx(que,{}),a.jsx(Pue,{})]}),a.jsx(Bue,{}),a.jsx(Lue,{}),a.jsx(Tue,{}),a.jsx(Vue,{})]})}):a.jsx(No,{label:n("sdxl.refiner"),activeLabel:e,children:a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(je,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:n("models.noRefinerModelsInstalled")})})})},Z2=l.memo(Xue),Yue=me([we],({generation:e,config:t,ui:n,hotkeys:r})=>{const{initial:o,min:s,sliderMax:i,inputMax:c}=t.sd.guidance,{cfgScale:d}=e,{shouldUseSliders:p}=n,{shift:h}=r;return{cfgScale:d,initial:o,min:s,sliderMax:i,inputMax:c,shouldUseSliders:p,shift:h}},Ie),Jue=()=>{const{cfgScale:e,initial:t,min:n,sliderMax:r,inputMax:o,shouldUseSliders:s,shift:i}=H(Yue),c=le(),{t:d}=Q(),p=l.useCallback(m=>c(Wh(m)),[c]),h=l.useCallback(()=>c(Wh(t)),[c,t]);return s?a.jsx(kn,{feature:"paramCFGScale",children:a.jsx(It,{label:d("parameters.cfgScale"),step:i?.1:.5,min:n,max:r,onChange:p,handleReset:h,value:e,sliderNumberInputProps:{max:o},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1})}):a.jsx(kn,{feature:"paramCFGScale",children:a.jsx(_a,{label:d("parameters.cfgScale"),step:.5,min:n,max:o,onChange:p,value:e,isInteger:!1,numberInputFieldProps:{textAlign:"center"}})})},Na=l.memo(Jue),Zue=me(we,e=>({model:e.generation.model}),Ie),ede=()=>{const e=le(),{t}=Q(),{model:n}=H(Zue),r=Pn("syncModels").isFeatureEnabled,{data:o,isLoading:s}=aa(iS),{data:i,isLoading:c}=Jd(iS),d=H(lo),p=l.useMemo(()=>{if(!o)return[];const g=[];return to(o.entities,(b,y)=>{b&&g.push({value:y,label:b.model_name,group:xr[b.base_model]})}),to(i==null?void 0:i.entities,(b,y)=>{!b||d==="unifiedCanvas"||d==="img2img"||g.push({value:y,label:b.model_name,group:xr[b.base_model]})}),g},[o,i,d]),h=l.useMemo(()=>((o==null?void 0:o.entities[`${n==null?void 0:n.base_model}/main/${n==null?void 0:n.model_name}`])||(i==null?void 0:i.entities[`${n==null?void 0:n.base_model}/onnx/${n==null?void 0:n.model_name}`]))??null,[o==null?void 0:o.entities,n,i==null?void 0:i.entities]),m=l.useCallback(g=>{if(!g)return;const b=R0(g);b&&e(X1(b))},[e]);return s||c?a.jsx(sr,{label:t("modelManager.model"),placeholder:"Loading...",disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:3,children:[a.jsx(kn,{feature:"paramModel",children:a.jsx(sr,{tooltip:h==null?void 0:h.description,label:t("modelManager.model"),value:h==null?void 0:h.id,placeholder:p.length>0?"Select a model":"No models available",data:p,error:p.length===0,disabled:p.length===0,onChange:m,w:"100%"})}),r&&a.jsx(Le,{mt:6,children:a.jsx(Ku,{iconMode:!0})})]})},tde=l.memo(ede),nde=me(we,({generation:e})=>{const{model:t,vae:n}=e;return{model:t,vae:n}},Ie),rde=()=>{const e=le(),{t}=Q(),{model:n,vae:r}=H(nde),{data:o}=iP(),s=l.useMemo(()=>{if(!o)return[];const d=[{value:"default",label:"Default",group:"Default"}];return to(o.entities,(p,h)=>{if(!p)return;const m=(n==null?void 0:n.base_model)!==p.base_model;d.push({value:h,label:p.model_name,group:xr[p.base_model],disabled:m,tooltip:m?`Incompatible base model: ${p.base_model}`:void 0})}),d.sort((p,h)=>p.disabled&&!h.disabled?1:-1)},[o,n==null?void 0:n.base_model]),i=l.useMemo(()=>(o==null?void 0:o.entities[`${r==null?void 0:r.base_model}/vae/${r==null?void 0:r.model_name}`])??null,[o==null?void 0:o.entities,r]),c=l.useCallback(d=>{if(!d||d==="default"){e(Vc(null));return}const p=vA(d);p&&e(Vc(p))},[e]);return a.jsx(kn,{feature:"paramVAE",children:a.jsx(sr,{itemComponent:pl,tooltip:i==null?void 0:i.description,label:t("modelManager.vae"),value:(i==null?void 0:i.id)??"default",placeholder:"Default",data:s,onChange:c,disabled:s.length===0,clearable:!0})})},ode=l.memo(rde),sde=me([uP,da],(e,t)=>{const{scheduler:n}=t,{favoriteSchedulers:r}=e,o=To(hg,(s,i)=>({value:i,label:s,group:r.includes(i)?"Favorites":void 0})).sort((s,i)=>s.label.localeCompare(i.label));return{scheduler:n,data:o}},Ie),ade=()=>{const e=le(),{t}=Q(),{scheduler:n,data:r}=H(sde),o=l.useCallback(s=>{s&&e(Y1(s))},[e]);return a.jsx(kn,{feature:"paramScheduler",children:a.jsx(sr,{label:t("parameters.scheduler"),value:n,data:r,onChange:o})})},ide=l.memo(ade),lde=me(we,({generation:e})=>{const{vaePrecision:t}=e;return{vaePrecision:t}},Ie),cde=["fp16","fp32"],ude=()=>{const{t:e}=Q(),t=le(),{vaePrecision:n}=H(lde),r=l.useCallback(o=>{o&&t(BT(o))},[t]);return a.jsx(kn,{feature:"paramVAEPrecision",children:a.jsx(Dr,{label:e("modelManager.vaePrecision"),value:n,data:cde,onChange:r})})},dde=l.memo(ude),fde=()=>{const e=Pn("vae").isFeatureEnabled;return a.jsxs(N,{gap:3,w:"full",flexWrap:e?"wrap":"nowrap",children:[a.jsx(Le,{w:"full",children:a.jsx(tde,{})}),a.jsx(Le,{w:"full",children:a.jsx(ide,{})}),e&&a.jsxs(N,{w:"full",gap:3,children:[a.jsx(ode,{}),a.jsx(dde,{})]})]})},$a=l.memo(fde),IA=[{name:fn.t("parameters.aspectRatioFree"),value:null},{name:"2:3",value:2/3},{name:"16:9",value:16/9},{name:"1:1",value:1/1}],PA=IA.map(e=>e.value);function EA(){const e=H(s=>s.generation.aspectRatio),t=le(),n=H(s=>s.generation.shouldFitToWidthHeight),r=H(lo),o=l.useCallback(s=>{t(Ys(s.value)),t(Zd(!1))},[t]);return a.jsx(Hn,{isAttached:!0,children:IA.map(s=>a.jsx(Dt,{size:"sm",isChecked:e===s.value,isDisabled:r==="img2img"?!n:!1,onClick:o.bind(null,s),children:s.name},s.name))})}const pde=me([we],({generation:e,hotkeys:t,config:n})=>{const{min:r,sliderMax:o,inputMax:s,fineStep:i,coarseStep:c}=n.sd.height,{model:d,height:p}=e,{aspectRatio:h}=e,m=t.shift?i:c;return{model:d,height:p,min:r,sliderMax:o,inputMax:s,step:m,aspectRatio:h}},Ie),hde=e=>{const{model:t,height:n,min:r,sliderMax:o,inputMax:s,step:i,aspectRatio:c}=H(pde),d=le(),{t:p}=Q(),h=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,m=l.useCallback(b=>{if(d(Vl(b)),c){const y=Ro(b*c,8);d(Wl(y))}},[d,c]),g=l.useCallback(()=>{if(d(Vl(h)),c){const b=Ro(h*c,8);d(Wl(b))}},[d,h,c]);return a.jsx(It,{label:p("parameters.height"),value:n,min:r,step:i,max:o,onChange:m,handleReset:g,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s},...e})},mde=l.memo(hde),gde=me([we],({generation:e,hotkeys:t,config:n})=>{const{min:r,sliderMax:o,inputMax:s,fineStep:i,coarseStep:c}=n.sd.width,{model:d,width:p,aspectRatio:h}=e,m=t.shift?i:c;return{model:d,width:p,min:r,sliderMax:o,inputMax:s,step:m,aspectRatio:h}},Ie),vde=e=>{const{model:t,width:n,min:r,sliderMax:o,inputMax:s,step:i,aspectRatio:c}=H(gde),d=le(),{t:p}=Q(),h=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,m=l.useCallback(b=>{if(d(Wl(b)),c){const y=Ro(b/c,8);d(Vl(y))}},[d,c]),g=l.useCallback(()=>{if(d(Wl(h)),c){const b=Ro(h/c,8);d(Vl(b))}},[d,h,c]);return a.jsx(It,{label:p("parameters.width"),value:n,min:r,step:i,max:o,onChange:m,handleReset:g,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s},...e})},bde=l.memo(vde),xde=me([da,lo],(e,t)=>{const{shouldFitToWidthHeight:n,shouldLockAspectRatio:r,width:o,height:s}=e;return{activeTabName:t,shouldFitToWidthHeight:n,shouldLockAspectRatio:r,width:o,height:s}},Ie);function Eu(){const{t:e}=Q(),t=le(),{activeTabName:n,shouldFitToWidthHeight:r,shouldLockAspectRatio:o,width:s,height:i}=H(xde),c=l.useCallback(()=>{o?(t(Zd(!1)),PA.includes(s/i)?t(Ys(s/i)):t(Ys(null))):(t(Zd(!0)),t(Ys(s/i)))},[o,s,i,t]),d=l.useCallback(()=>{t(HT()),t(Ys(null)),o&&t(Ys(i/s))},[t,o,s,i]);return a.jsxs(N,{sx:{gap:2,p:4,borderRadius:4,flexDirection:"column",w:"full",bg:"base.150",_dark:{bg:"base.750"}},children:[a.jsx(kn,{feature:"paramRatio",children:a.jsxs(Vn,{as:N,flexDir:"row",alignItems:"center",gap:2,children:[a.jsx(yr,{children:e("parameters.aspectRatio")}),a.jsx(Pi,{}),a.jsx(EA,{}),a.jsx(rt,{tooltip:e("ui.swapSizes"),"aria-label":e("ui.swapSizes"),size:"sm",icon:a.jsx(P8,{}),fontSize:20,isDisabled:n==="img2img"?!r:!1,onClick:d}),a.jsx(rt,{tooltip:e("ui.lockRatio"),"aria-label":e("ui.lockRatio"),size:"sm",icon:a.jsx(YM,{}),isChecked:o,isDisabled:n==="img2img"?!r:!1,onClick:c})]})}),a.jsx(N,{gap:2,alignItems:"center",children:a.jsxs(N,{gap:2,flexDirection:"column",width:"full",children:[a.jsx(bde,{isDisabled:n==="img2img"?!r:!1}),a.jsx(mde,{isDisabled:n==="img2img"?!r:!1})]})})]})}const yde=me([we],({generation:e,config:t,ui:n,hotkeys:r})=>{const{initial:o,min:s,sliderMax:i,inputMax:c,fineStep:d,coarseStep:p}=t.sd.steps,{steps:h}=e,{shouldUseSliders:m}=n,g=r.shift?d:p;return{steps:h,initial:o,min:s,sliderMax:i,inputMax:c,step:g,shouldUseSliders:m}},Ie),Cde=()=>{const{steps:e,initial:t,min:n,sliderMax:r,inputMax:o,step:s,shouldUseSliders:i}=H(yde),c=le(),{t:d}=Q(),p=l.useCallback(g=>{c(Vh(g))},[c]),h=l.useCallback(()=>{c(Vh(t))},[c,t]),m=l.useCallback(()=>{c(Qx())},[c]);return i?a.jsx(kn,{feature:"paramSteps",children:a.jsx(It,{label:d("parameters.steps"),min:n,max:r,step:s,onChange:p,handleReset:h,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:o}})}):a.jsx(kn,{feature:"paramSteps",children:a.jsx(_a,{label:d("parameters.steps"),min:n,max:o,step:s,onChange:p,value:e,numberInputFieldProps:{textAlign:"center"},onBlur:m})})},La=l.memo(Cde);function MA(){const e=le(),t=H(o=>o.generation.shouldFitToWidthHeight),n=l.useCallback(o=>{e(WT(o.target.checked))},[e]),{t:r}=Q();return a.jsx(_r,{label:r("parameters.imageFit"),isChecked:t,onChange:n})}function wde(){const e=H(i=>i.generation.seed),t=H(i=>i.generation.shouldRandomizeSeed),n=H(i=>i.generation.shouldGenerateVariations),{t:r}=Q(),o=le(),s=l.useCallback(i=>o(Hh(i)),[o]);return a.jsx(_a,{label:r("parameters.seed"),step:1,precision:0,flexGrow:1,min:dP,max:fP,isDisabled:t,isInvalid:e<0&&n,onChange:s,value:e})}const Sde=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function kde(){const e=le(),t=H(o=>o.generation.shouldRandomizeSeed),{t:n}=Q(),r=l.useCallback(()=>e(Hh(Sde(dP,fP))),[e]);return a.jsx(rt,{size:"sm",isDisabled:t,"aria-label":n("parameters.shuffle"),tooltip:n("parameters.shuffle"),onClick:r,icon:a.jsx(Gee,{})})}const jde=()=>{const e=le(),{t}=Q(),n=H(o=>o.generation.shouldRandomizeSeed),r=l.useCallback(o=>e(VT(o.target.checked)),[e]);return a.jsx(_r,{label:t("common.random"),isChecked:n,onChange:r})},_de=l.memo(jde),Ide=()=>a.jsx(kn,{feature:"paramSeed",children:a.jsxs(N,{sx:{gap:3,alignItems:"flex-end"},children:[a.jsx(wde,{}),a.jsx(kde,{}),a.jsx(_de,{})]})}),za=l.memo(Ide),OA=De((e,t)=>a.jsxs(N,{ref:t,sx:{flexDir:"column",gap:2,bg:"base.100",px:4,pt:2,pb:4,borderRadius:"base",_dark:{bg:"base.750"}},children:[a.jsx(je,{fontSize:"sm",fontWeight:"bold",sx:{color:"base.600",_dark:{color:"base.300"}},children:e.label}),e.children]}));OA.displayName="SubSettingsWrapper";const Mu=l.memo(OA),Pde=me([we],({sdxl:e})=>{const{sdxlImg2ImgDenoisingStrength:t}=e;return{sdxlImg2ImgDenoisingStrength:t}},Ie),Ede=()=>{const{sdxlImg2ImgDenoisingStrength:e}=H(Pde),t=le(),{t:n}=Q(),r=l.useCallback(s=>t(lS(s)),[t]),o=l.useCallback(()=>{t(lS(.7))},[t]);return a.jsx(kn,{feature:"paramDenoisingStrength",children:a.jsx(Mu,{children:a.jsx(It,{label:n("sdxl.denoisingStrength"),step:.01,min:0,max:1,onChange:r,handleReset:o,value:e,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0})})})},AA=l.memo(Ede),Mde=me([uP,da],(e,t)=>{const{shouldUseSliders:n}=e,{shouldRandomizeSeed:r}=t;return{shouldUseSliders:n,activeLabel:r?void 0:"Manual Seed"}},Ie),Ode=()=>{const{t:e}=Q(),{shouldUseSliders:t,activeLabel:n}=H(Mde);return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}),a.jsx(AA,{}),a.jsx(MA,{})]})})},Ade=l.memo(Ode),Rde=()=>a.jsxs(a.Fragment,{children:[a.jsx(J2,{}),a.jsx(Ade,{}),a.jsx(Z2,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(Yu,{})]}),Dde=l.memo(Rde),eC=()=>{const{t:e}=Q(),t=H(i=>i.generation.shouldRandomizeSeed),n=H(i=>i.generation.iterations),r=l.useMemo(()=>n===1?e("parameters.iterationsWithCount_one",{count:1}):e("parameters.iterationsWithCount_other",{count:n}),[n,e]),o=l.useMemo(()=>e(t?"parameters.randomSeed":"parameters.manualSeed"),[t,e]);return{iterationsAndSeedLabel:l.useMemo(()=>[r,o].join(", "),[r,o]),iterationsLabel:r,seedLabel:o}},Tde=()=>{const{t:e}=Q(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=eC();return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsx(N,{sx:{flexDirection:"column",gap:3},children:t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]})})})},RA=l.memo(Tde),Nde=()=>a.jsxs(a.Fragment,{children:[a.jsx(J2,{}),a.jsx(RA,{}),a.jsx(Z2,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(Yu,{})]}),$de=l.memo(Nde),Lde=()=>{const e=le(),t=H(s=>s.generation.canvasCoherenceMode),{t:n}=Q(),r=l.useMemo(()=>[{label:n("parameters.unmasked"),value:"unmasked"},{label:n("unifiedCanvas.mask"),value:"mask"},{label:n("parameters.maskEdge"),value:"edge"}],[n]),o=l.useCallback(s=>{s&&e(UT(s))},[e]);return a.jsx(kn,{feature:"compositingCoherenceMode",children:a.jsx(Dr,{label:n("parameters.coherenceMode"),data:r,value:t,onChange:o})})},zde=l.memo(Lde),Fde=()=>{const e=le(),t=H(s=>s.generation.canvasCoherenceSteps),{t:n}=Q(),r=l.useCallback(s=>{e(cS(s))},[e]),o=l.useCallback(()=>{e(cS(20))},[e]);return a.jsx(kn,{feature:"compositingCoherenceSteps",children:a.jsx(It,{label:n("parameters.coherenceSteps"),min:1,max:100,step:1,sliderNumberInputProps:{max:999},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})},Bde=l.memo(Fde),Hde=()=>{const e=le(),t=H(s=>s.generation.canvasCoherenceStrength),{t:n}=Q(),r=l.useCallback(s=>{e(uS(s))},[e]),o=l.useCallback(()=>{e(uS(.3))},[e]);return a.jsx(kn,{feature:"compositingStrength",children:a.jsx(It,{label:n("parameters.coherenceStrength"),min:0,max:1,step:.01,sliderNumberInputProps:{max:999},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})},Wde=l.memo(Hde);function Vde(){const e=le(),t=H(s=>s.generation.maskBlur),{t:n}=Q(),r=l.useCallback(s=>{e(dS(s))},[e]),o=l.useCallback(()=>{e(dS(16))},[e]);return a.jsx(kn,{feature:"compositingBlur",children:a.jsx(It,{label:n("parameters.maskBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})}const Ude=[{label:"Box Blur",value:"box"},{label:"Gaussian Blur",value:"gaussian"}];function Gde(){const e=H(o=>o.generation.maskBlurMethod),t=le(),{t:n}=Q(),r=l.useCallback(o=>{o&&t(GT(o))},[t]);return a.jsx(kn,{feature:"compositingBlurMethod",children:a.jsx(Dr,{value:e,onChange:r,label:n("parameters.maskBlurMethod"),data:Ude})})}const qde=()=>{const{t:e}=Q();return a.jsx(No,{label:e("parameters.compositingSettingsHeader"),children:a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsxs(Mu,{label:e("parameters.coherencePassHeader"),children:[a.jsx(zde,{}),a.jsx(Bde,{}),a.jsx(Wde,{})]}),a.jsx(io,{}),a.jsxs(Mu,{label:e("parameters.maskAdjustmentsHeader"),children:[a.jsx(Vde,{}),a.jsx(Gde,{})]})]})})},DA=l.memo(qde),Kde=me([we],({generation:e})=>{const{infillMethod:t}=e;return{infillMethod:t}},Ie),Qde=()=>{const e=le(),{infillMethod:t}=H(Kde),{data:n,isLoading:r}=DI(),o=n==null?void 0:n.infill_methods,{t:s}=Q(),i=l.useCallback(c=>{e(qT(c))},[e]);return a.jsx(kn,{feature:"infillMethod",children:a.jsx(Dr,{disabled:(o==null?void 0:o.length)===0,placeholder:r?"Loading...":void 0,label:s("parameters.infillMethod"),value:t,data:o??[],onChange:i})})},Xde=l.memo(Qde),Yde=me([da],e=>{const{infillPatchmatchDownscaleSize:t,infillMethod:n}=e;return{infillPatchmatchDownscaleSize:t,infillMethod:n}},Ie),Jde=()=>{const e=le(),{infillPatchmatchDownscaleSize:t,infillMethod:n}=H(Yde),{t:r}=Q(),o=l.useCallback(i=>{e(fS(i))},[e]),s=l.useCallback(()=>{e(fS(2))},[e]);return a.jsx(It,{isDisabled:n!=="patchmatch",label:r("parameters.patchmatchDownScaleSize"),min:1,max:10,value:t,onChange:o,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})},Zde=l.memo(Jde),efe=me([da],e=>{const{infillTileSize:t,infillMethod:n}=e;return{infillTileSize:t,infillMethod:n}},Ie),tfe=()=>{const e=le(),{infillTileSize:t,infillMethod:n}=H(efe),{t:r}=Q(),o=l.useCallback(i=>{e(pS(i))},[e]),s=l.useCallback(()=>{e(pS(32))},[e]);return a.jsx(It,{isDisabled:n!=="tile",label:r("parameters.tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:o,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})},nfe=l.memo(tfe),rfe=me([da],e=>{const{infillMethod:t}=e;return{infillMethod:t}},Ie);function ofe(){const{infillMethod:e}=H(rfe);return a.jsxs(N,{children:[e==="tile"&&a.jsx(nfe,{}),e==="patchmatch"&&a.jsx(Zde,{})]})}const Ir=e=>e.canvas,Vs=me([we],({canvas:e})=>e.batchIds.length>0||e.layerState.stagingArea.images.length>0),sfe=me([Ir],e=>{const{boundingBoxScaleMethod:t}=e;return{boundingBoxScale:t}},Ie),afe=()=>{const e=le(),{boundingBoxScale:t}=H(sfe),{t:n}=Q(),r=l.useCallback(o=>{e(KT(o))},[e]);return a.jsx(kn,{feature:"scaleBeforeProcessing",children:a.jsx(sr,{label:n("parameters.scaleBeforeProcessing"),data:QT,value:t,onChange:r})})},ife=l.memo(afe),lfe=me([da,Ir],(e,t)=>{const{scaledBoundingBoxDimensions:n,boundingBoxScaleMethod:r}=t,{model:o,aspectRatio:s}=e;return{model:o,scaledBoundingBoxDimensions:n,isManual:r==="manual",aspectRatio:s}},Ie),cfe=()=>{const e=le(),{model:t,isManual:n,scaledBoundingBoxDimensions:r,aspectRatio:o}=H(lfe),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=Q(),c=l.useCallback(p=>{let h=r.width;const m=Math.floor(p);o&&(h=Ro(m*o,64)),e(Qh({width:h,height:m}))},[o,e,r.width]),d=l.useCallback(()=>{let p=r.width;const h=Math.floor(s);o&&(p=Ro(h*o,64)),e(Qh({width:p,height:h}))},[o,e,s,r.width]);return a.jsx(It,{isDisabled:!n,label:i("parameters.scaledHeight"),min:64,max:1536,step:64,value:r.height,onChange:c,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},ufe=l.memo(cfe),dfe=me([Ir,da],(e,t)=>{const{boundingBoxScaleMethod:n,scaledBoundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,scaledBoundingBoxDimensions:r,aspectRatio:s,isManual:n==="manual"}},Ie),ffe=()=>{const e=le(),{model:t,isManual:n,scaledBoundingBoxDimensions:r,aspectRatio:o}=H(dfe),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=Q(),c=l.useCallback(p=>{const h=Math.floor(p);let m=r.height;o&&(m=Ro(h/o,64)),e(Qh({width:h,height:m}))},[o,e,r.height]),d=l.useCallback(()=>{const p=Math.floor(s);let h=r.height;o&&(h=Ro(p/o,64)),e(Qh({width:p,height:h}))},[o,e,s,r.height]);return a.jsx(It,{isDisabled:!n,label:i("parameters.scaledWidth"),min:64,max:1536,step:64,value:r.width,onChange:c,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},pfe=l.memo(ffe),hfe=()=>{const{t:e}=Q();return a.jsx(No,{label:e("parameters.infillScalingHeader"),children:a.jsxs(N,{sx:{gap:2,flexDirection:"column"},children:[a.jsxs(Mu,{children:[a.jsx(Xde,{}),a.jsx(ofe,{})]}),a.jsx(io,{}),a.jsxs(Mu,{children:[a.jsx(ife,{}),a.jsx(pfe,{}),a.jsx(ufe,{})]})]})})},TA=l.memo(hfe),mfe=me([we,Vs],({canvas:e,generation:t},n)=>{const{boundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,boundingBoxDimensions:r,isStaging:n,aspectRatio:s}},Ie),gfe=()=>{const e=le(),{model:t,boundingBoxDimensions:n,isStaging:r,aspectRatio:o}=H(mfe),{t:s}=Q(),i=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,c=l.useCallback(p=>{if(e(na({...n,height:Math.floor(p)})),o){const h=Ro(p*o,64);e(na({width:h,height:Math.floor(p)}))}},[o,n,e]),d=l.useCallback(()=>{if(e(na({...n,height:Math.floor(i)})),o){const p=Ro(i*o,64);e(na({width:p,height:Math.floor(i)}))}},[o,n,e,i]);return a.jsx(It,{label:s("parameters.boundingBoxHeight"),min:64,max:1536,step:64,value:n.height,onChange:c,isDisabled:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},vfe=l.memo(gfe),bfe=me([we,Vs],({canvas:e,generation:t},n)=>{const{boundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,boundingBoxDimensions:r,isStaging:n,aspectRatio:s}},Ie),xfe=()=>{const e=le(),{model:t,boundingBoxDimensions:n,isStaging:r,aspectRatio:o}=H(bfe),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=Q(),c=l.useCallback(p=>{if(e(na({...n,width:Math.floor(p)})),o){const h=Ro(p/o,64);e(na({width:Math.floor(p),height:h}))}},[o,n,e]),d=l.useCallback(()=>{if(e(na({...n,width:Math.floor(s)})),o){const p=Ro(s/o,64);e(na({width:Math.floor(s),height:p}))}},[o,n,e,s]);return a.jsx(It,{label:i("parameters.boundingBoxWidth"),min:64,max:1536,step:64,value:n.width,onChange:c,isDisabled:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},yfe=l.memo(xfe),Cfe=me([da,Ir],(e,t)=>{const{shouldFitToWidthHeight:n,shouldLockAspectRatio:r}=e,{boundingBoxDimensions:o}=t;return{shouldFitToWidthHeight:n,shouldLockAspectRatio:r,boundingBoxDimensions:o}});function ug(){const e=le(),{t}=Q(),{shouldLockAspectRatio:n,boundingBoxDimensions:r}=H(Cfe),o=l.useCallback(()=>{n?(e(Zd(!1)),PA.includes(r.width/r.height)?e(Ys(r.width/r.height)):e(Ys(null))):(e(Zd(!0)),e(Ys(r.width/r.height)))},[n,r,e]),s=l.useCallback(()=>{e(XT()),e(Ys(null)),n&&e(Ys(r.height/r.width))},[e,n,r]);return a.jsxs(N,{sx:{gap:2,p:4,borderRadius:4,flexDirection:"column",w:"full",bg:"base.100",_dark:{bg:"base.750"}},children:[a.jsx(kn,{feature:"paramRatio",children:a.jsxs(Vn,{as:N,flexDir:"row",alignItems:"center",gap:2,children:[a.jsx(yr,{children:t("parameters.aspectRatio")}),a.jsx(Pi,{}),a.jsx(EA,{}),a.jsx(rt,{tooltip:t("ui.swapSizes"),"aria-label":t("ui.swapSizes"),size:"sm",icon:a.jsx(P8,{}),fontSize:20,onClick:s}),a.jsx(rt,{tooltip:t("ui.lockRatio"),"aria-label":t("ui.lockRatio"),size:"sm",icon:a.jsx(YM,{}),isChecked:n,onClick:o})]})}),a.jsx(yfe,{}),a.jsx(vfe,{})]})}const wfe=me(we,({ui:e,generation:t})=>{const{shouldUseSliders:n}=e,{shouldRandomizeSeed:r}=t;return{shouldUseSliders:n,activeLabel:r?void 0:"Manual Seed"}},Ie),Sfe=()=>{const{t:e}=Q(),{shouldUseSliders:t,activeLabel:n}=H(wfe);return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(ug,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(ug,{})]}),a.jsx(AA,{})]})})},kfe=l.memo(Sfe);function jfe(){return a.jsxs(a.Fragment,{children:[a.jsx(J2,{}),a.jsx(kfe,{}),a.jsx(Z2,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(TA,{}),a.jsx(DA,{}),a.jsx(Yu,{})]})}function tC(){return a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(jA,{}),a.jsx(kA,{})]})}function _fe(){const e=H(i=>i.generation.horizontalSymmetrySteps),t=H(i=>i.generation.steps),n=le(),{t:r}=Q(),o=l.useCallback(i=>{n(hS(i))},[n]),s=l.useCallback(()=>{n(hS(0))},[n]);return a.jsx(It,{label:r("parameters.hSymmetryStep"),value:e,onChange:o,min:0,max:t,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})}function Ife(){const e=H(i=>i.generation.verticalSymmetrySteps),t=H(i=>i.generation.steps),n=le(),{t:r}=Q(),o=l.useCallback(i=>{n(mS(i))},[n]),s=l.useCallback(()=>{n(mS(0))},[n]);return a.jsx(It,{label:r("parameters.vSymmetryStep"),value:e,onChange:o,min:0,max:t,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})}function Pfe(){const e=H(r=>r.generation.shouldUseSymmetry),t=le(),n=l.useCallback(r=>{t(YT(r.target.checked))},[t]);return a.jsx(_r,{label:"Enable Symmetry",isChecked:e,onChange:n})}const Efe=me(we,e=>({activeLabel:e.generation.shouldUseSymmetry?"Enabled":void 0}),Ie),Mfe=()=>{const{t:e}=Q(),{activeLabel:t}=H(Efe);return Pn("symmetry").isFeatureEnabled?a.jsx(No,{label:e("parameters.symmetry"),activeLabel:t,children:a.jsxs(N,{sx:{gap:2,flexDirection:"column"},children:[a.jsx(Pfe,{}),a.jsx(_fe,{}),a.jsx(Ife,{})]})}):null},nC=l.memo(Mfe),Ofe=me([we],({generation:e,hotkeys:t,config:n})=>{const{initial:r,min:o,sliderMax:s,inputMax:i,fineStep:c,coarseStep:d}=n.sd.img2imgStrength,{img2imgStrength:p}=e,h=t.shift?c:d;return{img2imgStrength:p,initial:r,min:o,sliderMax:s,inputMax:i,step:h}},Ie),Afe=()=>{const{img2imgStrength:e,initial:t,min:n,sliderMax:r,inputMax:o,step:s}=H(Ofe),i=le(),{t:c}=Q(),d=l.useCallback(h=>i(Uh(h)),[i]),p=l.useCallback(()=>{i(Uh(t))},[i,t]);return a.jsx(kn,{feature:"paramDenoisingStrength",children:a.jsx(Mu,{children:a.jsx(It,{label:`${c("parameters.denoisingStrength")}`,step:s,min:n,max:r,onChange:d,handleReset:p,value:e,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0,sliderNumberInputProps:{max:o}})})})},NA=l.memo(Afe),Rfe=()=>{const{t:e}=Q(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=eC();return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}),a.jsx(NA,{}),a.jsx(MA,{})]})})},Dfe=l.memo(Rfe),Tfe=()=>a.jsxs(a.Fragment,{children:[a.jsx(tC,{}),a.jsx(Dfe,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(nC,{}),a.jsx(Yu,{})]}),Nfe=l.memo(Tfe),$fe=me([we],({generation:e,hotkeys:t,config:n})=>{const{initial:r,min:o,sliderMax:s,inputMax:i,fineStep:c,coarseStep:d}=n.sd.hrfStrength,{hrfStrength:p,hrfEnabled:h}=e,m=t.shift?c:d;return{hrfStrength:p,initial:r,min:o,sliderMax:s,inputMax:i,step:m,hrfEnabled:h}},Ie),Lfe=()=>{const{hrfStrength:e,initial:t,min:n,sliderMax:r,step:o,hrfEnabled:s}=H($fe),i=le(),{t:c}=Q(),d=l.useCallback(()=>{i(Gh(t))},[i,t]),p=l.useCallback(h=>{i(Gh(h))},[i]);return a.jsx(Wn,{label:c("hrf.strengthTooltip"),placement:"right",hasArrow:!0,children:a.jsx(It,{label:c("parameters.denoisingStrength"),min:n,max:r,step:o,value:e,onChange:p,withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d,isDisabled:!s})})},zfe=l.memo(Lfe);function Ffe(){const e=le(),{t}=Q(),n=H(o=>o.generation.hrfEnabled),r=l.useCallback(o=>e(J1(o.target.checked)),[e]);return a.jsx(_r,{label:t("hrf.enableHrf"),isChecked:n,onChange:r,tooltip:t("hrf.enableHrfTooltip")})}const Bfe=me(we,({generation:e})=>{const{hrfMethod:t,hrfEnabled:n}=e;return{hrfMethod:t,hrfEnabled:n}},Ie),Hfe=["ESRGAN","bilinear"],Wfe=()=>{const e=le(),{t}=Q(),{hrfMethod:n,hrfEnabled:r}=H(Bfe),o=l.useCallback(s=>{s&&e(Z1(s))},[e]);return a.jsx(Dr,{label:t("hrf.upscaleMethod"),value:n,data:Hfe,onChange:o,disabled:!r})},Vfe=l.memo(Wfe),Ufe=me(we,e=>{const{hrfEnabled:t}=e.generation;return{hrfEnabled:t}},Ie);function Gfe(){const{t:e}=Q(),t=Pn("hrf").isFeatureEnabled,{hrfEnabled:n}=H(Ufe),r=l.useMemo(()=>{if(n)return e("common.on")},[e,n]);return t?a.jsx(No,{label:e("hrf.hrf"),activeLabel:r,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(Ffe,{}),a.jsx(zfe,{}),a.jsx(Vfe,{})]})}):null}const qfe=()=>a.jsxs(a.Fragment,{children:[a.jsx(tC,{}),a.jsx(RA,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(nC,{}),a.jsx(Gfe,{}),a.jsx(Yu,{})]}),Kfe=l.memo(qfe),Qfe=()=>{const{t:e}=Q(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=eC();return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(ug,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(ug,{})]}),a.jsx(NA,{})]})})},Xfe=l.memo(Qfe),Yfe=()=>a.jsxs(a.Fragment,{children:[a.jsx(tC,{}),a.jsx(Xfe,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(nC,{}),a.jsx(TA,{}),a.jsx(DA,{}),a.jsx(Yu,{})]}),Jfe=l.memo(Yfe),Zfe=()=>{const e=H(lo),t=H(n=>n.generation.model);return e==="txt2img"?a.jsx(Fh,{children:t&&t.base_model==="sdxl"?a.jsx($de,{}):a.jsx(Kfe,{})}):e==="img2img"?a.jsx(Fh,{children:t&&t.base_model==="sdxl"?a.jsx(Dde,{}):a.jsx(Nfe,{})}):e==="unifiedCanvas"?a.jsx(Fh,{children:t&&t.base_model==="sdxl"?a.jsx(jfe,{}):a.jsx(Jfe,{})}):null},epe=l.memo(Zfe),Fh=l.memo(e=>a.jsxs(N,{sx:{w:"full",h:"full",flexDir:"column",gap:2},children:[a.jsx(z8,{}),a.jsx(N,{layerStyle:"first",sx:{w:"full",h:"full",position:"relative",borderRadius:"base",p:2},children:a.jsx(N,{sx:{w:"full",h:"full",position:"relative"},children:a.jsx(Le,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0},children:a.jsx(v0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:800,theme:"os-theme-dark"},overflow:{x:"hidden"}},children:a.jsx(N,{sx:{gap:2,flexDirection:"column",h:"full",w:"full"},children:e.children})})})})})]}));Fh.displayName="ParametersPanelWrapper";const tpe=me([we],e=>{const{initialImage:t}=e.generation;return{initialImage:t,isResetButtonDisabled:!t}},Ie),npe=()=>{const{initialImage:e}=H(tpe),{currentData:t}=Rs((e==null?void 0:e.imageName)??zs.skipToken),n=l.useMemo(()=>{if(t)return{id:"initial-image",payloadType:"IMAGE_DTO",payload:{imageDTO:t}}},[t]),r=l.useMemo(()=>({id:"initial-image",actionType:"SET_INITIAL_IMAGE"}),[]);return a.jsx(ll,{imageDTO:t,droppableData:r,draggableData:n,isUploadDisabled:!0,fitContainer:!0,dropLabel:"Set as Initial Image",noContentFallback:a.jsx(eo,{label:"No initial image selected"}),dataTestId:"initial-image"})},rpe=l.memo(npe),ope=me([we],e=>{const{initialImage:t}=e.generation;return{isResetButtonDisabled:!t}},Ie),spe={type:"SET_INITIAL_IMAGE"},ape=()=>{const{isResetButtonDisabled:e}=H(ope),t=le(),{getUploadButtonProps:n,getUploadInputProps:r}=D2({postUploadAction:spe}),o=l.useCallback(()=>{t(JT())},[t]);return a.jsxs(N,{layerStyle:"first",sx:{position:"relative",flexDirection:"column",height:"full",width:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",p:2,gap:4},children:[a.jsxs(N,{sx:{w:"full",flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:2},children:[a.jsx(je,{sx:{ps:2,fontWeight:600,userSelect:"none",color:"base.700",_dark:{color:"base.200"}},children:"Initial Image"}),a.jsx(Pi,{}),a.jsx(rt,{tooltip:"Upload Initial Image","aria-label":"Upload Initial Image",icon:a.jsx(i0,{}),...n()}),a.jsx(rt,{tooltip:"Reset Initial Image","aria-label":"Reset Initial Image",icon:a.jsx(a0,{}),onClick:o,isDisabled:e})]}),a.jsx(rpe,{}),a.jsx("input",{...r()})]})},ipe=l.memo(ape),lpe=e=>{const{onClick:t,isDisabled:n}=e,{t:r}=Q(),o=H(s=>s.system.isConnected);return a.jsx(rt,{onClick:t,icon:a.jsx(Zo,{}),tooltip:`${r("gallery.deleteImage")} (Del)`,"aria-label":`${r("gallery.deleteImage")} (Del)`,isDisabled:n||!o,colorScheme:"error"})},$A=()=>{const[e,{isLoading:t}]=bg({fixedCacheKey:"enqueueBatch"}),[n,{isLoading:r}]=rP({fixedCacheKey:"resumeProcessor"}),[o,{isLoading:s}]=tP({fixedCacheKey:"pauseProcessor"}),[i,{isLoading:c}]=Gx({fixedCacheKey:"cancelQueueItem"}),[d,{isLoading:p}]=eP({fixedCacheKey:"clearQueue"}),[h,{isLoading:m}]=pP({fixedCacheKey:"pruneQueue"});return t||r||s||c||p||m},cpe=[{label:"RealESRGAN x2 Plus",value:"RealESRGAN_x2plus.pth",tooltip:"Attempts to retain sharpness, low smoothing",group:"x2 Upscalers"},{label:"RealESRGAN x4 Plus",value:"RealESRGAN_x4plus.pth",tooltip:"Best for photos and highly detailed images, medium smoothing",group:"x4 Upscalers"},{label:"RealESRGAN x4 Plus (anime 6B)",value:"RealESRGAN_x4plus_anime_6B.pth",tooltip:"Best for anime/manga, high smoothing",group:"x4 Upscalers"},{label:"ESRGAN SRx4",value:"ESRGAN_SRx4_DF2KOST_official-ff704c30.pth",tooltip:"Retains sharpness, low smoothing",group:"x4 Upscalers"}];function upe(){const{t:e}=Q(),t=H(o=>o.postprocessing.esrganModelName),n=le(),r=l.useCallback(o=>n(ZT(o)),[n]);return a.jsx(Dr,{label:e("models.esrganModel"),value:t,itemComponent:pl,onChange:r,data:cpe})}const dpe=e=>{const{imageDTO:t}=e,n=le(),r=$A(),{t:o}=Q(),{isOpen:s,onOpen:i,onClose:c}=hs(),{isAllowedToUpscale:d,detail:p}=eN(t),h=l.useCallback(()=>{c(),!(!t||!d)&&n(hP({imageDTO:t}))},[n,t,d,c]);return a.jsx(tp,{isOpen:s,onClose:c,triggerComponent:a.jsx(rt,{tooltip:o("parameters.upscale"),onClick:i,icon:a.jsx(qM,{}),"aria-label":o("parameters.upscale")}),children:a.jsxs(N,{sx:{flexDirection:"column",gap:4},children:[a.jsx(upe,{}),a.jsx(Dt,{tooltip:p,size:"sm",isDisabled:!t||r||!d,onClick:h,children:o("parameters.upscaleImage")})]})})},fpe=l.memo(dpe),ppe=me([we,lo],({gallery:e,system:t,ui:n,config:r},o)=>{const{isConnected:s,shouldConfirmOnDelete:i,denoiseProgress:c}=t,{shouldShowImageDetails:d,shouldHidePreview:p,shouldShowProgressInViewer:h}=n,{shouldFetchMetadataFromApi:m}=r,g=e.selection[e.selection.length-1];return{shouldConfirmOnDelete:i,isConnected:s,shouldDisableToolbarButtons:!!(c!=null&&c.progress_image)||!g,shouldShowImageDetails:d,activeTabName:o,shouldHidePreview:p,shouldShowProgressInViewer:h,lastSelectedImage:g,shouldFetchMetadataFromApi:m}},{memoizeOptions:{resultEqualityCheck:Nn}}),hpe=()=>{const e=le(),{isConnected:t,shouldDisableToolbarButtons:n,shouldShowImageDetails:r,lastSelectedImage:o,shouldShowProgressInViewer:s}=H(ppe),i=Pn("upscaling").isFeatureEnabled,c=$A(),d=Zl(),{t:p}=Q(),{recallBothPrompts:h,recallSeed:m,recallAllParameters:g}=j0(),{currentData:b}=Rs((o==null?void 0:o.image_name)??zs.skipToken),{metadata:y,isLoading:x}=z2(o==null?void 0:o.image_name),{workflow:w,isLoading:S}=F2(o==null?void 0:o.workflow_id),j=l.useCallback(()=>{w&&e(Vx(w))},[e,w]),I=l.useCallback(()=>{g(y)},[y,g]);_t("a",I,[y]);const _=l.useCallback(()=>{m(y==null?void 0:y.seed)},[y==null?void 0:y.seed,m]);_t("s",_,[b]);const M=l.useCallback(()=>{h(y==null?void 0:y.positive_prompt,y==null?void 0:y.negative_prompt,y==null?void 0:y.positive_style_prompt,y==null?void 0:y.negative_style_prompt)},[y==null?void 0:y.negative_prompt,y==null?void 0:y.positive_prompt,y==null?void 0:y.positive_style_prompt,y==null?void 0:y.negative_style_prompt,h]);_t("p",M,[b]),_t("w",j,[w]);const E=l.useCallback(()=>{e(E8()),e(gg(b))},[e,b]);_t("shift+i",E,[b]);const A=l.useCallback(()=>{b&&e(hP({imageDTO:b}))},[e,b]),R=l.useCallback(()=>{b&&e(vg([b]))},[e,b]);_t("Shift+U",()=>{A()},{enabled:()=>!!(i&&!n&&t)},[i,b,n,t]);const D=l.useCallback(()=>e(tN(!r)),[e,r]);_t("i",()=>{b?D():d({title:p("toast.metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[b,r,d]),_t("delete",()=>{R()},[e,b]);const O=l.useCallback(()=>{e(TI(!s))},[e,s]);return a.jsx(a.Fragment,{children:a.jsxs(N,{sx:{flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:2},children:[a.jsx(Hn,{isAttached:!0,isDisabled:n,children:a.jsxs(Mg,{isLazy:!0,children:[a.jsx(Og,{as:rt,"aria-label":p("parameters.imageActions"),tooltip:p("parameters.imageActions"),isDisabled:!b,icon:a.jsx(lse,{})}),a.jsx(ql,{motionProps:fu,children:b&&a.jsx(M8,{imageDTO:b})})]})}),a.jsxs(Hn,{isAttached:!0,isDisabled:n,children:[a.jsx(rt,{isLoading:S,icon:a.jsx(T2,{}),tooltip:`${p("nodes.loadWorkflow")} (W)`,"aria-label":`${p("nodes.loadWorkflow")} (W)`,isDisabled:!w,onClick:j}),a.jsx(rt,{isLoading:x,icon:a.jsx(ZM,{}),tooltip:`${p("parameters.usePrompt")} (P)`,"aria-label":`${p("parameters.usePrompt")} (P)`,isDisabled:!(y!=null&&y.positive_prompt),onClick:M}),a.jsx(rt,{isLoading:x,icon:a.jsx(eO,{}),tooltip:`${p("parameters.useSeed")} (S)`,"aria-label":`${p("parameters.useSeed")} (S)`,isDisabled:(y==null?void 0:y.seed)===null||(y==null?void 0:y.seed)===void 0,onClick:_}),a.jsx(rt,{isLoading:x,icon:a.jsx(WM,{}),tooltip:`${p("parameters.useAll")} (A)`,"aria-label":`${p("parameters.useAll")} (A)`,isDisabled:!y,onClick:I})]}),i&&a.jsx(Hn,{isAttached:!0,isDisabled:c,children:i&&a.jsx(fpe,{imageDTO:b})}),a.jsx(Hn,{isAttached:!0,children:a.jsx(rt,{icon:a.jsx(UM,{}),tooltip:`${p("parameters.info")} (I)`,"aria-label":`${p("parameters.info")} (I)`,isChecked:r,onClick:D})}),a.jsx(Hn,{isAttached:!0,children:a.jsx(rt,{"aria-label":p("settings.displayInProgress"),tooltip:p("settings.displayInProgress"),icon:a.jsx($ee,{}),isChecked:s,onClick:O})}),a.jsx(Hn,{isAttached:!0,children:a.jsx(lpe,{onClick:R})})]})})},mpe=l.memo(hpe),gpe=me([we,Ux],(e,t)=>{var j,I;const{data:n,status:r}=nN.endpoints.listImages.select(t)(e),{data:o}=e.gallery.galleryView==="images"?gS.endpoints.getBoardImagesTotal.select(t.board_id??"none")(e):gS.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(e),s=e.gallery.selection[e.gallery.selection.length-1],i=r==="pending";if(!n||!s||(o==null?void 0:o.total)===0)return{isFetching:i,queryArgs:t,isOnFirstImage:!0,isOnLastImage:!0};const c={...t,offset:n.ids.length,limit:ZI},d=rN.getSelectors(),p=d.selectAll(n),h=p.findIndex(_=>_.image_name===s.image_name),m=Hl(h+1,0,p.length-1),g=Hl(h-1,0,p.length-1),b=(j=p[m])==null?void 0:j.image_name,y=(I=p[g])==null?void 0:I.image_name,x=b?d.selectById(n,b):void 0,w=y?d.selectById(n,y):void 0,S=p.length;return{loadedImagesCount:p.length,currentImageIndex:h,areMoreImagesAvailable:((o==null?void 0:o.total)??0)>S,isFetching:r==="pending",nextImage:x,prevImage:w,queryArgs:c}},{memoizeOptions:{resultEqualityCheck:Nn}}),LA=()=>{const e=le(),{nextImage:t,prevImage:n,areMoreImagesAvailable:r,isFetching:o,queryArgs:s,loadedImagesCount:i,currentImageIndex:c}=H(gpe),d=l.useCallback(()=>{n&&e(vS(n))},[e,n]),p=l.useCallback(()=>{t&&e(vS(t))},[e,t]),[h]=JI(),m=l.useCallback(()=>{h(s)},[h,s]);return{handlePrevImage:d,handleNextImage:p,isOnFirstImage:c===0,isOnLastImage:c!==void 0&&c===i-1,nextImage:t,prevImage:n,areMoreImagesAvailable:r,handleLoadMoreImages:m,isFetching:o}};function vpe(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const bpe=({label:e,value:t,onClick:n,isLink:r,labelPosition:o,withCopy:s=!1})=>{const{t:i}=Q(),c=l.useCallback(()=>navigator.clipboard.writeText(t.toString()),[t]);return t?a.jsxs(N,{gap:2,children:[n&&a.jsx(Wn,{label:`Recall ${e}`,children:a.jsx(Ia,{"aria-label":i("accessibility.useThisParameter"),icon:a.jsx(vpe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),s&&a.jsx(Wn,{label:`Copy ${e}`,children:a.jsx(Ia,{"aria-label":`Copy ${e}`,icon:a.jsx(Hu,{}),size:"xs",variant:"ghost",fontSize:14,onClick:c})}),a.jsxs(N,{direction:o?"column":"row",children:[a.jsxs(je,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?a.jsxs(Ig,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",a.jsx(BO,{mx:"2px"})]}):a.jsx(je,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}):null},Vr=l.memo(bpe),xpe=e=>{var F;const{metadata:t}=e,{t:n}=Q(),{recallPositivePrompt:r,recallNegativePrompt:o,recallSeed:s,recallCfgScale:i,recallModel:c,recallScheduler:d,recallVaeModel:p,recallSteps:h,recallWidth:m,recallHeight:g,recallStrength:b,recallHrfEnabled:y,recallHrfStrength:x,recallHrfMethod:w,recallLoRA:S,recallControlNet:j,recallIPAdapter:I,recallT2IAdapter:_}=j0(),M=l.useCallback(()=>{r(t==null?void 0:t.positive_prompt)},[t==null?void 0:t.positive_prompt,r]),E=l.useCallback(()=>{o(t==null?void 0:t.negative_prompt)},[t==null?void 0:t.negative_prompt,o]),A=l.useCallback(()=>{s(t==null?void 0:t.seed)},[t==null?void 0:t.seed,s]),R=l.useCallback(()=>{c(t==null?void 0:t.model)},[t==null?void 0:t.model,c]),D=l.useCallback(()=>{m(t==null?void 0:t.width)},[t==null?void 0:t.width,m]),O=l.useCallback(()=>{g(t==null?void 0:t.height)},[t==null?void 0:t.height,g]),T=l.useCallback(()=>{d(t==null?void 0:t.scheduler)},[t==null?void 0:t.scheduler,d]),K=l.useCallback(()=>{p(t==null?void 0:t.vae)},[t==null?void 0:t.vae,p]),G=l.useCallback(()=>{h(t==null?void 0:t.steps)},[t==null?void 0:t.steps,h]),X=l.useCallback(()=>{i(t==null?void 0:t.cfg_scale)},[t==null?void 0:t.cfg_scale,i]),Z=l.useCallback(()=>{b(t==null?void 0:t.strength)},[t==null?void 0:t.strength,b]),te=l.useCallback(()=>{y(t==null?void 0:t.hrf_enabled)},[t==null?void 0:t.hrf_enabled,y]),V=l.useCallback(()=>{x(t==null?void 0:t.hrf_strength)},[t==null?void 0:t.hrf_strength,x]),oe=l.useCallback(()=>{w(t==null?void 0:t.hrf_method)},[t==null?void 0:t.hrf_method,w]),ne=l.useCallback(q=>{S(q)},[S]),se=l.useCallback(q=>{j(q)},[j]),re=l.useCallback(q=>{I(q)},[I]),ae=l.useCallback(q=>{_(q)},[_]),B=l.useMemo(()=>t!=null&&t.controlnets?t.controlnets.filter(q=>qh(q.control_model)):[],[t==null?void 0:t.controlnets]),Y=l.useMemo(()=>t!=null&&t.ipAdapters?t.ipAdapters.filter(q=>qh(q.ip_adapter_model)):[],[t==null?void 0:t.ipAdapters]),$=l.useMemo(()=>t!=null&&t.t2iAdapters?t.t2iAdapters.filter(q=>oN(q.t2i_adapter_model)):[],[t==null?void 0:t.t2iAdapters]);return!t||Object.keys(t).length===0?null:(console.log(t),a.jsxs(a.Fragment,{children:[t.created_by&&a.jsx(Vr,{label:n("metadata.createdBy"),value:t.created_by}),t.generation_mode&&a.jsx(Vr,{label:n("metadata.generationMode"),value:t.generation_mode}),t.positive_prompt&&a.jsx(Vr,{label:n("metadata.positivePrompt"),labelPosition:"top",value:t.positive_prompt,onClick:M}),t.negative_prompt&&a.jsx(Vr,{label:n("metadata.negativePrompt"),labelPosition:"top",value:t.negative_prompt,onClick:E}),t.seed!==void 0&&t.seed!==null&&a.jsx(Vr,{label:n("metadata.seed"),value:t.seed,onClick:A}),t.model!==void 0&&t.model!==null&&t.model.model_name&&a.jsx(Vr,{label:n("metadata.model"),value:t.model.model_name,onClick:R}),t.width&&a.jsx(Vr,{label:n("metadata.width"),value:t.width,onClick:D}),t.height&&a.jsx(Vr,{label:n("metadata.height"),value:t.height,onClick:O}),t.scheduler&&a.jsx(Vr,{label:n("metadata.scheduler"),value:t.scheduler,onClick:T}),a.jsx(Vr,{label:n("metadata.vae"),value:((F=t.vae)==null?void 0:F.model_name)??"Default",onClick:K}),t.steps&&a.jsx(Vr,{label:n("metadata.steps"),value:t.steps,onClick:G}),t.cfg_scale!==void 0&&t.cfg_scale!==null&&a.jsx(Vr,{label:n("metadata.cfgScale"),value:t.cfg_scale,onClick:X}),t.strength&&a.jsx(Vr,{label:n("metadata.strength"),value:t.strength,onClick:Z}),t.hrf_enabled&&a.jsx(Vr,{label:n("hrf.metadata.enabled"),value:t.hrf_enabled,onClick:te}),t.hrf_enabled&&t.hrf_strength&&a.jsx(Vr,{label:n("hrf.metadata.strength"),value:t.hrf_strength,onClick:V}),t.hrf_enabled&&t.hrf_method&&a.jsx(Vr,{label:n("hrf.metadata.method"),value:t.hrf_method,onClick:oe}),t.loras&&t.loras.map((q,pe)=>{if(zI(q.lora))return a.jsx(Vr,{label:"LoRA",value:`${q.lora.model_name} - ${q.weight}`,onClick:ne.bind(null,q)},pe)}),B.map((q,pe)=>{var W;return a.jsx(Vr,{label:"ControlNet",value:`${(W=q.control_model)==null?void 0:W.model_name} - ${q.control_weight}`,onClick:se.bind(null,q)},pe)}),Y.map((q,pe)=>{var W;return a.jsx(Vr,{label:"IP Adapter",value:`${(W=q.ip_adapter_model)==null?void 0:W.model_name} - ${q.weight}`,onClick:re.bind(null,q)},pe)}),$.map((q,pe)=>{var W;return a.jsx(Vr,{label:"T2I Adapter",value:`${(W=q.t2i_adapter_model)==null?void 0:W.model_name} - ${q.weight}`,onClick:ae.bind(null,q)},pe)})]}))},ype=l.memo(xpe),Cpe=({image:e})=>{const{t}=Q(),{metadata:n}=z2(e.image_name),{workflow:r}=F2(e.workflow_id);return a.jsxs(N,{layerStyle:"first",sx:{padding:4,gap:1,flexDirection:"column",width:"full",height:"full",borderRadius:"base",position:"absolute",overflow:"hidden"},children:[a.jsxs(N,{gap:2,children:[a.jsx(je,{fontWeight:"semibold",children:"File:"}),a.jsxs(Ig,{href:e.image_url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.image_name,a.jsx(BO,{mx:"2px"})]})]}),a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(wo,{children:t("metadata.recallParameters")}),a.jsx(wo,{children:t("metadata.metadata")}),a.jsx(wo,{children:t("metadata.imageDetails")}),a.jsx(wo,{children:t("metadata.workflow")})]}),a.jsxs($u,{children:[a.jsx(Go,{children:n?a.jsx(cc,{children:a.jsx(ype,{metadata:n})}):a.jsx(eo,{label:t("metadata.noRecallParameters")})}),a.jsx(Go,{children:n?a.jsx(tl,{data:n,label:t("metadata.metadata")}):a.jsx(eo,{label:t("metadata.noMetaData")})}),a.jsx(Go,{children:e?a.jsx(tl,{data:e,label:t("metadata.imageDetails")}):a.jsx(eo,{label:t("metadata.noImageDetails")})}),a.jsx(Go,{children:r?a.jsx(tl,{data:r,label:t("metadata.workflow")}):a.jsx(eo,{label:t("nodes.noWorkflow")})})]})]})]})},wpe=l.memo(Cpe),F1={color:"base.100",pointerEvents:"auto"},Spe=()=>{const{t:e}=Q(),{handlePrevImage:t,handleNextImage:n,isOnFirstImage:r,isOnLastImage:o,handleLoadMoreImages:s,areMoreImagesAvailable:i,isFetching:c}=LA();return a.jsxs(Le,{sx:{position:"relative",height:"100%",width:"100%"},children:[a.jsx(Le,{sx:{pos:"absolute",top:"50%",transform:"translate(0, -50%)",insetInlineStart:0},children:!r&&a.jsx(Ia,{"aria-label":e("accessibility.previousImage"),icon:a.jsx(bee,{size:64}),variant:"unstyled",onClick:t,boxSize:16,sx:F1})}),a.jsxs(Le,{sx:{pos:"absolute",top:"50%",transform:"translate(0, -50%)",insetInlineEnd:0},children:[!o&&a.jsx(Ia,{"aria-label":e("accessibility.nextImage"),icon:a.jsx(xee,{size:64}),variant:"unstyled",onClick:n,boxSize:16,sx:F1}),o&&i&&!c&&a.jsx(Ia,{"aria-label":e("accessibility.loadMore"),icon:a.jsx(vee,{size:64}),variant:"unstyled",onClick:s,boxSize:16,sx:F1}),o&&i&&c&&a.jsx(N,{sx:{w:16,h:16,alignItems:"center",justifyContent:"center"},children:a.jsx(Ci,{opacity:.5,size:"xl"})})]})]})},zA=l.memo(Spe),kpe=me([we,sN],({ui:e,system:t},n)=>{const{shouldShowImageDetails:r,shouldHidePreview:o,shouldShowProgressInViewer:s}=e,{denoiseProgress:i,shouldAntialiasProgressImage:c}=t;return{shouldShowImageDetails:r,shouldHidePreview:o,imageName:n==null?void 0:n.image_name,denoiseProgress:i,shouldShowProgressInViewer:s,shouldAntialiasProgressImage:c}},{memoizeOptions:{resultEqualityCheck:Nn}}),jpe=()=>{const{shouldShowImageDetails:e,imageName:t,denoiseProgress:n,shouldShowProgressInViewer:r,shouldAntialiasProgressImage:o}=H(kpe),{handlePrevImage:s,handleNextImage:i,isOnLastImage:c,handleLoadMoreImages:d,areMoreImagesAvailable:p,isFetching:h}=LA();_t("left",()=>{s()},[s]),_t("right",()=>{if(c&&p&&!h){d();return}c||i()},[c,p,d,h,i]);const{currentData:m}=Rs(t??zs.skipToken),g=l.useMemo(()=>{if(m)return{id:"current-image",payloadType:"IMAGE_DTO",payload:{imageDTO:m}}},[m]),b=l.useMemo(()=>({id:"current-image",actionType:"SET_CURRENT_IMAGE"}),[]),[y,x]=l.useState(!1),w=l.useRef(0),{t:S}=Q(),j=l.useCallback(()=>{x(!0),window.clearTimeout(w.current)},[]),I=l.useCallback(()=>{w.current=window.setTimeout(()=>{x(!1)},500)},[]);return a.jsxs(N,{onMouseOver:j,onMouseOut:I,sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",position:"relative"},children:[n!=null&&n.progress_image&&r?a.jsx(_i,{src:n.progress_image.dataURL,width:n.progress_image.width,height:n.progress_image.height,draggable:!1,"data-testid":"progress-image",sx:{objectFit:"contain",maxWidth:"full",maxHeight:"full",height:"auto",position:"absolute",borderRadius:"base",imageRendering:o?"auto":"pixelated"}}):a.jsx(ll,{imageDTO:m,droppableData:b,draggableData:g,isUploadDisabled:!0,fitContainer:!0,useThumbailFallback:!0,dropLabel:S("gallery.setCurrentImage"),noContentFallback:a.jsx(eo,{icon:Xl,label:S("gallery.noImageSelected")}),dataTestId:"image-preview"}),e&&m&&a.jsx(Le,{sx:{position:"absolute",top:"0",width:"full",height:"full",borderRadius:"base"},children:a.jsx(wpe,{image:m})}),a.jsx(So,{children:!e&&m&&y&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},style:{position:"absolute",top:"0",width:"100%",height:"100%",pointerEvents:"none"},children:a.jsx(zA,{})},"nextPrevButtons")})]})},_pe=l.memo(jpe),Ipe=()=>a.jsxs(N,{sx:{position:"relative",flexDirection:"column",height:"100%",width:"100%",rowGap:4,alignItems:"center",justifyContent:"center"},children:[a.jsx(mpe,{}),a.jsx(_pe,{})]}),Ppe=l.memo(Ipe),Epe=()=>a.jsx(Le,{layerStyle:"first",sx:{position:"relative",width:"100%",height:"100%",p:2,borderRadius:"base"},children:a.jsx(N,{sx:{width:"100%",height:"100%"},children:a.jsx(Ppe,{})})}),FA=l.memo(Epe),Mpe=()=>{const e=l.useRef(null),t=l.useCallback(()=>{e.current&&e.current.setLayout([50,50])},[]),n=G2();return a.jsx(Le,{sx:{w:"full",h:"full"},children:a.jsxs(E0,{ref:e,autoSaveId:"imageTab.content",direction:"horizontal",style:{height:"100%",width:"100%"},storage:n,units:"percentages",children:[a.jsx(el,{id:"imageTab.content.initImage",order:0,defaultSize:50,minSize:25,style:{position:"relative"},children:a.jsx(ipe,{})}),a.jsx(lg,{onDoubleClick:t}),a.jsx(el,{id:"imageTab.content.selectedImage",order:1,defaultSize:50,minSize:25,children:a.jsx(FA,{})})]})})},Ope=l.memo(Mpe);var Ape=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const F_=Sf(Ape);function xx(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,n)=>{const r=e[n];return r!=null&&r!==!1&&(t[n]=r),t},{})}var Rpe=Object.defineProperty,B_=Object.getOwnPropertySymbols,Dpe=Object.prototype.hasOwnProperty,Tpe=Object.prototype.propertyIsEnumerable,H_=(e,t,n)=>t in e?Rpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Npe=(e,t)=>{for(var n in t||(t={}))Dpe.call(t,n)&&H_(e,n,t[n]);if(B_)for(var n of B_(t))Tpe.call(t,n)&&H_(e,n,t[n]);return e};function BA(e,t){if(t===null||typeof t!="object")return{};const n=Npe({},t);return Object.keys(t).forEach(r=>{r.includes(`${String(e)}.`)&&delete n[r]}),n}const $pe="__MANTINE_FORM_INDEX__";function W_(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${$pe}`)):!1:!1}function V_(e,t,n){typeof n.value=="object"&&(n.value=Qc(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Qc(e){if(typeof e!="object")return e;var t=0,n,r,o,s=Object.prototype.toString.call(e);if(s==="[object Object]"?o=Object.create(e.__proto__||null):s==="[object Array]"?o=Array(e.length):s==="[object Set]"?(o=new Set,e.forEach(function(i){o.add(Qc(i))})):s==="[object Map]"?(o=new Map,e.forEach(function(i,c){o.set(Qc(c),Qc(i))})):s==="[object Date]"?o=new Date(+e):s==="[object RegExp]"?o=new RegExp(e.source,e.flags):s==="[object DataView]"?o=new e.constructor(Qc(e.buffer)):s==="[object ArrayBuffer]"?o=e.slice(0):s.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t0,errors:t}}function yx(e,t,n="",r={}){return typeof e!="object"||e===null?r:Object.keys(e).reduce((o,s)=>{const i=e[s],c=`${n===""?"":`${n}.`}${s}`,d=ri(c,t);let p=!1;return typeof i=="function"&&(o[c]=i(d,t,c)),typeof i=="object"&&Array.isArray(d)&&(p=!0,d.forEach((h,m)=>yx(i,t,`${c}.${m}`,o))),typeof i=="object"&&typeof d=="object"&&d!==null&&(p||yx(i,t,c,o)),o},r)}function Cx(e,t){return U_(typeof e=="function"?e(t):yx(e,t))}function kh(e,t,n){if(typeof e!="string")return{hasError:!1,error:null};const r=Cx(t,n),o=Object.keys(r.errors).find(s=>e.split(".").every((i,c)=>i===s.split(".")[c]));return{hasError:!!o,error:o?r.errors[o]:null}}function Lpe(e,{from:t,to:n},r){const o=ri(e,r);if(!Array.isArray(o))return r;const s=[...o],i=o[t];return s.splice(t,1),s.splice(n,0,i),N0(e,s,r)}var zpe=Object.defineProperty,G_=Object.getOwnPropertySymbols,Fpe=Object.prototype.hasOwnProperty,Bpe=Object.prototype.propertyIsEnumerable,q_=(e,t,n)=>t in e?zpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hpe=(e,t)=>{for(var n in t||(t={}))Fpe.call(t,n)&&q_(e,n,t[n]);if(G_)for(var n of G_(t))Bpe.call(t,n)&&q_(e,n,t[n]);return e};function Wpe(e,{from:t,to:n},r){const o=`${e}.${t}`,s=`${e}.${n}`,i=Hpe({},r);return Object.keys(r).every(c=>{let d,p;if(c.startsWith(o)&&(d=c,p=c.replace(o,s)),c.startsWith(s)&&(d=c.replace(s,o),p=c),d&&p){const h=i[d],m=i[p];return m===void 0?delete i[d]:i[d]=m,h===void 0?delete i[p]:i[p]=h,!1}return!0}),i}function Vpe(e,t,n){const r=ri(e,n);return Array.isArray(r)?N0(e,r.filter((o,s)=>s!==t),n):n}var Upe=Object.defineProperty,K_=Object.getOwnPropertySymbols,Gpe=Object.prototype.hasOwnProperty,qpe=Object.prototype.propertyIsEnumerable,Q_=(e,t,n)=>t in e?Upe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kpe=(e,t)=>{for(var n in t||(t={}))Gpe.call(t,n)&&Q_(e,n,t[n]);if(K_)for(var n of K_(t))qpe.call(t,n)&&Q_(e,n,t[n]);return e};function X_(e,t){const n=e.substring(t.length+1).split(".")[0];return parseInt(n,10)}function Y_(e,t,n,r){if(t===void 0)return n;const o=`${String(e)}`;let s=n;r===-1&&(s=BA(`${o}.${t}`,s));const i=Kpe({},s),c=new Set;return Object.entries(s).filter(([d])=>{if(!d.startsWith(`${o}.`))return!1;const p=X_(d,o);return Number.isNaN(p)?!1:p>=t}).forEach(([d,p])=>{const h=X_(d,o),m=d.replace(`${o}.${h}`,`${o}.${h+r}`);i[m]=p,c.add(m),c.has(d)||delete i[d]}),i}function Qpe(e,t,n,r){const o=ri(e,r);if(!Array.isArray(o))return r;const s=[...o];return s.splice(typeof n=="number"?n:s.length,0,t),N0(e,s,r)}function J_(e,t){const n=Object.keys(e);if(typeof t=="string"){const r=n.filter(o=>o.startsWith(`${t}.`));return e[t]||r.some(o=>e[o])||!1}return n.some(r=>e[r])}function Xpe(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:n}=t;n instanceof HTMLInputElement?n.type==="checkbox"?e(n.checked):e(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&e(n.value)}else e(t)}}var Ype=Object.defineProperty,Jpe=Object.defineProperties,Zpe=Object.getOwnPropertyDescriptors,Z_=Object.getOwnPropertySymbols,ehe=Object.prototype.hasOwnProperty,the=Object.prototype.propertyIsEnumerable,eI=(e,t,n)=>t in e?Ype(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wi=(e,t)=>{for(var n in t||(t={}))ehe.call(t,n)&&eI(e,n,t[n]);if(Z_)for(var n of Z_(t))the.call(t,n)&&eI(e,n,t[n]);return e},B1=(e,t)=>Jpe(e,Zpe(t));function uc({initialValues:e={},initialErrors:t={},initialDirty:n={},initialTouched:r={},clearInputErrorOnChange:o=!0,validateInputOnChange:s=!1,validateInputOnBlur:i=!1,transformValues:c=p=>p,validate:d}={}){const[p,h]=l.useState(r),[m,g]=l.useState(n),[b,y]=l.useState(e),[x,w]=l.useState(xx(t)),S=l.useRef(e),j=$=>{S.current=$},I=l.useCallback(()=>h({}),[]),_=$=>{const F=$?Wi(Wi({},b),$):b;j(F),g({})},M=l.useCallback($=>w(F=>xx(typeof $=="function"?$(F):$)),[]),E=l.useCallback(()=>w({}),[]),A=l.useCallback(()=>{y(e),E(),j(e),g({}),I()},[]),R=l.useCallback(($,F)=>M(q=>B1(Wi({},q),{[$]:F})),[]),D=l.useCallback($=>M(F=>{if(typeof $!="string")return F;const q=Wi({},F);return delete q[$],q}),[]),O=l.useCallback($=>g(F=>{if(typeof $!="string")return F;const q=BA($,F);return delete q[$],q}),[]),T=l.useCallback(($,F)=>{const q=W_($,s);O($),h(pe=>B1(Wi({},pe),{[$]:!0})),y(pe=>{const W=N0($,F,pe);if(q){const U=kh($,d,W);U.hasError?R($,U.error):D($)}return W}),!q&&o&&R($,null)},[]),K=l.useCallback($=>{y(F=>{const q=typeof $=="function"?$(F):$;return Wi(Wi({},F),q)}),o&&E()},[]),G=l.useCallback(($,F)=>{O($),y(q=>Lpe($,F,q)),w(q=>Wpe($,F,q))},[]),X=l.useCallback(($,F)=>{O($),y(q=>Vpe($,F,q)),w(q=>Y_($,F,q,-1))},[]),Z=l.useCallback(($,F,q)=>{O($),y(pe=>Qpe($,F,q,pe)),w(pe=>Y_($,q,pe,1))},[]),te=l.useCallback(()=>{const $=Cx(d,b);return w($.errors),$},[b,d]),V=l.useCallback($=>{const F=kh($,d,b);return F.hasError?R($,F.error):D($),F},[b,d]),oe=($,{type:F="input",withError:q=!0,withFocus:pe=!0}={})=>{const U={onChange:Xpe(ee=>T($,ee))};return q&&(U.error=x[$]),F==="checkbox"?U.checked=ri($,b):U.value=ri($,b),pe&&(U.onFocus=()=>h(ee=>B1(Wi({},ee),{[$]:!0})),U.onBlur=()=>{if(W_($,i)){const ee=kh($,d,b);ee.hasError?R($,ee.error):D($)}}),U},ne=($,F)=>q=>{q==null||q.preventDefault();const pe=te();pe.hasErrors?F==null||F(pe.errors,b,q):$==null||$(c(b),q)},se=$=>c($||b),re=l.useCallback($=>{$.preventDefault(),A()},[]),ae=$=>{if($){const q=ri($,m);if(typeof q=="boolean")return q;const pe=ri($,b),W=ri($,S.current);return!F_(pe,W)}return Object.keys(m).length>0?J_(m):!F_(b,S.current)},B=l.useCallback($=>J_(p,$),[p]),Y=l.useCallback($=>$?!kh($,d,b).hasError:!Cx(d,b).hasErrors,[b,d]);return{values:b,errors:x,setValues:K,setErrors:M,setFieldValue:T,setFieldError:R,clearFieldError:D,clearErrors:E,reset:A,validate:te,validateField:V,reorderListItem:G,removeListItem:X,insertListItem:Z,getInputProps:oe,onSubmit:ne,onReset:re,isDirty:ae,isTouched:B,setTouched:h,setDirty:g,resetTouched:I,resetDirty:_,isValid:Y,getTransformedValues:se}}function Or(e){const{...t}=e,{base50:n,base100:r,base200:o,base300:s,base800:i,base700:c,base900:d,accent500:p,accent300:h}=Jf(),{colorMode:m}=ji(),g=l.useCallback(()=>({input:{color:Xe(d,r)(m),backgroundColor:Xe(n,d)(m),borderColor:Xe(o,i)(m),borderWidth:2,outline:"none",":focus":{borderColor:Xe(h,p)(m)}},label:{color:Xe(c,s)(m),fontWeight:"normal",marginBottom:4}}),[h,p,r,o,s,n,c,i,d,m]);return a.jsx(RM,{styles:g,...t})}const nhe=[{value:"sd-1",label:xr["sd-1"]},{value:"sd-2",label:xr["sd-2"]},{value:"sdxl",label:xr.sdxl},{value:"sdxl-refiner",label:xr["sdxl-refiner"]}];function sp(e){const{...t}=e,{t:n}=Q();return a.jsx(Dr,{label:n("modelManager.baseModel"),data:nhe,...t})}function WA(e){const{data:t}=mP(),{...n}=e;return a.jsx(Dr,{label:"Config File",placeholder:"Select A Config File",data:t||[],...n})}const rhe=[{value:"normal",label:"Normal"},{value:"inpaint",label:"Inpaint"},{value:"depth",label:"Depth"}];function $0(e){const{...t}=e,{t:n}=Q();return a.jsx(Dr,{label:n("modelManager.variant"),data:rhe,...t})}function dg(e,t=!0){let n;t?n=new RegExp("[^\\\\/]+(?=\\.)"):n=new RegExp("[^\\\\/]+(?=[\\\\/]?$)");const r=e.match(n);return r?r[0]:""}function VA(e){const{t}=Q(),n=le(),{model_path:r}=e,o=uc({initialValues:{model_name:r?dg(r):"",base_model:"sd-1",model_type:"main",path:r||"",description:"",model_format:"checkpoint",error:void 0,vae:"",variant:"normal",config:"configs\\stable-diffusion\\v1-inference.yaml"}}),[s]=gP(),[i,c]=l.useState(!1),d=m=>{s({body:m}).unwrap().then(g=>{n(Ht(rr({title:t("modelManager.modelAdded",{modelName:m.model_name}),status:"success"}))),o.reset(),r&&n(Pf(null))}).catch(g=>{g&&n(Ht(rr({title:t("toast.modelAddFailed"),status:"error"})))})},p=l.useCallback(m=>{if(o.values.model_name===""){const g=dg(m.currentTarget.value);g&&o.setFieldValue("model_name",g)}},[o]),h=l.useCallback(()=>c(m=>!m),[]);return a.jsx("form",{onSubmit:o.onSubmit(m=>d(m)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",gap:2,children:[a.jsx(Or,{label:t("modelManager.model"),required:!0,...o.getInputProps("model_name")}),a.jsx(sp,{label:t("modelManager.baseModel"),...o.getInputProps("base_model")}),a.jsx(Or,{label:t("modelManager.modelLocation"),required:!0,...o.getInputProps("path"),onBlur:p}),a.jsx(Or,{label:t("modelManager.description"),...o.getInputProps("description")}),a.jsx(Or,{label:t("modelManager.vaeLocation"),...o.getInputProps("vae")}),a.jsx($0,{label:t("modelManager.variant"),...o.getInputProps("variant")}),a.jsxs(N,{flexDirection:"column",width:"100%",gap:2,children:[i?a.jsx(Or,{required:!0,label:t("modelManager.customConfigFileLocation"),...o.getInputProps("config")}):a.jsx(WA,{required:!0,width:"100%",...o.getInputProps("config")}),a.jsx(Eo,{isChecked:i,onChange:h,label:t("modelManager.useCustomConfig")}),a.jsx(Dt,{mt:2,type:"submit",children:t("modelManager.addModel")})]})]})})}function UA(e){const{t}=Q(),n=le(),{model_path:r}=e,[o]=gP(),s=uc({initialValues:{model_name:r?dg(r,!1):"",base_model:"sd-1",model_type:"main",path:r||"",description:"",model_format:"diffusers",error:void 0,vae:"",variant:"normal"}}),i=d=>{o({body:d}).unwrap().then(p=>{n(Ht(rr({title:t("modelManager.modelAdded",{modelName:d.model_name}),status:"success"}))),s.reset(),r&&n(Pf(null))}).catch(p=>{p&&n(Ht(rr({title:t("toast.modelAddFailed"),status:"error"})))})},c=l.useCallback(d=>{if(s.values.model_name===""){const p=dg(d.currentTarget.value,!1);p&&s.setFieldValue("model_name",p)}},[s]);return a.jsx("form",{onSubmit:s.onSubmit(d=>i(d)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",gap:2,children:[a.jsx(Or,{required:!0,label:t("modelManager.model"),...s.getInputProps("model_name")}),a.jsx(sp,{label:t("modelManager.baseModel"),...s.getInputProps("base_model")}),a.jsx(Or,{required:!0,label:t("modelManager.modelLocation"),placeholder:t("modelManager.modelLocationValidationMsg"),...s.getInputProps("path"),onBlur:c}),a.jsx(Or,{label:t("modelManager.description"),...s.getInputProps("description")}),a.jsx(Or,{label:t("modelManager.vaeLocation"),...s.getInputProps("vae")}),a.jsx($0,{label:t("modelManager.variant"),...s.getInputProps("variant")}),a.jsx(Dt,{mt:2,type:"submit",children:t("modelManager.addModel")})]})})}function ohe(){const[e,t]=l.useState("diffusers"),{t:n}=Q(),r=l.useCallback(s=>{s&&t(s)},[]),o=l.useMemo(()=>[{label:n("modelManager.diffusersModels"),value:"diffusers"},{label:n("modelManager.checkpointOrSafetensors"),value:"checkpoint"}],[n]);return a.jsxs(N,{flexDirection:"column",gap:4,width:"100%",children:[a.jsx(Dr,{label:n("modelManager.modelType"),value:e,data:o,onChange:r}),a.jsxs(N,{sx:{p:4,borderRadius:4,bg:"base.300",_dark:{bg:"base.850"}},children:[e==="diffusers"&&a.jsx(UA,{}),e==="checkpoint"&&a.jsx(VA,{})]})]})}const she=[{label:"None",value:"none"},{label:"v_prediction",value:"v_prediction"},{label:"epsilon",value:"epsilon"},{label:"sample",value:"sample"}];function ahe(){const e=le(),{t}=Q(),[n,{isLoading:r}]=vP(),o=uc({initialValues:{location:"",prediction_type:void 0}}),s=i=>{const c={location:i.location,prediction_type:i.prediction_type==="none"?void 0:i.prediction_type};n({body:c}).unwrap().then(d=>{e(Ht(rr({title:t("toast.modelAddedSimple"),status:"success"}))),o.reset()}).catch(d=>{d&&e(Ht(rr({title:`${d.data.detail} `,status:"error"})))})};return a.jsx("form",{onSubmit:o.onSubmit(i=>s(i)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",width:"100%",gap:4,children:[a.jsx(Or,{label:t("modelManager.modelLocation"),placeholder:t("modelManager.simpleModelDesc"),w:"100%",...o.getInputProps("location")}),a.jsx(Dr,{label:t("modelManager.predictionType"),data:she,defaultValue:"none",...o.getInputProps("prediction_type")}),a.jsx(Dt,{type:"submit",isLoading:r,children:t("modelManager.addModel")})]})})}function ihe(){const{t:e}=Q(),[t,n]=l.useState("simple"),r=l.useCallback(()=>n("simple"),[]),o=l.useCallback(()=>n("advanced"),[]);return a.jsxs(N,{flexDirection:"column",width:"100%",overflow:"scroll",maxHeight:window.innerHeight-250,gap:4,children:[a.jsxs(Hn,{isAttached:!0,children:[a.jsx(Dt,{size:"sm",isChecked:t=="simple",onClick:r,children:e("common.simple")}),a.jsx(Dt,{size:"sm",isChecked:t=="advanced",onClick:o,children:e("common.advanced")})]}),a.jsxs(N,{sx:{p:4,borderRadius:4,background:"base.200",_dark:{background:"base.800"}},children:[t==="simple"&&a.jsx(ahe,{}),t==="advanced"&&a.jsx(ohe,{})]})]})}function lhe(e){const{...t}=e;return a.jsx(jE,{w:"100%",...t,children:e.children})}function che(){const e=H(w=>w.modelmanager.searchFolder),[t,n]=l.useState(""),{data:r}=aa(Al),{foundModels:o,alreadyInstalled:s,filteredModels:i}=bP({search_path:e||""},{selectFromResult:({data:w})=>{const S=_$(r==null?void 0:r.entities),j=To(S,"path"),I=C$(w,j),_=O$(w,j);return{foundModels:w,alreadyInstalled:tI(_,t),filteredModels:tI(I,t)}}}),[c,{isLoading:d}]=vP(),p=le(),{t:h}=Q(),m=l.useCallback(w=>{const S=w.currentTarget.id.split("\\").splice(-1)[0];c({body:{location:w.currentTarget.id}}).unwrap().then(j=>{p(Ht(rr({title:`Added Model: ${S}`,status:"success"})))}).catch(j=>{j&&p(Ht(rr({title:h("toast.modelAddFailed"),status:"error"})))})},[p,c,h]),g=l.useCallback(w=>{n(w.target.value)},[]),b=l.useCallback(w=>p(Pf(w)),[p]),y=({models:w,showActions:S=!0})=>w.map(j=>a.jsxs(N,{sx:{p:4,gap:4,alignItems:"center",borderRadius:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{w:"100%",sx:{flexDirection:"column",minW:"25%"},children:[a.jsx(je,{sx:{fontWeight:600},children:j.split("\\").slice(-1)[0]}),a.jsx(je,{sx:{fontSize:"sm",color:"base.600",_dark:{color:"base.400"}},children:j})]}),S?a.jsxs(N,{gap:2,children:[a.jsx(Dt,{id:j,onClick:m,isLoading:d,children:h("modelManager.quickAdd")}),a.jsx(Dt,{onClick:b.bind(null,j),isLoading:d,children:h("modelManager.advanced")})]}):a.jsx(je,{sx:{fontWeight:600,p:2,borderRadius:4,color:"accent.50",bg:"accent.400",_dark:{color:"accent.100",bg:"accent.600"}},children:"Installed"})]},j));return(()=>e?!o||o.length===0?a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center",height:96,userSelect:"none",bg:"base.200",_dark:{bg:"base.900"}},children:a.jsx(je,{variant:"subtext",children:h("modelManager.noModels")})}):a.jsxs(N,{sx:{flexDirection:"column",gap:2,w:"100%",minW:"50%"},children:[a.jsx(Is,{onChange:g,label:h("modelManager.search"),labelPos:"side"}),a.jsxs(N,{p:2,gap:2,children:[a.jsxs(je,{sx:{fontWeight:600},children:["Models Found: ",o.length]}),a.jsxs(je,{sx:{fontWeight:600,color:"accent.500",_dark:{color:"accent.200"}},children:["Not Installed: ",i.length]})]}),a.jsx(lhe,{offsetScrollbars:!0,children:a.jsxs(N,{gap:2,flexDirection:"column",children:[y({models:i}),y({models:s,showActions:!1})]})})]}):null)()}const tI=(e,t)=>{const n=[];return to(e,r=>{if(!r)return null;r.includes(t)&&n.push(r)}),n};function uhe(){const e=H(h=>h.modelmanager.advancedAddScanModel),{t}=Q(),n=l.useMemo(()=>[{label:t("modelManager.diffusersModels"),value:"diffusers"},{label:t("modelManager.checkpointOrSafetensors"),value:"checkpoint"}],[t]),[r,o]=l.useState("diffusers"),[s,i]=l.useState(!0);l.useEffect(()=>{e&&[".ckpt",".safetensors",".pth",".pt"].some(h=>e.endsWith(h))?o("checkpoint"):o("diffusers")},[e,o,s]);const c=le(),d=l.useCallback(()=>c(Pf(null)),[c]),p=l.useCallback(h=>{h&&(o(h),i(h==="checkpoint"))},[]);return e?a.jsxs(Le,{as:Ar.div,initial:{x:-100,opacity:0},animate:{x:0,opacity:1,transition:{duration:.2}},sx:{display:"flex",flexDirection:"column",minWidth:"40%",maxHeight:window.innerHeight-300,overflow:"scroll",p:4,gap:4,borderRadius:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{justifyContent:"space-between",alignItems:"center",children:[a.jsx(je,{size:"xl",fontWeight:600,children:s||r==="checkpoint"?"Add Checkpoint Model":"Add Diffusers Model"}),a.jsx(rt,{icon:a.jsx(ku,{}),"aria-label":t("modelManager.closeAdvanced"),onClick:d,size:"sm"})]}),a.jsx(Dr,{label:t("modelManager.modelType"),value:r,data:n,onChange:p}),s?a.jsx(VA,{model_path:e},e):a.jsx(UA,{model_path:e},e)]}):null}function dhe(){const e=le(),{t}=Q(),n=H(d=>d.modelmanager.searchFolder),{refetch:r}=bP({search_path:n||""}),o=uc({initialValues:{folder:""}}),s=l.useCallback(d=>{e(bS(d.folder))},[e]),i=l.useCallback(()=>{r()},[r]),c=l.useCallback(()=>{e(bS(null)),e(Pf(null))},[e]);return a.jsx("form",{onSubmit:o.onSubmit(d=>s(d)),style:{width:"100%"},children:a.jsxs(N,{sx:{w:"100%",gap:2,borderRadius:4,alignItems:"center"},children:[a.jsxs(N,{w:"100%",alignItems:"center",gap:4,minH:12,children:[a.jsx(je,{sx:{fontSize:"sm",fontWeight:600,color:"base.700",minW:"max-content",_dark:{color:"base.300"}},children:"Folder"}),n?a.jsx(N,{sx:{w:"100%",p:2,px:4,bg:"base.300",borderRadius:4,fontSize:"sm",fontWeight:"bold",_dark:{bg:"base.700"}},children:n}):a.jsx(Is,{w:"100%",size:"md",...o.getInputProps("folder")})]}),a.jsxs(N,{gap:2,children:[n?a.jsx(rt,{"aria-label":t("modelManager.scanAgain"),tooltip:t("modelManager.scanAgain"),icon:a.jsx(s0,{}),onClick:i,fontSize:18,size:"sm"}):a.jsx(rt,{"aria-label":t("modelManager.findModels"),tooltip:t("modelManager.findModels"),icon:a.jsx(Qee,{}),fontSize:18,size:"sm",type:"submit"}),a.jsx(rt,{"aria-label":t("modelManager.clearCheckpointFolder"),tooltip:t("modelManager.clearCheckpointFolder"),icon:a.jsx(Zo,{}),size:"sm",onClick:c,isDisabled:!n,colorScheme:"red"})]})]})})}const fhe=l.memo(dhe);function phe(){return a.jsxs(N,{flexDirection:"column",w:"100%",gap:4,children:[a.jsx(fhe,{}),a.jsxs(N,{gap:4,children:[a.jsx(N,{sx:{maxHeight:window.innerHeight-300,overflow:"scroll",gap:4,w:"100%"},children:a.jsx(che,{})}),a.jsx(uhe,{})]})]})}function hhe(){const[e,t]=l.useState("add"),{t:n}=Q(),r=l.useCallback(()=>t("add"),[]),o=l.useCallback(()=>t("scan"),[]);return a.jsxs(N,{flexDirection:"column",gap:4,children:[a.jsxs(Hn,{isAttached:!0,children:[a.jsx(Dt,{onClick:r,isChecked:e=="add",size:"sm",width:"100%",children:n("modelManager.addModel")}),a.jsx(Dt,{onClick:o,isChecked:e=="scan",size:"sm",width:"100%",children:n("modelManager.scanForModels")})]}),e=="add"&&a.jsx(ihe,{}),e=="scan"&&a.jsx(phe,{})]})}const mhe=[{label:"Stable Diffusion 1",value:"sd-1"},{label:"Stable Diffusion 2",value:"sd-2"}];function ghe(){var q,pe;const{t:e}=Q(),t=le(),{data:n}=aa(Al),[r,{isLoading:o}]=aN(),[s,i]=l.useState("sd-1"),c=OS(n==null?void 0:n.entities,(W,U)=>(W==null?void 0:W.model_format)==="diffusers"&&(W==null?void 0:W.base_model)==="sd-1"),d=OS(n==null?void 0:n.entities,(W,U)=>(W==null?void 0:W.model_format)==="diffusers"&&(W==null?void 0:W.base_model)==="sd-2"),p=l.useMemo(()=>({"sd-1":c,"sd-2":d}),[c,d]),[h,m]=l.useState(((q=Object.keys(p[s]))==null?void 0:q[0])??null),[g,b]=l.useState(((pe=Object.keys(p[s]))==null?void 0:pe[1])??null),[y,x]=l.useState(null),[w,S]=l.useState(""),[j,I]=l.useState(.5),[_,M]=l.useState("weighted_sum"),[E,A]=l.useState("root"),[R,D]=l.useState(""),[O,T]=l.useState(!1),K=Object.keys(p[s]).filter(W=>W!==g&&W!==y),G=Object.keys(p[s]).filter(W=>W!==h&&W!==y),X=Object.keys(p[s]).filter(W=>W!==h&&W!==g),Z=l.useCallback(W=>{i(W),m(null),b(null)},[]),te=l.useCallback(W=>{m(W)},[]),V=l.useCallback(W=>{b(W)},[]),oe=l.useCallback(W=>{W?(x(W),M("weighted_sum")):(x(null),M("add_difference"))},[]),ne=l.useCallback(W=>S(W.target.value),[]),se=l.useCallback(W=>I(W),[]),re=l.useCallback(()=>I(.5),[]),ae=l.useCallback(W=>M(W),[]),B=l.useCallback(W=>A(W),[]),Y=l.useCallback(W=>D(W.target.value),[]),$=l.useCallback(W=>T(W.target.checked),[]),F=l.useCallback(()=>{const W=[];let U=[h,g,y];U=U.filter(J=>J!==null),U.forEach(J=>{var he;const ge=(he=J==null?void 0:J.split("/"))==null?void 0:he[2];ge&&W.push(ge)});const ee={model_names:W,merged_model_name:w!==""?w:W.join("-"),alpha:j,interp:_,force:O,merge_dest_directory:E==="root"?void 0:R};r({base_model:s,body:{body:ee}}).unwrap().then(J=>{t(Ht(rr({title:e("modelManager.modelsMerged"),status:"success"})))}).catch(J=>{J&&t(Ht(rr({title:e("modelManager.modelsMergeFailed"),status:"error"})))})},[s,t,r,w,j,R,O,_,E,h,y,g,e]);return a.jsxs(N,{flexDirection:"column",rowGap:4,children:[a.jsxs(N,{sx:{flexDirection:"column",rowGap:1},children:[a.jsx(je,{children:e("modelManager.modelMergeHeaderHelp1")}),a.jsx(je,{fontSize:"sm",variant:"subtext",children:e("modelManager.modelMergeHeaderHelp2")})]}),a.jsxs(N,{columnGap:4,children:[a.jsx(Dr,{label:e("modelManager.modelType"),w:"100%",data:mhe,value:s,onChange:Z}),a.jsx(sr,{label:e("modelManager.modelOne"),w:"100%",value:h,placeholder:e("modelManager.selectModel"),data:K,onChange:te}),a.jsx(sr,{label:e("modelManager.modelTwo"),w:"100%",placeholder:e("modelManager.selectModel"),value:g,data:G,onChange:V}),a.jsx(sr,{label:e("modelManager.modelThree"),data:X,w:"100%",placeholder:e("modelManager.selectModel"),clearable:!0,onChange:oe})]}),a.jsx(Is,{label:e("modelManager.mergedModelName"),value:w,onChange:ne}),a.jsxs(N,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(It,{label:e("modelManager.alpha"),min:.01,max:.99,step:.01,value:j,onChange:se,withInput:!0,withReset:!0,handleReset:re,withSliderMarks:!0}),a.jsx(je,{variant:"subtext",fontSize:"sm",children:e("modelManager.modelMergeAlphaHelp")})]}),a.jsxs(N,{sx:{padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(je,{fontWeight:500,fontSize:"sm",variant:"subtext",children:e("modelManager.interpolationType")}),a.jsx(om,{value:_,onChange:ae,children:a.jsx(N,{columnGap:4,children:y===null?a.jsxs(a.Fragment,{children:[a.jsx(ei,{value:"weighted_sum",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.weightedSum")})}),a.jsx(ei,{value:"sigmoid",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.sigmoid")})}),a.jsx(ei,{value:"inv_sigmoid",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.inverseSigmoid")})})]}):a.jsx(ei,{value:"add_difference",children:a.jsx(Wn,{label:e("modelManager.modelMergeInterpAddDifferenceHelp"),children:a.jsx(je,{fontSize:"sm",children:e("modelManager.addDifference")})})})})})]}),a.jsxs(N,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.900"}},children:[a.jsxs(N,{columnGap:4,children:[a.jsx(je,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:e("modelManager.mergedModelSaveLocation")}),a.jsx(om,{value:E,onChange:B,children:a.jsxs(N,{columnGap:4,children:[a.jsx(ei,{value:"root",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.invokeAIFolder")})}),a.jsx(ei,{value:"custom",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.custom")})})]})})]}),E==="custom"&&a.jsx(Is,{label:e("modelManager.mergedModelCustomSaveLocation"),value:R,onChange:Y})]}),a.jsx(Eo,{label:e("modelManager.ignoreMismatch"),isChecked:O,onChange:$,fontWeight:"500"}),a.jsx(Dt,{onClick:F,isLoading:o,isDisabled:h===null||g===null,children:e("modelManager.merge")})]})}function vhe(e){const{model:t}=e,n=le(),{t:r}=Q(),[o,{isLoading:s}]=iN(),[i,c]=l.useState("InvokeAIRoot"),[d,p]=l.useState("");l.useEffect(()=>{c("InvokeAIRoot")},[t]);const h=l.useCallback(()=>{c("InvokeAIRoot")},[]),m=l.useCallback(y=>{c(y)},[]),g=l.useCallback(y=>{p(y.target.value)},[]),b=l.useCallback(()=>{const y={base_model:t.base_model,model_name:t.model_name,convert_dest_directory:i==="Custom"?d:void 0};if(i==="Custom"&&d===""){n(Ht(rr({title:r("modelManager.noCustomLocationProvided"),status:"error"})));return}n(Ht(rr({title:`${r("modelManager.convertingModelBegin")}: ${t.model_name}`,status:"info"}))),o(y).unwrap().then(()=>{n(Ht(rr({title:`${r("modelManager.modelConverted")}: ${t.model_name}`,status:"success"})))}).catch(()=>{n(Ht(rr({title:`${r("modelManager.modelConversionFailed")}: ${t.model_name}`,status:"error"})))})},[o,d,n,t.base_model,t.model_name,i,r]);return a.jsxs(_0,{title:`${r("modelManager.convert")} ${t.model_name}`,acceptCallback:b,cancelCallback:h,acceptButtonText:`${r("modelManager.convert")}`,triggerComponent:a.jsxs(Dt,{size:"sm","aria-label":r("modelManager.convertToDiffusers"),className:" modal-close-btn",isLoading:s,children:["🧨 ",r("modelManager.convertToDiffusers")]}),motionPreset:"slideInBottom",children:[a.jsxs(N,{flexDirection:"column",rowGap:4,children:[a.jsx(je,{children:r("modelManager.convertToDiffusersHelpText1")}),a.jsxs(zf,{children:[a.jsx(Ps,{children:r("modelManager.convertToDiffusersHelpText2")}),a.jsx(Ps,{children:r("modelManager.convertToDiffusersHelpText3")}),a.jsx(Ps,{children:r("modelManager.convertToDiffusersHelpText4")}),a.jsx(Ps,{children:r("modelManager.convertToDiffusersHelpText5")})]}),a.jsx(je,{children:r("modelManager.convertToDiffusersHelpText6")})]}),a.jsxs(N,{flexDir:"column",gap:2,children:[a.jsxs(N,{marginTop:4,flexDir:"column",gap:2,children:[a.jsx(je,{fontWeight:"600",children:r("modelManager.convertToDiffusersSaveLocation")}),a.jsx(om,{value:i,onChange:m,children:a.jsxs(N,{gap:4,children:[a.jsx(ei,{value:"InvokeAIRoot",children:a.jsx(Wn,{label:"Save converted model in the InvokeAI root folder",children:r("modelManager.invokeRoot")})}),a.jsx(ei,{value:"Custom",children:a.jsx(Wn,{label:"Save converted model in a custom folder",children:r("modelManager.custom")})})]})})]}),i==="Custom"&&a.jsxs(N,{flexDirection:"column",rowGap:2,children:[a.jsx(je,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:r("modelManager.customSaveLocation")}),a.jsx(Is,{value:d,onChange:g,width:"full"})]})]})]})}function bhe(e){const{model:t}=e,[n,{isLoading:r}]=xP(),{data:o}=mP(),[s,i]=l.useState(!1);l.useEffect(()=>{o!=null&&o.includes(t.config)||i(!0)},[o,t.config]);const c=le(),{t:d}=Q(),p=uc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"main",path:t.path?t.path:"",description:t.description?t.description:"",model_format:"checkpoint",vae:t.vae?t.vae:"",config:t.config?t.config:"",variant:t.variant},validate:{path:g=>g.trim().length===0?"Must provide a path":null}}),h=l.useCallback(()=>i(g=>!g),[]),m=l.useCallback(g=>{const b={base_model:t.base_model,model_name:t.model_name,body:g};n(b).unwrap().then(y=>{p.setValues(y),c(Ht(rr({title:d("modelManager.modelUpdated"),status:"success"})))}).catch(y=>{p.reset(),c(Ht(rr({title:d("modelManager.modelUpdateFailed"),status:"error"})))})},[p,c,t.base_model,t.model_name,d,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{justifyContent:"space-between",alignItems:"center",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(je,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(je,{fontSize:"sm",color:"base.400",children:[xr[t.base_model]," Model"]})]}),[""].includes(t.base_model)?a.jsx(Va,{sx:{p:2,borderRadius:4,bg:"error.200",_dark:{bg:"error.400"}},children:"Conversion Not Supported"}):a.jsx(vhe,{model:t})]}),a.jsx(io,{}),a.jsx(N,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",children:a.jsx("form",{onSubmit:p.onSubmit(g=>m(g)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Or,{label:d("modelManager.name"),...p.getInputProps("model_name")}),a.jsx(Or,{label:d("modelManager.description"),...p.getInputProps("description")}),a.jsx(sp,{required:!0,...p.getInputProps("base_model")}),a.jsx($0,{required:!0,...p.getInputProps("variant")}),a.jsx(Or,{required:!0,label:d("modelManager.modelLocation"),...p.getInputProps("path")}),a.jsx(Or,{label:d("modelManager.vaeLocation"),...p.getInputProps("vae")}),a.jsxs(N,{flexDirection:"column",gap:2,children:[s?a.jsx(Or,{required:!0,label:d("modelManager.config"),...p.getInputProps("config")}):a.jsx(WA,{required:!0,...p.getInputProps("config")}),a.jsx(Eo,{isChecked:s,onChange:h,label:"Use Custom Config"})]}),a.jsx(Dt,{type:"submit",isLoading:r,children:d("modelManager.updateModel")})]})})})]})}function xhe(e){const{model:t}=e,[n,{isLoading:r}]=xP(),o=le(),{t:s}=Q(),i=uc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"main",path:t.path?t.path:"",description:t.description?t.description:"",model_format:"diffusers",vae:t.vae?t.vae:"",variant:t.variant},validate:{path:d=>d.trim().length===0?"Must provide a path":null}}),c=l.useCallback(d=>{const p={base_model:t.base_model,model_name:t.model_name,body:d};n(p).unwrap().then(h=>{i.setValues(h),o(Ht(rr({title:s("modelManager.modelUpdated"),status:"success"})))}).catch(h=>{i.reset(),o(Ht(rr({title:s("modelManager.modelUpdateFailed"),status:"error"})))})},[i,o,t.base_model,t.model_name,s,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(je,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(je,{fontSize:"sm",color:"base.400",children:[xr[t.base_model]," Model"]})]}),a.jsx(io,{}),a.jsx("form",{onSubmit:i.onSubmit(d=>c(d)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Or,{label:s("modelManager.name"),...i.getInputProps("model_name")}),a.jsx(Or,{label:s("modelManager.description"),...i.getInputProps("description")}),a.jsx(sp,{required:!0,...i.getInputProps("base_model")}),a.jsx($0,{required:!0,...i.getInputProps("variant")}),a.jsx(Or,{required:!0,label:s("modelManager.modelLocation"),...i.getInputProps("path")}),a.jsx(Or,{label:s("modelManager.vaeLocation"),...i.getInputProps("vae")}),a.jsx(Dt,{type:"submit",isLoading:r,children:s("modelManager.updateModel")})]})})]})}function yhe(e){const{model:t}=e,[n,{isLoading:r}]=lN(),o=le(),{t:s}=Q(),i=uc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"lora",path:t.path?t.path:"",description:t.description?t.description:"",model_format:t.model_format},validate:{path:d=>d.trim().length===0?"Must provide a path":null}}),c=l.useCallback(d=>{const p={base_model:t.base_model,model_name:t.model_name,body:d};n(p).unwrap().then(h=>{i.setValues(h),o(Ht(rr({title:s("modelManager.modelUpdated"),status:"success"})))}).catch(h=>{i.reset(),o(Ht(rr({title:s("modelManager.modelUpdateFailed"),status:"error"})))})},[o,i,t.base_model,t.model_name,s,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(je,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(je,{fontSize:"sm",color:"base.400",children:[xr[t.base_model]," Model ⋅"," ",cN[t.model_format]," format"]})]}),a.jsx(io,{}),a.jsx("form",{onSubmit:i.onSubmit(d=>c(d)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Or,{label:s("modelManager.name"),...i.getInputProps("model_name")}),a.jsx(Or,{label:s("modelManager.description"),...i.getInputProps("description")}),a.jsx(sp,{...i.getInputProps("base_model")}),a.jsx(Or,{label:s("modelManager.modelLocation"),...i.getInputProps("path")}),a.jsx(Dt,{type:"submit",isLoading:r,children:s("modelManager.updateModel")})]})})]})}function Che(e){const{t}=Q(),n=le(),[r]=uN(),[o]=dN(),{model:s,isSelected:i,setSelectedModelId:c}=e,d=l.useCallback(()=>{c(s.id)},[s.id,c]),p=l.useCallback(()=>{const h={main:r,lora:o,onnx:r}[s.model_type];h(s).unwrap().then(m=>{n(Ht(rr({title:`${t("modelManager.modelDeleted")}: ${s.model_name}`,status:"success"})))}).catch(m=>{m&&n(Ht(rr({title:`${t("modelManager.modelDeleteFailed")}: ${s.model_name}`,status:"error"})))}),c(void 0)},[r,o,s,c,n,t]);return a.jsxs(N,{sx:{gap:2,alignItems:"center",w:"full"},children:[a.jsx(N,{as:Dt,isChecked:i,sx:{justifyContent:"start",p:2,borderRadius:"base",w:"full",alignItems:"center",bg:i?"accent.400":"base.100",color:i?"base.50":"base.800",_hover:{bg:i?"accent.500":"base.300",color:i?"base.50":"base.800"},_dark:{color:i?"base.50":"base.100",bg:i?"accent.600":"base.850",_hover:{color:i?"base.50":"base.100",bg:i?"accent.550":"base.700"}}},onClick:d,children:a.jsxs(N,{gap:4,alignItems:"center",children:[a.jsx(Va,{minWidth:14,p:.5,fontSize:"sm",variant:"solid",children:fN[s.base_model]}),a.jsx(Wn,{label:s.description,hasArrow:!0,placement:"bottom",children:a.jsx(je,{sx:{fontWeight:500},children:s.model_name})})]})}),a.jsx(_0,{title:t("modelManager.deleteModel"),acceptCallback:p,acceptButtonText:t("modelManager.delete"),triggerComponent:a.jsx(rt,{icon:a.jsx(Une,{}),"aria-label":t("modelManager.deleteConfig"),colorScheme:"error"}),children:a.jsxs(N,{rowGap:4,flexDirection:"column",children:[a.jsx("p",{style:{fontWeight:"bold"},children:t("modelManager.deleteMsg1")}),a.jsx("p",{children:t("modelManager.deleteMsg2")})]})})]})}const whe=e=>{const{selectedModelId:t,setSelectedModelId:n}=e,{t:r}=Q(),[o,s]=l.useState(""),[i,c]=l.useState("all"),{filteredDiffusersModels:d,isLoadingDiffusersModels:p}=aa(Al,{selectFromResult:({data:I,isLoading:_})=>({filteredDiffusersModels:jd(I,"main","diffusers",o),isLoadingDiffusersModels:_})}),{filteredCheckpointModels:h,isLoadingCheckpointModels:m}=aa(Al,{selectFromResult:({data:I,isLoading:_})=>({filteredCheckpointModels:jd(I,"main","checkpoint",o),isLoadingCheckpointModels:_})}),{filteredLoraModels:g,isLoadingLoraModels:b}=_f(void 0,{selectFromResult:({data:I,isLoading:_})=>({filteredLoraModels:jd(I,"lora",void 0,o),isLoadingLoraModels:_})}),{filteredOnnxModels:y,isLoadingOnnxModels:x}=Jd(Al,{selectFromResult:({data:I,isLoading:_})=>({filteredOnnxModels:jd(I,"onnx","onnx",o),isLoadingOnnxModels:_})}),{filteredOliveModels:w,isLoadingOliveModels:S}=Jd(Al,{selectFromResult:({data:I,isLoading:_})=>({filteredOliveModels:jd(I,"onnx","olive",o),isLoadingOliveModels:_})}),j=l.useCallback(I=>{s(I.target.value)},[]);return a.jsx(N,{flexDirection:"column",rowGap:4,width:"50%",minWidth:"50%",children:a.jsxs(N,{flexDirection:"column",gap:4,paddingInlineEnd:4,children:[a.jsxs(Hn,{isAttached:!0,children:[a.jsx(Dt,{onClick:c.bind(null,"all"),isChecked:i==="all",size:"sm",children:r("modelManager.allModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"diffusers"),isChecked:i==="diffusers",children:r("modelManager.diffusersModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"checkpoint"),isChecked:i==="checkpoint",children:r("modelManager.checkpointModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"onnx"),isChecked:i==="onnx",children:r("modelManager.onnxModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"olive"),isChecked:i==="olive",children:r("modelManager.oliveModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"lora"),isChecked:i==="lora",children:r("modelManager.loraModels")})]}),a.jsx(Is,{onChange:j,label:r("modelManager.search"),labelPos:"side"}),a.jsxs(N,{flexDirection:"column",gap:4,maxHeight:window.innerHeight-280,overflow:"scroll",children:[p&&a.jsx(Wc,{loadingMessage:"Loading Diffusers..."}),["all","diffusers"].includes(i)&&!p&&d.length>0&&a.jsx(Hc,{title:"Diffusers",modelList:d,selected:{selectedModelId:t,setSelectedModelId:n}},"diffusers"),m&&a.jsx(Wc,{loadingMessage:"Loading Checkpoints..."}),["all","checkpoint"].includes(i)&&!m&&h.length>0&&a.jsx(Hc,{title:"Checkpoints",modelList:h,selected:{selectedModelId:t,setSelectedModelId:n}},"checkpoints"),b&&a.jsx(Wc,{loadingMessage:"Loading LoRAs..."}),["all","lora"].includes(i)&&!b&&g.length>0&&a.jsx(Hc,{title:"LoRAs",modelList:g,selected:{selectedModelId:t,setSelectedModelId:n}},"loras"),S&&a.jsx(Wc,{loadingMessage:"Loading Olives..."}),["all","olive"].includes(i)&&!S&&w.length>0&&a.jsx(Hc,{title:"Olives",modelList:w,selected:{selectedModelId:t,setSelectedModelId:n}},"olive"),x&&a.jsx(Wc,{loadingMessage:"Loading ONNX..."}),["all","onnx"].includes(i)&&!x&&y.length>0&&a.jsx(Hc,{title:"ONNX",modelList:y,selected:{selectedModelId:t,setSelectedModelId:n}},"onnx")]})]})})},She=l.memo(whe),jd=(e,t,n,r)=>{const o=[];return to(e==null?void 0:e.entities,s=>{if(!s)return;const i=s.model_name.toLowerCase().includes(r.toLowerCase()),c=n===void 0||s.model_format===n,d=s.model_type===t;i&&c&&d&&o.push(s)}),o},rC=l.memo(e=>a.jsx(N,{flexDirection:"column",gap:4,borderRadius:4,p:4,sx:{bg:"base.200",_dark:{bg:"base.800"}},children:e.children}));rC.displayName="StyledModelContainer";const Hc=l.memo(e=>{const{title:t,modelList:n,selected:r}=e;return a.jsx(rC,{children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(je,{variant:"subtext",fontSize:"sm",children:t}),n.map(o=>a.jsx(Che,{model:o,isSelected:r.selectedModelId===o.id,setSelectedModelId:r.setSelectedModelId},o.id))]})})});Hc.displayName="ModelListWrapper";const Wc=l.memo(({loadingMessage:e})=>a.jsx(rC,{children:a.jsxs(N,{justifyContent:"center",alignItems:"center",flexDirection:"column",p:4,gap:8,children:[a.jsx(Ci,{}),a.jsx(je,{variant:"subtext",children:e||"Fetching..."})]})}));Wc.displayName="FetchingModelsLoader";function khe(){const[e,t]=l.useState(),{mainModel:n}=aa(Al,{selectFromResult:({data:s})=>({mainModel:e?s==null?void 0:s.entities[e]:void 0})}),{loraModel:r}=_f(void 0,{selectFromResult:({data:s})=>({loraModel:e?s==null?void 0:s.entities[e]:void 0})}),o=n||r;return a.jsxs(N,{sx:{gap:8,w:"full",h:"full"},children:[a.jsx(She,{selectedModelId:e,setSelectedModelId:t}),a.jsx(jhe,{model:o})]})}const jhe=e=>{const{t}=Q(),{model:n}=e;return(n==null?void 0:n.model_format)==="checkpoint"?a.jsx(bhe,{model:n},n.id):(n==null?void 0:n.model_format)==="diffusers"?a.jsx(xhe,{model:n},n.id):(n==null?void 0:n.model_type)==="lora"?a.jsx(yhe,{model:n},n.id):a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center",maxH:96,userSelect:"none"},children:a.jsx(je,{variant:"subtext",children:t("modelManager.noModelSelected")})})};function _he(){const{t:e}=Q();return a.jsxs(N,{sx:{w:"full",p:4,borderRadius:4,gap:4,justifyContent:"space-between",alignItems:"center",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(je,{sx:{fontWeight:600},children:e("modelManager.syncModels")}),a.jsx(je,{fontSize:"sm",sx:{_dark:{color:"base.400"}},children:e("modelManager.syncModelsDesc")})]}),a.jsx(Ku,{})]})}function Ihe(){return a.jsx(N,{children:a.jsx(_he,{})})}const Phe=()=>{const{t:e}=Q(),t=l.useMemo(()=>[{id:"modelManager",label:e("modelManager.modelManager"),content:a.jsx(khe,{})},{id:"importModels",label:e("modelManager.importModels"),content:a.jsx(hhe,{})},{id:"mergeModels",label:e("modelManager.mergeModels"),content:a.jsx(ghe,{})},{id:"settings",label:e("modelManager.settings"),content:a.jsx(Ihe,{})}],[e]);return a.jsxs(tc,{isLazy:!0,variant:"line",layerStyle:"first",sx:{w:"full",h:"full",p:4,gap:4,borderRadius:"base"},children:[a.jsx(nc,{children:t.map(n=>a.jsx(wo,{sx:{borderTopRadius:"base"},children:n.label},n.id))}),a.jsx($u,{sx:{w:"full",h:"full"},children:t.map(n=>a.jsx(Go,{sx:{w:"full",h:"full"},children:n.content},n.id))})]})},Ehe=l.memo(Phe),Mhe=me([e=>e.nodes],e=>e.nodeTemplates),Ohe=()=>{const e=H(Mhe),t=Jx();return l.useCallback(n=>{var d;let r=window.innerWidth/2,o=window.innerHeight/2;const s=(d=document.querySelector("#workflow-editor"))==null?void 0:d.getBoundingClientRect();s&&(r=s.width/2-sb/2,o=s.height/2-sb/2);const i=t.project({x:r,y:o}),c=e[n];return pN(n,i,c)},[e,t])},GA=l.forwardRef(({label:e,description:t,...n},r)=>a.jsx("div",{ref:r,...n,children:a.jsxs("div",{children:[a.jsx(je,{fontWeight:600,children:e}),a.jsx(je,{size:"xs",sx:{color:"base.600",_dark:{color:"base.500"}},children:t})]})}));GA.displayName="AddNodePopoverSelectItem";const Ahe=(e,t)=>{const n=new RegExp(e.trim().replace(/[-[\]{}()*+!<=:?./\\^$|#,]/g,"").split(" ").join(".*"),"gi");return n.test(t.label)||n.test(t.description)||t.tags.some(r=>n.test(r))},Rhe=()=>{const e=le(),t=Ohe(),n=Zl(),{t:r}=Q(),o=H(w=>w.nodes.currentConnectionFieldType),s=H(w=>{var S;return(S=w.nodes.connectionStartParams)==null?void 0:S.handleType}),i=me([we],({nodes:w})=>{const S=o?S$(w.nodeTemplates,I=>{const _=s=="source"?I.inputs:I.outputs;return ta(_,M=>{const E=s=="source"?o:M.type,A=s=="target"?o:M.type;return Zx(E,A)})}):To(w.nodeTemplates),j=To(S,I=>({label:I.title,value:I.type,description:I.description,tags:I.tags}));return o===null&&(j.push({label:r("nodes.currentImage"),value:"current_image",description:r("nodes.currentImageDescription"),tags:["progress"]}),j.push({label:r("nodes.notes"),value:"notes",description:r("nodes.notesDescription"),tags:["notes"]})),j.sort((I,_)=>I.label.localeCompare(_.label)),{data:j,t:r}},Ie),{data:c}=H(i),d=H(w=>w.nodes.isAddNodePopoverOpen),p=l.useRef(null),h=l.useCallback(w=>{const S=t(w);if(!S){const j=r("nodes.unknownNode",{nodeType:w});n({status:"error",title:j});return}e(hN(S))},[e,t,n,r]),m=l.useCallback(w=>{w&&h(w)},[h]),g=l.useCallback(()=>{e(mN())},[e]),b=l.useCallback(()=>{e(yP())},[e]),y=l.useCallback(w=>{w.preventDefault(),b(),setTimeout(()=>{var S;(S=p.current)==null||S.focus()},0)},[b]),x=l.useCallback(()=>{g()},[g]);return _t(["shift+a","space"],y),_t(["escape"],x),a.jsxs(Uf,{initialFocusRef:p,isOpen:d,onClose:g,placement:"bottom",openDelay:0,closeDelay:0,closeOnBlur:!0,returnFocusOnClose:!0,children:[a.jsx(y3,{children:a.jsx(N,{sx:{position:"absolute",top:"15%",insetInlineStart:"50%",pointerEvents:"none"}})}),a.jsx(Gf,{sx:{p:0,top:-1,shadow:"dark-lg",borderColor:"accent.300",borderWidth:"2px",borderStyle:"solid",_dark:{borderColor:"accent.400"}},children:a.jsx(Hg,{sx:{p:0},children:a.jsx(sr,{inputRef:p,selectOnBlur:!1,placeholder:r("nodes.nodeSearch"),value:null,data:c,maxDropdownHeight:400,nothingFound:r("nodes.noMatchingNodes"),itemComponent:GA,filter:Ahe,onChange:m,hoverOnSearchChange:!0,onDropdownClose:g,sx:{width:"32rem",input:{padding:"0.5rem"}}})})})]})},Dhe=l.memo(Rhe),The=()=>{const e=Jx(),t=H(r=>r.nodes.shouldValidateGraph);return l.useCallback(({source:r,sourceHandle:o,target:s,targetHandle:i})=>{var b,y;const c=e.getEdges(),d=e.getNodes();if(!(r&&o&&s&&i))return!1;const p=e.getNode(r),h=e.getNode(s);if(!(p&&h&&p.data&&h.data))return!1;const m=(b=p.data.outputs[o])==null?void 0:b.type,g=(y=h.data.inputs[i])==null?void 0:y.type;return!m||!g||r===s?!1:t?c.find(x=>{x.target===s&&x.targetHandle===i&&x.source===r&&x.sourceHandle})||c.find(x=>x.target===s&&x.targetHandle===i)&&g!=="CollectionItem"||!Zx(m,g)?!1:CP(r,s,d,c):!0},[e,t])},yf=e=>`var(--invokeai-colors-${e.split(".").join("-")})`,Nhe=me(we,({nodes:e})=>{const{shouldAnimateEdges:t,currentConnectionFieldType:n,shouldColorEdges:r}=e,o=yf(n&&r?If[n].color:"base.500");let s="react-flow__custom_connection-path";return t&&(s=s.concat(" animated")),{stroke:o,className:s}}),$he=({fromX:e,fromY:t,fromPosition:n,toX:r,toY:o,toPosition:s})=>{const{stroke:i,className:c}=H(Nhe),d={sourceX:e,sourceY:t,sourcePosition:n,targetX:r,targetY:o,targetPosition:s},[p]=ey(d);return a.jsx("g",{children:a.jsx("path",{fill:"none",stroke:i,strokeWidth:2,className:c,d:p,style:{opacity:.8}})})},Lhe=l.memo($he),qA=(e,t,n,r,o)=>me(we,({nodes:s})=>{var g,b;const i=s.nodes.find(y=>y.id===e),c=s.nodes.find(y=>y.id===n),d=Rr(i)&&Rr(c),p=(i==null?void 0:i.selected)||(c==null?void 0:c.selected)||o,h=d?(b=(g=i==null?void 0:i.data)==null?void 0:g.outputs[t||""])==null?void 0:b.type:void 0,m=h&&s.shouldColorEdges?yf(If[h].color):yf("base.500");return{isSelected:p,shouldAnimate:s.shouldAnimateEdges&&p,stroke:m}},Ie),zhe=({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o,targetPosition:s,markerEnd:i,data:c,selected:d,source:p,target:h,sourceHandleId:m,targetHandleId:g})=>{const b=l.useMemo(()=>qA(p,m,h,g,d),[d,p,m,h,g]),{isSelected:y,shouldAnimate:x}=H(b),[w,S,j]=ey({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s}),{base500:I}=Jf();return a.jsxs(a.Fragment,{children:[a.jsx(wP,{path:w,markerEnd:i,style:{strokeWidth:y?3:2,stroke:I,opacity:y?.8:.5,animation:x?"dashdraw 0.5s linear infinite":void 0,strokeDasharray:x?5:"none"}}),(c==null?void 0:c.count)&&c.count>1&&a.jsx(gN,{children:a.jsx(N,{sx:{position:"absolute",transform:`translate(-50%, -50%) translate(${S}px,${j}px)`},className:"nodrag nopan",children:a.jsx(Va,{variant:"solid",sx:{bg:"base.500",opacity:y?.8:.5,boxShadow:"base"},children:c.count})})})]})},Fhe=l.memo(zhe),Bhe=({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o,targetPosition:s,markerEnd:i,selected:c,source:d,target:p,sourceHandleId:h,targetHandleId:m})=>{const g=l.useMemo(()=>qA(d,h,p,m,c),[d,h,p,m,c]),{isSelected:b,shouldAnimate:y,stroke:x}=H(g),[w]=ey({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s});return a.jsx(wP,{path:w,markerEnd:i,style:{strokeWidth:b?3:2,stroke:x,opacity:b?.8:.5,animation:y?"dashdraw 0.5s linear infinite":void 0,strokeDasharray:y?5:"none"}})},Hhe=l.memo(Bhe),Whe=e=>{const{nodeId:t,width:n,children:r,selected:o}=e,{isMouseOverNode:s,handleMouseOut:i,handleMouseOver:c}=rA(t),d=l.useMemo(()=>me(we,({nodes:j})=>{var I;return((I=j.nodeExecutionStates[t])==null?void 0:I.status)===oi.IN_PROGRESS}),[t]),p=H(d),[h,m,g,b]=ea("shadows",["nodeInProgress.light","nodeInProgress.dark","shadows.xl","shadows.base"]),y=le(),x=di(h,m),w=H(j=>j.nodes.nodeOpacity),S=l.useCallback(j=>{!j.ctrlKey&&!j.altKey&&!j.metaKey&&!j.shiftKey&&y(vN(t)),y(SP())},[y,t]);return a.jsxs(Le,{onClick:S,onMouseEnter:c,onMouseLeave:i,className:Du,sx:{h:"full",position:"relative",borderRadius:"base",w:n??sb,transitionProperty:"common",transitionDuration:"0.1s",cursor:"grab",opacity:w},children:[a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",pointerEvents:"none",shadow:`${g}, ${b}, ${b}`,zIndex:-1}}),a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"md",pointerEvents:"none",transitionProperty:"common",transitionDuration:"0.1s",opacity:.7,shadow:p?x:void 0,zIndex:-1}}),r,a.jsx(nA,{isSelected:o,isHovered:s})]})},L0=l.memo(Whe),Vhe=me(we,({system:e,gallery:t})=>{var r;return{imageDTO:t.selection[t.selection.length-1],progressImage:(r=e.denoiseProgress)==null?void 0:r.progress_image}}),Uhe=e=>{const{progressImage:t,imageDTO:n}=bN(Vhe);return t?a.jsx(H1,{nodeProps:e,children:a.jsx(_i,{src:t.dataURL,sx:{w:"full",h:"full",objectFit:"contain",borderRadius:"base"}})}):n?a.jsx(H1,{nodeProps:e,children:a.jsx(ll,{imageDTO:n,isDragDisabled:!0,useThumbailFallback:!0})}):a.jsx(H1,{nodeProps:e,children:a.jsx(eo,{})})},Ghe=l.memo(Uhe),H1=e=>{const[t,n]=l.useState(!1),r=l.useCallback(()=>{n(!0)},[]),o=l.useCallback(()=>{n(!1)},[]);return a.jsx(L0,{nodeId:e.nodeProps.id,selected:e.nodeProps.selected,width:384,children:a.jsxs(N,{onMouseEnter:r,onMouseLeave:o,className:Du,sx:{position:"relative",flexDirection:"column"},children:[a.jsx(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",alignItems:"center",justifyContent:"center",h:8},children:a.jsx(je,{sx:{fontSize:"sm",fontWeight:600,color:"base.700",_dark:{color:"base.200"}},children:"Current Image"})}),a.jsxs(N,{layerStyle:"nodeBody",sx:{w:"full",h:"full",borderBottomRadius:"base",p:2},children:[e.children,t&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},style:{position:"absolute",top:40,left:-2,right:-2,bottom:0,pointerEvents:"none"},children:a.jsx(zA,{})},"nextPrevButtons")]})]})})},oC=e=>{const t=e.filter(o=>!o.ui_hidden),n=t.filter(o=>!si(o.ui_order)).sort((o,s)=>(o.ui_order??0)-(s.ui_order??0)),r=t.filter(o=>si(o.ui_order));return n.concat(r).map(o=>o.name).filter(o=>o!=="is_intermediate")},qhe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(c=>c.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];if(!s)return[];const i=To(s.inputs).filter(c=>(["any","direct"].includes(c.input)||ty.includes(c.type))&&kP.includes(c.type));return oC(i)},Ie),[e]);return H(t)},Khe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(c=>c.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];if(!s)return[];const i=To(s.inputs).filter(c=>c.input==="connection"&&!ty.includes(c.type)||!kP.includes(c.type));return oC(i)},Ie),[e]);return H(t)},Qhe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];return s?oC(To(s.outputs)):[]},Ie),[e]);return H(t)},sC=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?ta(o.data.outputs,s=>xN.includes(s.type)&&o.data.type!=="image"):!1},Ie),[e]);return H(t)},Xhe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.embedWorkflow:!1},Ie),[e]);return H(t)},Yhe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return!1;const s=r.nodeTemplates[(o==null?void 0:o.data.type)??""];return s?s.withWorkflow:!1},Ie),[e]);return H(t)},Jhe=({nodeId:e})=>{const t=le(),n=Yhe(e),r=Xhe(e),o=l.useCallback(s=>{t(yN({nodeId:e,embedWorkflow:s.target.checked}))},[t,e]);return n?a.jsxs(Vn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(yr,{sx:{fontSize:"xs",mb:"1px"},children:"Workflow"}),a.jsx(Tf,{className:"nopan",size:"sm",onChange:o,isChecked:r})]}):null},Zhe=l.memo(Jhe),eme=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.isIntermediate:!1},Ie),[e]);return H(t)},tme=({nodeId:e})=>{const t=le(),n=sC(e),r=eme(e),o=l.useCallback(s=>{t(CN({nodeId:e,isIntermediate:!s.target.checked}))},[t,e]);return n?a.jsxs(Vn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(yr,{sx:{fontSize:"xs",mb:"1px"},children:"Save to Gallery"}),a.jsx(Tf,{className:"nopan",size:"sm",onChange:o,isChecked:!r})]}):null},nme=l.memo(tme),rme=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.useCache:!1},Ie),[e]);return H(t)},ome=({nodeId:e})=>{const t=le(),n=rme(e),r=l.useCallback(o=>{t(wN({nodeId:e,useCache:o.target.checked}))},[t,e]);return a.jsxs(Vn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(yr,{sx:{fontSize:"xs",mb:"1px"},children:"Use Cache"}),a.jsx(Tf,{className:"nopan",size:"sm",onChange:r,isChecked:n})]})},sme=l.memo(ome),ame=({nodeId:e})=>{const t=sC(e),n=Pn("invocationCache").isFeatureEnabled;return a.jsxs(N,{className:Du,layerStyle:"nodeFooter",sx:{w:"full",borderBottomRadius:"base",px:2,py:0,h:6,justifyContent:"space-between"},children:[n&&a.jsx(sme,{nodeId:e}),t&&a.jsx(Zhe,{nodeId:e}),t&&a.jsx(nme,{nodeId:e})]})},ime=l.memo(ame),lme=({nodeId:e,isOpen:t})=>{const n=le(),r=SN(),o=l.useCallback(()=>{n(kN({nodeId:e,isOpen:!t})),r(e)},[n,t,e,r]);return a.jsx(rt,{className:"nodrag",onClick:o,"aria-label":"Minimize",sx:{minW:8,w:8,h:8,color:"base.500",_dark:{color:"base.500"},_hover:{color:"base.700",_dark:{color:"base.300"}}},variant:"link",icon:a.jsx(b0,{sx:{transform:t?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})})},aC=l.memo(lme),cme=({nodeId:e,title:t})=>{const n=le(),r=Z8(e),o=eA(e),{t:s}=Q(),[i,c]=l.useState(""),d=l.useCallback(async h=>{n(oP({nodeId:e,label:h})),c(r||t||o||s("nodes.problemSettingTitle"))},[n,e,t,o,r,s]),p=l.useCallback(h=>{c(h)},[]);return l.useEffect(()=>{c(r||t||o||s("nodes.problemSettingTitle"))},[r,o,t,s]),a.jsx(N,{sx:{overflow:"hidden",w:"full",h:"full",alignItems:"center",justifyContent:"center",cursor:"text"},children:a.jsxs(Lf,{as:N,value:i,onChange:p,onSubmit:d,sx:{alignItems:"center",position:"relative",w:"full",h:"full"},children:[a.jsx($f,{fontSize:"sm",sx:{p:0,w:"full"},noOfLines:1}),a.jsx(Nf,{className:"nodrag",fontSize:"sm",sx:{p:0,fontWeight:700,_focusVisible:{p:0,boxShadow:"none"}}}),a.jsx(ume,{})]})})},KA=l.memo(cme);function ume(){const{isEditing:e,getEditButtonProps:t}=e5(),n=l.useCallback(r=>{const{onClick:o}=t();o&&o(r)},[t]);return e?null:a.jsx(Le,{className:Du,onDoubleClick:n,sx:{position:"absolute",w:"full",h:"full",top:0,cursor:"grab"}})}const dme=({nodeId:e})=>{const t=K2(e),{base400:n,base600:r}=Jf(),o=di(n,r),s=l.useMemo(()=>({borderWidth:0,borderRadius:"3px",width:"1rem",height:"1rem",backgroundColor:o,zIndex:-1}),[o]);return Kh(t)?a.jsxs(a.Fragment,{children:[a.jsx(Ed,{type:"target",id:`${t.id}-collapsed-target`,isConnectable:!1,position:Uc.Left,style:{...s,left:"-0.5rem"}}),To(t.inputs,i=>a.jsx(Ed,{type:"target",id:i.name,isConnectable:!1,position:Uc.Left,style:{visibility:"hidden"}},`${t.id}-${i.name}-collapsed-input-handle`)),a.jsx(Ed,{type:"source",id:`${t.id}-collapsed-source`,isConnectable:!1,position:Uc.Right,style:{...s,right:"-0.5rem"}}),To(t.outputs,i=>a.jsx(Ed,{type:"source",id:i.name,isConnectable:!1,position:Uc.Right,style:{visibility:"hidden"}},`${t.id}-${i.name}-collapsed-output-handle`))]}):null},fme=l.memo(dme),pme=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);return r.nodeTemplates[(o==null?void 0:o.data.type)??""]},Ie),[e]);return H(t)},hme=({nodeId:e})=>{const{needsUpdate:t}=sP(e);return a.jsx(Wn,{label:a.jsx(QA,{nodeId:e}),placement:"top",shouldWrapChildren:!0,children:a.jsx(Gr,{as:QM,sx:{boxSize:4,w:8,color:t?"error.400":"base.400"}})})},mme=l.memo(hme),QA=l.memo(({nodeId:e})=>{const t=K2(e),n=pme(e),{t:r}=Q(),o=l.useMemo(()=>t!=null&&t.label&&(n!=null&&n.title)?`${t.label} (${n.title})`:t!=null&&t.label&&!n?t.label:!(t!=null&&t.label)&&n?n.title:r("nodes.unknownNode"),[t,n,r]),s=l.useMemo(()=>!Kh(t)||!n?null:t.version?n.version?xS(t.version,n.version,"<")?a.jsxs(je,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.updateNode"),")"]}):xS(t.version,n.version,">")?a.jsxs(je,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.updateApp"),")"]}):a.jsxs(je,{as:"span",children:[r("nodes.version")," ",t.version]}):a.jsxs(je,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.unknownTemplate"),")"]}):a.jsx(je,{as:"span",sx:{color:"error.500"},children:r("nodes.versionUnknown")}),[t,n,r]);return Kh(t)?a.jsxs(N,{sx:{flexDir:"column"},children:[a.jsx(je,{as:"span",sx:{fontWeight:600},children:o}),a.jsx(je,{sx:{opacity:.7,fontStyle:"oblique 5deg"},children:n==null?void 0:n.description}),s,(t==null?void 0:t.notes)&&a.jsx(je,{children:t.notes})]}):a.jsx(je,{sx:{fontWeight:600},children:r("nodes.unknownNode")})});QA.displayName="TooltipContent";const W1=3,nI={circle:{transitionProperty:"none",transitionDuration:"0s"},".chakra-progress__track":{stroke:"transparent"}},gme=({nodeId:e})=>{const t=l.useMemo(()=>me(we,({nodes:r})=>r.nodeExecutionStates[e]),[e]),n=H(t);return n?a.jsx(Wn,{label:a.jsx(XA,{nodeExecutionState:n}),placement:"top",children:a.jsx(N,{className:Du,sx:{w:5,h:"full",alignItems:"center",justifyContent:"flex-end"},children:a.jsx(YA,{nodeExecutionState:n})})}):null},vme=l.memo(gme),XA=l.memo(({nodeExecutionState:e})=>{const{status:t,progress:n,progressImage:r}=e,{t:o}=Q();return t===oi.PENDING?a.jsx(je,{children:"Pending"}):t===oi.IN_PROGRESS?r?a.jsxs(N,{sx:{pos:"relative",pt:1.5,pb:.5},children:[a.jsx(_i,{src:r.dataURL,sx:{w:32,h:32,borderRadius:"base",objectFit:"contain"}}),n!==null&&a.jsxs(Va,{variant:"solid",sx:{pos:"absolute",top:2.5,insetInlineEnd:1},children:[Math.round(n*100),"%"]})]}):n!==null?a.jsxs(je,{children:[o("nodes.executionStateInProgress")," (",Math.round(n*100),"%)"]}):a.jsx(je,{children:o("nodes.executionStateInProgress")}):t===oi.COMPLETED?a.jsx(je,{children:o("nodes.executionStateCompleted")}):t===oi.FAILED?a.jsx(je,{children:o("nodes.executionStateError")}):null});XA.displayName="TooltipLabel";const YA=l.memo(e=>{const{progress:t,status:n}=e.nodeExecutionState;return n===oi.PENDING?a.jsx(Gr,{as:Pee,sx:{boxSize:W1,color:"base.600",_dark:{color:"base.300"}}}):n===oi.IN_PROGRESS?t===null?a.jsx(Pb,{isIndeterminate:!0,size:"14px",color:"base.500",thickness:14,sx:nI}):a.jsx(Pb,{value:Math.round(t*100),size:"14px",color:"base.500",thickness:14,sx:nI}):n===oi.COMPLETED?a.jsx(Gr,{as:VM,sx:{boxSize:W1,color:"ok.600",_dark:{color:"ok.300"}}}):n===oi.FAILED?a.jsx(Gr,{as:Oee,sx:{boxSize:W1,color:"error.600",_dark:{color:"error.300"}}}):null});YA.displayName="StatusIcon";const bme=({nodeId:e,isOpen:t})=>a.jsxs(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:t?0:"base",alignItems:"center",justifyContent:"space-between",h:8,textAlign:"center",fontWeight:500,color:"base.700",_dark:{color:"base.200"}},children:[a.jsx(aC,{nodeId:e,isOpen:t}),a.jsx(KA,{nodeId:e}),a.jsxs(N,{alignItems:"center",children:[a.jsx(vme,{nodeId:e}),a.jsx(mme,{nodeId:e})]}),!t&&a.jsx(fme,{nodeId:e})]}),xme=l.memo(bme),yme=(e,t,n,r)=>me(we,o=>{if(!r)return fn.t("nodes.noFieldType");const{currentConnectionFieldType:s,connectionStartParams:i,nodes:c,edges:d}=o.nodes;if(!i||!s)return fn.t("nodes.noConnectionInProgress");const{handleType:p,nodeId:h,handleId:m}=i;if(!p||!h||!m)return fn.t("nodes.noConnectionData");const g=n==="target"?r:s,b=n==="source"?r:s;if(e===h)return fn.t("nodes.cannotConnectToSelf");if(n===p)return n==="source"?fn.t("nodes.cannotConnectOutputToOutput"):fn.t("nodes.cannotConnectInputToInput");const y=n==="target"?e:h,x=n==="target"?t:m,w=n==="source"?e:h,S=n==="source"?t:m;return d.find(I=>{I.target===y&&I.targetHandle===x&&I.source===w&&I.sourceHandle})?fn.t("nodes.cannotDuplicateConnection"):d.find(I=>I.target===y&&I.targetHandle===x)&&g!=="CollectionItem"?fn.t("nodes.inputMayOnlyHaveOneConnection"):Zx(b,g)?CP(p==="source"?h:e,p==="source"?e:h,c,d)?null:fn.t("nodes.connectionWouldCreateCycle"):fn.t("nodes.fieldTypesMustMatch")}),Cme=(e,t,n)=>{const r=l.useMemo(()=>me(we,({nodes:s})=>{var c;const i=s.nodes.find(d=>d.id===e);if(Rr(i))return(c=i==null?void 0:i.data[Xx[n]][t])==null?void 0:c.type},Ie),[t,n,e]);return H(r)},wme=me(we,({nodes:e})=>e.currentConnectionFieldType!==null&&e.connectionStartParams!==null),JA=({nodeId:e,fieldName:t,kind:n})=>{const r=Cme(e,t,n),o=l.useMemo(()=>me(we,({nodes:g})=>!!g.edges.filter(b=>(n==="input"?b.target:b.source)===e&&(n==="input"?b.targetHandle:b.sourceHandle)===t).length),[t,n,e]),s=l.useMemo(()=>yme(e,t,n==="input"?"target":"source",r),[e,t,n,r]),i=l.useMemo(()=>me(we,({nodes:g})=>{var b,y,x;return((b=g.connectionStartParams)==null?void 0:b.nodeId)===e&&((y=g.connectionStartParams)==null?void 0:y.handleId)===t&&((x=g.connectionStartParams)==null?void 0:x.handleType)==={input:"target",output:"source"}[n]}),[t,n,e]),c=H(o),d=H(wme),p=H(i),h=H(s),m=l.useMemo(()=>!!(d&&h&&!p),[h,d,p]);return{isConnected:c,isConnectionInProgress:d,isConnectionStartField:p,connectionError:h,shouldDim:m}},Sme=(e,t)=>{const n=l.useMemo(()=>me(we,({nodes:o})=>{var i;const s=o.nodes.find(c=>c.id===e);if(Rr(s))return((i=s==null?void 0:s.data.inputs[t])==null?void 0:i.value)!==void 0},Ie),[t,e]);return H(n)},kme=(e,t)=>{const n=l.useMemo(()=>me(we,({nodes:o})=>{const s=o.nodes.find(d=>d.id===e);if(!Rr(s))return;const i=o.nodeTemplates[(s==null?void 0:s.data.type)??""],c=i==null?void 0:i.inputs[t];return c==null?void 0:c.input},Ie),[t,e]);return H(n)},jme=({nodeId:e,fieldName:t,kind:n,children:r})=>{const o=le(),s=oA(e,t),i=sA(e,t,n),c=kme(e,t),{t:d}=Q(),p=l.useCallback(S=>{S.preventDefault()},[]),h=l.useMemo(()=>me(we,({nodes:S})=>({isExposed:!!S.workflow.exposedFields.find(I=>I.nodeId===e&&I.fieldName===t)}),Ie),[t,e]),m=l.useMemo(()=>["any","direct"].includes(c??"__UNKNOWN_INPUT__"),[c]),{isExposed:g}=H(h),b=l.useCallback(()=>{o(jN({nodeId:e,fieldName:t}))},[o,t,e]),y=l.useCallback(()=>{o(lP({nodeId:e,fieldName:t}))},[o,t,e]),x=l.useMemo(()=>{const S=[];return m&&!g&&S.push(a.jsx(Kn,{icon:a.jsx(Zi,{}),onClick:b,children:"Add to Linear View"},`${e}.${t}.expose-field`)),m&&g&&S.push(a.jsx(Kn,{icon:a.jsx(Hee,{}),onClick:y,children:"Remove from Linear View"},`${e}.${t}.unexpose-field`)),S},[t,b,y,g,m,e]),w=l.useCallback(()=>x.length?a.jsx(ql,{sx:{visibility:"visible !important"},motionProps:fu,onContextMenu:p,children:a.jsx(af,{title:s||i||d("nodes.unknownField"),children:x})}):null,[i,s,x,p,d]);return a.jsx(S2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:w,children:r})},_me=l.memo(jme),Ime=e=>{const{fieldTemplate:t,handleType:n,isConnectionInProgress:r,isConnectionStartField:o,connectionError:s}=e,{name:i,type:c}=t,{color:d,title:p}=If[c],h=l.useMemo(()=>{const g=_N.includes(c),b=ty.includes(c),y=IN.includes(c),x=yf(d),w={backgroundColor:g||b?"var(--invokeai-colors-base-900)":x,position:"absolute",width:"1rem",height:"1rem",borderWidth:g||b?4:0,borderStyle:"solid",borderColor:x,borderRadius:y?4:"100%",zIndex:1};return n==="target"?w.insetInlineStart="-1rem":w.insetInlineEnd="-1rem",r&&!o&&s&&(w.filter="opacity(0.4) grayscale(0.7)"),r&&s?o?w.cursor="grab":w.cursor="not-allowed":w.cursor="crosshair",w},[s,n,r,o,c,d]),m=l.useMemo(()=>r&&o?p:r&&s?s??p:p,[s,r,o,p]);return a.jsx(Wn,{label:m,placement:n==="target"?"start":"end",hasArrow:!0,openDelay:xg,children:a.jsx(Ed,{type:n,id:i,position:n==="target"?Uc.Left:Uc.Right,style:h})})},ZA=l.memo(Ime),Pme=({nodeId:e,fieldName:t})=>{const n=M0(e,t,"input"),r=Sme(e,t),{isConnected:o,isConnectionInProgress:s,isConnectionStartField:i,connectionError:c,shouldDim:d}=JA({nodeId:e,fieldName:t,kind:"input"}),p=l.useMemo(()=>{if((n==null?void 0:n.fieldKind)!=="input"||!n.required)return!1;if(!o&&n.input==="connection"||!r&&!o&&n.input==="any")return!0},[n,o,r]);return(n==null?void 0:n.fieldKind)!=="input"?a.jsx(wx,{shouldDim:d,children:a.jsxs(Vn,{sx:{color:"error.400",textAlign:"left",fontSize:"sm"},children:["Unknown input: ",t]})}):a.jsxs(wx,{shouldDim:d,children:[a.jsxs(Vn,{isInvalid:p,isDisabled:o,sx:{alignItems:"stretch",justifyContent:"space-between",ps:n.input==="direct"?0:2,gap:2,h:"full",w:"full"},children:[a.jsx(_me,{nodeId:e,fieldName:t,kind:"input",children:h=>a.jsx(yr,{sx:{display:"flex",alignItems:"center",h:"full",mb:0,px:1,gap:2},children:a.jsx(iA,{ref:h,nodeId:e,fieldName:t,kind:"input",isMissingInput:p,withTooltip:!0})})}),a.jsx(Le,{children:a.jsx(bA,{nodeId:e,fieldName:t})})]}),n.input!=="direct"&&a.jsx(ZA,{fieldTemplate:n,handleType:"target",isConnectionInProgress:s,isConnectionStartField:i,connectionError:c})]})},rI=l.memo(Pme),wx=l.memo(({shouldDim:e,children:t})=>a.jsx(N,{sx:{position:"relative",minH:8,py:.5,alignItems:"center",opacity:e?.5:1,transitionProperty:"opacity",transitionDuration:"0.1s",w:"full",h:"full"},children:t}));wx.displayName="InputFieldWrapper";const Eme=({nodeId:e,fieldName:t})=>{const n=M0(e,t,"output"),{isConnected:r,isConnectionInProgress:o,isConnectionStartField:s,connectionError:i,shouldDim:c}=JA({nodeId:e,fieldName:t,kind:"output"});return(n==null?void 0:n.fieldKind)!=="output"?a.jsx(Sx,{shouldDim:c,children:a.jsxs(Vn,{sx:{color:"error.400",textAlign:"right",fontSize:"sm"},children:["Unknown output: ",t]})}):a.jsxs(Sx,{shouldDim:c,children:[a.jsx(Wn,{label:a.jsx(Q2,{nodeId:e,fieldName:t,kind:"output"}),openDelay:xg,placement:"top",shouldWrapChildren:!0,hasArrow:!0,children:a.jsx(Vn,{isDisabled:r,pe:2,children:a.jsx(yr,{sx:{mb:0,fontWeight:500},children:n==null?void 0:n.title})})}),a.jsx(ZA,{fieldTemplate:n,handleType:"source",isConnectionInProgress:o,isConnectionStartField:s,connectionError:i})]})},Mme=l.memo(Eme),Sx=l.memo(({shouldDim:e,children:t})=>a.jsx(N,{sx:{position:"relative",minH:8,py:.5,alignItems:"center",opacity:e?.5:1,transitionProperty:"opacity",transitionDuration:"0.1s",justifyContent:"flex-end"},children:t}));Sx.displayName="OutputFieldWrapper";const Ome=e=>{const t=sC(e),n=Pn("invocationCache").isFeatureEnabled;return l.useMemo(()=>t||n,[t,n])},Ame=({nodeId:e,isOpen:t,label:n,type:r,selected:o})=>{const s=Khe(e),i=qhe(e),c=Ome(e),d=Qhe(e);return a.jsxs(L0,{nodeId:e,selected:o,children:[a.jsx(xme,{nodeId:e,isOpen:t,label:n,selected:o,type:r}),t&&a.jsxs(a.Fragment,{children:[a.jsx(N,{layerStyle:"nodeBody",sx:{flexDirection:"column",w:"full",h:"full",py:2,gap:1,borderBottomRadius:c?0:"base"},children:a.jsxs(N,{sx:{flexDir:"column",px:2,w:"full",h:"full"},children:[a.jsxs(rl,{gridTemplateColumns:"1fr auto",gridAutoRows:"1fr",children:[s.map((p,h)=>a.jsx(rf,{gridColumnStart:1,gridRowStart:h+1,children:a.jsx(rI,{nodeId:e,fieldName:p})},`${e}.${p}.input-field`)),d.map((p,h)=>a.jsx(rf,{gridColumnStart:2,gridRowStart:h+1,children:a.jsx(Mme,{nodeId:e,fieldName:p})},`${e}.${p}.output-field`))]}),i.map(p=>a.jsx(rI,{nodeId:e,fieldName:p},`${e}.${p}.input-field`))]})}),c&&a.jsx(ime,{nodeId:e})]})]})},Rme=l.memo(Ame),Dme=({nodeId:e,isOpen:t,label:n,type:r,selected:o})=>a.jsxs(L0,{nodeId:e,selected:o,children:[a.jsxs(N,{className:Du,layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:t?0:"base",alignItems:"center",h:8,fontWeight:600,fontSize:"sm"},children:[a.jsx(aC,{nodeId:e,isOpen:t}),a.jsx(je,{sx:{w:"full",textAlign:"center",pe:8,color:"error.500",_dark:{color:"error.300"}},children:n?`${n} (${r})`:r})]}),t&&a.jsx(N,{layerStyle:"nodeBody",sx:{userSelect:"auto",flexDirection:"column",w:"full",h:"full",p:4,gap:1,borderBottomRadius:"base",fontSize:"sm"},children:a.jsxs(Le,{children:[a.jsx(je,{as:"span",children:"Unknown node type: "}),a.jsx(je,{as:"span",fontWeight:600,children:r})]})})]}),Tme=l.memo(Dme),Nme=e=>{const{data:t,selected:n}=e,{id:r,type:o,isOpen:s,label:i}=t,c=l.useMemo(()=>me(we,({nodes:p})=>!!p.nodeTemplates[o]),[o]);return H(c)?a.jsx(Rme,{nodeId:r,isOpen:s,label:i,type:o,selected:n}):a.jsx(Tme,{nodeId:r,isOpen:s,label:i,type:o,selected:n})},$me=l.memo(Nme),Lme=e=>{const{id:t,data:n,selected:r}=e,{notes:o,isOpen:s}=n,i=le(),c=l.useCallback(d=>{i(PN({nodeId:t,value:d.target.value}))},[i,t]);return a.jsxs(L0,{nodeId:t,selected:r,children:[a.jsxs(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:s?0:"base",alignItems:"center",justifyContent:"space-between",h:8},children:[a.jsx(aC,{nodeId:t,isOpen:s}),a.jsx(KA,{nodeId:t,title:"Notes"}),a.jsx(Le,{minW:8})]}),s&&a.jsx(a.Fragment,{children:a.jsx(N,{layerStyle:"nodeBody",className:"nopan",sx:{cursor:"auto",flexDirection:"column",borderBottomRadius:"base",w:"full",h:"full",p:2,gap:1},children:a.jsx(N,{className:"nopan",sx:{flexDir:"column",w:"full",h:"full"},children:a.jsx(yi,{value:o,onChange:c,rows:8,resize:"none",sx:{fontSize:"xs"}})})})})]})},zme=l.memo(Lme),Fme=["Delete","Backspace"],Bme={collapsed:Fhe,default:Hhe},Hme={invocation:$me,current_image:Ghe,notes:zme},Wme={hideAttribution:!0},Vme=me(we,({nodes:e})=>{const{shouldSnapToGrid:t,selectionMode:n}=e;return{shouldSnapToGrid:t,selectionMode:n}},Ie),Ume=()=>{const e=le(),t=H(O=>O.nodes.nodes),n=H(O=>O.nodes.edges),r=H(O=>O.nodes.viewport),{shouldSnapToGrid:o,selectionMode:s}=H(Vme),i=l.useRef(null),c=l.useRef(),d=The(),[p]=ea("radii",["base"]),h=l.useCallback(O=>{e(EN(O))},[e]),m=l.useCallback(O=>{e(MN(O))},[e]),g=l.useCallback((O,T)=>{e(ON(T))},[e]),b=l.useCallback(O=>{e(yS(O))},[e]),y=l.useCallback(()=>{e(AN({cursorPosition:c.current}))},[e]),x=l.useCallback(O=>{e(RN(O))},[e]),w=l.useCallback(O=>{e(DN(O))},[e]),S=l.useCallback(({nodes:O,edges:T})=>{e(TN(O?O.map(K=>K.id):[])),e(NN(T?T.map(K=>K.id):[]))},[e]),j=l.useCallback((O,T)=>{e($N(T))},[e]),I=l.useCallback(()=>{e(SP())},[e]),_=l.useCallback(O=>{CS.set(O),O.fitView()},[]),M=l.useCallback(O=>{var K,G;const T=(K=i.current)==null?void 0:K.getBoundingClientRect();if(T){const X=(G=CS.get())==null?void 0:G.project({x:O.clientX-T.left,y:O.clientY-T.top});c.current=X}},[]),E=l.useRef(),A=l.useCallback((O,T,K)=>{E.current=O,e(LN(T.id)),e(zN())},[e]),R=l.useCallback((O,T)=>{e(yS(T))},[e]),D=l.useCallback((O,T,K)=>{var G,X;!("touches"in O)&&((G=E.current)==null?void 0:G.clientX)===O.clientX&&((X=E.current)==null?void 0:X.clientY)===O.clientY&&e(FN(T)),E.current=void 0},[e]);return _t(["Ctrl+c","Meta+c"],O=>{O.preventDefault(),e(BN())}),_t(["Ctrl+a","Meta+a"],O=>{O.preventDefault(),e(HN())}),_t(["Ctrl+v","Meta+v"],O=>{O.preventDefault(),e(WN({cursorPosition:c.current}))}),a.jsx(VN,{id:"workflow-editor",ref:i,defaultViewport:r,nodeTypes:Hme,edgeTypes:Bme,nodes:t,edges:n,onInit:_,onMouseMove:M,onNodesChange:h,onEdgesChange:m,onEdgesDelete:x,onEdgeUpdate:R,onEdgeUpdateStart:A,onEdgeUpdateEnd:D,onNodesDelete:w,onConnectStart:g,onConnect:b,onConnectEnd:y,onMoveEnd:j,connectionLineComponent:Lhe,onSelectionChange:S,isValidConnection:d,minZoom:.1,snapToGrid:o,snapGrid:[25,25],connectionRadius:30,proOptions:Wme,style:{borderRadius:p},onPaneClick:I,deleteKeyCode:Fme,selectionMode:s,children:a.jsx(Y$,{})})},Gme=me(we,e=>{const t=e.nodes.nodes,n=e.nodes.nodeTemplates;return t.some(o=>{const s=n[o.data.type];return UN(o,s)})},Ie),qme=()=>H(Gme),Kme=()=>{const e=le(),{t}=Q(),n=qme(),r=l.useCallback(()=>{e(yP())},[e]),o=l.useCallback(()=>{e(GN())},[e]);return a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineStart:2},children:[a.jsx(rt,{tooltip:t("nodes.addNodeToolTip"),"aria-label":t("nodes.addNode"),icon:a.jsx(Zi,{}),onClick:r}),n&&a.jsx(Dt,{leftIcon:a.jsx(s0,{}),onClick:o,children:t("nodes.updateAllNodes")})]})},Qme=l.memo(Kme),Xme=()=>{const e=le(),t=Q3("nodes"),{t:n}=Q();return l.useCallback(o=>{if(!o)return;const s=new FileReader;s.onload=async()=>{const i=s.result;try{const c=JSON.parse(String(i)),d=KI.safeParse(c);if(!d.success){const{message:p}=qN(d.error,{prefix:n("nodes.workflowValidation")});t.error({error:KN(d.error)},p),e(Ht(rr({title:n("nodes.unableToValidateWorkflow"),status:"error",duration:5e3}))),s.abort();return}e(Vx(d.data)),s.abort()}catch{e(Ht(rr({title:n("nodes.unableToLoadWorkflow"),status:"error"})))}},s.readAsText(o)},[e,t,n])},Yme=l.memo(e=>e.error.issues[0]?a.jsx(je,{children:wS(e.error.issues[0],{prefix:null}).toString()}):a.jsx(zf,{children:e.error.issues.map((t,n)=>a.jsx(Ps,{children:a.jsx(je,{children:wS(t,{prefix:null}).toString()})},n))}));Yme.displayName="WorkflowValidationErrorContent";const Jme=()=>{const{t:e}=Q(),t=l.useRef(null),n=Xme();return a.jsx(vM,{resetRef:t,accept:"application/json",onChange:n,children:r=>a.jsx(rt,{icon:a.jsx(i0,{}),tooltip:e("nodes.loadWorkflow"),"aria-label":e("nodes.loadWorkflow"),...r})})},Zme=l.memo(Jme),ege=()=>{const{t:e}=Q(),t=le(),{isOpen:n,onOpen:r,onClose:o}=hs(),s=l.useRef(null),i=H(d=>d.nodes.nodes.length),c=l.useCallback(()=>{t(QN()),t(Ht(rr({title:e("toast.nodesCleared"),status:"success"}))),o()},[t,e,o]);return a.jsxs(a.Fragment,{children:[a.jsx(rt,{icon:a.jsx(Zo,{}),tooltip:e("nodes.resetWorkflow"),"aria-label":e("nodes.resetWorkflow"),onClick:r,isDisabled:!i,colorScheme:"error"}),a.jsxs(Wf,{isOpen:n,onClose:o,leastDestructiveRef:s,isCentered:!0,children:[a.jsx(Aa,{}),a.jsxs(Vf,{children:[a.jsx(Oa,{fontSize:"lg",fontWeight:"bold",children:e("nodes.resetWorkflow")}),a.jsx(Ra,{py:4,children:a.jsxs(N,{flexDir:"column",gap:2,children:[a.jsx(je,{children:e("nodes.resetWorkflowDesc")}),a.jsx(je,{variant:"subtext",children:e("nodes.resetWorkflowDesc2")})]})}),a.jsxs(pi,{children:[a.jsx(nl,{ref:s,onClick:o,children:e("common.cancel")}),a.jsx(nl,{colorScheme:"error",ml:3,onClick:c,children:e("common.accept")})]})]})]})]})},tge=l.memo(ege),nge=()=>{const{t:e}=Q(),t=tA(),n=l.useCallback(()=>{const r=new Blob([JSON.stringify(t,null,2)]),o=document.createElement("a");o.href=URL.createObjectURL(r),o.download=`${t.name||"My Workflow"}.json`,document.body.appendChild(o),o.click(),o.remove()},[t]);return a.jsx(rt,{icon:a.jsx(Wu,{}),tooltip:e("nodes.downloadWorkflow"),"aria-label":e("nodes.downloadWorkflow"),onClick:n})},rge=l.memo(nge),oge=()=>a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineStart:"50%",transform:"translate(-50%)"},children:[a.jsx(rge,{}),a.jsx(Zme,{}),a.jsx(tge,{})]}),sge=l.memo(oge),age=()=>a.jsx(N,{sx:{gap:2,flexDir:"column"},children:To(If,({title:e,description:t,color:n},r)=>a.jsx(Wn,{label:t,children:a.jsx(Va,{sx:{userSelect:"none",color:parseInt(n.split(".")[1]??"0",10)<500?"base.800":"base.50",bg:n},textAlign:"center",children:e})},r))}),ige=l.memo(age),lge=()=>{const{t:e}=Q(),t=le(),n=l.useCallback(()=>{t(XN())},[t]);return a.jsx(Dt,{leftIcon:a.jsx(Jee,{}),tooltip:e("nodes.reloadNodeTemplates"),"aria-label":e("nodes.reloadNodeTemplates"),onClick:n,children:e("nodes.reloadNodeTemplates")})},cge=l.memo(lge),_d={fontWeight:600},uge=me(we,({nodes:e})=>{const{shouldAnimateEdges:t,shouldValidateGraph:n,shouldSnapToGrid:r,shouldColorEdges:o,selectionMode:s}=e;return{shouldAnimateEdges:t,shouldValidateGraph:n,shouldSnapToGrid:r,shouldColorEdges:o,selectionModeIsChecked:s===YN.Full}},Ie),dge=De((e,t)=>{const{isOpen:n,onOpen:r,onClose:o}=hs(),s=le(),{shouldAnimateEdges:i,shouldValidateGraph:c,shouldSnapToGrid:d,shouldColorEdges:p,selectionModeIsChecked:h}=H(uge),m=l.useCallback(S=>{s(JN(S.target.checked))},[s]),g=l.useCallback(S=>{s(ZN(S.target.checked))},[s]),b=l.useCallback(S=>{s(e9(S.target.checked))},[s]),y=l.useCallback(S=>{s(t9(S.target.checked))},[s]),x=l.useCallback(S=>{s(n9(S.target.checked))},[s]),{t:w}=Q();return a.jsxs(a.Fragment,{children:[a.jsx(rt,{ref:t,"aria-label":w("nodes.workflowSettings"),tooltip:w("nodes.workflowSettings"),icon:a.jsx(GM,{}),onClick:r}),a.jsxs(vu,{isOpen:n,onClose:o,size:"2xl",isCentered:!0,children:[a.jsx(Aa,{}),a.jsxs(bu,{children:[a.jsx(Oa,{children:w("nodes.workflowSettings")}),a.jsx(Rg,{}),a.jsx(Ra,{children:a.jsxs(N,{sx:{flexDirection:"column",gap:4,py:4},children:[a.jsx(yo,{size:"sm",children:w("parameters.general")}),a.jsx(_r,{formLabelProps:_d,onChange:g,isChecked:i,label:w("nodes.animatedEdges"),helperText:w("nodes.animatedEdgesHelp")}),a.jsx(io,{}),a.jsx(_r,{formLabelProps:_d,isChecked:d,onChange:b,label:w("nodes.snapToGrid"),helperText:w("nodes.snapToGridHelp")}),a.jsx(io,{}),a.jsx(_r,{formLabelProps:_d,isChecked:p,onChange:y,label:w("nodes.colorCodeEdges"),helperText:w("nodes.colorCodeEdgesHelp")}),a.jsx(_r,{formLabelProps:_d,isChecked:h,onChange:x,label:w("nodes.fullyContainNodes"),helperText:w("nodes.fullyContainNodesHelp")}),a.jsx(yo,{size:"sm",pt:4,children:w("common.advanced")}),a.jsx(_r,{formLabelProps:_d,isChecked:c,onChange:m,label:w("nodes.validateConnections"),helperText:w("nodes.validateConnectionsHelp")}),a.jsx(cge,{})]})})]})]})]})}),fge=l.memo(dge),pge=()=>{const e=H(t=>t.nodes.shouldShowFieldTypeLegend);return a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineEnd:2},children:[a.jsx(fge,{}),e&&a.jsx(ige,{})]})},hge=l.memo(pge);function mge(){const e=le(),t=H(o=>o.nodes.nodeOpacity),{t:n}=Q(),r=l.useCallback(o=>{e(r9(o))},[e]);return a.jsx(N,{alignItems:"center",children:a.jsxs(Ny,{"aria-label":n("nodes.nodeOpacity"),value:t,min:.5,max:1,step:.01,onChange:r,orientation:"vertical",defaultValue:30,h:"calc(100% - 0.5rem)",children:[a.jsx(Ly,{children:a.jsx(zy,{})}),a.jsx($y,{})]})})}const gge=()=>{const{t:e}=Q(),{zoomIn:t,zoomOut:n,fitView:r}=Jx(),o=le(),s=H(h=>h.nodes.shouldShowMinimapPanel),i=l.useCallback(()=>{t()},[t]),c=l.useCallback(()=>{n()},[n]),d=l.useCallback(()=>{r()},[r]),p=l.useCallback(()=>{o(o9(!s))},[s,o]);return a.jsxs(Hn,{isAttached:!0,orientation:"vertical",children:[a.jsx(rt,{tooltip:e("nodes.zoomInNodes"),"aria-label":e("nodes.zoomInNodes"),onClick:i,icon:a.jsx(use,{})}),a.jsx(rt,{tooltip:e("nodes.zoomOutNodes"),"aria-label":e("nodes.zoomOutNodes"),onClick:c,icon:a.jsx(cse,{})}),a.jsx(rt,{tooltip:e("nodes.fitViewportNodes"),"aria-label":e("nodes.fitViewportNodes"),onClick:d,icon:a.jsx(qM,{})}),a.jsx(rt,{tooltip:e(s?"nodes.hideMinimapnodes":"nodes.showMinimapnodes"),"aria-label":e(s?"nodes.hideMinimapnodes":"nodes.showMinimapnodes"),isChecked:s,onClick:p,icon:a.jsx(Bee,{})})]})},vge=l.memo(gge),bge=()=>a.jsxs(N,{sx:{gap:2,position:"absolute",bottom:2,insetInlineStart:2},children:[a.jsx(vge,{}),a.jsx(mge,{})]}),xge=l.memo(bge),yge=Ae(U$),Cge=()=>{const e=H(r=>r.nodes.shouldShowMinimapPanel),t=di("var(--invokeai-colors-accent-300)","var(--invokeai-colors-accent-600)"),n=di("var(--invokeai-colors-blackAlpha-300)","var(--invokeai-colors-blackAlpha-600)");return a.jsx(N,{sx:{gap:2,position:"absolute",bottom:2,insetInlineEnd:2},children:e&&a.jsx(yge,{pannable:!0,zoomable:!0,nodeBorderRadius:15,sx:{m:"0 !important",backgroundColor:"base.200 !important",borderRadius:"base",_dark:{backgroundColor:"base.500 !important"},svg:{borderRadius:"inherit"}},nodeColor:t,maskColor:n})})},wge=l.memo(Cge),Sge=()=>{const e=H(n=>n.nodes.isReady),{t}=Q();return a.jsxs(N,{layerStyle:"first",sx:{position:"relative",width:"full",height:"full",borderRadius:"base",alignItems:"center",justifyContent:"center"},children:[a.jsx(So,{children:e&&a.jsxs(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:.2}},style:{position:"relative",width:"100%",height:"100%"},children:[a.jsx(Ume,{}),a.jsx(Dhe,{}),a.jsx(Qme,{}),a.jsx(sge,{}),a.jsx(hge,{}),a.jsx(xge,{}),a.jsx(wge,{})]})}),a.jsx(So,{children:!e&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:.2}},style:{position:"absolute",width:"100%",height:"100%"},children:a.jsx(N,{layerStyle:"first",sx:{position:"relative",width:"full",height:"full",borderRadius:"base",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:a.jsx(eo,{label:t("nodes.loadingNodes"),icon:dse})})})})]})},kge=l.memo(Sge),jge=()=>a.jsx(s9,{children:a.jsx(kge,{})}),_ge=l.memo(jge),Ige=()=>{const{t:e}=Q(),t=le(),{data:n}=Ef(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=a9({fixedCacheKey:"clearInvocationCache"}),i=l.useMemo(()=>!(n!=null&&n.size)||!r,[n==null?void 0:n.size,r]);return{clearInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Ht({title:e("invocationCache.clearSucceeded"),status:"success"}))}catch{t(Ht({title:e("invocationCache.clearFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},Pge=()=>{const{t:e}=Q(),{clearInvocationCache:t,isDisabled:n,isLoading:r}=Ige();return a.jsx(Dt,{isDisabled:n,isLoading:r,onClick:t,children:e("invocationCache.clear")})},Ege=l.memo(Pge),Mge=()=>{const{t:e}=Q(),t=le(),{data:n}=Ef(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=i9({fixedCacheKey:"disableInvocationCache"}),i=l.useMemo(()=>!(n!=null&&n.enabled)||!r||(n==null?void 0:n.max_size)===0,[n==null?void 0:n.enabled,n==null?void 0:n.max_size,r]);return{disableInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Ht({title:e("invocationCache.disableSucceeded"),status:"success"}))}catch{t(Ht({title:e("invocationCache.disableFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},Oge=()=>{const{t:e}=Q(),t=le(),{data:n}=Ef(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=l9({fixedCacheKey:"enableInvocationCache"}),i=l.useMemo(()=>(n==null?void 0:n.enabled)||!r||(n==null?void 0:n.max_size)===0,[n==null?void 0:n.enabled,n==null?void 0:n.max_size,r]);return{enableInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Ht({title:e("invocationCache.enableSucceeded"),status:"success"}))}catch{t(Ht({title:e("invocationCache.enableFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},Age=()=>{const{t:e}=Q(),{data:t}=Ef(),{enableInvocationCache:n,isDisabled:r,isLoading:o}=Oge(),{disableInvocationCache:s,isDisabled:i,isLoading:c}=Mge();return t!=null&&t.enabled?a.jsx(Dt,{isDisabled:i,isLoading:c,onClick:s,children:e("invocationCache.disable")}):a.jsx(Dt,{isDisabled:r,isLoading:o,onClick:n,children:e("invocationCache.enable")})},Rge=l.memo(Age),Dge=({children:e,...t})=>a.jsx(W3,{alignItems:"center",justifyContent:"center",w:"full",h:"full",layerStyle:"second",borderRadius:"base",py:2,px:3,gap:6,flexWrap:"nowrap",...t,children:e}),eR=l.memo(Dge),Tge={'&[aria-disabled="true"]':{color:"base.400",_dark:{color:"base.500"}}},Nge=({label:e,value:t,isDisabled:n=!1,...r})=>a.jsxs(H3,{flexGrow:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap","aria-disabled":n,sx:Tge,...r,children:[a.jsx(V3,{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",children:e}),a.jsx(U3,{children:t})]}),Ca=l.memo(Nge),$ge=()=>{const{t:e}=Q(),{data:t}=Ef(void 0);return a.jsxs(eR,{children:[a.jsx(Ca,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.cacheSize"),value:(t==null?void 0:t.size)??0}),a.jsx(Ca,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.hits"),value:(t==null?void 0:t.hits)??0}),a.jsx(Ca,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.misses"),value:(t==null?void 0:t.misses)??0}),a.jsx(Ca,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.maxCacheSize"),value:(t==null?void 0:t.max_size)??0}),a.jsxs(Hn,{w:24,orientation:"vertical",size:"xs",children:[a.jsx(Ege,{}),a.jsx(Rge,{})]})]})},Lge=l.memo($ge),tR=e=>{const t=H(c=>c.system.isConnected),[n,{isLoading:r}]=Gx(),o=le(),{t:s}=Q();return{cancelQueueItem:l.useCallback(async()=>{try{await n(e).unwrap(),o(Ht({title:s("queue.cancelSucceeded"),status:"success"}))}catch{o(Ht({title:s("queue.cancelFailed"),status:"error"}))}},[o,e,s,n]),isLoading:r,isDisabled:!t}},nR=(e,t)=>Number(((Date.parse(t)-Date.parse(e))/1e3).toFixed(2)),oI={pending:{colorScheme:"cyan",translationKey:"queue.pending"},in_progress:{colorScheme:"yellow",translationKey:"queue.in_progress"},completed:{colorScheme:"green",translationKey:"queue.completed"},failed:{colorScheme:"red",translationKey:"queue.failed"},canceled:{colorScheme:"orange",translationKey:"queue.canceled"}},zge=({status:e})=>{const{t}=Q();return a.jsx(Va,{colorScheme:oI[e].colorScheme,children:t(oI[e].translationKey)})},Fge=l.memo(zge),Bge=e=>{const t=H(d=>d.system.isConnected),{isCanceled:n}=c9({batch_id:e},{selectFromResult:({data:d})=>d?{isCanceled:(d==null?void 0:d.in_progress)===0&&(d==null?void 0:d.pending)===0}:{isCanceled:!0}}),[r,{isLoading:o}]=u9({fixedCacheKey:"cancelByBatchIds"}),s=le(),{t:i}=Q();return{cancelBatch:l.useCallback(async()=>{if(!n)try{await r({batch_ids:[e]}).unwrap(),s(Ht({title:i("queue.cancelBatchSucceeded"),status:"success"}))}catch{s(Ht({title:i("queue.cancelBatchFailed"),status:"error"}))}},[e,s,n,i,r]),isLoading:o,isCanceled:n,isDisabled:!t}},Hge=({queueItemDTO:e})=>{const{session_id:t,batch_id:n,item_id:r}=e,{t:o}=Q(),{cancelBatch:s,isLoading:i,isCanceled:c}=Bge(n),{cancelQueueItem:d,isLoading:p}=tR(r),{data:h}=d9(r),m=l.useMemo(()=>{if(!h)return o("common.loading");if(!h.completed_at||!h.started_at)return o(`queue.${h.status}`);const g=nR(h.started_at,h.completed_at);return h.status==="completed"?`${o("queue.completedIn")} ${g}${g===1?"":"s"}`:`${g}s`},[h,o]);return a.jsxs(N,{layerStyle:"third",flexDir:"column",p:2,pt:0,borderRadius:"base",gap:2,children:[a.jsxs(N,{layerStyle:"second",p:2,gap:2,justifyContent:"space-between",alignItems:"center",borderRadius:"base",h:20,children:[a.jsx(jh,{label:o("queue.status"),data:m}),a.jsx(jh,{label:o("queue.item"),data:r}),a.jsx(jh,{label:o("queue.batch"),data:n}),a.jsx(jh,{label:o("queue.session"),data:t}),a.jsxs(Hn,{size:"xs",orientation:"vertical",children:[a.jsx(Dt,{onClick:d,isLoading:p,isDisabled:h?["canceled","completed","failed"].includes(h.status):!0,"aria-label":o("queue.cancelItem"),icon:a.jsx(ku,{}),colorScheme:"error",children:o("queue.cancelItem")}),a.jsx(Dt,{onClick:s,isLoading:i,isDisabled:c,"aria-label":o("queue.cancelBatch"),icon:a.jsx(ku,{}),colorScheme:"error",children:o("queue.cancelBatch")})]})]}),(h==null?void 0:h.error)&&a.jsxs(N,{layerStyle:"second",p:3,gap:1,justifyContent:"space-between",alignItems:"flex-start",borderRadius:"base",flexDir:"column",children:[a.jsx(yo,{size:"sm",color:"error.500",_dark:{color:"error.400"},children:"Error"}),a.jsx("pre",{children:h.error})]}),a.jsx(N,{layerStyle:"second",h:512,w:"full",borderRadius:"base",alignItems:"center",justifyContent:"center",children:h?a.jsx(cc,{children:a.jsx(tl,{label:"Queue Item",data:h})}):a.jsx(Ci,{opacity:.5})})]})},Wge=l.memo(Hge),jh=({label:e,data:t})=>a.jsxs(N,{flexDir:"column",justifyContent:"flex-start",p:1,gap:1,overflow:"hidden",h:"full",w:"full",children:[a.jsx(yo,{size:"md",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e}),a.jsx(je,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]}),Sa={number:"3rem",statusBadge:"5.7rem",statusDot:2,time:"4rem",batchId:"5rem",fieldValues:"auto",actions:"auto"},sI={bg:"base.300",_dark:{bg:"base.750"}},Vge={_hover:sI,"&[aria-selected='true']":sI},Uge=({index:e,item:t,context:n})=>{const{t:r}=Q(),o=l.useCallback(()=>{n.toggleQueueItem(t.item_id)},[n,t.item_id]),{cancelQueueItem:s,isLoading:i}=tR(t.item_id),c=l.useCallback(m=>{m.stopPropagation(),s()},[s]),d=l.useMemo(()=>n.openQueueItems.includes(t.item_id),[n.openQueueItems,t.item_id]),p=l.useMemo(()=>!t.completed_at||!t.started_at?void 0:`${nR(t.started_at,t.completed_at)}s`,[t]),h=l.useMemo(()=>["canceled","completed","failed"].includes(t.status),[t.status]);return a.jsxs(N,{flexDir:"column","aria-selected":d,fontSize:"sm",borderRadius:"base",justifyContent:"center",sx:Vge,"data-testid":"queue-item",children:[a.jsxs(N,{minH:9,alignItems:"center",gap:4,p:1.5,cursor:"pointer",onClick:o,children:[a.jsx(N,{w:Sa.number,justifyContent:"flex-end",alignItems:"center",flexShrink:0,children:a.jsx(je,{variant:"subtext",children:e+1})}),a.jsx(N,{w:Sa.statusBadge,alignItems:"center",flexShrink:0,children:a.jsx(Fge,{status:t.status})}),a.jsx(N,{w:Sa.time,alignItems:"center",flexShrink:0,children:p||"-"}),a.jsx(N,{w:Sa.batchId,flexShrink:0,children:a.jsx(je,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",alignItems:"center",children:t.batch_id})}),a.jsx(N,{alignItems:"center",overflow:"hidden",flexGrow:1,children:t.field_values&&a.jsx(N,{gap:2,w:"full",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:t.field_values.filter(m=>m.node_path!=="metadata_accumulator").map(({node_path:m,field_name:g,value:b})=>a.jsxs(je,{as:"span",children:[a.jsxs(je,{as:"span",fontWeight:600,children:[m,".",g]}),": ",b]},`${t.item_id}.${m}.${g}.${b}`))})}),a.jsx(N,{alignItems:"center",w:Sa.actions,pe:3,children:a.jsx(Hn,{size:"xs",variant:"ghost",children:a.jsx(rt,{onClick:c,isDisabled:h,isLoading:i,"aria-label":r("queue.cancelItem"),icon:a.jsx(ku,{})})})})]}),a.jsx(Af,{in:d,transition:{enter:{duration:.1},exit:{duration:.1}},unmountOnExit:!0,children:a.jsx(Wge,{queueItemDTO:t})})]})},Gge=l.memo(Uge),qge=l.memo(De((e,t)=>a.jsx(N,{...e,ref:t,flexDirection:"column",gap:.5,children:e.children}))),Kge=l.memo(qge),Qge=()=>{const{t:e}=Q();return a.jsxs(N,{alignItems:"center",gap:4,p:1,pb:2,textTransform:"uppercase",fontWeight:700,fontSize:"xs",letterSpacing:1,children:[a.jsx(N,{w:Sa.number,justifyContent:"flex-end",alignItems:"center",children:a.jsx(je,{variant:"subtext",children:"#"})}),a.jsx(N,{ps:.5,w:Sa.statusBadge,alignItems:"center",children:a.jsx(je,{variant:"subtext",children:e("queue.status")})}),a.jsx(N,{ps:.5,w:Sa.time,alignItems:"center",children:a.jsx(je,{variant:"subtext",children:e("queue.time")})}),a.jsx(N,{ps:.5,w:Sa.batchId,alignItems:"center",children:a.jsx(je,{variant:"subtext",children:e("queue.batch")})}),a.jsx(N,{ps:.5,w:Sa.fieldValues,alignItems:"center",children:a.jsx(je,{variant:"subtext",children:e("queue.batchFieldValues")})})]})},Xge=l.memo(Qge),Yge={defer:!0,options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}}},Jge=me(we,({queue:e})=>{const{listCursor:t,listPriority:n}=e;return{listCursor:t,listPriority:n}},Ie),Zge=(e,t)=>t.item_id,e0e={List:Kge},t0e=(e,t,n)=>a.jsx(Gge,{index:e,item:t,context:n}),n0e=()=>{const{listCursor:e,listPriority:t}=H(Jge),n=le(),r=l.useRef(null),[o,s]=l.useState(null),[i,c]=y2(Yge),{t:d}=Q();l.useEffect(()=>{const{current:S}=r;return o&&S&&i({target:S,elements:{viewport:o}}),()=>{var j;return(j=c())==null?void 0:j.destroy()}},[o,i,c]);const{data:p,isLoading:h}=f9({cursor:e,priority:t}),m=l.useMemo(()=>p?p9.getSelectors().selectAll(p):[],[p]),g=l.useCallback(()=>{if(!(p!=null&&p.has_more))return;const S=m[m.length-1];S&&(n(qx(S.item_id)),n(Kx(S.priority)))},[n,p==null?void 0:p.has_more,m]),[b,y]=l.useState([]),x=l.useCallback(S=>{y(j=>j.includes(S)?j.filter(I=>I!==S):[...j,S])},[]),w=l.useMemo(()=>({openQueueItems:b,toggleQueueItem:x}),[b,x]);return h?a.jsx(jre,{}):m.length?a.jsxs(N,{w:"full",h:"full",flexDir:"column",children:[a.jsx(Xge,{}),a.jsx(N,{ref:r,w:"full",h:"full",alignItems:"center",justifyContent:"center",children:a.jsx($oe,{data:m,endReached:g,scrollerRef:s,itemContent:t0e,computeItemKey:Zge,components:e0e,context:w})})]}):a.jsx(N,{w:"full",h:"full",alignItems:"center",justifyContent:"center",children:a.jsx(yo,{color:"base.400",_dark:{color:"base.500"},children:d("queue.queueEmpty")})})},r0e=l.memo(n0e),o0e=()=>{const{data:e}=Ha(),{t}=Q();return a.jsxs(eR,{"data-testid":"queue-status",children:[a.jsx(Ca,{label:t("queue.in_progress"),value:(e==null?void 0:e.queue.in_progress)??0}),a.jsx(Ca,{label:t("queue.pending"),value:(e==null?void 0:e.queue.pending)??0}),a.jsx(Ca,{label:t("queue.completed"),value:(e==null?void 0:e.queue.completed)??0}),a.jsx(Ca,{label:t("queue.failed"),value:(e==null?void 0:e.queue.failed)??0}),a.jsx(Ca,{label:t("queue.canceled"),value:(e==null?void 0:e.queue.canceled)??0}),a.jsx(Ca,{label:t("queue.total"),value:(e==null?void 0:e.queue.total)??0})]})},s0e=l.memo(o0e);function a0e(e){return Ye({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828l.645-1.937zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.734 1.734 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.734 1.734 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.734 1.734 0 0 0 3.407 2.31l.387-1.162zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L10.863.1z"}}]})(e)}const i0e=()=>{const e=le(),{t}=Q(),n=H(d=>d.system.isConnected),[r,{isLoading:o}]=pP({fixedCacheKey:"pruneQueue"}),{finishedCount:s}=Ha(void 0,{selectFromResult:({data:d})=>d?{finishedCount:d.queue.completed+d.queue.canceled+d.queue.failed}:{finishedCount:0}}),i=l.useCallback(async()=>{if(s)try{const d=await r().unwrap();e(Ht({title:t("queue.pruneSucceeded",{item_count:d.deleted}),status:"success"})),e(qx(void 0)),e(Kx(void 0))}catch{e(Ht({title:t("queue.pruneFailed"),status:"error"}))}},[s,r,e,t]),c=l.useMemo(()=>!n||!s,[s,n]);return{pruneQueue:i,isLoading:o,finishedCount:s,isDisabled:c}},l0e=({asIconButton:e})=>{const{t}=Q(),{pruneQueue:n,isLoading:r,finishedCount:o,isDisabled:s}=i0e();return a.jsx(lc,{isDisabled:s,isLoading:r,asIconButton:e,label:t("queue.prune"),tooltip:t("queue.pruneTooltip",{item_count:o}),icon:a.jsx(a0e,{}),onClick:n,colorScheme:"blue"})},c0e=l.memo(l0e),u0e=()=>{const e=Pn("pauseQueue").isFeatureEnabled,t=Pn("resumeQueue").isFeatureEnabled;return a.jsxs(N,{layerStyle:"second",borderRadius:"base",p:2,gap:2,children:[e||t?a.jsxs(Hn,{w:28,orientation:"vertical",isAttached:!0,size:"sm",children:[t?a.jsx(L8,{}):a.jsx(a.Fragment,{}),e?a.jsx(A8,{}):a.jsx(a.Fragment,{})]}):a.jsx(a.Fragment,{}),a.jsxs(Hn,{w:28,orientation:"vertical",isAttached:!0,size:"sm",children:[a.jsx(c0e,{}),a.jsx(B2,{})]})]})},d0e=l.memo(u0e),f0e=()=>{const e=Pn("invocationCache").isFeatureEnabled;return a.jsxs(N,{layerStyle:"first",borderRadius:"base",w:"full",h:"full",p:2,flexDir:"column",gap:2,children:[a.jsxs(N,{gap:2,w:"full",children:[a.jsx(d0e,{}),a.jsx(s0e,{}),e&&a.jsx(Lge,{})]}),a.jsx(Le,{layerStyle:"second",p:2,borderRadius:"base",w:"full",h:"full",children:a.jsx(r0e,{})})]})},p0e=l.memo(f0e),h0e=()=>a.jsx(p0e,{}),m0e=l.memo(h0e),g0e=()=>a.jsx(FA,{}),v0e=l.memo(g0e);var kx={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=SS;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=SS;e.exports=r.Konva})(kx,kx.exports);var b0e=kx.exports;const Cf=Sf(b0e);var rR={exports:{}};/** - * @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;vce||k[L]!==P[ce]){var be=` -`+k[L].replace(" at new "," at ");return u.displayName&&be.includes("")&&(be=be.replace("",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;0v;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>=L,k-=L,rs=1<<32-er(f)+k|v<Dn?(so=sn,sn=null):so=sn.sibling;var Tn=ut(ve,sn,Ce[Dn],dt);if(Tn===null){sn===null&&(sn=so);break}u&&sn&&Tn.alternate===null&&f(ve,sn),fe=P(Tn,fe,Dn),un===null?Wt=Tn:un.sibling=Tn,un=Tn,sn=so}if(Dn===Ce.length)return v(ve,sn),mr&&xl(ve,Dn),Wt;if(sn===null){for(;DnDn?(so=sn,sn=null):so=sn.sibling;var Fi=ut(ve,sn,Tn.value,dt);if(Fi===null){sn===null&&(sn=so);break}u&&sn&&Fi.alternate===null&&f(ve,sn),fe=P(Fi,fe,Dn),un===null?Wt=Fi:un.sibling=Fi,un=Fi,sn=so}if(Tn.done)return v(ve,sn),mr&&xl(ve,Dn),Wt;if(sn===null){for(;!Tn.done;Dn++,Tn=Ce.next())Tn=on(ve,Tn.value,dt),Tn!==null&&(fe=P(Tn,fe,Dn),un===null?Wt=Tn:un.sibling=Tn,un=Tn);return mr&&xl(ve,Dn),Wt}for(sn=C(ve,sn);!Tn.done;Dn++,Tn=Ce.next())Tn=fr(sn,ve,Dn,Tn.value,dt),Tn!==null&&(u&&Tn.alternate!==null&&sn.delete(Tn.key===null?Dn:Tn.key),fe=P(Tn,fe,Dn),un===null?Wt=Tn:un.sibling=Tn,un=Tn);return u&&sn.forEach(function(qR){return f(ve,qR)}),mr&&xl(ve,Dn),Wt}function Ja(ve,fe,Ce,dt){if(typeof Ce=="object"&&Ce!==null&&Ce.type===h&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case d:e:{for(var Wt=Ce.key,un=fe;un!==null;){if(un.key===Wt){if(Wt=Ce.type,Wt===h){if(un.tag===7){v(ve,un.sibling),fe=k(un,Ce.props.children),fe.return=ve,ve=fe;break e}}else if(un.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===I&&kC(Wt)===un.type){v(ve,un.sibling),fe=k(un,Ce.props),fe.ref=ed(ve,un,Ce),fe.return=ve,ve=fe;break e}v(ve,un);break}else f(ve,un);un=un.sibling}Ce.type===h?(fe=_l(Ce.props.children,ve.mode,dt,Ce.key),fe.return=ve,ve=fe):(dt=Fp(Ce.type,Ce.key,Ce.props,null,ve.mode,dt),dt.ref=ed(ve,fe,Ce),dt.return=ve,ve=dt)}return L(ve);case p:e:{for(un=Ce.key;fe!==null;){if(fe.key===un)if(fe.tag===4&&fe.stateNode.containerInfo===Ce.containerInfo&&fe.stateNode.implementation===Ce.implementation){v(ve,fe.sibling),fe=k(fe,Ce.children||[]),fe.return=ve,ve=fe;break e}else{v(ve,fe);break}else f(ve,fe);fe=fe.sibling}fe=Fv(Ce,ve.mode,dt),fe.return=ve,ve=fe}return L(ve);case I:return un=Ce._init,Ja(ve,fe,un(Ce._payload),dt)}if(Z(Ce))return tr(ve,fe,Ce,dt);if(E(Ce))return Ho(ve,fe,Ce,dt);hp(ve,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"?(Ce=""+Ce,fe!==null&&fe.tag===6?(v(ve,fe.sibling),fe=k(fe,Ce),fe.return=ve,ve=fe):(v(ve,fe),fe=zv(Ce,ve.mode,dt),fe.return=ve,ve=fe),L(ve)):v(ve,fe)}return Ja}var mc=jC(!0),_C=jC(!1),td={},ys=Ct(td),nd=Ct(td),gc=Ct(td);function ma(u){if(u===td)throw Error(i(174));return u}function Z0(u,f){Qt(gc,f),Qt(nd,u),Qt(ys,td),u=V(f),Ft(ys),Qt(ys,u)}function vc(){Ft(ys),Ft(nd),Ft(gc)}function IC(u){var f=ma(gc.current),v=ma(ys.current);f=oe(v,u.type,f),v!==f&&(Qt(nd,u),Qt(ys,f))}function ev(u){nd.current===u&&(Ft(ys),Ft(nd))}var wr=Ct(0);function mp(u){for(var f=u;f!==null;){if(f.tag===13){var v=f.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||Br(v)||ts(v)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var tv=[];function nv(){for(var u=0;uv?v:4,u(!0);var C=rv.transition;rv.transition={};try{u(!1),f()}finally{Oe=v,rv.transition=C}}function UC(){return Cs().memoizedState}function yR(u,f,v){var C=$i(u);if(v={lane:C,action:v,hasEagerState:!1,eagerState:null,next:null},GC(u))qC(f,v);else if(v=gC(u,f,v,C),v!==null){var k=bo();ws(v,u,C,k),KC(v,f,C)}}function CR(u,f,v){var C=$i(u),k={lane:C,action:v,hasEagerState:!1,eagerState:null,next:null};if(GC(u))qC(f,k);else{var P=u.alternate;if(u.lanes===0&&(P===null||P.lanes===0)&&(P=f.lastRenderedReducer,P!==null))try{var L=f.lastRenderedState,ce=P(L,v);if(k.hasEagerState=!0,k.eagerState=ce,dr(ce,L)){var be=f.interleaved;be===null?(k.next=k,Q0(f)):(k.next=be.next,be.next=k),f.interleaved=k;return}}catch{}finally{}v=gC(u,f,k,C),v!==null&&(k=bo(),ws(v,u,C,k),KC(v,f,C))}}function GC(u){var f=u.alternate;return u===Sr||f!==null&&f===Sr}function qC(u,f){rd=vp=!0;var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}function KC(u,f,v){if(v&4194240){var C=f.lanes;C&=u.pendingLanes,v|=C,f.lanes=v,Be(u,v)}}var yp={readContext:xs,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useInsertionEffect:mo,useLayoutEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useMutableSource:mo,useSyncExternalStore:mo,useId:mo,unstable_isNewReconciler:!1},wR={readContext:xs,useCallback:function(u,f){return ga().memoizedState=[u,f===void 0?null:f],u},useContext:xs,useEffect:$C,useImperativeHandle:function(u,f,v){return v=v!=null?v.concat([u]):null,bp(4194308,4,FC.bind(null,f,u),v)},useLayoutEffect:function(u,f){return bp(4194308,4,u,f)},useInsertionEffect:function(u,f){return bp(4,2,u,f)},useMemo:function(u,f){var v=ga();return f=f===void 0?null:f,u=u(),v.memoizedState=[u,f],u},useReducer:function(u,f,v){var C=ga();return f=v!==void 0?v(f):f,C.memoizedState=C.baseState=f,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:f},C.queue=u,u=u.dispatch=yR.bind(null,Sr,u),[C.memoizedState,u]},useRef:function(u){var f=ga();return u={current:u},f.memoizedState=u},useState:TC,useDebugValue:uv,useDeferredValue:function(u){return ga().memoizedState=u},useTransition:function(){var u=TC(!1),f=u[0];return u=xR.bind(null,u[1]),ga().memoizedState=u,[f,u]},useMutableSource:function(){},useSyncExternalStore:function(u,f,v){var C=Sr,k=ga();if(mr){if(v===void 0)throw Error(i(407));v=v()}else{if(v=f(),oo===null)throw Error(i(349));Cl&30||MC(C,f,v)}k.memoizedState=v;var P={value:v,getSnapshot:f};return k.queue=P,$C(AC.bind(null,C,P,u),[u]),C.flags|=2048,ad(9,OC.bind(null,C,P,v,f),void 0,null),v},useId:function(){var u=ga(),f=oo.identifierPrefix;if(mr){var v=ho,C=rs;v=(C&~(1<<32-er(C)-1)).toString(32)+v,f=":"+f+"R"+v,v=od++,0Ov&&(f.flags|=128,C=!0,cd(k,!1),f.lanes=4194304)}else{if(!C)if(u=mp(P),u!==null){if(f.flags|=128,C=!0,u=u.updateQueue,u!==null&&(f.updateQueue=u,f.flags|=4),cd(k,!0),k.tail===null&&k.tailMode==="hidden"&&!P.alternate&&!mr)return go(f),null}else 2*Ze()-k.renderingStartTime>Ov&&v!==1073741824&&(f.flags|=128,C=!0,cd(k,!1),f.lanes=4194304);k.isBackwards?(P.sibling=f.child,f.child=P):(u=k.last,u!==null?u.sibling=P:f.child=P,k.last=P)}return k.tail!==null?(f=k.tail,k.rendering=f,k.tail=f.sibling,k.renderingStartTime=Ze(),f.sibling=null,u=wr.current,Qt(wr,C?u&1|2:u&1),f):(go(f),null);case 22:case 23:return Nv(),v=f.memoizedState!==null,u!==null&&u.memoizedState!==null!==v&&(f.flags|=8192),v&&f.mode&1?ss&1073741824&&(go(f),ee&&f.subtreeFlags&6&&(f.flags|=8192)):go(f),null;case 24:return null;case 25:return null}throw Error(i(156,f.tag))}function MR(u,f){switch(B0(f),f.tag){case 1:return pr(f.type)&&Tt(),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return vc(),Ft(yn),Ft(Jt),nv(),u=f.flags,u&65536&&!(u&128)?(f.flags=u&-65537|128,f):null;case 5:return ev(f),null;case 13:if(Ft(wr),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(i(340));fc()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return Ft(wr),null;case 4:return vc(),null;case 10:return q0(f.type._context),null;case 22:case 23:return Nv(),null;case 24:return null;default:return null}}var jp=!1,vo=!1,OR=typeof WeakSet=="function"?WeakSet:Set,bt=null;function xc(u,f){var v=u.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(C){gr(u,f,C)}else v.current=null}function xv(u,f,v){try{v()}catch(C){gr(u,f,C)}}var pw=!1;function AR(u,f){for(ne(u.containerInfo),bt=f;bt!==null;)if(u=bt,f=u.child,(u.subtreeFlags&1028)!==0&&f!==null)f.return=u,bt=f;else for(;bt!==null;){u=bt;try{var v=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var C=v.memoizedProps,k=v.memoizedState,P=u.stateNode,L=P.getSnapshotBeforeUpdate(u.elementType===u.type?C:Gs(u.type,C),k);P.__reactInternalSnapshotBeforeUpdate=L}break;case 3:ee&&dn(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ce){gr(u,u.return,ce)}if(f=u.sibling,f!==null){f.return=u.return,bt=f;break}bt=u.return}return v=pw,pw=!1,v}function ud(u,f,v){var C=f.updateQueue;if(C=C!==null?C.lastEffect:null,C!==null){var k=C=C.next;do{if((k.tag&u)===u){var P=k.destroy;k.destroy=void 0,P!==void 0&&xv(f,v,P)}k=k.next}while(k!==C)}}function _p(u,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var v=f=f.next;do{if((v.tag&u)===u){var C=v.create;v.destroy=C()}v=v.next}while(v!==f)}}function yv(u){var f=u.ref;if(f!==null){var v=u.stateNode;switch(u.tag){case 5:u=te(v);break;default:u=v}typeof f=="function"?f(u):f.current=u}}function hw(u){var f=u.alternate;f!==null&&(u.alternate=null,hw(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&Pe(f)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function mw(u){return u.tag===5||u.tag===3||u.tag===4}function gw(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||mw(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Cv(u,f,v){var C=u.tag;if(C===5||C===6)u=u.stateNode,f?En(v,u,f):lt(v,u);else if(C!==4&&(u=u.child,u!==null))for(Cv(u,f,v),u=u.sibling;u!==null;)Cv(u,f,v),u=u.sibling}function wv(u,f,v){var C=u.tag;if(C===5||C===6)u=u.stateNode,f?Qe(v,u,f):ke(v,u);else if(C!==4&&(u=u.child,u!==null))for(wv(u,f,v),u=u.sibling;u!==null;)wv(u,f,v),u=u.sibling}var uo=null,qs=!1;function ba(u,f,v){for(v=v.child;v!==null;)Sv(u,f,v),v=v.sibling}function Sv(u,f,v){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(cr,v)}catch{}switch(v.tag){case 5:vo||xc(v,f);case 6:if(ee){var C=uo,k=qs;uo=null,ba(u,f,v),uo=C,qs=k,uo!==null&&(qs?ct(uo,v.stateNode):Te(uo,v.stateNode))}else ba(u,f,v);break;case 18:ee&&uo!==null&&(qs?Ge(uo,v.stateNode):wt(uo,v.stateNode));break;case 4:ee?(C=uo,k=qs,uo=v.stateNode.containerInfo,qs=!0,ba(u,f,v),uo=C,qs=k):(J&&(C=v.stateNode.containerInfo,k=ir(C),Mn(C,k)),ba(u,f,v));break;case 0:case 11:case 14:case 15:if(!vo&&(C=v.updateQueue,C!==null&&(C=C.lastEffect,C!==null))){k=C=C.next;do{var P=k,L=P.destroy;P=P.tag,L!==void 0&&(P&2||P&4)&&xv(v,f,L),k=k.next}while(k!==C)}ba(u,f,v);break;case 1:if(!vo&&(xc(v,f),C=v.stateNode,typeof C.componentWillUnmount=="function"))try{C.props=v.memoizedProps,C.state=v.memoizedState,C.componentWillUnmount()}catch(ce){gr(v,f,ce)}ba(u,f,v);break;case 21:ba(u,f,v);break;case 22:v.mode&1?(vo=(C=vo)||v.memoizedState!==null,ba(u,f,v),vo=C):ba(u,f,v);break;default:ba(u,f,v)}}function vw(u){var f=u.updateQueue;if(f!==null){u.updateQueue=null;var v=u.stateNode;v===null&&(v=u.stateNode=new OR),f.forEach(function(C){var k=BR.bind(null,u,C);v.has(C)||(v.add(C),C.then(k,k))})}}function Ks(u,f){var v=f.deletions;if(v!==null)for(var C=0;C";case Pp:return":has("+(_v(u)||"")+")";case Ep:return'[role="'+u.value+'"]';case Op:return'"'+u.value+'"';case Mp:return'[data-testname="'+u.value+'"]';default:throw Error(i(365))}}function Sw(u,f){var v=[];u=[u,0];for(var C=0;Ck&&(k=L),C&=~P}if(C=k,C=Ze()-C,C=(120>C?120:480>C?480:1080>C?1080:1920>C?1920:3e3>C?3e3:4320>C?4320:1960*DR(C/1960))-C,10u?16:u,Ni===null)var C=!1;else{if(u=Ni,Ni=null,Np=0,gn&6)throw Error(i(331));var k=gn;for(gn|=4,bt=u.current;bt!==null;){var P=bt,L=P.child;if(bt.flags&16){var ce=P.deletions;if(ce!==null){for(var be=0;beZe()-Mv?Sl(u,0):Ev|=v),Bo(u,f)}function Aw(u,f){f===0&&(u.mode&1?(f=jn,jn<<=1,!(jn&130023424)&&(jn=4194304)):f=1);var v=bo();u=ha(u,f),u!==null&&(Bt(u,f,v),Bo(u,v))}function FR(u){var f=u.memoizedState,v=0;f!==null&&(v=f.retryLane),Aw(u,v)}function BR(u,f){var v=0;switch(u.tag){case 13:var C=u.stateNode,k=u.memoizedState;k!==null&&(v=k.retryLane);break;case 19:C=u.stateNode;break;default:throw Error(i(314))}C!==null&&C.delete(f),Aw(u,v)}var Rw;Rw=function(u,f,v){if(u!==null)if(u.memoizedProps!==f.pendingProps||yn.current)zo=!0;else{if(!(u.lanes&v)&&!(f.flags&128))return zo=!1,PR(u,f,v);zo=!!(u.flags&131072)}else zo=!1,mr&&f.flags&1048576&&uC(f,jo,f.index);switch(f.lanes=0,f.tag){case 2:var C=f.type;wp(u,f),u=f.pendingProps;var k=Hr(f,Jt.current);hc(f,v),k=sv(null,f,C,u,k,v);var P=av();return f.flags|=1,typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,pr(C)?(P=!0,hr(f)):P=!1,f.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,X0(f),k.updater=pp,f.stateNode=k,k._reactInternals=f,J0(f,C,u,v),f=hv(null,f,C,!0,P,v)):(f.tag=0,mr&&P&&F0(f),Po(null,f,k,v),f=f.child),f;case 16:C=f.elementType;e:{switch(wp(u,f),u=f.pendingProps,k=C._init,C=k(C._payload),f.type=C,k=f.tag=WR(C),u=Gs(C,u),k){case 0:f=pv(null,f,C,u,v);break e;case 1:f=sw(null,f,C,u,v);break e;case 11:f=ew(null,f,C,u,v);break e;case 14:f=tw(null,f,C,Gs(C.type,u),v);break e}throw Error(i(306,C,""))}return f;case 0:return C=f.type,k=f.pendingProps,k=f.elementType===C?k:Gs(C,k),pv(u,f,C,k,v);case 1:return C=f.type,k=f.pendingProps,k=f.elementType===C?k:Gs(C,k),sw(u,f,C,k,v);case 3:e:{if(aw(f),u===null)throw Error(i(387));C=f.pendingProps,P=f.memoizedState,k=P.element,vC(u,f),fp(f,C,null,v);var L=f.memoizedState;if(C=L.element,ge&&P.isDehydrated)if(P={element:C,isDehydrated:!1,cache:L.cache,pendingSuspenseBoundaries:L.pendingSuspenseBoundaries,transitions:L.transitions},f.updateQueue.baseState=P,f.memoizedState=P,f.flags&256){k=bc(Error(i(423)),f),f=iw(u,f,C,v,k);break e}else if(C!==k){k=bc(Error(i(424)),f),f=iw(u,f,C,v,k);break e}else for(ge&&(bs=ue(f.stateNode.containerInfo),os=f,mr=!0,Us=null,Zu=!1),v=_C(f,null,C,v),f.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(fc(),C===k){f=Xa(u,f,v);break e}Po(u,f,C,v)}f=f.child}return f;case 5:return IC(f),u===null&&W0(f),C=f.type,k=f.pendingProps,P=u!==null?u.memoizedProps:null,L=k.children,$(C,k)?L=null:P!==null&&$(C,P)&&(f.flags|=32),ow(u,f),Po(u,f,L,v),f.child;case 6:return u===null&&W0(f),null;case 13:return lw(u,f,v);case 4:return Z0(f,f.stateNode.containerInfo),C=f.pendingProps,u===null?f.child=mc(f,null,C,v):Po(u,f,C,v),f.child;case 11:return C=f.type,k=f.pendingProps,k=f.elementType===C?k:Gs(C,k),ew(u,f,C,k,v);case 7:return Po(u,f,f.pendingProps,v),f.child;case 8:return Po(u,f,f.pendingProps.children,v),f.child;case 12:return Po(u,f,f.pendingProps.children,v),f.child;case 10:e:{if(C=f.type._context,k=f.pendingProps,P=f.memoizedProps,L=k.value,mC(f,C,L),P!==null)if(dr(P.value,L)){if(P.children===k.children&&!yn.current){f=Xa(u,f,v);break e}}else for(P=f.child,P!==null&&(P.return=f);P!==null;){var ce=P.dependencies;if(ce!==null){L=P.child;for(var be=ce.firstContext;be!==null;){if(be.context===C){if(P.tag===1){be=Qa(-1,v&-v),be.tag=2;var We=P.updateQueue;if(We!==null){We=We.shared;var xt=We.pending;xt===null?be.next=be:(be.next=xt.next,xt.next=be),We.pending=be}}P.lanes|=v,be=P.alternate,be!==null&&(be.lanes|=v),K0(P.return,v,f),ce.lanes|=v;break}be=be.next}}else if(P.tag===10)L=P.type===f.type?null:P.child;else if(P.tag===18){if(L=P.return,L===null)throw Error(i(341));L.lanes|=v,ce=L.alternate,ce!==null&&(ce.lanes|=v),K0(L,v,f),L=P.sibling}else L=P.child;if(L!==null)L.return=P;else for(L=P;L!==null;){if(L===f){L=null;break}if(P=L.sibling,P!==null){P.return=L.return,L=P;break}L=L.return}P=L}Po(u,f,k.children,v),f=f.child}return f;case 9:return k=f.type,C=f.pendingProps.children,hc(f,v),k=xs(k),C=C(k),f.flags|=1,Po(u,f,C,v),f.child;case 14:return C=f.type,k=Gs(C,f.pendingProps),k=Gs(C.type,k),tw(u,f,C,k,v);case 15:return nw(u,f,f.type,f.pendingProps,v);case 17:return C=f.type,k=f.pendingProps,k=f.elementType===C?k:Gs(C,k),wp(u,f),f.tag=1,pr(C)?(u=!0,hr(f)):u=!1,hc(f,v),wC(f,C,k),J0(f,C,k,v),hv(null,f,C,!0,u,v);case 19:return uw(u,f,v);case 22:return rw(u,f,v)}throw Error(i(156,f.tag))};function Dw(u,f){return Ne(u,f)}function HR(u,f,v,C){this.tag=u,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=C,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ss(u,f,v,C){return new HR(u,f,v,C)}function Lv(u){return u=u.prototype,!(!u||!u.isReactComponent)}function WR(u){if(typeof u=="function")return Lv(u)?1:0;if(u!=null){if(u=u.$$typeof,u===x)return 11;if(u===j)return 14}return 2}function zi(u,f){var v=u.alternate;return v===null?(v=Ss(u.tag,f,u.key,u.mode),v.elementType=u.elementType,v.type=u.type,v.stateNode=u.stateNode,v.alternate=u,u.alternate=v):(v.pendingProps=f,v.type=u.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=u.flags&14680064,v.childLanes=u.childLanes,v.lanes=u.lanes,v.child=u.child,v.memoizedProps=u.memoizedProps,v.memoizedState=u.memoizedState,v.updateQueue=u.updateQueue,f=u.dependencies,v.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},v.sibling=u.sibling,v.index=u.index,v.ref=u.ref,v}function Fp(u,f,v,C,k,P){var L=2;if(C=u,typeof u=="function")Lv(u)&&(L=1);else if(typeof u=="string")L=5;else e:switch(u){case h:return _l(v.children,k,P,f);case m:L=8,k|=8;break;case g:return u=Ss(12,v,f,k|2),u.elementType=g,u.lanes=P,u;case w:return u=Ss(13,v,f,k),u.elementType=w,u.lanes=P,u;case S:return u=Ss(19,v,f,k),u.elementType=S,u.lanes=P,u;case _:return Bp(v,k,P,f);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case b:L=10;break e;case y:L=9;break e;case x:L=11;break e;case j:L=14;break e;case I:L=16,C=null;break e}throw Error(i(130,u==null?u:typeof u,""))}return f=Ss(L,v,f,k),f.elementType=u,f.type=C,f.lanes=P,f}function _l(u,f,v,C){return u=Ss(7,u,C,f),u.lanes=v,u}function Bp(u,f,v,C){return u=Ss(22,u,C,f),u.elementType=_,u.lanes=v,u.stateNode={isHidden:!1},u}function zv(u,f,v){return u=Ss(6,u,null,f),u.lanes=v,u}function Fv(u,f,v){return f=Ss(4,u.children!==null?u.children:[],u.key,f),f.lanes=v,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}function VR(u,f,v,C,k){this.tag=f,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=W,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=St(0),this.expirationTimes=St(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.identifierPrefix=C,this.onRecoverableError=k,ge&&(this.mutableSourceEagerHydrationData=null)}function Tw(u,f,v,C,k,P,L,ce,be){return u=new VR(u,f,v,ce,be),f===1?(f=1,P===!0&&(f|=8)):f=0,P=Ss(3,null,null,f),u.current=P,P.stateNode=u,P.memoizedState={element:C,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},X0(P),u}function Nw(u){if(!u)return Ln;u=u._reactInternals;e:{if(D(u)!==u||u.tag!==1)throw Error(i(170));var f=u;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(pr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(i(171))}if(u.tag===1){var v=u.type;if(pr(v))return Gn(u,v,f)}return f}function $w(u){var f=u._reactInternals;if(f===void 0)throw typeof u.render=="function"?Error(i(188)):(u=Object.keys(u).join(","),Error(i(268,u)));return u=K(f),u===null?null:u.stateNode}function Lw(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var v=u.retryLane;u.retryLane=v!==0&&v=We&&P>=on&&k<=xt&&L<=ut){u.splice(f,1);break}else if(C!==We||v.width!==be.width||utL){if(!(P!==on||v.height!==be.height||xtk)){We>C&&(be.width+=We-C,be.x=C),xtP&&(be.height+=on-P,be.y=P),utv&&(v=L)),L ")+` - -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.call(t,n)&&uI(e,n,t[n]);return e},pve=(e,t)=>cve(e,uve(t));function lR(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const o=lR(r,t,n);if(o)return o;r=t?null:r.sibling}}function cR(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const lC=cR(l.createContext(null));class uR extends l.Component{render(){return l.createElement(lC.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:fI,ReactCurrentDispatcher:pI}=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function hve(){const e=l.useContext(lC);if(e===null)throw new Error("its-fine: useFiber must be called within a !");const t=l.useId();return l.useMemo(()=>{for(const r of[fI==null?void 0:fI.current,e,e==null?void 0:e.alternate]){if(!r)continue;const o=lR(r,!1,s=>{let i=s.memoizedState;for(;i;){if(i.memoizedState===t)return!0;i=i.next}});if(o)return o}},[e,t])}function mve(){var e,t;const n=hve(),[r]=l.useState(()=>new Map);r.clear();let o=n;for(;o;){const s=(e=o.type)==null?void 0:e._context;s&&s!==lC&&!r.has(s)&&r.set(s,(t=pI==null?void 0:pI.current)==null?void 0:t.readContext(cR(s))),o=o.return}return r}function gve(){const e=mve();return l.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>l.createElement(t,null,l.createElement(n.Provider,pve(dI({},r),{value:e.get(n)}))),t=>l.createElement(uR,dI({},t))),[e])}function vve(e){const t=z.useRef({});return z.useLayoutEffect(()=>{t.current=e}),z.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const bve=e=>{const t=z.useRef(),n=z.useRef(),r=z.useRef(),o=vve(e),s=gve(),i=c=>{const{forwardedRef:d}=e;d&&(typeof d=="function"?d(c):d.current=c)};return z.useLayoutEffect(()=>(n.current=new Cf.Stage({width:e.width,height:e.height,container:t.current}),i(n.current),r.current=Nd.createContainer(n.current,sR.LegacyRoot,!1,null),Nd.updateContainer(z.createElement(s,{},e.children),r.current),()=>{Cf.isBrowser&&(i(null),Nd.updateContainer(null,r.current,null),n.current.destroy())}),[]),z.useLayoutEffect(()=>{i(n.current),z0(n.current,e,o),Nd.updateContainer(z.createElement(s,{},e.children),r.current,null)}),z.createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Id="Layer",Fa="Group",Ba="Rect",Il="Circle",fg="Line",dR="Image",xve="Text",yve="Transformer",Nd=C0e(ive);Nd.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:z.version,rendererPackageName:"react-konva"});const Cve=z.forwardRef((e,t)=>z.createElement(uR,{},z.createElement(bve,{...e,forwardedRef:t}))),wve=me([Ir,Vs],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Nn}}),Sve=()=>{const e=le(),{tool:t,isStaging:n,isMovingBoundingBox:r}=H(wve);return{handleDragStart:l.useCallback(()=>{(t==="move"||n)&&!r&&e(Xh(!0))},[e,r,n,t]),handleDragMove:l.useCallback(o=>{if(!((t==="move"||n)&&!r))return;const s={x:o.target.x(),y:o.target.y()};e(jP(s))},[e,r,n,t]),handleDragEnd:l.useCallback(()=>{(t==="move"||n)&&!r&&e(Xh(!1))},[e,r,n,t])}},kve=me([Ir,lo,Vs],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:i,isMaskEnabled:c,shouldSnapToGrid:d}=e;return{activeTabName:t,isCursorOnCanvas:!!r,shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:i,isStaging:n,isMaskEnabled:c,shouldSnapToGrid:d}},{memoizeOptions:{resultEqualityCheck:Nn}}),jve=()=>{const e=le(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:o,isMaskEnabled:s,shouldSnapToGrid:i}=H(kve),c=l.useRef(null),d=_P(),p=()=>e(IP());_t(["shift+c"],()=>{p()},{enabled:()=>!o,preventDefault:!0},[]);const h=()=>e(ny(!s));_t(["h"],()=>{h()},{enabled:()=>!o,preventDefault:!0},[s]),_t(["n"],()=>{e(Yh(!i))},{enabled:!0,preventDefault:!0},[i]),_t("esc",()=>{e(m9())},{enabled:()=>!0,preventDefault:!0}),_t("shift+h",()=>{e(g9(!n))},{enabled:()=>!o,preventDefault:!0},[t,n]),_t(["space"],m=>{m.repeat||(d==null||d.container().focus(),r!=="move"&&(c.current=r,e(Zc("move"))),r==="move"&&c.current&&c.current!=="move"&&(e(Zc(c.current)),c.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,c])},cC=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},fR=()=>{const e=le(),t=ab(),n=_P();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const o=v9.pixelRatio,[s,i,c,d]=t.getContext().getImageData(r.x*o,r.y*o,1,1).data;s===void 0||i===void 0||c===void 0||d===void 0||e(b9({r:s,g:i,b:c,a:d}))},commitColorUnderCursor:()=>{e(x9())}}},_ve=me([lo,Ir,Vs],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Ive=e=>{const t=le(),{tool:n,isStaging:r}=H(_ve),{commitColorUnderCursor:o}=fR();return l.useCallback(s=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Xh(!0));return}if(n==="colorPicker"){o();return}const i=cC(e.current);i&&(s.evt.preventDefault(),t(PP(!0)),t(y9([i.x,i.y])))},[e,n,r,t,o])},Pve=me([lo,Ir,Vs],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Eve=(e,t,n)=>{const r=le(),{isDrawing:o,tool:s,isStaging:i}=H(Pve),{updateColorUnderCursor:c}=fR();return l.useCallback(()=>{if(!e.current)return;const d=cC(e.current);if(d){if(r(C9(d)),n.current=d,s==="colorPicker"){c();return}!o||s==="move"||i||(t.current=!0,r(EP([d.x,d.y])))}},[t,r,o,i,n,e,s,c])},Mve=()=>{const e=le();return l.useCallback(()=>{e(w9())},[e])},Ove=me([lo,Ir,Vs],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Ave=(e,t)=>{const n=le(),{tool:r,isDrawing:o,isStaging:s}=H(Ove);return l.useCallback(()=>{if(r==="move"||s){n(Xh(!1));return}if(!t.current&&o&&e.current){const i=cC(e.current);if(!i)return;n(EP([i.x,i.y]))}else t.current=!1;n(PP(!1))},[t,n,o,s,e,r])},Rve=me([Ir],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Dve=e=>{const t=le(),{isMoveStageKeyHeld:n,stageScale:r}=H(Rve);return l.useCallback(o=>{if(!e.current||n)return;o.evt.preventDefault();const s=e.current.getPointerPosition();if(!s)return;const i={x:(s.x-e.current.x())/r,y:(s.y-e.current.y())/r};let c=o.evt.deltaY;o.evt.ctrlKey&&(c=-c);const d=Hl(r*j9**c,k9,S9),p={x:s.x-i.x*d,y:s.y-i.y*d};t(_9(d)),t(jP(p))},[e,n,r,t])},Tve=me(Ir,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:o,shouldDarkenOutsideBoundingBox:s,stageCoordinates:i}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:s,stageCoordinates:i,stageDimensions:r,stageScale:o}},{memoizeOptions:{resultEqualityCheck:Nn}}),Nve=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=H(Tve);return a.jsxs(Fa,{children:[a.jsx(Ba,{offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),a.jsx(Ba,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},$ve=l.memo(Nve),Lve=me([Ir],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Nn}}),zve=()=>{const{stageScale:e,stageCoordinates:t,stageDimensions:n}=H(Lve),{colorMode:r}=ji(),[o,s]=l.useState([]),[i,c]=ea("colors",["base.800","base.200"]),d=l.useCallback(p=>p/e,[e]);return l.useLayoutEffect(()=>{const{width:p,height:h}=n,{x:m,y:g}=t,b={x1:0,y1:0,x2:p,y2:h,offset:{x:d(m),y:d(g)}},y={x:Math.ceil(d(m)/64)*64,y:Math.ceil(d(g)/64)*64},x={x1:-y.x,y1:-y.y,x2:d(p)-y.x+64,y2:d(h)-y.y+64},S={x1:Math.min(b.x1,x.x1),y1:Math.min(b.y1,x.y1),x2:Math.max(b.x2,x.x2),y2:Math.max(b.y2,x.y2)},j=S.x2-S.x1,I=S.y2-S.y1,_=Math.round(j/64)+1,M=Math.round(I/64)+1,E=kS(0,_).map(R=>a.jsx(fg,{x:S.x1+R*64,y:S.y1,points:[0,0,0,I],stroke:r==="dark"?i:c,strokeWidth:1},`x_${R}`)),A=kS(0,M).map(R=>a.jsx(fg,{x:S.x1,y:S.y1+R*64,points:[0,0,j,0],stroke:r==="dark"?i:c,strokeWidth:1},`y_${R}`));s(E.concat(A))},[e,t,n,d,r,i,c]),a.jsx(Fa,{children:o})},Fve=l.memo(zve),Bve=me([we],({system:e,canvas:t})=>{const{denoiseProgress:n}=e,{boundingBox:r}=t.layerState.stagingArea,{batchIds:o}=t;return{boundingBox:r,progressImage:n&&o.includes(n.batch_id)?n.progress_image:void 0}},{memoizeOptions:{resultEqualityCheck:Nn}}),Hve=e=>{const{...t}=e,{progressImage:n,boundingBox:r}=H(Bve),[o,s]=l.useState(null);return l.useEffect(()=>{if(!n)return;const i=new Image;i.onload=()=>{s(i)},i.src=n.dataURL},[n]),n&&r&&o?a.jsx(dR,{x:r.x,y:r.y,width:r.width,height:r.height,image:o,listening:!1,...t}):null},Wve=l.memo(Hve),Bl=e=>{const{r:t,g:n,b:r,a:o}=e;return`rgba(${t}, ${n}, ${r}, ${o})`},Vve=me(Ir,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:o}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:o,maskColorString:Bl(t)}}),hI=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.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,height:(d==null?void 0:d.height)??s.height}},{memoizeOptions:{resultEqualityCheck:Nn}}),s1e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:i,width:c,height:d}=H(o1e);return a.jsxs(Fa,{...t,children:[r&&n&&a.jsx(pR,{canvasImage:n}),o&&a.jsxs(Fa,{children:[a.jsx(Ba,{x:s,y:i,width:c,height:d,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),a.jsx(Ba,{x:s,y:i,width:c,height:d,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},a1e=l.memo(s1e),i1e=me([Ir],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:o}=e;return{currentIndex:n,total:t.length,currentStagingAreaImage:t.length>0?t[n]:void 0,shouldShowStagingImage:o,shouldShowStagingOutline:r}},Ie),l1e=()=>{const e=le(),{currentStagingAreaImage:t,shouldShowStagingImage:n,currentIndex:r,total:o}=H(i1e),{t:s}=Q(),i=l.useCallback(()=>{e(jS(!0))},[e]),c=l.useCallback(()=>{e(jS(!1))},[e]),d=l.useCallback(()=>e(A9()),[e]),p=l.useCallback(()=>e(R9()),[e]),h=l.useCallback(()=>e(D9()),[e]);_t(["left"],d,{enabled:()=>!0,preventDefault:!0}),_t(["right"],p,{enabled:()=>!0,preventDefault:!0}),_t(["enter"],()=>h,{enabled:()=>!0,preventDefault:!0});const{data:m}=Rs((t==null?void 0:t.imageName)??zs.skipToken),g=l.useCallback(()=>{e(T9(!n))},[e,n]),b=l.useCallback(()=>{m&&e(N9({imageDTO:m}))},[e,m]),y=l.useCallback(()=>{e($9())},[e]);return t?a.jsxs(N,{pos:"absolute",bottom:4,gap:2,w:"100%",align:"center",justify:"center",onMouseEnter:i,onMouseLeave:c,children:[a.jsxs(Hn,{isAttached:!0,borderRadius:"base",shadow:"dark-lg",children:[a.jsx(rt,{tooltip:`${s("unifiedCanvas.previous")} (Left)`,"aria-label":`${s("unifiedCanvas.previous")} (Left)`,icon:a.jsx(yee,{}),onClick:d,colorScheme:"accent",isDisabled:!n}),a.jsx(Dt,{colorScheme:"base",pointerEvents:"none",isDisabled:!n,minW:20,children:`${r+1}/${o}`}),a.jsx(rt,{tooltip:`${s("unifiedCanvas.next")} (Right)`,"aria-label":`${s("unifiedCanvas.next")} (Right)`,icon:a.jsx(Cee,{}),onClick:p,colorScheme:"accent",isDisabled:!n})]}),a.jsxs(Hn,{isAttached:!0,borderRadius:"base",shadow:"dark-lg",children:[a.jsx(rt,{tooltip:`${s("unifiedCanvas.accept")} (Enter)`,"aria-label":`${s("unifiedCanvas.accept")} (Enter)`,icon:a.jsx(VM,{}),onClick:h,colorScheme:"accent"}),a.jsx(rt,{tooltip:s(n?"unifiedCanvas.showResultsOn":"unifiedCanvas.showResultsOff"),"aria-label":s(n?"unifiedCanvas.showResultsOn":"unifiedCanvas.showResultsOff"),"data-alert":!n,icon:n?a.jsx(Dee,{}):a.jsx(Ree,{}),onClick:g,colorScheme:"accent"}),a.jsx(rt,{tooltip:s("unifiedCanvas.saveToGallery"),"aria-label":s("unifiedCanvas.saveToGallery"),isDisabled:!m||!m.is_intermediate,icon:a.jsx(o0,{}),onClick:b,colorScheme:"accent"}),a.jsx(rt,{tooltip:s("unifiedCanvas.discardAll"),"aria-label":s("unifiedCanvas.discardAll"),icon:a.jsx(ku,{}),onClick:y,colorScheme:"error",fontSize:20})]})]}):null},c1e=l.memo(l1e),u1e=()=>{const e=H(c=>c.canvas.layerState),t=H(c=>c.canvas.boundingBoxCoordinates),n=H(c=>c.canvas.boundingBoxDimensions),r=H(c=>c.canvas.isMaskEnabled),o=H(c=>c.canvas.shouldPreserveMaskedArea),[s,i]=l.useState();return l.useEffect(()=>{i(void 0)},[e,t,n,r,o]),ate(async()=>{const c=await L9(e,t,n,r,o);if(!c)return;const{baseImageData:d,maskImageData:p}=c,h=z9(d,p);i(h)},1e3,[e,t,n,r,o]),s},d1e=()=>{const e=u1e(),{t}=Q(),n=l.useMemo(()=>({txt2img:t("common.txt2img"),img2img:t("common.img2img"),inpaint:t("common.inpaint"),outpaint:t("common.outpaint")}),[t]);return a.jsxs(Le,{children:[t("accessibility.mode"),":"," ",e?n[e]:"..."]})},f1e=l.memo(d1e),Xc=e=>Math.round(e*100)/100,p1e=me([Ir],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${Xc(n)}, ${Xc(r)})`}},{memoizeOptions:{resultEqualityCheck:Nn}});function h1e(){const{cursorCoordinatesString:e}=H(p1e),{t}=Q();return a.jsx(Le,{children:`${t("unifiedCanvas.cursorPosition")}: ${e}`})}const jx="var(--invokeai-colors-warning-500)",m1e=me([Ir],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:o},boundingBoxDimensions:{width:s,height:i},scaledBoundingBoxDimensions:{width:c,height:d},boundingBoxCoordinates:{x:p,y:h},stageScale:m,shouldShowCanvasDebugInfo:g,layer:b,boundingBoxScaleMethod:y,shouldPreserveMaskedArea:x}=e;let w="inherit";return(y==="none"&&(s<512||i<512)||y==="manual"&&c*d<512*512)&&(w=jx),{activeLayerColor:b==="mask"?jx:"inherit",layer:b,boundingBoxColor:w,boundingBoxCoordinatesString:`(${Xc(p)}, ${Xc(h)})`,boundingBoxDimensionsString:`${s}×${i}`,scaledBoundingBoxDimensionsString:`${c}×${d}`,canvasCoordinatesString:`${Xc(r)}×${Xc(o)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(m*100),shouldShowCanvasDebugInfo:g,shouldShowBoundingBox:y!=="auto",shouldShowScaledBoundingBox:y!=="none",shouldPreserveMaskedArea:x}},{memoizeOptions:{resultEqualityCheck:Nn}}),g1e=()=>{const{activeLayerColor:e,layer:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:o,scaledBoundingBoxDimensionsString:s,shouldShowScaledBoundingBox:i,canvasCoordinatesString:c,canvasDimensionsString:d,canvasScaleString:p,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:m,shouldPreserveMaskedArea:g}=H(m1e),{t:b}=Q();return a.jsxs(N,{sx:{flexDirection:"column",position:"absolute",top:0,insetInlineStart:0,opacity:.65,display:"flex",fontSize:"sm",padding:1,px:2,minWidth:48,margin:1,borderRadius:"base",pointerEvents:"none",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(f1e,{}),a.jsx(Le,{style:{color:e},children:`${b("unifiedCanvas.activeLayer")}: ${b(`unifiedCanvas.${t}`)}`}),a.jsx(Le,{children:`${b("unifiedCanvas.canvasScale")}: ${p}%`}),g&&a.jsxs(Le,{style:{color:jx},children:[b("unifiedCanvas.preserveMaskedArea"),": ",b("common.on")]}),m&&a.jsx(Le,{style:{color:n},children:`${b("unifiedCanvas.boundingBox")}: ${o}`}),i&&a.jsx(Le,{style:{color:n},children:`${b("unifiedCanvas.scaledBoundingBox")}: ${s}`}),h&&a.jsxs(a.Fragment,{children:[a.jsx(Le,{children:`${b("unifiedCanvas.boundingBoxPosition")}: ${r}`}),a.jsx(Le,{children:`${b("unifiedCanvas.canvasDimensions")}: ${d}`}),a.jsx(Le,{children:`${b("unifiedCanvas.canvasPosition")}: ${c}`}),a.jsx(h1e,{})]})]})},v1e=l.memo(g1e),b1e=me([we],({canvas:e,generation:t})=>{const{boundingBoxCoordinates:n,boundingBoxDimensions:r,stageScale:o,isDrawing:s,isTransformingBoundingBox:i,isMovingBoundingBox:c,tool:d,shouldSnapToGrid:p}=e,{aspectRatio:h}=t;return{boundingBoxCoordinates:n,boundingBoxDimensions:r,isDrawing:s,isMovingBoundingBox:c,isTransformingBoundingBox:i,stageScale:o,shouldSnapToGrid:p,tool:d,hitStrokeWidth:20/o,aspectRatio:h}},{memoizeOptions:{resultEqualityCheck:Nn}}),x1e=e=>{const{...t}=e,n=le(),{boundingBoxCoordinates:r,boundingBoxDimensions:o,isDrawing:s,isMovingBoundingBox:i,isTransformingBoundingBox:c,stageScale:d,shouldSnapToGrid:p,tool:h,hitStrokeWidth:m,aspectRatio:g}=H(b1e),b=l.useRef(null),y=l.useRef(null),[x,w]=l.useState(!1);l.useEffect(()=>{var G;!b.current||!y.current||(b.current.nodes([y.current]),(G=b.current.getLayer())==null||G.batchDraw())},[]);const S=64*d;_t("N",()=>{n(Yh(!p))});const j=l.useCallback(G=>{if(!p){n(Gv({x:Math.floor(G.target.x()),y:Math.floor(G.target.y())}));return}const X=G.target.x(),Z=G.target.y(),te=Ro(X,64),V=Ro(Z,64);G.target.x(te),G.target.y(V),n(Gv({x:te,y:V}))},[n,p]),I=l.useCallback(()=>{if(!y.current)return;const G=y.current,X=G.scaleX(),Z=G.scaleY(),te=Math.round(G.width()*X),V=Math.round(G.height()*Z),oe=Math.round(G.x()),ne=Math.round(G.y());if(g){const se=Ro(te/g,64);n(na({width:te,height:se}))}else n(na({width:te,height:V}));n(Gv({x:p?Pd(oe,64):oe,y:p?Pd(ne,64):ne})),G.scaleX(1),G.scaleY(1)},[n,p,g]),_=l.useCallback((G,X,Z)=>{const te=G.x%S,V=G.y%S;return{x:Pd(X.x,S)+te,y:Pd(X.y,S)+V}},[S]),M=l.useCallback(()=>{n(qv(!0))},[n]),E=l.useCallback(()=>{n(qv(!1)),n(Kv(!1)),n(Kp(!1)),w(!1)},[n]),A=l.useCallback(()=>{n(Kv(!0))},[n]),R=l.useCallback(()=>{n(qv(!1)),n(Kv(!1)),n(Kp(!1)),w(!1)},[n]),D=l.useCallback(()=>{w(!0)},[]),O=l.useCallback(()=>{!c&&!i&&w(!1)},[i,c]),T=l.useCallback(()=>{n(Kp(!0))},[n]),K=l.useCallback(()=>{n(Kp(!1))},[n]);return a.jsxs(Fa,{...t,children:[a.jsx(Ba,{height:o.height,width:o.width,x:r.x,y:r.y,onMouseEnter:T,onMouseOver:T,onMouseLeave:K,onMouseOut:K}),a.jsx(Ba,{draggable:!0,fillEnabled:!1,height:o.height,hitStrokeWidth:m,listening:!s&&h==="move",onDragStart:A,onDragEnd:R,onDragMove:j,onMouseDown:A,onMouseOut:O,onMouseOver:D,onMouseEnter:D,onMouseUp:R,onTransform:I,onTransformEnd:E,ref:y,stroke:x?"rgba(255,255,255,0.7)":"white",strokeWidth:(x?8:1)/d,width:o.width,x:r.x,y:r.y}),a.jsx(yve,{anchorCornerRadius:3,anchorDragBoundFunc:_,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:h==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!s&&h==="move",onDragStart:A,onDragEnd:R,onMouseDown:M,onMouseUp:E,onTransformEnd:E,ref:b,rotateEnabled:!1})]})},y1e=l.memo(x1e),C1e=me(Ir,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:o,brushColor:s,tool:i,layer:c,shouldShowBrush:d,isMovingBoundingBox:p,isTransformingBoundingBox:h,stageScale:m,stageDimensions:g,boundingBoxCoordinates:b,boundingBoxDimensions:y,shouldRestrictStrokesToBox:x}=e,w=x?{clipX:b.x,clipY:b.y,clipWidth:y.width,clipHeight:y.height}:{};return{cursorPosition:t,brushX:t?t.x:g.width/2,brushY:t?t.y:g.height/2,radius:n/2,colorPickerOuterRadius:_S/m,colorPickerInnerRadius:(_S-ib+1)/m,maskColorString:Bl({...o,a:.5}),brushColorString:Bl(s),colorPickerColorString:Bl(r),tool:i,layer:c,shouldShowBrush:d,shouldDrawBrushPreview:!(p||h||!t)&&d,strokeWidth:1.5/m,dotRadius:1.5/m,clip:w}},{memoizeOptions:{resultEqualityCheck:Nn}}),w1e=e=>{const{...t}=e,{brushX:n,brushY:r,radius:o,maskColorString:s,tool:i,layer:c,shouldDrawBrushPreview:d,dotRadius:p,strokeWidth:h,brushColorString:m,colorPickerColorString:g,colorPickerInnerRadius:b,colorPickerOuterRadius:y,clip:x}=H(C1e);return d?a.jsxs(Fa,{listening:!1,...x,...t,children:[i==="colorPicker"?a.jsxs(a.Fragment,{children:[a.jsx(Il,{x:n,y:r,radius:y,stroke:m,strokeWidth:ib,strokeScaleEnabled:!1}),a.jsx(Il,{x:n,y:r,radius:b,stroke:g,strokeWidth:ib,strokeScaleEnabled:!1})]}):a.jsxs(a.Fragment,{children:[a.jsx(Il,{x:n,y:r,radius:o,fill:c==="mask"?s:m,globalCompositeOperation:i==="eraser"?"destination-out":"source-out"}),a.jsx(Il,{x:n,y:r,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),a.jsx(Il,{x:n,y:r,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}),a.jsx(Il,{x:n,y:r,radius:p*2,fill:"rgba(255,255,255,0.4)",listening:!1}),a.jsx(Il,{x:n,y:r,radius:p,fill:"rgba(0,0,0,1)",listening:!1})]}):null},S1e=l.memo(w1e),k1e=me([Ir,Vs],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:o,isTransformingBoundingBox:s,isMouseOverBoundingBox:i,isMovingBoundingBox:c,stageDimensions:d,stageCoordinates:p,tool:h,isMovingStage:m,shouldShowIntermediates:g,shouldShowGrid:b,shouldRestrictStrokesToBox:y,shouldAntialias:x}=e;let w="none";return h==="move"||t?m?w="grabbing":w="grab":s?w=void 0:y&&!i&&(w="default"),{isMaskEnabled:n,isModifyingBoundingBox:s||c,shouldShowBoundingBox:o,shouldShowGrid:b,stageCoordinates:p,stageCursor:w,stageDimensions:d,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:g,shouldAntialias:x}},Ie),j1e=Ae(Cve,{shouldForwardProp:e=>!["sx"].includes(e)}),_1e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:o,stageCursor:s,stageDimensions:i,stageScale:c,tool:d,isStaging:p,shouldShowIntermediates:h,shouldAntialias:m}=H(k1e);jve();const g=le(),b=l.useRef(null),y=l.useRef(null),x=l.useRef(null),w=l.useCallback(G=>{F9(G),y.current=G},[]),S=l.useCallback(G=>{B9(G),x.current=G},[]),j=l.useRef({x:0,y:0}),I=l.useRef(!1),_=Dve(y),M=Ive(y),E=Ave(y,I),A=Eve(y,I,j),R=Mve(),{handleDragStart:D,handleDragMove:O,handleDragEnd:T}=Sve(),K=l.useCallback(G=>G.evt.preventDefault(),[]);return l.useEffect(()=>{if(!b.current)return;const G=new ResizeObserver(te=>{for(const V of te)if(V.contentBoxSize){const{width:oe,height:ne}=V.contentRect;g(IS({width:oe,height:ne}))}});G.observe(b.current);const{width:X,height:Z}=b.current.getBoundingClientRect();return g(IS({width:X,height:Z})),()=>{G.disconnect()}},[g]),a.jsxs(N,{id:"canvas-container",ref:b,sx:{position:"relative",height:"100%",width:"100%",borderRadius:"base"},children:[a.jsx(Le,{sx:{position:"absolute"},children:a.jsxs(j1e,{tabIndex:-1,ref:w,sx:{outline:"none",overflow:"hidden",cursor:s||void 0,canvas:{outline:"none"}},x:o.x,y:o.y,width:i.width,height:i.height,scale:{x:c,y:c},onTouchStart:M,onTouchMove:A,onTouchEnd:E,onMouseDown:M,onMouseLeave:R,onMouseMove:A,onMouseUp:E,onDragStart:D,onDragMove:O,onDragEnd:T,onContextMenu:K,onWheel:_,draggable:(d==="move"||p)&&!t,children:[a.jsx(Id,{id:"grid",visible:r,children:a.jsx(Fve,{})}),a.jsx(Id,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:m,children:a.jsx(r1e,{})}),a.jsxs(Id,{id:"mask",visible:e&&!p,listening:!1,children:[a.jsx(Qve,{visible:!0,listening:!1}),a.jsx(Gve,{listening:!1})]}),a.jsx(Id,{children:a.jsx($ve,{})}),a.jsxs(Id,{id:"preview",imageSmoothingEnabled:m,children:[!p&&a.jsx(S1e,{visible:d!=="move",listening:!1}),a.jsx(a1e,{visible:p}),h&&a.jsx(Wve,{}),a.jsx(y1e,{visible:n&&!p})]})]})}),a.jsx(v1e,{}),a.jsx(c1e,{})]})},I1e=l.memo(_1e);function P1e(e,t,n=250){const[r,o]=l.useState(0);return l.useEffect(()=>{const s=setTimeout(()=>{r===1&&e(),o(0)},n);return r===2&&t(),()=>clearTimeout(s)},[r,e,t,n]),()=>o(s=>s+1)}const V1={width:6,height:6,borderColor:"base.100"},E1e={".react-colorful__hue-pointer":V1,".react-colorful__saturation-pointer":V1,".react-colorful__alpha-pointer":V1,gap:2,flexDir:"column"},_h="4.2rem",M1e=e=>{const{color:t,onChange:n,withNumberInput:r,...o}=e,s=l.useCallback(p=>n({...t,r:p}),[t,n]),i=l.useCallback(p=>n({...t,g:p}),[t,n]),c=l.useCallback(p=>n({...t,b:p}),[t,n]),d=l.useCallback(p=>n({...t,a:p}),[t,n]);return a.jsxs(N,{sx:E1e,children:[a.jsx(fA,{color:t,onChange:n,style:{width:"100%"},...o}),r&&a.jsxs(N,{children:[a.jsx(_a,{value:t.r,onChange:s,min:0,max:255,step:1,label:"Red",w:_h}),a.jsx(_a,{value:t.g,onChange:i,min:0,max:255,step:1,label:"Green",w:_h}),a.jsx(_a,{value:t.b,onChange:c,min:0,max:255,step:1,label:"Blue",w:_h}),a.jsx(_a,{value:t.a,onChange:d,step:.1,min:0,max:1,label:"Alpha",w:_h,isInteger:!1})]})]})},hR=l.memo(M1e),O1e=me([Ir,Vs],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:o,shouldPreserveMaskedArea:s}=e;return{layer:r,maskColor:n,maskColorString:Bl(n),isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Nn}}),A1e=()=>{const e=le(),{t}=Q(),{layer:n,maskColor:r,isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:i}=H(O1e);_t(["q"],()=>{c()},{enabled:()=>!i,preventDefault:!0},[n]),_t(["shift+c"],()=>{d()},{enabled:()=>!i,preventDefault:!0},[]),_t(["h"],()=>{p()},{enabled:()=>!i,preventDefault:!0},[o]);const c=l.useCallback(()=>{e(MP(n==="mask"?"base":"mask"))},[e,n]),d=l.useCallback(()=>{e(IP())},[e]),p=l.useCallback(()=>{e(ny(!o))},[e,o]),h=l.useCallback(async()=>{e(H9())},[e]),m=l.useCallback(b=>{e(W9(b.target.checked))},[e]),g=l.useCallback(b=>{e(V9(b))},[e]);return a.jsx(tp,{triggerComponent:a.jsx(Hn,{children:a.jsx(rt,{"aria-label":t("unifiedCanvas.maskingOptions"),tooltip:t("unifiedCanvas.maskingOptions"),icon:a.jsx(JM,{}),isChecked:n==="mask",isDisabled:i})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(Eo,{label:`${t("unifiedCanvas.enableMask")} (H)`,isChecked:o,onChange:p}),a.jsx(Eo,{label:t("unifiedCanvas.preserveMaskedArea"),isChecked:s,onChange:m}),a.jsx(Le,{sx:{paddingTop:2,paddingBottom:2},children:a.jsx(hR,{color:r,onChange:g})}),a.jsx(Dt,{size:"sm",leftIcon:a.jsx(o0,{}),onClick:h,children:"Save Mask"}),a.jsxs(Dt,{size:"sm",leftIcon:a.jsx(Zo,{}),onClick:d,children:[t("unifiedCanvas.clearMask")," (Shift+C)"]})]})})},R1e=l.memo(A1e),D1e=me([we,lo],({canvas:e},t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Nn}});function T1e(){const e=le(),{canRedo:t,activeTabName:n}=H(D1e),{t:r}=Q(),o=l.useCallback(()=>{e(U9())},[e]);return _t(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{o()},{enabled:()=>t,preventDefault:!0},[n,t]),a.jsx(rt,{"aria-label":`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,icon:a.jsx(qee,{}),onClick:o,isDisabled:!t})}const N1e=()=>{const e=H(Vs),t=le(),{t:n}=Q(),r=l.useCallback(()=>t(G9()),[t]);return a.jsxs(_0,{title:n("unifiedCanvas.clearCanvasHistory"),acceptCallback:r,acceptButtonText:n("unifiedCanvas.clearHistory"),triggerComponent:a.jsx(Dt,{size:"sm",leftIcon:a.jsx(Zo,{}),isDisabled:e,children:n("unifiedCanvas.clearCanvasHistory")}),children:[a.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryMessage")}),a.jsx("br",{}),a.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryConfirm")})]})},$1e=l.memo(N1e),L1e=me([Ir],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:i,shouldSnapToGrid:c,shouldRestrictStrokesToBox:d,shouldAntialias:p}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:i,shouldSnapToGrid:c,shouldRestrictStrokesToBox:d,shouldAntialias:p}},{memoizeOptions:{resultEqualityCheck:Nn}}),z1e=()=>{const e=le(),{t}=Q(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:s,shouldShowGrid:i,shouldShowIntermediates:c,shouldSnapToGrid:d,shouldRestrictStrokesToBox:p,shouldAntialias:h}=H(L1e);_t(["n"],()=>{e(Yh(!d))},{enabled:!0,preventDefault:!0},[d]);const m=l.useCallback(_=>e(Yh(_.target.checked)),[e]),g=l.useCallback(_=>e(q9(_.target.checked)),[e]),b=l.useCallback(_=>e(K9(_.target.checked)),[e]),y=l.useCallback(_=>e(Q9(_.target.checked)),[e]),x=l.useCallback(_=>e(X9(_.target.checked)),[e]),w=l.useCallback(_=>e(Y9(_.target.checked)),[e]),S=l.useCallback(_=>e(J9(_.target.checked)),[e]),j=l.useCallback(_=>e(Z9(_.target.checked)),[e]),I=l.useCallback(_=>e(e$(_.target.checked)),[e]);return a.jsx(tp,{isLazy:!1,triggerComponent:a.jsx(rt,{tooltip:t("unifiedCanvas.canvasSettings"),"aria-label":t("unifiedCanvas.canvasSettings"),icon:a.jsx(nO,{})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(Eo,{label:t("unifiedCanvas.showIntermediates"),isChecked:c,onChange:g}),a.jsx(Eo,{label:t("unifiedCanvas.showGrid"),isChecked:i,onChange:b}),a.jsx(Eo,{label:t("unifiedCanvas.snapToGrid"),isChecked:d,onChange:m}),a.jsx(Eo,{label:t("unifiedCanvas.darkenOutsideSelection"),isChecked:o,onChange:y}),a.jsx(Eo,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:x}),a.jsx(Eo,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:w}),a.jsx(Eo,{label:t("unifiedCanvas.limitStrokesToBox"),isChecked:p,onChange:S}),a.jsx(Eo,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:s,onChange:j}),a.jsx(Eo,{label:t("unifiedCanvas.antialiasing"),isChecked:h,onChange:I}),a.jsx($1e,{})]})})},F1e=l.memo(z1e),B1e=me([we,Vs],({canvas:e},t)=>{const{tool:n,brushColor:r,brushSize:o}=e;return{tool:n,isStaging:t,brushColor:r,brushSize:o}},{memoizeOptions:{resultEqualityCheck:Nn}}),H1e=()=>{const e=le(),{tool:t,brushColor:n,brushSize:r,isStaging:o}=H(B1e),{t:s}=Q();_t(["b"],()=>{i()},{enabled:()=>!o,preventDefault:!0},[]),_t(["e"],()=>{c()},{enabled:()=>!o,preventDefault:!0},[t]),_t(["c"],()=>{d()},{enabled:()=>!o,preventDefault:!0},[t]),_t(["shift+f"],()=>{p()},{enabled:()=>!o,preventDefault:!0}),_t(["delete","backspace"],()=>{h()},{enabled:()=>!o,preventDefault:!0}),_t(["BracketLeft"],()=>{r-5<=5?e(Qp(Math.max(r-1,1))):e(Qp(Math.max(r-5,1)))},{enabled:()=>!o,preventDefault:!0},[r]),_t(["BracketRight"],()=>{e(Qp(Math.min(r+5,500)))},{enabled:()=>!o,preventDefault:!0},[r]),_t(["Shift+BracketLeft"],()=>{e(Qv({...n,a:Hl(n.a-.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]),_t(["Shift+BracketRight"],()=>{e(Qv({...n,a:Hl(n.a+.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]);const i=l.useCallback(()=>{e(Zc("brush"))},[e]),c=l.useCallback(()=>{e(Zc("eraser"))},[e]),d=l.useCallback(()=>{e(Zc("colorPicker"))},[e]),p=l.useCallback(()=>{e(t$())},[e]),h=l.useCallback(()=>{e(n$())},[e]),m=l.useCallback(b=>{e(Qp(b))},[e]),g=l.useCallback(b=>{e(Qv(b))},[e]);return a.jsxs(Hn,{isAttached:!0,children:[a.jsx(rt,{"aria-label":`${s("unifiedCanvas.brush")} (B)`,tooltip:`${s("unifiedCanvas.brush")} (B)`,icon:a.jsx(Wee,{}),isChecked:t==="brush"&&!o,onClick:i,isDisabled:o}),a.jsx(rt,{"aria-label":`${s("unifiedCanvas.eraser")} (E)`,tooltip:`${s("unifiedCanvas.eraser")} (E)`,icon:a.jsx(Eee,{}),isChecked:t==="eraser"&&!o,isDisabled:o,onClick:c}),a.jsx(rt,{"aria-label":`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:a.jsx(Tee,{}),isDisabled:o,onClick:p}),a.jsx(rt,{"aria-label":`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:a.jsx(Zi,{style:{transform:"rotate(45deg)"}}),isDisabled:o,onClick:h}),a.jsx(rt,{"aria-label":`${s("unifiedCanvas.colorPicker")} (C)`,tooltip:`${s("unifiedCanvas.colorPicker")} (C)`,icon:a.jsx(Aee,{}),isChecked:t==="colorPicker"&&!o,isDisabled:o,onClick:d}),a.jsx(tp,{triggerComponent:a.jsx(rt,{"aria-label":s("unifiedCanvas.brushOptions"),tooltip:s("unifiedCanvas.brushOptions"),icon:a.jsx(tO,{})}),children:a.jsxs(N,{minWidth:60,direction:"column",gap:4,width:"100%",children:[a.jsx(N,{gap:4,justifyContent:"space-between",children:a.jsx(It,{label:s("unifiedCanvas.brushSize"),value:r,withInput:!0,onChange:m,sliderNumberInputProps:{max:500}})}),a.jsx(Le,{sx:{width:"100%",paddingTop:2,paddingBottom:2},children:a.jsx(hR,{withNumberInput:!0,color:n,onChange:g})})]})})]})},W1e=l.memo(H1e),V1e=me([we,lo],({canvas:e},t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Nn}});function U1e(){const e=le(),{t}=Q(),{canUndo:n,activeTabName:r}=H(V1e),o=l.useCallback(()=>{e(r$())},[e]);return _t(["meta+z","ctrl+z"],()=>{o()},{enabled:()=>n,preventDefault:!0},[r,n]),a.jsx(rt,{"aria-label":`${t("unifiedCanvas.undo")} (Ctrl+Z)`,tooltip:`${t("unifiedCanvas.undo")} (Ctrl+Z)`,icon:a.jsx(a0,{}),onClick:o,isDisabled:!n})}const G1e=me([we,Vs],({canvas:e},t)=>{const{tool:n,shouldCropToBoundingBoxOnSave:r,layer:o,isMaskEnabled:s}=e;return{isStaging:t,isMaskEnabled:s,tool:n,layer:o,shouldCropToBoundingBoxOnSave:r}},{memoizeOptions:{resultEqualityCheck:Nn}}),q1e=()=>{const e=le(),{isStaging:t,isMaskEnabled:n,layer:r,tool:o}=H(G1e),s=ab(),{t:i}=Q(),{isClipboardAPIAvailable:c}=I8(),{getUploadButtonProps:d,getUploadInputProps:p}=D2({postUploadAction:{type:"SET_CANVAS_INITIAL_IMAGE"}});_t(["v"],()=>{h()},{enabled:()=>!t,preventDefault:!0},[]),_t(["r"],()=>{g()},{enabled:()=>!0,preventDefault:!0},[s]),_t(["shift+m"],()=>{y()},{enabled:()=>!t,preventDefault:!0},[s]),_t(["shift+s"],()=>{x()},{enabled:()=>!t,preventDefault:!0},[s]),_t(["meta+c","ctrl+c"],()=>{w()},{enabled:()=>!t&&c,preventDefault:!0},[s,c]),_t(["shift+d"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s]);const h=l.useCallback(()=>{e(Zc("move"))},[e]),m=P1e(()=>g(!1),()=>g(!0)),g=(I=!1)=>{const _=ab();if(!_)return;const M=_.getClientRect({skipTransform:!0});e(c$({contentRect:M,shouldScaleTo1:I}))},b=l.useCallback(()=>{e(RI())},[e]),y=l.useCallback(()=>{e(o$())},[e]),x=l.useCallback(()=>{e(s$())},[e]),w=l.useCallback(()=>{c&&e(a$())},[e,c]),S=l.useCallback(()=>{e(i$())},[e]),j=l.useCallback(I=>{const _=I;e(MP(_)),_==="mask"&&!n&&e(ny(!0))},[e,n]);return a.jsxs(N,{sx:{alignItems:"center",gap:2,flexWrap:"wrap"},children:[a.jsx(Le,{w:24,children:a.jsx(Dr,{tooltip:`${i("unifiedCanvas.layer")} (Q)`,value:r,data:l$,onChange:j,disabled:t})}),a.jsx(R1e,{}),a.jsx(W1e,{}),a.jsxs(Hn,{isAttached:!0,children:[a.jsx(rt,{"aria-label":`${i("unifiedCanvas.move")} (V)`,tooltip:`${i("unifiedCanvas.move")} (V)`,icon:a.jsx(wee,{}),isChecked:o==="move"||t,onClick:h}),a.jsx(rt,{"aria-label":`${i("unifiedCanvas.resetView")} (R)`,tooltip:`${i("unifiedCanvas.resetView")} (R)`,icon:a.jsx(_ee,{}),onClick:m})]}),a.jsxs(Hn,{isAttached:!0,children:[a.jsx(rt,{"aria-label":`${i("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${i("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:a.jsx(Fee,{}),onClick:y,isDisabled:t}),a.jsx(rt,{"aria-label":`${i("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${i("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:a.jsx(o0,{}),onClick:x,isDisabled:t}),c&&a.jsx(rt,{"aria-label":`${i("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${i("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:a.jsx(Hu,{}),onClick:w,isDisabled:t}),a.jsx(rt,{"aria-label":`${i("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${i("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:a.jsx(Wu,{}),onClick:S,isDisabled:t})]}),a.jsxs(Hn,{isAttached:!0,children:[a.jsx(U1e,{}),a.jsx(T1e,{})]}),a.jsxs(Hn,{isAttached:!0,children:[a.jsx(rt,{"aria-label":`${i("common.upload")}`,tooltip:`${i("common.upload")}`,icon:a.jsx(i0,{}),isDisabled:t,...d()}),a.jsx("input",{...p()}),a.jsx(rt,{"aria-label":`${i("unifiedCanvas.clearCanvas")}`,tooltip:`${i("unifiedCanvas.clearCanvas")}`,icon:a.jsx(Zo,{}),onClick:b,colorScheme:"error",isDisabled:t})]}),a.jsx(Hn,{isAttached:!0,children:a.jsx(F1e,{})})]})},K1e=l.memo(q1e),mI={id:"canvas-intial-image",actionType:"SET_CANVAS_INITIAL_IMAGE"},Q1e=()=>{const{t:e}=Q(),{isOver:t,setNodeRef:n,active:r}=HO({id:"unifiedCanvas",data:mI});return a.jsxs(N,{layerStyle:"first",ref:n,tabIndex:-1,sx:{flexDirection:"column",alignItems:"center",gap:4,p:2,borderRadius:"base",w:"full",h:"full"},children:[a.jsx(K1e,{}),a.jsx(I1e,{}),WO(mI,r)&&a.jsx(VO,{isOver:t,label:e("toast.setCanvasInitialImage")})]})},X1e=l.memo(Q1e),Y1e=()=>a.jsx(X1e,{}),J1e=l.memo(Y1e),Z1e=[{id:"txt2img",translationKey:"common.txt2img",icon:a.jsx(Gr,{as:Nee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(v0e,{})},{id:"img2img",translationKey:"common.img2img",icon:a.jsx(Gr,{as:Xl,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(Ope,{})},{id:"unifiedCanvas",translationKey:"common.unifiedCanvas",icon:a.jsx(Gr,{as:fse,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(J1e,{})},{id:"nodes",translationKey:"common.nodes",icon:a.jsx(Gr,{as:T2,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(_ge,{})},{id:"modelManager",translationKey:"modelManager.modelManager",icon:a.jsx(Gr,{as:Iee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(Ehe,{})},{id:"queue",translationKey:"queue.queue",icon:a.jsx(Gr,{as:Yee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(m0e,{})}],ebe=me([we],({config:e})=>{const{disabledTabs:t}=e;return Z1e.filter(r=>!t.includes(r.id))},{memoizeOptions:{resultEqualityCheck:Nn}}),tbe=448,nbe=448,rbe=360,obe=["modelManager","queue"],sbe=["modelManager","queue"],abe=()=>{const e=H(u$),t=H(lo),n=H(ebe),{t:r}=Q(),o=le(),s=l.useCallback(O=>{O.target instanceof HTMLElement&&O.target.blur()},[]),i=l.useMemo(()=>n.map(O=>a.jsx(Wn,{hasArrow:!0,label:String(r(O.translationKey)),placement:"end",children:a.jsxs(wo,{onClick:s,children:[a.jsx(UP,{children:String(r(O.translationKey))}),O.icon]})},O.id)),[n,r,s]),c=l.useMemo(()=>n.map(O=>a.jsx(Go,{children:O.content},O.id)),[n]),d=l.useCallback(O=>{const T=n[O];T&&o(ni(T.id))},[o,n]),{minSize:p,isCollapsed:h,setIsCollapsed:m,ref:g,reset:b,expand:y,collapse:x,toggle:w}=I_(tbe,"pixels"),{ref:S,minSize:j,isCollapsed:I,setIsCollapsed:_,reset:M,expand:E,collapse:A,toggle:R}=I_(rbe,"pixels");_t("f",()=>{I||h?(E(),y()):(x(),A())},[o,I,h]),_t(["t","o"],()=>{w()},[o]),_t("g",()=>{R()},[o]);const D=G2();return a.jsxs(tc,{variant:"appTabs",defaultIndex:e,index:e,onChange:d,sx:{flexGrow:1,gap:4},isLazy:!0,children:[a.jsxs(nc,{sx:{pt:2,gap:4,flexDir:"column"},children:[i,a.jsx(Pi,{})]}),a.jsxs(E0,{id:"app",autoSaveId:"app",direction:"horizontal",style:{height:"100%",width:"100%"},storage:D,units:"pixels",children:[!sbe.includes(t)&&a.jsxs(a.Fragment,{children:[a.jsx(el,{order:0,id:"side",ref:g,defaultSize:p,minSize:p,onCollapse:m,collapsible:!0,children:t==="nodes"?a.jsx(wle,{}):a.jsx(epe,{})}),a.jsx(lg,{onDoubleClick:b,collapsedDirection:h?"left":void 0}),a.jsx(_le,{isSidePanelCollapsed:h,sidePanelRef:g})]}),a.jsx(el,{id:"main",order:1,minSize:nbe,children:a.jsx($u,{style:{height:"100%",width:"100%"},children:c})}),!obe.includes(t)&&a.jsxs(a.Fragment,{children:[a.jsx(lg,{onDoubleClick:M,collapsedDirection:I?"right":void 0}),a.jsx(el,{id:"gallery",ref:S,order:2,defaultSize:j,minSize:j,onCollapse:_,collapsible:!0,children:a.jsx(qse,{})}),a.jsx(kle,{isGalleryCollapsed:I,galleryPanelRef:S})]})]})]})},ibe=l.memo(abe),lbe=l.createContext(null),U1={didCatch:!1,error:null};class cbe extends l.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=U1}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,s=new Array(o),i=0;i0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function dbe(e={}){let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");const n=new URL(`${t}/issues/new`),r=["body","title","labels","template","milestone","assignee","projects"];for(const o of r){let s=e[o];if(s!==void 0){if(o==="labels"||o==="projects"){if(!Array.isArray(s))throw new TypeError(`The \`${o}\` option should be an array`);s=s.join(",")}n.searchParams.set(o,s)}}return n.toString()}const fbe=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(e=>[e.name,e]),pbe=new Map(fbe),hbe=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],_x=new WeakSet,mbe=e=>{_x.add(e);const t=e.toJSON();return _x.delete(e),t},gbe=e=>pbe.get(e)??Error,mR=({from:e,seen:t,to:n,forceEnumerable:r,maxDepth:o,depth:s,useToJSON:i,serialize:c})=>{if(!n)if(Array.isArray(e))n=[];else if(!c&&gI(e)){const p=gbe(e.name);n=new p}else n={};if(t.push(e),s>=o)return n;if(i&&typeof e.toJSON=="function"&&!_x.has(e))return mbe(e);const d=p=>mR({from:p,seen:[...t],forceEnumerable:r,maxDepth:o,depth:s,useToJSON:i,serialize:c});for(const[p,h]of Object.entries(e)){if(typeof Buffer=="function"&&Buffer.isBuffer(h)){n[p]="[object Buffer]";continue}if(h!==null&&typeof h=="object"&&typeof h.pipe=="function"){n[p]="[object Stream]";continue}if(typeof h!="function"){if(!h||typeof h!="object"){try{n[p]=h}catch{}continue}if(!t.includes(e[p])){s++,n[p]=d(e[p]);continue}n[p]="[Circular]"}}for(const{property:p,enumerable:h}of hbe)typeof e[p]<"u"&&e[p]!==null&&Object.defineProperty(n,p,{value:gI(e[p])?d(e[p]):e[p],enumerable:r?!0:h,configurable:!0,writable:!0});return n};function vbe(e,t={}){const{maxDepth:n=Number.POSITIVE_INFINITY,useToJSON:r=!0}=t;return typeof e=="object"&&e!==null?mR({from:e,seen:[],forceEnumerable:!0,maxDepth:n,depth:0,useToJSON:r,serialize:!0}):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:e}function gI(e){return!!e&&typeof e=="object"&&"name"in e&&"message"in e&&"stack"in e}const bbe=({error:e,resetErrorBoundary:t})=>{const n=d$(),r=l.useCallback(()=>{const s=JSON.stringify(vbe(e),null,2);navigator.clipboard.writeText(`\`\`\` -${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}; diff --git a/invokeai/frontend/web/dist/assets/MantineProvider-a6a1d85c.js b/invokeai/frontend/web/dist/assets/MantineProvider-a6a1d85c.js deleted file mode 100644 index 82e3e2ecc2..0000000000 --- a/invokeai/frontend/web/dist/assets/MantineProvider-a6a1d85c.js +++ /dev/null @@ -1 +0,0 @@ -import{R as d,ie as _,v as h,ir as X}from"./index-f820e2e3.js";const Y={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function q(r){return()=>({fontFamily:r.fontFamily||"sans-serif"})}var J=Object.defineProperty,x=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,z=(r,e,o)=>e in r?J(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,j=(r,e)=>{for(var o in e||(e={}))K.call(e,o)&&z(r,o,e[o]);if(x)for(var o of x(e))Q.call(e,o)&&z(r,o,e[o]);return r};function Z(r){return e=>({WebkitTapHighlightColor:"transparent",[e||"&:focus"]:j({},r.focusRing==="always"||r.focusRing==="auto"?r.focusRingStyles.styles(r):r.focusRingStyles.resetStyles(r)),[e?e.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:j({},r.focusRing==="auto"||r.focusRing==="never"?r.focusRingStyles.resetStyles(r):null)})}function y(r){return e=>typeof r.primaryShade=="number"?r.primaryShade:r.primaryShade[e||r.colorScheme]}function w(r){const e=y(r);return(o,n,a=!0,t=!0)=>{if(typeof o=="string"&&o.includes(".")){const[s,l]=o.split("."),g=parseInt(l,10);if(s in r.colors&&g>=0&&g<10)return r.colors[s][typeof n=="number"&&!t?n:g]}const i=typeof n=="number"?n:e();return o in r.colors?r.colors[o][i]:a?r.colors[r.primaryColor][i]:o}}function T(r){let e="";for(let o=1;o{const a={from:(n==null?void 0:n.from)||r.defaultGradient.from,to:(n==null?void 0:n.to)||r.defaultGradient.to,deg:(n==null?void 0:n.deg)||r.defaultGradient.deg};return`linear-gradient(${a.deg}deg, ${e(a.from,o(),!1)} 0%, ${e(a.to,o(),!1)} 100%)`}}function D(r){return e=>{if(typeof e=="number")return`${e/16}${r}`;if(typeof e=="string"){const o=e.replace("px","");if(!Number.isNaN(Number(o)))return`${Number(o)/16}${r}`}return e}}const u=D("rem"),k=D("em");function V({size:r,sizes:e,units:o}){return r in e?e[r]:typeof r=="number"?o==="em"?k(r):u(r):r||e.md}function S(r){return typeof r=="number"?r:typeof r=="string"&&r.includes("rem")?Number(r.replace("rem",""))*16:typeof r=="string"&&r.includes("em")?Number(r.replace("em",""))*16:Number(r)}function er(r){return e=>`@media (min-width: ${k(S(V({size:e,sizes:r.breakpoints})))})`}function or(r){return e=>`@media (max-width: ${k(S(V({size:e,sizes:r.breakpoints}))-1)})`}function nr(r){return/^#?([0-9A-F]{3}){1,2}$/i.test(r)}function tr(r){let e=r.replace("#","");if(e.length===3){const i=e.split("");e=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}const o=parseInt(e,16),n=o>>16&255,a=o>>8&255,t=o&255;return{r:n,g:a,b:t,a:1}}function ar(r){const[e,o,n,a]=r.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:o,b:n,a:a||1}}function C(r){return nr(r)?tr(r):r.startsWith("rgb")?ar(r):{r:0,g:0,b:0,a:1}}function p(r,e){if(typeof r!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(r.startsWith("var(--"))return r;const{r:o,g:n,b:a}=C(r);return`rgba(${o}, ${n}, ${a}, ${e})`}function ir(r=0){return{position:"absolute",top:u(r),right:u(r),left:u(r),bottom:u(r)}}function sr(r,e){if(typeof r=="string"&&r.startsWith("var(--"))return r;const{r:o,g:n,b:a,a:t}=C(r),i=1-e,s=l=>Math.round(l*i);return`rgba(${s(o)}, ${s(n)}, ${s(a)}, ${t})`}function lr(r,e){if(typeof r=="string"&&r.startsWith("var(--"))return r;const{r:o,g:n,b:a,a:t}=C(r),i=s=>Math.round(s+(255-s)*e);return`rgba(${i(o)}, ${i(n)}, ${i(a)}, ${t})`}function fr(r){return e=>{if(typeof e=="number")return u(e);const o=typeof r.defaultRadius=="number"?r.defaultRadius:r.radius[r.defaultRadius]||r.defaultRadius;return r.radius[e]||e||o}}function cr(r,e){if(typeof r=="string"&&r.includes(".")){const[o,n]=r.split("."),a=parseInt(n,10);if(o in e.colors&&a>=0&&a<10)return{isSplittedColor:!0,key:o,shade:a}}return{isSplittedColor:!1}}function dr(r){const e=w(r),o=y(r),n=G(r);return({variant:a,color:t,gradient:i,primaryFallback:s})=>{const l=cr(t,r);switch(a){case"light":return{border:"transparent",background:p(e(t,r.colorScheme==="dark"?8:0,s,!1),r.colorScheme==="dark"?.2:1),color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),hover:p(e(t,r.colorScheme==="dark"?7:1,s,!1),r.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),hover:p(e(t,r.colorScheme==="dark"?8:0,s,!1),r.colorScheme==="dark"?.2:1)};case"outline":return{border:e(t,r.colorScheme==="dark"?5:o("light")),background:"transparent",color:e(t,r.colorScheme==="dark"?5:o("light")),hover:r.colorScheme==="dark"?p(e(t,5,s,!1),.05):p(e(t,0,s,!1),.35)};case"default":return{border:r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[4],background:r.colorScheme==="dark"?r.colors.dark[6]:r.white,color:r.colorScheme==="dark"?r.white:r.black,hover:r.colorScheme==="dark"?r.colors.dark[5]:r.colors.gray[0]};case"white":return{border:"transparent",background:r.white,color:e(t,o()),hover:null};case"transparent":return{border:"transparent",color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),background:"transparent",hover:null};case"gradient":return{background:n(i),color:r.white,border:"transparent",hover:null};default:{const g=o(),$=l.isSplittedColor?l.shade:g,O=l.isSplittedColor?l.key:t;return{border:"transparent",background:e(O,$,s),color:r.white,hover:e(O,$===9?8:$+1)}}}}}function ur(r){return e=>{const o=y(r)(e);return r.colors[r.primaryColor][o]}}function pr(r){return{"@media (hover: hover)":{"&:hover":r},"@media (hover: none)":{"&:active":r}}}function gr(r){return()=>({userSelect:"none",color:r.colorScheme==="dark"?r.colors.dark[3]:r.colors.gray[5]})}function br(r){return()=>r.colorScheme==="dark"?r.colors.dark[2]:r.colors.gray[6]}const f={fontStyles:q,themeColor:w,focusStyles:Z,linearGradient:B,radialGradient:rr,smallerThan:or,largerThan:er,rgba:p,cover:ir,darken:sr,lighten:lr,radius:fr,variant:dr,primaryShade:y,hover:pr,gradient:G,primaryColor:ur,placeholderStyles:gr,dimmed:br};var mr=Object.defineProperty,yr=Object.defineProperties,Sr=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,vr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,F=(r,e,o)=>e in r?mr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,hr=(r,e)=>{for(var o in e||(e={}))vr.call(e,o)&&F(r,o,e[o]);if(R)for(var o of R(e))_r.call(e,o)&&F(r,o,e[o]);return r},kr=(r,e)=>yr(r,Sr(e));function U(r){return kr(hr({},r),{fn:{fontStyles:f.fontStyles(r),themeColor:f.themeColor(r),focusStyles:f.focusStyles(r),largerThan:f.largerThan(r),smallerThan:f.smallerThan(r),radialGradient:f.radialGradient,linearGradient:f.linearGradient,gradient:f.gradient(r),rgba:f.rgba,cover:f.cover,lighten:f.lighten,darken:f.darken,primaryShade:f.primaryShade(r),radius:f.radius(r),variant:f.variant(r),hover:f.hover,primaryColor:f.primaryColor(r),placeholderStyles:f.placeholderStyles(r),dimmed:f.dimmed(r)}})}const $r={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:Y,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:r=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${r.colors[r.primaryColor][r.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:r=>({outline:"none",borderColor:r.colors[r.primaryColor][typeof r.primaryShade=="object"?r.primaryShade[r.colorScheme]:r.primaryShade]})}},E=U($r);var Pr=Object.defineProperty,wr=Object.defineProperties,Cr=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,M=(r,e,o)=>e in r?Pr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,xr=(r,e)=>{for(var o in e||(e={}))Er.call(e,o)&&M(r,o,e[o]);if(H)for(var o of H(e))Or.call(e,o)&&M(r,o,e[o]);return r},zr=(r,e)=>wr(r,Cr(e));function jr({theme:r}){return d.createElement(_,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:r.colorScheme==="dark"?"dark":"light"},body:zr(xr({},r.fn.fontStyles()),{backgroundColor:r.colorScheme==="dark"?r.colors.dark[7]:r.white,color:r.colorScheme==="dark"?r.colors.dark[0]:r.black,lineHeight:r.lineHeight,fontSize:r.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function b(r,e,o,n=u){Object.keys(e).forEach(a=>{r[`--mantine-${o}-${a}`]=n(e[a])})}function Rr({theme:r}){const e={"--mantine-color-white":r.white,"--mantine-color-black":r.black,"--mantine-transition-timing-function":r.transitionTimingFunction,"--mantine-line-height":`${r.lineHeight}`,"--mantine-font-family":r.fontFamily,"--mantine-font-family-monospace":r.fontFamilyMonospace,"--mantine-font-family-headings":r.headings.fontFamily,"--mantine-heading-font-weight":`${r.headings.fontWeight}`};b(e,r.shadows,"shadow"),b(e,r.fontSizes,"font-size"),b(e,r.radius,"radius"),b(e,r.spacing,"spacing"),b(e,r.breakpoints,"breakpoints",k),Object.keys(r.colors).forEach(n=>{r.colors[n].forEach((a,t)=>{e[`--mantine-color-${n}-${t}`]=a})});const o=r.headings.sizes;return Object.keys(o).forEach(n=>{e[`--mantine-${n}-font-size`]=o[n].fontSize,e[`--mantine-${n}-line-height`]=`${o[n].lineHeight}`}),d.createElement(_,{styles:{":root":e}})}var Fr=Object.defineProperty,Hr=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,A=(r,e,o)=>e in r?Fr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,c=(r,e)=>{for(var o in e||(e={}))Ir.call(e,o)&&A(r,o,e[o]);if(I)for(var o of I(e))Ar.call(e,o)&&A(r,o,e[o]);return r},P=(r,e)=>Hr(r,Mr(e));function Nr(r,e){var o;if(!e)return r;const n=Object.keys(r).reduce((a,t)=>{if(t==="headings"&&e.headings){const i=e.headings.sizes?Object.keys(r.headings.sizes).reduce((s,l)=>(s[l]=c(c({},r.headings.sizes[l]),e.headings.sizes[l]),s),{}):r.headings.sizes;return P(c({},a),{headings:P(c(c({},r.headings),e.headings),{sizes:i})})}if(t==="breakpoints"&&e.breakpoints){const i=c(c({},r.breakpoints),e.breakpoints);return P(c({},a),{breakpoints:Object.fromEntries(Object.entries(i).sort((s,l)=>S(s[1])-S(l[1])))})}return a[t]=typeof e[t]=="object"?c(c({},r[t]),e[t]):typeof e[t]=="number"||typeof e[t]=="boolean"||typeof e[t]=="function"?e[t]:e[t]||r[t],a},{});if(e!=null&&e.fontFamily&&!((o=e==null?void 0:e.headings)!=null&&o.fontFamily)&&(n.headings.fontFamily=e.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function Wr(r,e){return U(Nr(r,e))}function Tr(r){return Object.keys(r).reduce((e,o)=>(r[o]!==void 0&&(e[o]=r[o]),e),{})}const Gr={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${u(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function Dr(){return d.createElement(_,{styles:Gr})}var Vr=Object.defineProperty,N=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,W=(r,e,o)=>e in r?Vr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,m=(r,e)=>{for(var o in e||(e={}))Ur.call(e,o)&&W(r,o,e[o]);if(N)for(var o of N(e))Lr.call(e,o)&&W(r,o,e[o]);return r};const v=h.createContext({theme:E});function L(){var r;return((r=h.useContext(v))==null?void 0:r.theme)||E}function qr(r){const e=L(),o=n=>{var a,t,i,s;return{styles:((a=e.components[n])==null?void 0:a.styles)||{},classNames:((t=e.components[n])==null?void 0:t.classNames)||{},variants:(i=e.components[n])==null?void 0:i.variants,sizes:(s=e.components[n])==null?void 0:s.sizes}};return Array.isArray(r)?r.map(o):[o(r)]}function Jr(){var r;return(r=h.useContext(v))==null?void 0:r.emotionCache}function Kr(r,e,o){var n;const a=L(),t=(n=a.components[r])==null?void 0:n.defaultProps,i=typeof t=="function"?t(a):t;return m(m(m({},e),i),Tr(o))}function Xr({theme:r,emotionCache:e,withNormalizeCSS:o=!1,withGlobalStyles:n=!1,withCSSVariables:a=!1,inherit:t=!1,children:i}){const s=h.useContext(v),l=Wr(E,t?m(m({},s.theme),r):r);return d.createElement(X,{theme:l},d.createElement(v.Provider,{value:{theme:l,emotionCache:e}},o&&d.createElement(Dr,null),n&&d.createElement(jr,{theme:l}),a&&d.createElement(Rr,{theme:l}),typeof l.globalStyles=="function"&&d.createElement(_,{styles:l.globalStyles(l)}),i))}Xr.displayName="@mantine/core/MantineProvider";export{Xr as M,L as a,qr as b,V as c,Kr as d,Tr as f,S as g,u as r,Jr as u}; diff --git a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-9d17ef9a.js b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-9d17ef9a.js deleted file mode 100644 index eaa62f15d4..0000000000 --- a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-9d17ef9a.js +++ /dev/null @@ -1,280 +0,0 @@ -import{I as s,ie as T,v as l,$ as A,ig as R,aa as V,ih as z,ii as j,ij as D,ik as F,il as G,im as W,io as K,az as H,ip as U,iq as Y}from"./index-f820e2e3.js";import{M as Z}from"./MantineProvider-a6a1d85c.js";var P=String.raw,E=P` - :root, - :host { - --chakra-vh: 100vh; - } - - @supports (height: -webkit-fill-available) { - :root, - :host { - --chakra-vh: -webkit-fill-available; - } - } - - @supports (height: -moz-fill-available) { - :root, - :host { - --chakra-vh: -moz-fill-available; - } - } - - @supports (height: 100dvh) { - :root, - :host { - --chakra-vh: 100dvh; - } - } -`,B=()=>s.jsx(T,{styles:E}),J=({scope:e=""})=>s.jsx(T,{styles:P` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - margin: 0; - font-feature-settings: "kern"; - } - - ${e} :where(*, *::before, *::after) { - border-width: 0; - border-style: solid; - box-sizing: border-box; - word-wrap: break-word; - } - - main { - display: block; - } - - ${e} hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - ${e} :where(pre, code, kbd,samp) { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - ${e} a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - ${e} abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - ${e} :where(b, strong) { - font-weight: bold; - } - - ${e} small { - font-size: 80%; - } - - ${e} :where(sub,sup) { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - ${e} sub { - bottom: -0.25em; - } - - ${e} sup { - top: -0.5em; - } - - ${e} img { - border-style: none; - } - - ${e} :where(button, input, optgroup, select, textarea) { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - ${e} :where(button, input) { - overflow: visible; - } - - ${e} :where(button, select) { - text-transform: none; - } - - ${e} :where( - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner - ) { - border-style: none; - padding: 0; - } - - ${e} fieldset { - padding: 0.35em 0.75em 0.625em; - } - - ${e} legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - ${e} progress { - vertical-align: baseline; - } - - ${e} textarea { - overflow: auto; - } - - ${e} :where([type="checkbox"], [type="radio"]) { - box-sizing: border-box; - padding: 0; - } - - ${e} input[type="number"]::-webkit-inner-spin-button, - ${e} input[type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - ${e} input[type="number"] { - -moz-appearance: textfield; - } - - ${e} input[type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - ${e} input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ${e} ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - ${e} details { - display: block; - } - - ${e} summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - ${e} :where( - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre - ) { - margin: 0; - } - - ${e} button { - background: transparent; - padding: 0; - } - - ${e} fieldset { - margin: 0; - padding: 0; - } - - ${e} :where(ol, ul) { - margin: 0; - padding: 0; - } - - ${e} textarea { - resize: vertical; - } - - ${e} :where(button, [role="button"]) { - cursor: pointer; - } - - ${e} button::-moz-focus-inner { - border: 0 !important; - } - - ${e} table { - border-collapse: collapse; - } - - ${e} :where(h1, h2, h3, h4, h5, h6) { - font-size: inherit; - font-weight: inherit; - } - - ${e} :where(button, input, optgroup, select, textarea) { - padding: 0; - line-height: inherit; - color: inherit; - } - - ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) { - display: block; - } - - ${e} :where(img, video) { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] - :focus:not([data-focus-visible-added]):not( - [data-focus-visible-disabled] - ) { - outline: none; - box-shadow: none; - } - - ${e} select::-ms-expand { - display: none; - } - - ${E} - `}),g={light:"chakra-ui-light",dark:"chakra-ui-dark"};function Q(e={}){const{preventTransition:o=!0}=e,n={setDataset:r=>{const t=o?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,t==null||t()},setClassName(r){document.body.classList.add(r?g.dark:g.light),document.body.classList.remove(r?g.light:g.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var t;return((t=n.query().matches)!=null?t:r==="dark")?"dark":"light"},addListener(r){const t=n.query(),i=a=>{r(a.matches?"dark":"light")};return typeof t.addListener=="function"?t.addListener(i):t.addEventListener("change",i),()=>{typeof t.removeListener=="function"?t.removeListener(i):t.removeEventListener("change",i)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var X="chakra-ui-color-mode";function L(e){return{ssr:!1,type:"localStorage",get(o){if(!(globalThis!=null&&globalThis.document))return o;let n;try{n=localStorage.getItem(e)||o}catch{}return n||o},set(o){try{localStorage.setItem(e,o)}catch{}}}}var ee=L(X),M=()=>{};function S(e,o){return e.type==="cookie"&&e.ssr?e.get(o):o}function O(e){const{value:o,children:n,options:{useSystemColorMode:r,initialColorMode:t,disableTransitionOnChange:i}={},colorModeManager:a=ee}=e,d=t==="dark"?"dark":"light",[u,p]=l.useState(()=>S(a,d)),[y,b]=l.useState(()=>S(a)),{getSystemTheme:w,setClassName:k,setDataset:x,addListener:$}=l.useMemo(()=>Q({preventTransition:i}),[i]),v=t==="system"&&!u?y:u,c=l.useCallback(m=>{const f=m==="system"?w():m;p(f),k(f==="dark"),x(f),a.set(f)},[a,w,k,x]);A(()=>{t==="system"&&b(w())},[]),l.useEffect(()=>{const m=a.get();if(m){c(m);return}if(t==="system"){c("system");return}c(d)},[a,d,t,c]);const C=l.useCallback(()=>{c(v==="dark"?"light":"dark")},[v,c]);l.useEffect(()=>{if(r)return $(c)},[r,$,c]);const N=l.useMemo(()=>({colorMode:o??v,toggleColorMode:o?M:C,setColorMode:o?M:c,forced:o!==void 0}),[v,C,c,o]);return s.jsx(R.Provider,{value:N,children:n})}O.displayName="ColorModeProvider";var te=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function re(e){return V(e)?te.every(o=>Object.prototype.hasOwnProperty.call(e,o)):!1}function h(e){return typeof e=="function"}function oe(...e){return o=>e.reduce((n,r)=>r(n),o)}var ne=e=>function(...n){let r=[...n],t=n[n.length-1];return re(t)&&r.length>1?r=r.slice(0,r.length-1):t=e,oe(...r.map(i=>a=>h(i)?i(a):ae(a,i)))(t)},ie=ne(j);function ae(...e){return z({},...e,_)}function _(e,o,n,r){if((h(e)||h(o))&&Object.prototype.hasOwnProperty.call(r,n))return(...t)=>{const i=h(e)?e(...t):e,a=h(o)?o(...t):o;return z({},i,a,_)}}var q=l.createContext({getDocument(){return document},getWindow(){return window}});q.displayName="EnvironmentContext";function I(e){const{children:o,environment:n,disabled:r}=e,t=l.useRef(null),i=l.useMemo(()=>n||{getDocument:()=>{var d,u;return(u=(d=t.current)==null?void 0:d.ownerDocument)!=null?u:document},getWindow:()=>{var d,u;return(u=(d=t.current)==null?void 0:d.ownerDocument.defaultView)!=null?u:window}},[n]),a=!r||!n;return s.jsxs(q.Provider,{value:i,children:[o,a&&s.jsx("span",{id:"__chakra_env",hidden:!0,ref:t})]})}I.displayName="EnvironmentProvider";var se=e=>{const{children:o,colorModeManager:n,portalZIndex:r,resetScope:t,resetCSS:i=!0,theme:a={},environment:d,cssVarsRoot:u,disableEnvironment:p,disableGlobalStyle:y}=e,b=s.jsx(I,{environment:d,disabled:p,children:o});return s.jsx(D,{theme:a,cssVarsRoot:u,children:s.jsxs(O,{colorModeManager:n,options:a.config,children:[i?s.jsx(J,{scope:t}):s.jsx(B,{}),!y&&s.jsx(F,{}),r?s.jsx(G,{zIndex:r,children:b}):b]})})},le=e=>function({children:n,theme:r=e,toastOptions:t,...i}){return s.jsxs(se,{theme:r,...i,children:[s.jsx(W,{value:t==null?void 0:t.defaultOptions,children:n}),s.jsx(K,{...t})]})},de=le(j);const ue=()=>l.useMemo(()=>({colorScheme:"dark",fontFamily:"'Inter Variable', sans-serif",components:{ScrollArea:{defaultProps:{scrollbarSize:10},styles:{scrollbar:{"&:hover":{backgroundColor:"var(--invokeai-colors-baseAlpha-300)"}},thumb:{backgroundColor:"var(--invokeai-colors-baseAlpha-300)"}}}}}),[]),ce=L("@@invokeai-color-mode");function me({children:e}){const{i18n:o}=H(),n=o.dir(),r=l.useMemo(()=>ie({...U,direction:n}),[n]);l.useEffect(()=>{document.body.dir=n},[n]);const t=ue();return s.jsx(Z,{theme:t,children:s.jsx(de,{theme:r,colorModeManager:ce,toastOptions:Y,children:e})})}const ve=l.memo(me);export{ve as default}; diff --git a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-f5f9aabf.css b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-f5f9aabf.css deleted file mode 100644 index 2d9bf55425..0000000000 --- a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-f5f9aabf.css +++ /dev/null @@ -1,9 +0,0 @@ -@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-cyrillic-ext-wght-normal-1c3007b8.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-cyrillic-wght-normal-eba94878.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-greek-ext-wght-normal-81f77e51.woff2) format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-greek-wght-normal-d92c6cbc.woff2) format("woff2-variations");unicode-range:U+0370-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-vietnamese-wght-normal-15df7612.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-latin-ext-wght-normal-a2bfd9fe.woff2) format("woff2-variations");unicode-range:U+0100-02AF,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-latin-wght-normal-88df0b5a.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}/*! -* OverlayScrollbars -* Version: 2.4.4 -* -* Copyright (c) Rene Haas | KingSora. -* https://github.com/KingSora -* -* Released under the MIT license. -*/.os-size-observer,.os-size-observer-listener{scroll-behavior:auto!important;direction:inherit;pointer-events:none;overflow:hidden;visibility:hidden;box-sizing:border-box}.os-size-observer,.os-size-observer-listener,.os-size-observer-listener-item,.os-size-observer-listener-item-final{writing-mode:horizontal-tb;position:absolute;left:0;top:0}.os-size-observer{z-index:-1;contain:strict;display:flex;flex-direction:row;flex-wrap:nowrap;padding:inherit;border:inherit;box-sizing:inherit;margin:-133px;top:0;right:0;bottom:0;left:0;transform:scale(.1)}.os-size-observer:before{content:"";flex:none;box-sizing:inherit;padding:10px;width:10px;height:10px}.os-size-observer-appear{animation:os-size-observer-appear-animation 1ms forwards}.os-size-observer-listener{box-sizing:border-box;position:relative;flex:auto;padding:inherit;border:inherit;margin:-133px;transform:scale(10)}.os-size-observer-listener.ltr{margin-right:-266px;margin-left:0}.os-size-observer-listener.rtl{margin-left:-266px;margin-right:0}.os-size-observer-listener:empty:before{content:"";width:100%;height:100%}.os-size-observer-listener:empty:before,.os-size-observer-listener>.os-size-observer-listener-item{display:block;position:relative;padding:inherit;border:inherit;box-sizing:content-box;flex:auto}.os-size-observer-listener-scroll{box-sizing:border-box;display:flex}.os-size-observer-listener-item{right:0;bottom:0;overflow:hidden;direction:ltr;flex:none}.os-size-observer-listener-item-final{transition:none}@keyframes os-size-observer-appear-animation{0%{cursor:auto}to{cursor:none}}.os-trinsic-observer{flex:none;box-sizing:border-box;position:relative;max-width:0px;max-height:1px;padding:0;margin:0;border:none;overflow:hidden;z-index:-1;height:0;top:calc(100% + 1px);contain:strict}.os-trinsic-observer:not(:empty){height:calc(100% + 1px);top:-1px}.os-trinsic-observer:not(:empty)>.os-size-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-environment{scroll-behavior:auto!important;--os-custom-prop: -1;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:var(--os-custom-prop)}.os-environment div{width:200%;height:200%;margin:10px 0}.os-environment.os-environment-flexbox-glue{display:flex;flex-direction:row;flex-wrap:nowrap;height:auto;width:auto;min-height:200px;min-width:200px}.os-environment.os-environment-flexbox-glue div{flex:auto;width:auto;height:auto;max-height:100%;max-width:100%;margin:0}.os-environment.os-environment-flexbox-glue-max{max-height:200px}.os-environment.os-environment-flexbox-glue-max div{overflow:visible}.os-environment.os-environment-flexbox-glue-max div:before{content:"";display:block;height:999px;width:999px}.os-environment,[data-overlayscrollbars-viewport]{-ms-overflow-style:scrollbar!important}[data-overlayscrollbars-initialize],[data-overlayscrollbars~=scrollbarHidden],[data-overlayscrollbars-viewport~=scrollbarHidden],.os-scrollbar-hidden.os-environment{scrollbar-width:none!important}[data-overlayscrollbars-initialize]::-webkit-scrollbar,[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar-corner,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner,.os-scrollbar-hidden.os-environment::-webkit-scrollbar,.os-scrollbar-hidden.os-environment::-webkit-scrollbar-corner{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;display:none!important;width:0!important;height:0!important}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars]):not(html):not(body){overflow:auto}html[data-overlayscrollbars],html.os-scrollbar-hidden,html.os-scrollbar-hidden>body{box-sizing:border-box;margin:0;width:100%;height:100%}html[data-overlayscrollbars]>body{overflow:visible}[data-overlayscrollbars~=host],[data-overlayscrollbars-padding]{display:flex;align-items:stretch!important;flex-direction:row!important;flex-wrap:nowrap!important}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{box-sizing:inherit;position:relative;flex:auto!important;height:auto;width:100%;min-width:0;padding:0;margin:0;border:none;z-index:0}[data-overlayscrollbars-viewport]{--os-vaw: 0;--os-vah: 0}[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]:before{content:"";position:absolute;pointer-events:none;z-index:-1;min-width:1px;min-height:1px;width:var(--os-vaw);height:var(--os-vah)}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{overflow:hidden}[data-overlayscrollbars~=host],[data-overlayscrollbars~=viewport]{position:relative;overflow:hidden}[data-overlayscrollbars~=overflowVisible],[data-overlayscrollbars-padding~=overflowVisible],[data-overlayscrollbars-viewport~=overflowVisible]{overflow:visible}[data-overlayscrollbars-overflow-x=hidden]{overflow-x:hidden}[data-overlayscrollbars-overflow-x=scroll]{overflow-x:scroll}[data-overlayscrollbars-overflow-x=hidden]{overflow-y:hidden}[data-overlayscrollbars-overflow-y=scroll]{overflow-y:scroll}[data-overlayscrollbars~=scrollbarPressed],[data-overlayscrollbars~=scrollbarPressed] [data-overlayscrollbars-viewport]{scroll-behavior:auto!important}[data-overlayscrollbars-content]{box-sizing:inherit}[data-overlayscrollbars-contents]:not([data-overlayscrollbars-padding]):not([data-overlayscrollbars-viewport]):not([data-overlayscrollbars-content]){display:contents}[data-overlayscrollbars-grid],[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]{display:grid;grid-template:1fr/1fr}[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding],[data-overlayscrollbars-grid]>[data-overlayscrollbars-viewport],[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding]>[data-overlayscrollbars-viewport]{height:auto!important;width:auto!important}.os-scrollbar{contain:size layout;contain:size layout style;transition:opacity .15s,visibility .15s,top .15s,right .15s,bottom .15s,left .15s;pointer-events:none;position:absolute;opacity:0;visibility:hidden}body>.os-scrollbar{position:fixed;z-index:99999}.os-scrollbar-transitionless{transition:none}.os-scrollbar-track{position:relative;direction:ltr!important;padding:0!important;border:none!important}.os-scrollbar-handle{position:absolute}.os-scrollbar-track,.os-scrollbar-handle{pointer-events:none;width:100%;height:100%}.os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle{pointer-events:auto;touch-action:none}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-scrollbar-rtl.os-scrollbar-horizontal{right:0}.os-scrollbar-rtl.os-scrollbar-vertical{right:auto;left:0}.os-scrollbar-visible,.os-scrollbar-interaction.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-auto-hide.os-scrollbar-auto-hide-hidden{opacity:0;visibility:hidden}.os-scrollbar-unusable,.os-scrollbar-unusable *,.os-scrollbar-wheel,.os-scrollbar-wheel *{pointer-events:none!important}.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important}.os-scrollbar-horizontal .os-scrollbar-handle{bottom:0}.os-scrollbar-vertical .os-scrollbar-handle{right:0}.os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle{right:auto;left:0}.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl{left:0;right:0}.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl{top:0;bottom:0}.os-scrollbar{--os-size: 0;--os-padding-perpendicular: 0;--os-padding-axis: 0;--os-track-border-radius: 0;--os-track-bg: none;--os-track-bg-hover: none;--os-track-bg-active: none;--os-track-border: none;--os-track-border-hover: none;--os-track-border-active: none;--os-handle-border-radius: 0;--os-handle-bg: none;--os-handle-bg-hover: none;--os-handle-bg-active: none;--os-handle-border: none;--os-handle-border-hover: none;--os-handle-border-active: none;--os-handle-min-size: 33px;--os-handle-max-size: none;--os-handle-perpendicular-size: 100%;--os-handle-perpendicular-size-hover: 100%;--os-handle-perpendicular-size-active: 100%;--os-handle-interactive-area-offset: 0}.os-scrollbar .os-scrollbar-track{border:var(--os-track-border);border-radius:var(--os-track-border-radius);background:var(--os-track-bg);transition:opacity .15s,background-color .15s,border-color .15s}.os-scrollbar .os-scrollbar-track:hover{border:var(--os-track-border-hover);background:var(--os-track-bg-hover)}.os-scrollbar .os-scrollbar-track:active{border:var(--os-track-border-active);background:var(--os-track-bg-active)}.os-scrollbar .os-scrollbar-handle{border:var(--os-handle-border);border-radius:var(--os-handle-border-radius);background:var(--os-handle-bg)}.os-scrollbar .os-scrollbar-handle:before{content:"";position:absolute;left:0;right:0;top:0;bottom:0;display:block}.os-scrollbar .os-scrollbar-handle:hover{border:var(--os-handle-border-hover);background:var(--os-handle-bg-hover)}.os-scrollbar .os-scrollbar-handle:active{border:var(--os-handle-border-active);background:var(--os-handle-bg-active)}.os-scrollbar-horizontal{padding:var(--os-padding-perpendicular) var(--os-padding-axis);right:var(--os-size);height:var(--os-size)}.os-scrollbar-horizontal.os-scrollbar-rtl{left:var(--os-size);right:0}.os-scrollbar-horizontal .os-scrollbar-handle{min-width:var(--os-handle-min-size);max-width:var(--os-handle-max-size);height:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,height .15s}.os-scrollbar-horizontal .os-scrollbar-handle:before{top:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);bottom:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-horizontal:hover .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-horizontal:active .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-active)}.os-scrollbar-vertical{padding:var(--os-padding-axis) var(--os-padding-perpendicular);bottom:var(--os-size);width:var(--os-size)}.os-scrollbar-vertical .os-scrollbar-handle{min-height:var(--os-handle-min-size);max-height:var(--os-handle-max-size);width:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,width .15s}.os-scrollbar-vertical .os-scrollbar-handle:before{left:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);right:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);left:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-vertical:hover .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-vertical:active .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-active)}[data-overlayscrollbars~=updating]>.os-scrollbar,.os-theme-none.os-scrollbar{display:none!important}.os-theme-dark,.os-theme-light{box-sizing:border-box;--os-size: 10px;--os-padding-perpendicular: 2px;--os-padding-axis: 2px;--os-track-border-radius: 10px;--os-handle-interactive-area-offset: 4px;--os-handle-border-radius: 10px}.os-theme-dark{--os-handle-bg: rgba(0, 0, 0, .44);--os-handle-bg-hover: rgba(0, 0, 0, .55);--os-handle-bg-active: rgba(0, 0, 0, .66)}.os-theme-light{--os-handle-bg: rgba(255, 255, 255, .44);--os-handle-bg-hover: rgba(255, 255, 255, .55);--os-handle-bg-active: rgba(255, 255, 255, .66)}.os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-handle,.os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-track,.os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-track{border-radius:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal{padding:2px;right:10px;height:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-cornerless{right:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl{left:10px;right:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl.os-scrollbar-cornerless{left:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle{min-width:33px;max-width:none}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle:before{top:-6px;bottom:-2px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical,.os-no-css-vars.os-theme-light.os-scrollbar-vertical{padding:2px;bottom:10px;width:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-cornerless{bottom:0}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle{min-height:33px;max-height:none}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle:before{left:-6px;right:-2px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:-6px;left:-2px}.os-no-css-vars.os-theme-dark .os-scrollbar-handle{background:rgba(0,0,0,.44)}.os-no-css-vars.os-theme-dark:hover .os-scrollbar-handle{background:rgba(0,0,0,.55)}.os-no-css-vars.os-theme-dark:active .os-scrollbar-handle{background:rgba(0,0,0,.66)}.os-no-css-vars.os-theme-light .os-scrollbar-handle{background:rgba(255,255,255,.44)}.os-no-css-vars.os-theme-light:hover .os-scrollbar-handle{background:rgba(255,255,255,.55)}.os-no-css-vars.os-theme-light:active .os-scrollbar-handle{background:rgba(255,255,255,.66)}.os-scrollbar{--os-handle-bg: var(--invokeai-colors-accentAlpha-500);--os-handle-bg-hover: var(--invokeai-colors-accentAlpha-700);--os-handle-bg-active: var(--invokeai-colors-accentAlpha-800);--os-handle-min-size: 50px} diff --git a/invokeai/frontend/web/dist/assets/favicon-0d253ced.ico b/invokeai/frontend/web/dist/assets/favicon-0d253ced.ico deleted file mode 100644 index 413340efb2..0000000000 Binary files a/invokeai/frontend/web/dist/assets/favicon-0d253ced.ico and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/index-f820e2e3.js b/invokeai/frontend/web/dist/assets/index-f820e2e3.js deleted file mode 100644 index 2276172ddf..0000000000 --- a/invokeai/frontend/web/dist/assets/index-f820e2e3.js +++ /dev/null @@ -1,157 +0,0 @@ -var fq=Object.defineProperty;var hq=(e,t,n)=>t in e?fq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q2=(e,t,n)=>(hq(e,typeof t!="symbol"?t+"":t,n),n),Y2=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var te=(e,t,n)=>(Y2(e,t,"read from private field"),n?n.call(e):t.get(e)),Gt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},$i=(e,t,n,r)=>(Y2(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var eh=(e,t,n,r)=>({set _(i){$i(e,t,i,n)},get _(){return te(e,t,r)}}),Go=(e,t,n)=>(Y2(e,t,"access private method"),n);function gO(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pq(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var mO={exports:{}},Sb={},yO={exports:{}},Ke={};/** - * @license React - * react.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 rm=Symbol.for("react.element"),gq=Symbol.for("react.portal"),mq=Symbol.for("react.fragment"),yq=Symbol.for("react.strict_mode"),vq=Symbol.for("react.profiler"),bq=Symbol.for("react.provider"),_q=Symbol.for("react.context"),Sq=Symbol.for("react.forward_ref"),xq=Symbol.for("react.suspense"),wq=Symbol.for("react.memo"),Cq=Symbol.for("react.lazy"),JA=Symbol.iterator;function Eq(e){return e===null||typeof e!="object"?null:(e=JA&&e[JA]||e["@@iterator"],typeof e=="function"?e:null)}var vO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bO=Object.assign,_O={};function Pf(e,t,n){this.props=e,this.context=t,this.refs=_O,this.updater=n||vO}Pf.prototype.isReactComponent={};Pf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Pf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function SO(){}SO.prototype=Pf.prototype;function t4(e,t,n){this.props=e,this.context=t,this.refs=_O,this.updater=n||vO}var n4=t4.prototype=new SO;n4.constructor=t4;bO(n4,Pf.prototype);n4.isPureReactComponent=!0;var eP=Array.isArray,xO=Object.prototype.hasOwnProperty,r4={current:null},wO={key:!0,ref:!0,__self:!0,__source:!0};function CO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)xO.call(t,r)&&!wO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,U=$[B];if(0>>1;Bi(Y,O))Zi(V,Y)?($[B]=V,$[Z]=O,B=Z):($[B]=Y,$[q]=O,B=q);else if(Zi(V,O))$[B]=V,$[Z]=O,B=Z;else break e}}return L}function i($,L){var O=$.sortIndex-L.sortIndex;return O!==0?O:$.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,g=!1,_=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m($){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=$)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function v($){if(g=!1,m($),!p)if(n(l)!==null)p=!0,R(S);else{var L=n(u);L!==null&&D(v,L.startTime-$)}}function S($,L){p=!1,g&&(g=!1,b(x),x=-1),h=!0;var O=f;try{for(m(L),d=n(l);d!==null&&(!(d.expirationTime>L)||$&&!I());){var B=d.callback;if(typeof B=="function"){d.callback=null,f=d.priorityLevel;var U=B(d.expirationTime<=L);L=e.unstable_now(),typeof U=="function"?d.callback=U:d===n(l)&&r(l),m(L)}else r(l);d=n(l)}if(d!==null)var j=!0;else{var q=n(u);q!==null&&D(v,q.startTime-L),j=!1}return j}finally{d=null,f=O,h=!1}}var w=!1,C=null,x=-1,P=5,E=-1;function I(){return!(e.unstable_now()-E$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function($){switch(f){case 1:case 2:case 3:var L=3;break;default:L=f}var O=f;f=L;try{return $()}finally{f=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,L){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var O=f;f=$;try{return L()}finally{f=O}},e.unstable_scheduleCallback=function($,L,O){var B=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0B?($.sortIndex=O,t(u,$),n(l)===null&&$===n(u)&&(g?(b(x),x=-1):g=!0,D(v,O-B))):($.sortIndex=U,t(l,$),p||h||(p=!0,R(S))),$},e.unstable_shouldYield=I,e.unstable_wrapCallback=function($){var L=f;return function(){var O=f;f=L;try{return $.apply(this,arguments)}finally{f=O}}}})(PO);AO.exports=PO;var Dq=AO.exports;/** - * @license React - * react-dom.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 kO=k,wi=Dq;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sC=Object.prototype.hasOwnProperty,Lq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rP={},iP={};function Fq(e){return sC.call(iP,e)?!0:sC.call(rP,e)?!1:Lq.test(e)?iP[e]=!0:(rP[e]=!0,!1)}function Bq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zq(e,t,n,r){if(t===null||typeof t>"u"||Bq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Br(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var sr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){sr[e]=new Br(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];sr[t]=new Br(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){sr[e]=new Br(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){sr[e]=new Br(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){sr[e]=new Br(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){sr[e]=new Br(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){sr[e]=new Br(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){sr[e]=new Br(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){sr[e]=new Br(e,5,!1,e.toLowerCase(),null,!1,!1)});var o4=/[\-:]([a-z])/g;function a4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(o4,a4);sr[t]=new Br(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(o4,a4);sr[t]=new Br(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(o4,a4);sr[t]=new Br(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){sr[e]=new Br(e,1,!1,e.toLowerCase(),null,!1,!1)});sr.xlinkHref=new Br("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){sr[e]=new Br(e,1,!1,e.toLowerCase(),null,!0,!0)});function s4(e,t,n,r){var i=sr.hasOwnProperty(t)?sr[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{ex=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nh(e):""}function Vq(e){switch(e.tag){case 5:return Nh(e.type);case 16:return Nh("Lazy");case 13:return Nh("Suspense");case 19:return Nh("SuspenseList");case 0:case 2:case 15:return e=tx(e.type,!1),e;case 11:return e=tx(e.type.render,!1),e;case 1:return e=tx(e.type,!0),e;default:return""}}function dC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yc:return"Fragment";case Qc:return"Portal";case lC:return"Profiler";case l4:return"StrictMode";case uC:return"Suspense";case cC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case RO:return(e.displayName||"Context")+".Consumer";case MO:return(e._context.displayName||"Context")+".Provider";case u4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c4:return t=e.displayName||null,t!==null?t:dC(e.type)||"Memo";case Gs:t=e._payload,e=e._init;try{return dC(e(t))}catch{}}return null}function jq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return dC(t);case 8:return t===l4?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $O(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Uq(e){var t=$O(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function r0(e){e._valueTracker||(e._valueTracker=Uq(e))}function NO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$O(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _v(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function fC(e,t){var n=t.checked;return en({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function DO(e,t){t=t.checked,t!=null&&s4(e,"checked",t,!1)}function hC(e,t){DO(e,t);var n=wl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pC(e,t.type,n):t.hasOwnProperty("defaultValue")&&pC(e,t.type,wl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sP(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pC(e,t,n){(t!=="number"||_v(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dh=Array.isArray;function _d(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=i0.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function kp(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gq=["Webkit","ms","Moz","O"];Object.keys(tp).forEach(function(e){Gq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tp[t]=tp[e]})});function zO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tp.hasOwnProperty(e)&&tp[e]?(""+t).trim():t+"px"}function VO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=zO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Hq=en({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yC(e,t){if(t){if(Hq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function vC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bC=null;function d4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _C=null,Sd=null,xd=null;function cP(e){if(e=am(e)){if(typeof _C!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=Tb(t),_C(e.stateNode,e.type,t))}}function jO(e){Sd?xd?xd.push(e):xd=[e]:Sd=e}function UO(){if(Sd){var e=Sd,t=xd;if(xd=Sd=null,cP(e),t)for(e=0;e>>=0,e===0?32:31-(nW(e)/rW|0)|0}var o0=64,a0=4194304;function Lh(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Cv(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Lh(s):(o&=a,o!==0&&(r=Lh(o)))}else a=n&~i,a!==0?r=Lh(a):o!==0&&(r=Lh(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function im(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-To(t),e[t]=n}function sW(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=rp),bP=String.fromCharCode(32),_P=!1;function u7(e,t){switch(e){case"keyup":return NW.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zc=!1;function LW(e,t){switch(e){case"compositionend":return c7(t);case"keypress":return t.which!==32?null:(_P=!0,bP);case"textInput":return e=t.data,e===bP&&_P?null:e;default:return null}}function FW(e,t){if(Zc)return e==="compositionend"||!b4&&u7(e,t)?(e=s7(),Iy=m4=il=null,Zc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=CP(n)}}function p7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?p7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function g7(){for(var e=window,t=_v();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_v(e.document)}return t}function _4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WW(e){var t=g7(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&p7(n.ownerDocument.documentElement,n)){if(r!==null&&_4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=EP(n,o);var a=EP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jc=null,TC=null,op=null,AC=!1;function TP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;AC||Jc==null||Jc!==_v(r)||(r=Jc,"selectionStart"in r&&_4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),op&&Np(op,r)||(op=r,r=Av(TC,"onSelect"),0nd||(e.current=OC[nd],OC[nd]=null,nd--)}function Mt(e,t){nd++,OC[nd]=e.current,e.current=t}var Cl={},br=Vl(Cl),Zr=Vl(!1),Xu=Cl;function ef(e,t){var n=e.type.contextTypes;if(!n)return Cl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Jr(e){return e=e.childContextTypes,e!=null}function kv(){zt(Zr),zt(br)}function OP(e,t,n){if(br.current!==Cl)throw Error(ne(168));Mt(br,t),Mt(Zr,n)}function C7(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ne(108,jq(e)||"Unknown",i));return en({},n,r)}function Iv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cl,Xu=br.current,Mt(br,e),Mt(Zr,Zr.current),!0}function $P(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=C7(e,t,Xu),r.__reactInternalMemoizedMergedChildContext=e,zt(Zr),zt(br),Mt(br,e)):zt(Zr),Mt(Zr,n)}var ja=null,Ab=!1,gx=!1;function E7(e){ja===null?ja=[e]:ja.push(e)}function oK(e){Ab=!0,E7(e)}function jl(){if(!gx&&ja!==null){gx=!0;var e=0,t=vt;try{var n=ja;for(vt=1;e>=a,i-=a,Qa=1<<32-To(t)+i|n<x?(P=C,C=null):P=C.sibling;var E=f(b,C,m[x],v);if(E===null){C===null&&(C=P);break}e&&C&&E.alternate===null&&t(b,C),y=o(E,y,x),w===null?S=E:w.sibling=E,w=E,C=P}if(x===m.length)return n(b,C),qt&&hu(b,x),S;if(C===null){for(;xx?(P=C,C=null):P=C.sibling;var I=f(b,C,E.value,v);if(I===null){C===null&&(C=P);break}e&&C&&I.alternate===null&&t(b,C),y=o(I,y,x),w===null?S=I:w.sibling=I,w=I,C=P}if(E.done)return n(b,C),qt&&hu(b,x),S;if(C===null){for(;!E.done;x++,E=m.next())E=d(b,E.value,v),E!==null&&(y=o(E,y,x),w===null?S=E:w.sibling=E,w=E);return qt&&hu(b,x),S}for(C=r(b,C);!E.done;x++,E=m.next())E=h(C,b,x,E.value,v),E!==null&&(e&&E.alternate!==null&&C.delete(E.key===null?x:E.key),y=o(E,y,x),w===null?S=E:w.sibling=E,w=E);return e&&C.forEach(function(N){return t(b,N)}),qt&&hu(b,x),S}function _(b,y,m,v){if(typeof m=="object"&&m!==null&&m.type===Yc&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case n0:e:{for(var S=m.key,w=y;w!==null;){if(w.key===S){if(S=m.type,S===Yc){if(w.tag===7){n(b,w.sibling),y=i(w,m.props.children),y.return=b,b=y;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Gs&&VP(S)===w.type){n(b,w.sibling),y=i(w,m.props),y.ref=ah(b,w,m),y.return=b,b=y;break e}n(b,w);break}else t(b,w);w=w.sibling}m.type===Yc?(y=Fu(m.props.children,b.mode,v,m.key),y.return=b,b=y):(v=Fy(m.type,m.key,m.props,null,b.mode,v),v.ref=ah(b,y,m),v.return=b,b=v)}return a(b);case Qc:e:{for(w=m.key;y!==null;){if(y.key===w)if(y.tag===4&&y.stateNode.containerInfo===m.containerInfo&&y.stateNode.implementation===m.implementation){n(b,y.sibling),y=i(y,m.children||[]),y.return=b,b=y;break e}else{n(b,y);break}else t(b,y);y=y.sibling}y=wx(m,b.mode,v),y.return=b,b=y}return a(b);case Gs:return w=m._init,_(b,y,w(m._payload),v)}if(Dh(m))return p(b,y,m,v);if(th(m))return g(b,y,m,v);h0(b,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,y!==null&&y.tag===6?(n(b,y.sibling),y=i(y,m),y.return=b,b=y):(n(b,y),y=xx(m,b.mode,v),y.return=b,b=y),a(b)):n(b,y)}return _}var nf=O7(!0),$7=O7(!1),sm={},fa=Vl(sm),Bp=Vl(sm),zp=Vl(sm);function Pu(e){if(e===sm)throw Error(ne(174));return e}function k4(e,t){switch(Mt(zp,t),Mt(Bp,e),Mt(fa,sm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mC(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mC(t,e)}zt(fa),Mt(fa,t)}function rf(){zt(fa),zt(Bp),zt(zp)}function N7(e){Pu(zp.current);var t=Pu(fa.current),n=mC(t,e.type);t!==n&&(Mt(Bp,e),Mt(fa,n))}function I4(e){Bp.current===e&&(zt(fa),zt(Bp))}var Yt=Vl(0);function Dv(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mx=[];function M4(){for(var e=0;en?n:4,e(!0);var r=yx.transition;yx.transition={};try{e(!1),t()}finally{vt=n,yx.transition=r}}function Y7(){return Yi().memoizedState}function uK(e,t,n){var r=pl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Z7(e))J7(t,n);else if(n=k7(e,t,n,r),n!==null){var i=$r();Ao(n,e,r,i),e$(n,t,r)}}function cK(e,t,n){var r=pl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Z7(e))J7(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Oo(s,a)){var l=t.interleaved;l===null?(i.next=i,A4(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=k7(e,t,i,r),n!==null&&(i=$r(),Ao(n,e,r,i),e$(n,t,r))}}function Z7(e){var t=e.alternate;return e===Jt||t!==null&&t===Jt}function J7(e,t){ap=Lv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function e$(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,h4(e,n)}}var Fv={readContext:Qi,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useInsertionEffect:dr,useLayoutEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useMutableSource:dr,useSyncExternalStore:dr,useId:dr,unstable_isNewReconciler:!1},dK={readContext:Qi,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:UP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$y(4194308,4,q7.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $y(4194308,4,e,t)},useInsertionEffect:function(e,t){return $y(4,2,e,t)},useMemo:function(e,t){var n=Ko();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ko();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=uK.bind(null,Jt,e),[r.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:jP,useDebugValue:D4,useDeferredValue:function(e){return Ko().memoizedState=e},useTransition:function(){var e=jP(!1),t=e[0];return e=lK.bind(null,e[1]),Ko().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Jt,i=Ko();if(qt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),Hn===null)throw Error(ne(349));Yu&30||F7(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,UP(z7.bind(null,r,o,e),[e]),r.flags|=2048,Up(9,B7.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ko(),t=Hn.identifierPrefix;if(qt){var n=Ya,r=Qa;n=(r&~(1<<32-To(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vp++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ra]=t,e[Fp]=r,u$(e,t,!1,!1),t.stateNode=e;e:{switch(a=vC(n,r),n){case"dialog":Nt("cancel",e),Nt("close",e),i=r;break;case"iframe":case"object":case"embed":Nt("load",e),i=r;break;case"video":case"audio":for(i=0;iaf&&(t.flags|=128,r=!0,sh(o,!1),t.lanes=4194304)}else{if(!r)if(e=Dv(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!qt)return fr(t),null}else 2*mn()-o.renderingStartTime>af&&n!==1073741824&&(t.flags|=128,r=!0,sh(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=mn(),t.sibling=null,n=Yt.current,Mt(Yt,r?n&1|2:n&1),t):(fr(t),null);case 22:case 23:return j4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pi&1073741824&&(fr(t),t.subtreeFlags&6&&(t.flags|=8192)):fr(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function bK(e,t){switch(x4(t),t.tag){case 1:return Jr(t.type)&&kv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rf(),zt(Zr),zt(br),M4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return I4(t),null;case 13:if(zt(Yt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));tf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zt(Yt),null;case 4:return rf(),null;case 10:return T4(t.type._context),null;case 22:case 23:return j4(),null;case 24:return null;default:return null}}var g0=!1,yr=!1,_K=typeof WeakSet=="function"?WeakSet:Set,be=null;function ad(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){an(e,t,r)}else n.current=null}function HC(e,t,n){try{n()}catch(r){an(e,t,r)}}var ZP=!1;function SK(e,t){if(PC=Ev,e=g7(),_4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(s=a),f===o&&++c===r&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kC={focusedElem:e,selectionRange:n},Ev=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,_=p.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:mo(t.type,g),_);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(v){an(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return p=ZP,ZP=!1,p}function sp(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&HC(t,n,o)}i=i.next}while(i!==r)}}function Ib(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function qC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function f$(e){var t=e.alternate;t!==null&&(e.alternate=null,f$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ra],delete t[Fp],delete t[RC],delete t[rK],delete t[iK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function h$(e){return e.tag===5||e.tag===3||e.tag===4}function JP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h$(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function WC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pv));else if(r!==4&&(e=e.child,e!==null))for(WC(e,t,n),e=e.sibling;e!==null;)WC(e,t,n),e=e.sibling}function KC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(KC(e,t,n),e=e.sibling;e!==null;)KC(e,t,n),e=e.sibling}var tr=null,vo=!1;function Os(e,t,n){for(n=n.child;n!==null;)p$(e,t,n),n=n.sibling}function p$(e,t,n){if(da&&typeof da.onCommitFiberUnmount=="function")try{da.onCommitFiberUnmount(xb,n)}catch{}switch(n.tag){case 5:yr||ad(n,t);case 6:var r=tr,i=vo;tr=null,Os(e,t,n),tr=r,vo=i,tr!==null&&(vo?(e=tr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tr.removeChild(n.stateNode));break;case 18:tr!==null&&(vo?(e=tr,n=n.stateNode,e.nodeType===8?px(e.parentNode,n):e.nodeType===1&&px(e,n),Op(e)):px(tr,n.stateNode));break;case 4:r=tr,i=vo,tr=n.stateNode.containerInfo,vo=!0,Os(e,t,n),tr=r,vo=i;break;case 0:case 11:case 14:case 15:if(!yr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&HC(n,t,a),i=i.next}while(i!==r)}Os(e,t,n);break;case 1:if(!yr&&(ad(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){an(n,t,s)}Os(e,t,n);break;case 21:Os(e,t,n);break;case 22:n.mode&1?(yr=(r=yr)||n.memoizedState!==null,Os(e,t,n),yr=r):Os(e,t,n);break;default:Os(e,t,n)}}function ek(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _K),t.forEach(function(r){var i=IK.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ho(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=mn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wK(r/1960))-r,10e?16:e,ol===null)var r=!1;else{if(e=ol,ol=null,Vv=0,st&6)throw Error(ne(331));var i=st;for(st|=4,be=e.current;be!==null;){var o=be,a=o.child;if(be.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lmn()-z4?Lu(e,0):B4|=n),ei(e,t)}function x$(e,t){t===0&&(e.mode&1?(t=a0,a0<<=1,!(a0&130023424)&&(a0=4194304)):t=1);var n=$r();e=ds(e,t),e!==null&&(im(e,t,n),ei(e,n))}function kK(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),x$(e,n)}function IK(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),x$(e,n)}var w$;w$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zr.current)Xr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xr=!1,yK(e,t,n);Xr=!!(e.flags&131072)}else Xr=!1,qt&&t.flags&1048576&&T7(t,Rv,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ny(e,t),e=t.pendingProps;var i=ef(t,br.current);Cd(t,n),i=O4(null,t,r,e,i,n);var o=$4();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Jr(r)?(o=!0,Iv(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,P4(t),i.updater=Pb,t.stateNode=i,i._reactInternals=t,FC(t,r,e,n),t=VC(null,t,r,!0,o,n)):(t.tag=0,qt&&o&&S4(t),Mr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ny(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=RK(r),e=mo(r,e),i){case 0:t=zC(null,t,r,e,n);break e;case 1:t=XP(null,t,r,e,n);break e;case 11:t=WP(null,t,r,e,n);break e;case 14:t=KP(null,t,r,mo(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mo(r,i),zC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mo(r,i),XP(e,t,r,i,n);case 3:e:{if(a$(t),e===null)throw Error(ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,I7(e,t),Nv(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=of(Error(ne(423)),t),t=QP(e,t,r,n,i);break e}else if(r!==i){i=of(Error(ne(424)),t),t=QP(e,t,r,n,i);break e}else for(bi=dl(t.stateNode.containerInfo.firstChild),_i=t,qt=!0,_o=null,n=$7(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tf(),r===i){t=fs(e,t,n);break e}Mr(e,t,r,n)}t=t.child}return t;case 5:return N7(t),e===null&&NC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,IC(r,i)?a=null:o!==null&&IC(r,o)&&(t.flags|=32),o$(e,t),Mr(e,t,a,n),t.child;case 6:return e===null&&NC(t),null;case 13:return s$(e,t,n);case 4:return k4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nf(t,null,r,n):Mr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mo(r,i),WP(e,t,r,i,n);case 7:return Mr(e,t,t.pendingProps,n),t.child;case 8:return Mr(e,t,t.pendingProps.children,n),t.child;case 12:return Mr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Mt(Ov,r._currentValue),r._currentValue=a,o!==null)if(Oo(o.value,a)){if(o.children===i.children&&!Zr.current){t=fs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ns(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),DC(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),DC(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Mr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Cd(t,n),i=Qi(i),r=r(i),t.flags|=1,Mr(e,t,r,n),t.child;case 14:return r=t.type,i=mo(r,t.pendingProps),i=mo(r.type,i),KP(e,t,r,i,n);case 15:return r$(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mo(r,i),Ny(e,t),t.tag=1,Jr(r)?(e=!0,Iv(t)):e=!1,Cd(t,n),R7(t,r,i),FC(t,r,i,n),VC(null,t,r,!0,e,n);case 19:return l$(e,t,n);case 22:return i$(e,t,n)}throw Error(ne(156,t.tag))};function C$(e,t){return QO(e,t)}function MK(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wi(e,t,n,r){return new MK(e,t,n,r)}function G4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function RK(e){if(typeof e=="function")return G4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===u4)return 11;if(e===c4)return 14}return 2}function gl(e,t){var n=e.alternate;return n===null?(n=Wi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")G4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Yc:return Fu(n.children,i,o,t);case l4:a=8,i|=8;break;case lC:return e=Wi(12,n,t,i|2),e.elementType=lC,e.lanes=o,e;case uC:return e=Wi(13,n,t,i),e.elementType=uC,e.lanes=o,e;case cC:return e=Wi(19,n,t,i),e.elementType=cC,e.lanes=o,e;case OO:return Rb(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case MO:a=10;break e;case RO:a=9;break e;case u4:a=11;break e;case c4:a=14;break e;case Gs:a=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Wi(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fu(e,t,n,r){return e=Wi(7,e,r,t),e.lanes=n,e}function Rb(e,t,n,r){return e=Wi(22,e,r,t),e.elementType=OO,e.lanes=n,e.stateNode={isHidden:!1},e}function xx(e,t,n){return e=Wi(6,e,null,t),e.lanes=n,e}function wx(e,t,n){return t=Wi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function OK(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=rx(0),this.expirationTimes=rx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function H4(e,t,n,r,i,o,a,s,l){return e=new OK(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Wi(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},P4(o),e}function $K(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P$)}catch(e){console.error(e)}}P$(),TO.exports=Ai;var mi=TO.exports;const vLe=Bl(mi);var lk=mi;aC.createRoot=lk.createRoot,aC.hydrateRoot=lk.hydrateRoot;const BK="modulepreload",zK=function(e,t){return new URL(e,t).href},uk={},k$=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=zK(o,r),o in uk)return;uk[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const d=i[c];if(d.href===o&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":BK,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};function Un(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Lb(e)?2:Fb(e)?3:0}function ml(e,t){return El(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function By(e,t){return El(e)===2?e.get(t):e[t]}function I$(e,t,n){var r=El(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function M$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Lb(e){return qK&&e instanceof Map}function Fb(e){return WK&&e instanceof Set}function Ln(e){return e.o||e.t}function Q4(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=O$(e);delete t[Fe];for(var n=Ad(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=VK),Object.freeze(e),t&&hs(e,function(n,r){return lm(r,!0)},!0)),e}function VK(){Un(2)}function Y4(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ha(e){var t=e5[e];return t||Un(18,e),t}function Z4(e,t){e5[e]||(e5[e]=t)}function Hp(){return Wp}function Cx(e,t){t&&(ha("Patches"),e.u=[],e.s=[],e.v=t)}function Gv(e){JC(e),e.p.forEach(jK),e.p=null}function JC(e){e===Wp&&(Wp=e.l)}function ck(e){return Wp={p:[],l:Wp,h:e,m:!0,_:0}}function jK(e){var t=e[Fe];t.i===0||t.i===1?t.j():t.g=!0}function Ex(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||ha("ES5").S(t,e,r),r?(n[Fe].P&&(Gv(t),Un(4)),ti(e)&&(e=Hv(t,e),t.l||qv(t,e)),t.u&&ha("Patches").M(n[Fe].t,e,t.u,t.s)):e=Hv(t,n,[]),Gv(t),t.u&&t.v(t.u,t.s),e!==zb?e:void 0}function Hv(e,t,n){if(Y4(t))return t;var r=t[Fe];if(!r)return hs(t,function(s,l){return dk(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return qv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=Q4(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),hs(o,function(s,l){return dk(e,r,i,s,l,n,a)}),qv(e,i,!1),n&&e.u&&ha("Patches").N(r,n,e.u,e.s)}return r.o}function dk(e,t,n,r,i,o,a){if(Dr(i)){var s=Hv(e,i,o&&t&&t.i!==3&&!ml(t.R,r)?o.concat(r):void 0);if(I$(n,r,s),!Dr(s))return;e.m=!1}else a&&n.add(i);if(ti(i)&&!Y4(i)){if(!e.h.D&&e._<1)return;Hv(e,i),t&&t.A.l||qv(e,i)}}function qv(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&lm(t,n)}function Tx(e,t){var n=e[Fe];return(n?Ln(n):e)[t]}function fk(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Wr(e){e.P||(e.P=!0,e.l&&Wr(e.l))}function Ax(e){e.o||(e.o=Q4(e.t))}function qp(e,t,n){var r=Lb(t)?ha("MapSet").F(t,n):Fb(t)?ha("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Hp(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Kp;a&&(l=[s],u=Bh);var c=Proxy.revocable(l,u),d=c.revoke,f=c.proxy;return s.k=f,s.j=d,f}(t,n):ha("ES5").J(t,n);return(n?n.A:Hp()).p.push(r),r}function Bb(e){return Dr(e)||Un(22,e),function t(n){if(!ti(n))return n;var r,i=n[Fe],o=El(n);if(i){if(!i.P&&(i.i<4||!ha("ES5").K(i)))return i.t;i.I=!0,r=hk(n,o),i.I=!1}else r=hk(n,o);return hs(r,function(a,s){i&&By(i.t,a)===s||I$(r,a,t(s))}),o===3?new Set(r):r}(e)}function hk(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Q4(e)}function J4(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[Fe];return Kp.get(l,o)},set:function(l){var u=this[Fe];Kp.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][Fe];if(!s.P)switch(s.i){case 5:r(s)&&Wr(s);break;case 4:n(s)&&Wr(s)}}}function n(o){for(var a=o.t,s=o.k,l=Ad(s),u=l.length-1;u>=0;u--){var c=l[u];if(c!==Fe){var d=a[c];if(d===void 0&&!ml(a,c))return!0;var f=s[c],h=f&&f[Fe];if(h?h.t!==d:!M$(f,d))return!0}}var p=!!a[Fe];return l.length!==Ad(a).length+(p?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?b-1:0),m=1;m1?c-1:0),f=1;f=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=ha("Patches").$;return Dr(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Ci=new $$,N$=Ci.produce,nE=Ci.produceWithPatches.bind(Ci),XK=Ci.setAutoFreeze.bind(Ci),QK=Ci.setUseProxies.bind(Ci),t5=Ci.applyPatches.bind(Ci),YK=Ci.createDraft.bind(Ci),ZK=Ci.finishDraft.bind(Ci);const Ul=N$,bLe=Object.freeze(Object.defineProperty({__proto__:null,Immer:$$,applyPatches:t5,castDraft:GK,castImmutable:HK,createDraft:YK,current:Bb,default:Ul,enableAllPlugins:UK,enableES5:J4,enableMapSet:R$,enablePatches:eE,finishDraft:ZK,freeze:lm,immerable:Td,isDraft:Dr,isDraftable:ti,nothing:zb,original:X4,produce:N$,produceWithPatches:nE,setAutoFreeze:XK,setUseProxies:QK},Symbol.toStringTag,{value:"Module"}));function Xp(e){"@babel/helpers - typeof";return Xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xp(e)}function JK(e,t){if(Xp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eX(e){var t=JK(e,"string");return Xp(t)==="symbol"?t:String(t)}function tX(e,t,n){return t=eX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yk(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(nr(1));return n(um)(e,t)}if(typeof e!="function")throw new Error(nr(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(nr(3));return o}function d(g){if(typeof g!="function")throw new Error(nr(4));if(l)throw new Error(nr(5));var _=!0;return u(),s.push(g),function(){if(_){if(l)throw new Error(nr(6));_=!1,u();var y=s.indexOf(g);s.splice(y,1),a=null}}}function f(g){if(!nX(g))throw new Error(nr(7));if(typeof g.type>"u")throw new Error(nr(8));if(l)throw new Error(nr(9));try{l=!0,o=i(o,g)}finally{l=!1}for(var _=a=s,b=0;b<_.length;b++){var y=_[b];y()}return g}function h(g){if(typeof g!="function")throw new Error(nr(10));i=g,f({type:sf.REPLACE})}function p(){var g,_=d;return g={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(nr(11));function m(){y.next&&y.next(c())}m();var v=_(m);return{unsubscribe:v}}},g[vk]=function(){return this},g}return f({type:sf.INIT}),r={dispatch:f,subscribe:d,getState:c,replaceReducer:h},r[vk]=p,r}var D$=um;function rX(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:sf.INIT});if(typeof r>"u")throw new Error(nr(12));if(typeof n(void 0,{type:sf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(nr(13))})}function Mf(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(nr(14));d[h]=_,c=c||_!==g}return c=c||o.length!==Object.keys(l).length,c?d:l}}function bk(e,t){return function(){return t(e.apply(this,arguments))}}function L$(e,t){if(typeof e=="function")return bk(e,t);if(typeof e!="object"||e===null)throw new Error(nr(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=bk(i,t))}return n}function lf(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return Wv}function i(s,l){r(s)===Wv&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var F$=function(t,n){return t===n};function sX(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]-1}function vX(e){return""+e}function bX(e){return function(){return function(t){return function(n){return t(n)}}}}var H$=function(e){j$(t,e);function t(){for(var n=[],r=0;r",value:e};if(typeof e!="object"||e===null||o!=null&&o.has(e))return!1;for(var s=r!=null?r(e):Object.entries(e),l=i.length>0,u=function(_,b){var y=t?t+"."+_:_;if(l){var m=i.some(function(v){return v instanceof RegExp?v.test(y):y===v});if(m)return"continue"}if(!n(b))return{value:{keyPath:y,value:b}};if(typeof b=="object"&&(a=K$(b,y,n,r,i,o),a))return{value:a}},c=0,d=s;c0;if(y){var m=p.filter(function(v){return u(_,v,g)}).length>0;m&&(g.ids=Object.keys(g.entities))}}function f(p,g){return h([p],g)}function h(p,g){var _=eN(p,e,g),b=_[0],y=_[1];d(y,g),n(b,g)}return{removeAll:MX(l),addOne:gn(t),addMany:gn(n),setOne:gn(r),setMany:gn(i),setAll:gn(o),updateOne:gn(c),updateMany:gn(d),upsertOne:gn(f),upsertMany:gn(h),removeOne:gn(a),removeMany:gn(s)}}function RX(e,t){var n=tN(e),r=n.removeOne,i=n.removeMany,o=n.removeAll;function a(y,m){return s([y],m)}function s(y,m){y=Bu(y);var v=y.filter(function(S){return!(cp(S,e)in m.entities)});v.length!==0&&_(v,m)}function l(y,m){return u([y],m)}function u(y,m){y=Bu(y),y.length!==0&&_(y,m)}function c(y,m){y=Bu(y),m.entities={},m.ids=[],s(y,m)}function d(y,m){return f([y],m)}function f(y,m){for(var v=!1,S=0,w=y;S-1;return n&&r}function fm(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ub(){for(var e=[],t=0;t0)for(var m=h.getState(),v=Array.from(n.values()),S=0,w=v;SMath.floor(e/t)*t,Rr=(e,t)=>Math.round(e/t)*t;var XX=typeof global=="object"&&global&&global.Object===Object&&global;const bN=XX;var QX=typeof self=="object"&&self&&self.Object===Object&&self,YX=bN||QX||Function("return this")();const Ta=YX;var ZX=Ta.Symbol;const Zi=ZX;var _N=Object.prototype,JX=_N.hasOwnProperty,eQ=_N.toString,uh=Zi?Zi.toStringTag:void 0;function tQ(e){var t=JX.call(e,uh),n=e[uh];try{e[uh]=void 0;var r=!0}catch{}var i=eQ.call(e);return r&&(t?e[uh]=n:delete e[uh]),i}var nQ=Object.prototype,rQ=nQ.toString;function iQ(e){return rQ.call(e)}var oQ="[object Null]",aQ="[object Undefined]",Ak=Zi?Zi.toStringTag:void 0;function Bo(e){return e==null?e===void 0?aQ:oQ:Ak&&Ak in Object(e)?tQ(e):iQ(e)}function ni(e){return e!=null&&typeof e=="object"}var sQ="[object Symbol]";function Gb(e){return typeof e=="symbol"||ni(e)&&Bo(e)==sQ}function SN(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=zQ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function GQ(e){return function(){return e}}var HQ=function(){try{var e=fc(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Jv=HQ;var qQ=Jv?function(e,t){return Jv(e,"toString",{configurable:!0,enumerable:!1,value:GQ(t),writable:!0})}:Hb;const WQ=qQ;var KQ=UQ(WQ);const EN=KQ;function TN(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var eY=9007199254740991,tY=/^(?:0|[1-9]\d*)$/;function lE(e,t){var n=typeof e;return t=t??eY,!!t&&(n=="number"||n!="symbol"&&tY.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=iY}function Of(e){return e!=null&&uE(e.length)&&!sE(e)}function Wb(e,t,n){if(!ri(n))return!1;var r=typeof t;return(r=="number"?Of(n)&&lE(t,n.length):r=="string"&&t in n)?mm(n[t],e):!1}function IN(e){return kN(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Wb(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r-1}function bZ(e,t){var n=this.__data__,r=Xb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function xs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?LN(s,t-1,n,r,i):gE(i,s):r||(i[i.length]=s)}return i}function DZ(e){var t=e==null?0:e.length;return t?LN(e,1):[]}function LZ(e){return EN(PN(e,void 0,DZ),e+"")}var FZ=NN(Object.getPrototypeOf,Object);const mE=FZ;var BZ="[object Object]",zZ=Function.prototype,VZ=Object.prototype,FN=zZ.toString,jZ=VZ.hasOwnProperty,UZ=FN.call(Object);function BN(e){if(!ni(e)||Bo(e)!=BZ)return!1;var t=mE(e);if(t===null)return!0;var n=jZ.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&FN.call(n)==UZ}function zN(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:zN(e,t,n)}var GZ="\\ud800-\\udfff",HZ="\\u0300-\\u036f",qZ="\\ufe20-\\ufe2f",WZ="\\u20d0-\\u20ff",KZ=HZ+qZ+WZ,XZ="\\ufe0e\\ufe0f",QZ="\\u200d",YZ=RegExp("["+QZ+GZ+KZ+XZ+"]");function Zb(e){return YZ.test(e)}function ZZ(e){return e.split("")}var jN="\\ud800-\\udfff",JZ="\\u0300-\\u036f",eJ="\\ufe20-\\ufe2f",tJ="\\u20d0-\\u20ff",nJ=JZ+eJ+tJ,rJ="\\ufe0e\\ufe0f",iJ="["+jN+"]",a5="["+nJ+"]",s5="\\ud83c[\\udffb-\\udfff]",oJ="(?:"+a5+"|"+s5+")",UN="[^"+jN+"]",GN="(?:\\ud83c[\\udde6-\\uddff]){2}",HN="[\\ud800-\\udbff][\\udc00-\\udfff]",aJ="\\u200d",qN=oJ+"?",WN="["+rJ+"]?",sJ="(?:"+aJ+"(?:"+[UN,GN,HN].join("|")+")"+WN+qN+")*",lJ=WN+qN+sJ,uJ="(?:"+[UN+a5+"?",a5,GN,HN,iJ].join("|")+")",cJ=RegExp(s5+"(?="+s5+")|"+uJ+lJ,"g");function dJ(e){return e.match(cJ)||[]}function KN(e){return Zb(e)?dJ(e):ZZ(e)}function fJ(e){return function(t){t=cf(t);var n=Zb(t)?KN(t):void 0,r=n?n[0]:t.charAt(0),i=n?VN(n,1).join(""):t.slice(1);return r[e]()+i}}var hJ=fJ("toUpperCase");const XN=hJ;function QN(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i=t?e:t)),e}function al(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=zy(n),n=n===n?n:0),t!==void 0&&(t=zy(t),t=t===t?t:0),ree(zy(e),t,n)}function iee(){this.__data__=new xs,this.size=0}function oee(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function aee(e){return this.__data__.get(e)}function see(e){return this.__data__.has(e)}var lee=200;function uee(e,t){var n=this.__data__;if(n instanceof xs){var r=n.__data__;if(!Jp||r.lengths))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=n&Gte?new eg:void 0;for(o.set(e,t),o.set(t,e);++d1),o}),Rf(e,gD(e),n),r&&(n=fp(n,are|sre|lre,ore));for(var i=t.length;i--;)ire(n,t[i]);return n});const $f=ure;var cre=AD("length");const dre=cre;var MD="\\ud800-\\udfff",fre="\\u0300-\\u036f",hre="\\ufe20-\\ufe2f",pre="\\u20d0-\\u20ff",gre=fre+hre+pre,mre="\\ufe0e\\ufe0f",yre="["+MD+"]",h5="["+gre+"]",p5="\\ud83c[\\udffb-\\udfff]",vre="(?:"+h5+"|"+p5+")",RD="[^"+MD+"]",OD="(?:\\ud83c[\\udde6-\\uddff]){2}",$D="[\\ud800-\\udbff][\\udc00-\\udfff]",bre="\\u200d",ND=vre+"?",DD="["+mre+"]?",_re="(?:"+bre+"(?:"+[RD,OD,$D].join("|")+")"+DD+ND+")*",Sre=DD+ND+_re,xre="(?:"+[RD+h5+"?",h5,OD,$D,yre].join("|")+")",l6=RegExp(p5+"(?="+p5+")|"+xre+Sre,"g");function wre(e){for(var t=l6.lastIndex=0;l6.test(e);)++t;return t}function LD(e){return Zb(e)?wre(e):dre(e)}var Cre=Math.floor,Ere=Math.random;function Tre(e,t){return e+Cre(Ere()*(t-e+1))}var Are=parseFloat,Pre=Math.min,kre=Math.random;function Ire(e,t,n){if(n&&typeof n!="boolean"&&Wb(e,t,n)&&(t=n=void 0),n===void 0&&(typeof t=="boolean"?(n=t,t=void 0):typeof e=="boolean"&&(n=e,e=void 0)),e===void 0&&t===void 0?(e=0,t=1):(e=Md(e),t===void 0?(t=e,e=0):t=Md(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=kre();return Pre(e+i*(t-e+Are("1e-"+((i+"").length-1))),t)}return Tre(e,t)}var Mre=Math.ceil,Rre=Math.max;function Ore(e,t,n,r){for(var i=-1,o=Rre(Mre((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}function $re(e){return function(t,n,r){return r&&typeof r!="number"&&Wb(t,n,r)&&(n=r=void 0),t=Md(t),n===void 0?(n=t,t=0):n=Md(n),r=r===void 0?t=o)return e;var s=n-LD(r);if(s<1)return r;var l=a?VN(a,0,s).join(""):e.slice(0,s);if(i===void 0)return l+r;if(a&&(s+=l.length-s),tre(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=RegExp(i.source,cf(Gre.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(e.indexOf(Zv(i),s)!=s){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+r}var Hre=1/0,qre=Rd&&1/bE(new Rd([,-0]))[1]==Hre?function(e){return new Rd(e)}:BQ;const Wre=qre;var Kre=200;function FD(e,t,n){var r=-1,i=JQ,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Bne;else if(o>=Kre){var u=t?null:Wre(e);if(u)return bE(u);a=!1,i=xD,l=new eg}else l=t?[]:s;e:for(;++r{Od(e,t.payload)}}}),{configChanged:Qre}=zD.actions,Yre=zD.reducer,VD=ge("socket/socketConnected"),CE=ge("socket/appSocketConnected"),jD=ge("socket/socketDisconnected"),UD=ge("socket/appSocketDisconnected"),Zre=ge("socket/socketSubscribedSession"),Jre=ge("socket/appSocketSubscribedSession"),eie=ge("socket/socketUnsubscribedSession"),tie=ge("socket/appSocketUnsubscribedSession"),GD=ge("socket/socketInvocationStarted"),EE=ge("socket/appSocketInvocationStarted"),TE=ge("socket/socketInvocationComplete"),AE=ge("socket/appSocketInvocationComplete"),HD=ge("socket/socketInvocationError"),i_=ge("socket/appSocketInvocationError"),qD=ge("socket/socketGraphExecutionStateComplete"),WD=ge("socket/appSocketGraphExecutionStateComplete"),KD=ge("socket/socketGeneratorProgress"),PE=ge("socket/appSocketGeneratorProgress"),XD=ge("socket/socketModelLoadStarted"),QD=ge("socket/appSocketModelLoadStarted"),YD=ge("socket/socketModelLoadCompleted"),ZD=ge("socket/appSocketModelLoadCompleted"),JD=ge("socket/socketSessionRetrievalError"),eL=ge("socket/appSocketSessionRetrievalError"),tL=ge("socket/socketInvocationRetrievalError"),nL=ge("socket/appSocketInvocationRetrievalError"),rL=ge("socket/socketQueueItemStatusChanged"),o_=ge("socket/appSocketQueueItemStatusChanged");let S0;const nie=new Uint8Array(16);function rie(){if(!S0&&(S0=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!S0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return S0(nie)}const er=[];for(let e=0;e<256;++e)er.push((e+256).toString(16).slice(1));function iie(e,t=0){return er[e[t+0]]+er[e[t+1]]+er[e[t+2]]+er[e[t+3]]+"-"+er[e[t+4]]+er[e[t+5]]+"-"+er[e[t+6]]+er[e[t+7]]+"-"+er[e[t+8]]+er[e[t+9]]+"-"+er[e[t+10]]+er[e[t+11]]+er[e[t+12]]+er[e[t+13]]+er[e[t+14]]+er[e[t+15]]}const oie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),c6={randomUUID:oie};function yl(e,t,n){if(c6.randomUUID&&!t&&!e)return c6.randomUUID();e=e||{};const r=e.random||(e.rng||rie)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return iie(r)}const aie={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class t1{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||aie,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{a(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(a=>{a.apply(a,[t,...r])})}}function ch(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function d6(e){return e==null?"":""+e}function sie(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function kE(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?[].concat(t):t.split(".");for(;o.length>1;){if(i())return{};const a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function f6(e,t,n){const{obj:r,k:i}=kE(e,t,Object);r[i]=n}function lie(e,t,n,r){const{obj:i,k:o}=kE(e,t,Object);i[o]=i[o]||[],r&&(i[o]=i[o].concat(n)),r||i[o].push(n)}function n1(e,t){const{obj:n,k:r}=kE(e,t);if(n)return n[r]}function uie(e,t,n){const r=n1(e,n);return r!==void 0?r:n1(t,n)}function iL(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):iL(e[r],t[r],n):e[r]=t[r]);return e}function kc(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var cie={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function die(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>cie[t]):e}const fie=[" ",",","?","!",";"];function hie(e,t,n){t=t||"",n=n||"";const r=fie.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=new RegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function r1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;oo+a;)a++,s=r.slice(o,o+a).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const u=r.slice(o+a).join(n);return u?r1(l,u,n):void 0}i=i[r[o]]}return i}function i1(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class h6 extends a_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[t,n];r&&typeof r!="string"&&(s=s.concat(r)),r&&typeof r=="string"&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split("."));const l=n1(this.data,s);return l||!a||typeof r!="string"?l:r1(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),f6(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Object.prototype.toString.apply(r[o])==="[object Array]")&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let l=n1(this.data,s)||{};i?iL(l,r,o):l={...l,...r},f6(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var oL={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const p6={};class o1 extends a_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),sie(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=sa.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!hie(t,r,i);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const v=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${v}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${v}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let f=d&&d.res;const h=d&&d.usedKey||a,p=d&&d.exactUsedKey||a,g=Object.prototype.toString.apply(f),_=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(y&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&_.indexOf(g)<0&&!(typeof b=="string"&&g==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const v=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=v,d.usedParams=this.getUsedParamsDetails(n),d):v}if(o){const v=g==="[object Array]",S=v?[]:{},w=v?p:h;for(const C in f)if(Object.prototype.hasOwnProperty.call(f,C)){const x=`${w}${o}${C}`;S[C]=this.translate(x,{...n,joinArrays:!1,ns:s}),S[C]===x&&(S[C]=f[C])}f=S}}else if(y&&typeof b=="string"&&g==="[object Array]")f=f.join(b),f&&(f=this.extendTranslation(f,t,n,r));else{let v=!1,S=!1;const w=n.count!==void 0&&typeof n.count!="string",C=o1.hasDefaultValue(n),x=w?this.pluralResolver.getSuffix(u,n.count,n):"",P=n.ordinal&&w?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",E=n[`defaultValue${x}`]||n[`defaultValue${P}`]||n.defaultValue;!this.isValidLookup(f)&&C&&(v=!0,f=E),this.isValidLookup(f)||(S=!0,f=a);const N=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:f,M=C&&E!==f&&this.options.updateMissing;if(S||v||M){if(this.logger.log(M?"updateKey":"missingKey",u,l,a,M?E:f),o){const D=this.resolve(a,{...n,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const A=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&A&&A[0])for(let D=0;D{const O=C&&L!==f?L:N;this.options.missingKeyHandler?this.options.missingKeyHandler(D,l,$,O,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(D,l,$,O,M,n),this.emit("missingKey",D,l,$,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(D=>{this.pluralResolver.getSuffixes(D,n).forEach($=>{R([D],a+$,n[`defaultValue${$}`]||E)})}):R(T,a,E))}f=this.extendTranslation(f,t,n,d,r),S&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(S||v)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,v?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=t.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),u){const f=t.match(this.interpolator.nestingRegexp),h=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",h=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(_=>{this.isValidLookup(r)||(s=_,!p6[`${g[0]}-${_}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(p6[`${g[0]}-${_}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;a=b;const y=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,c,b,_,n);else{let v;f&&(v=this.pluralResolver.getSuffix(b,n.count,n));const S=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(y.push(c+v),n.ordinal&&v.indexOf(w)===0&&y.push(c+v.replace(w,this.options.pluralSeparator)),h&&y.push(c+S)),p){const C=`${c}${this.options.contextSeparator}${n.context}`;y.push(C),f&&(y.push(C+v),n.ordinal&&v.indexOf(w)===0&&y.push(C+v.replace(w,this.options.pluralSeparator)),h&&y.push(C+S))}}let m;for(;m=y.pop();)this.isValidLookup(r)||(o=m,r=this.getResource(b,_,m,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function $x(e){return e.charAt(0).toUpperCase()+e.slice(1)}class g6{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=sa.create("languageUtils")}getScriptPartFromCode(t){if(t=i1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=i1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=$x(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=$x(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=$x(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&o.indexOf(i)===0)return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}let pie=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],gie={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const mie=["v1","v2","v3"],yie=["v4"],m6={zero:0,one:1,two:2,few:3,many:4,other:5};function vie(){const e={};return pie.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:gie[t.fc]}})}),e}class bie{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=sa.create("pluralResolver"),(!this.options.compatibilityJSON||yie.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=vie()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(i1(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>m6[i]-m6[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!mie.includes(this.options.compatibilityJSON)}}function y6(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=uie(e,t,n);return!o&&i&&typeof n=="string"&&(o=r1(e,n,r),o===void 0&&(o=r1(t,n,r))),o}class _ie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=sa.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:die,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?kc(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?kc(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?kc(n.nestingPrefix):n.nestingPrefixEscaped||kc("$t("),this.nestingSuffix=n.nestingSuffix?kc(n.nestingSuffix):n.nestingSuffixEscaped||kc(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,i){let o,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const c=p=>{if(p.indexOf(this.formatSeparator)<0){const y=y6(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),_=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(y6(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:_})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const g=o[1].trim();if(a=c(g),a===void 0)if(typeof d=="function"){const b=d(t,o,i);a=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=d6(a));const _=p.safeValue(a);if(t=t.replace(o[0],_),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;function s(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const h=f.match(/'/g),p=f.match(/"/g);(h&&h.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${c}${f}`}return delete a.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),l=c,u=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=d6(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),u&&(o=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function Sie(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(!a)return;const[s,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[s.trim()]||(n[s.trim()]=u),u==="false"&&(n[s.trim()]=!1),u==="true"&&(n[s.trim()]=!0),isNaN(u)||(n[s.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function Ic(e){const t={};return function(r,i,o){const a=i+JSON.stringify(o);let s=t[a];return s||(s=e(i1(i),o),t[a]=s),s(r)}}class xie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=sa.create("formatter"),this.options=t,this.formats={number:Ic((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Ic((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Ic((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Ic((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Ic((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Ic(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((s,l)=>{const{formatName:u,formatOptions:c}=Sie(l);if(this.formats[u]){let d=s;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[u](s,h,{...c,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}function wie(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class Cie extends a_{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=sa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(s[u]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),r&&this.store.addResourceBundle(o,a,r),this.state[t]=n?-1:2;const s={};this.queue.forEach(l=>{lie(l.loaded,[o],a),wie(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{s[u][d]===void 0&&(s[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>s(null,c)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,i,l):c=u(t,n,r,i),c&&typeof c.then=="function"?c.then(d=>s(null,d)).catch(s):s(null,c)}catch(c){s(c)}else u(t,n,r,i,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function v6(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function b6(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function x0(){}function Eie(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class ng extends a_{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=b6(t),this.services={},this.logger=sa,this.modules={external:[]},Eie(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=v6();this.options={...i,...this.options,...b6(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?sa.init(o(this.modules.logger),this.options):sa.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=xie);const d=new g6(this.options);this.store=new h6(this.options.resources,this.options);const f=this.services;f.logger=sa,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new bie(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new _ie(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Cie(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),_=1;_1?p-1:0),_=1;_{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=x0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=ch(),u=()=>{const c=(d,f)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x0;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=ch();return t||(t=this.languages),n||(n=this.options.ns),r||(r=x0),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&oL.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=ch();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{a(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let l;if(typeof s!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${f}${p}`):h=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,i.t(h,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=ch();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ch();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0);return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new g6(v6());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new ng(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x0;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new ng(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new h6(this.store.data,i),o.services.resourceStore=o.store),o.translator=new o1(o.services,i),o.translator.on("*",function(s){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c{switch(t){case"controlnet":return Od(Ye(Tie),{id:e,...n});case"t2i_adapter":return Od(Ye(Aie),{id:e,...n});case"ip_adapter":return Od(Ye(Pie),{id:e,...n});default:throw new Error(`Unknown control adapter type: ${t}`)}},IE=ge("controlAdapters/imageProcessed"),s_=e=>e.type==="controlnet",aL=e=>e.type==="ip_adapter",ME=e=>e.type==="t2i_adapter",gi=e=>s_(e)||ME(e),pn=Ji(),{selectById:di,selectAll:Aa,selectEntities:xLe,selectIds:wLe,selectTotal:CLe}=pn.getSelectors(),m5=pn.getInitialState({pendingControlImages:[]}),kie=e=>Aa(e).filter(s_),Iie=e=>Aa(e).filter(s_).filter(t=>t.isEnabled&&t.model&&(!!t.processedControlImage||t.processorType==="none"&&!!t.controlImage)),Mie=e=>Aa(e).filter(aL),Rie=e=>Aa(e).filter(aL).filter(t=>t.isEnabled&&t.model&&!!t.controlImage),Oie=e=>Aa(e).filter(ME),$ie=e=>Aa(e).filter(ME).filter(t=>t.isEnabled&&t.model&&(!!t.processedControlImage||t.processorType==="none"&&!!t.controlImage)),sL=Wt({name:"controlAdapters",initialState:m5,reducers:{controlAdapterAdded:{reducer:(e,t)=>{const{id:n,type:r,overrides:i}=t.payload;pn.addOne(e,_6(n,r,i))},prepare:({type:e,overrides:t})=>({payload:{id:yl(),type:e,overrides:t}})},controlAdapterRecalled:(e,t)=>{pn.addOne(e,t.payload)},controlAdapterDuplicated:{reducer:(e,t)=>{const{id:n,newId:r}=t.payload,i=di(e,n);if(!i)return;const o=Od(Ye(i),{id:r,isEnabled:!0});pn.addOne(e,o)},prepare:e=>({payload:{id:e,newId:yl()}})},controlAdapterAddedFromImage:{reducer:(e,t)=>{const{id:n,type:r,controlImage:i}=t.payload;pn.addOne(e,_6(n,r,{controlImage:i}))},prepare:e=>({payload:{...e,id:yl()}})},controlAdapterRemoved:(e,t)=>{pn.removeOne(e,t.payload.id)},controlAdapterIsEnabledChanged:(e,t)=>{const{id:n,isEnabled:r}=t.payload;pn.updateOne(e,{id:n,changes:{isEnabled:r}})},controlAdapterImageChanged:(e,t)=>{const{id:n,controlImage:r}=t.payload,i=di(e,n);i&&(pn.updateOne(e,{id:n,changes:{controlImage:r,processedControlImage:null}}),r!==null&&gi(i)&&i.processorType!=="none"&&e.pendingControlImages.push(n))},controlAdapterProcessedImageChanged:(e,t)=>{const{id:n,processedControlImage:r}=t.payload,i=di(e,n);i&&gi(i)&&(pn.updateOne(e,{id:n,changes:{processedControlImage:r}}),e.pendingControlImages=e.pendingControlImages.filter(o=>o!==n))},controlAdapterModelCleared:(e,t)=>{pn.updateOne(e,{id:t.payload.id,changes:{model:null}})},controlAdapterModelChanged:(e,t)=>{const{id:n,model:r}=t.payload,i=di(e,n);if(!i)return;if(!gi(i)){pn.updateOne(e,{id:n,changes:{model:r}});return}const o={id:n,changes:{model:r}};if(o.changes.processedControlImage=null,i.shouldAutoConfig){let a;for(const s in w0)if(r.model_name.includes(s)){a=w0[s];break}a?(o.changes.processorType=a,o.changes.processorNode=Su[a].default):(o.changes.processorType="none",o.changes.processorNode=Su.none.default)}pn.updateOne(e,o)},controlAdapterWeightChanged:(e,t)=>{const{id:n,weight:r}=t.payload;pn.updateOne(e,{id:n,changes:{weight:r}})},controlAdapterBeginStepPctChanged:(e,t)=>{const{id:n,beginStepPct:r}=t.payload;pn.updateOne(e,{id:n,changes:{beginStepPct:r}})},controlAdapterEndStepPctChanged:(e,t)=>{const{id:n,endStepPct:r}=t.payload;pn.updateOne(e,{id:n,changes:{endStepPct:r}})},controlAdapterControlModeChanged:(e,t)=>{const{id:n,controlMode:r}=t.payload,i=di(e,n);!i||!s_(i)||pn.updateOne(e,{id:n,changes:{controlMode:r}})},controlAdapterResizeModeChanged:(e,t)=>{const{id:n,resizeMode:r}=t.payload,i=di(e,n);!i||!gi(i)||pn.updateOne(e,{id:n,changes:{resizeMode:r}})},controlAdapterProcessorParamsChanged:(e,t)=>{const{id:n,params:r}=t.payload,i=di(e,n);if(!i||!gi(i)||!i.processorNode)return;const o=Od(Ye(i.processorNode),r);pn.updateOne(e,{id:n,changes:{shouldAutoConfig:!1,processorNode:o}})},controlAdapterProcessortTypeChanged:(e,t)=>{const{id:n,processorType:r}=t.payload,i=di(e,n);if(!i||!gi(i))return;const o=Ye(Su[r].default);pn.updateOne(e,{id:n,changes:{processorType:r,processedControlImage:null,processorNode:o,shouldAutoConfig:!1}})},controlAdapterAutoConfigToggled:(e,t)=>{var o;const{id:n}=t.payload,r=di(e,n);if(!r||!gi(r))return;const i={id:n,changes:{shouldAutoConfig:!r.shouldAutoConfig}};if(i.changes.shouldAutoConfig){let a;for(const s in w0)if((o=r.model)!=null&&o.model_name.includes(s)){a=w0[s];break}a?(i.changes.processorType=a,i.changes.processorNode=Su[a].default):(i.changes.processorType="none",i.changes.processorNode=Su.none.default)}pn.updateOne(e,i)},controlAdaptersReset:()=>Ye(m5),pendingControlImagesCleared:e=>{e.pendingControlImages=[]}},extraReducers:e=>{e.addCase(IE,(t,n)=>{const r=di(t,n.payload.id);r&&r.controlImage!==null&&(t.pendingControlImages=Xre(t.pendingControlImages.concat(n.payload.id)))}),e.addCase(i_,t=>{t.pendingControlImages=[]})}}),{controlAdapterAdded:Nie,controlAdapterRecalled:Die,controlAdapterDuplicated:ELe,controlAdapterAddedFromImage:Lie,controlAdapterRemoved:TLe,controlAdapterImageChanged:Hl,controlAdapterProcessedImageChanged:RE,controlAdapterIsEnabledChanged:OE,controlAdapterModelChanged:S6,controlAdapterWeightChanged:ALe,controlAdapterBeginStepPctChanged:PLe,controlAdapterEndStepPctChanged:kLe,controlAdapterControlModeChanged:ILe,controlAdapterResizeModeChanged:MLe,controlAdapterProcessorParamsChanged:Fie,controlAdapterProcessortTypeChanged:Bie,controlAdaptersReset:zie,controlAdapterAutoConfigToggled:x6,pendingControlImagesCleared:Vie,controlAdapterModelCleared:Nx}=sL.actions,jie=sL.reducer,Uie=si(Nie,Lie,Die),RLe={any:"Any","sd-1":"Stable Diffusion 1.x","sd-2":"Stable Diffusion 2.x",sdxl:"Stable Diffusion XL","sdxl-refiner":"Stable Diffusion XL Refiner"},OLe={any:"Any","sd-1":"SD1","sd-2":"SD2",sdxl:"SDXL","sdxl-refiner":"SDXLR"},Gie={any:{maxClip:0,markers:[]},"sd-1":{maxClip:12,markers:[0,1,2,3,4,8,12]},"sd-2":{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]},sdxl:{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]},"sdxl-refiner":{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]}},$Le={lycoris:"LyCORIS",diffusers:"Diffusers"},Hie=0,hp=4294967295;var ut;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(ut||(ut={}));var y5;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(y5||(y5={}));const he=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Zs=e=>{switch(typeof e){case"undefined":return he.undefined;case"string":return he.string;case"number":return isNaN(e)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(e)?he.array:e===null?he.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?he.promise:typeof Map<"u"&&e instanceof Map?he.map:typeof Set<"u"&&e instanceof Set?he.set:typeof Date<"u"&&e instanceof Date?he.date:he.object;default:return he.unknown}},ie=ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),qie=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ko extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;ln.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ko.create=e=>new ko(e);const rg=(e,t)=>{let n;switch(e.code){case ie.invalid_type:e.received===he.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ie.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ie.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let lL=rg;function Wie(e){lL=e}function a1(){return lL}const s1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)s=u(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},Kie=[];function ye(e,t){const n=s1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a1(),rg].filter(r=>!!r)});e.common.issues.push(n)}class _r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return _r.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),uL=e=>({status:"dirty",value:e}),Lr=e=>({status:"valid",value:e}),v5=e=>e.status==="aborted",b5=e=>e.status==="dirty",ig=e=>e.status==="valid",l1=e=>typeof Promise<"u"&&e instanceof Promise;var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ie||(Ie={}));class Sa{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const w6=(e,t)=>{if(ig(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ko(e.common.issues);return this._error=n,this._error}}};function Be(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class ze{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Zs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new _r,ctx:{common:t.parent.common,data:t.data,parsedType:Zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(l1(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Zs(t)},o=this._parseSync({data:t,path:i.path,parent:i});return w6(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Zs(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(l1(i)?i:Promise.resolve(i));return w6(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:ie.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new No({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return rs.create(this,this._def)}nullable(){return rc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Io.create(this,this._def)}promise(){return hf.create(this,this._def)}or(t){return lg.create([this,t],this._def)}and(t){return ug.create(this,t,this._def)}transform(t){return new No({...Be(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new pg({...Be(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new dL({typeName:Oe.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new f1({...Be(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _m.create(this,t)}readonly(){return p1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Xie=/^c[^\s-]{8,}$/i,Qie=/^[a-z][a-z0-9]*$/,Yie=/^[0-9A-HJKMNP-TV-Z]{26}$/,Zie=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Jie=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eoe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Dx;const toe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,noe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,roe=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function ioe(e,t){return!!((t==="v4"||!t)&&toe.test(e)||(t==="v6"||!t)&&noe.test(e))}class Eo extends ze{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==he.string){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.string,received:o.parsedType}),Le}const r=new _r;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:ie.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new Eo({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ie.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ie.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new Eo({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Eo({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Eo({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Eo({checks:[],typeName:Oe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function ooe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Pl extends ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==he.number){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.number,received:o.parsedType}),Le}let r;const i=new _r;for(const o of this._def.checks)o.kind==="int"?ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?ooe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_finite,message:o.message}),i.dirty()):ut.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,i){return new Pl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(i)}]})}_addCheck(t){return new Pl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&ut.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Pl({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});class kl extends ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==he.bigint){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.bigint,received:o.parsedType}),Le}let r;const i=new _r;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):ut.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new kl({checks:[],typeName:Oe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};class og extends ze{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==he.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.boolean,received:r.parsedType}),Le}return Lr(t.data)}}og.create=e=>new og({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});class tc extends ze{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==he.date){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.date,received:o.parsedType}),Le}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_date}),Le}const r=new _r;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ut.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new tc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew tc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...Be(e)});class u1 extends ze{_parse(t){if(this._getType(t)!==he.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.symbol,received:r.parsedType}),Le}return Lr(t.data)}}u1.create=e=>new u1({typeName:Oe.ZodSymbol,...Be(e)});class ag extends ze{_parse(t){if(this._getType(t)!==he.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.undefined,received:r.parsedType}),Le}return Lr(t.data)}}ag.create=e=>new ag({typeName:Oe.ZodUndefined,...Be(e)});class sg extends ze{_parse(t){if(this._getType(t)!==he.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.null,received:r.parsedType}),Le}return Lr(t.data)}}sg.create=e=>new sg({typeName:Oe.ZodNull,...Be(e)});class ff extends ze{constructor(){super(...arguments),this._any=!0}_parse(t){return Lr(t.data)}}ff.create=e=>new ff({typeName:Oe.ZodAny,...Be(e)});class zu extends ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Lr(t.data)}}zu.create=e=>new zu({typeName:Oe.ZodUnknown,...Be(e)});class gs extends ze{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ie.invalid_type,expected:he.never,received:n.parsedType}),Le}}gs.create=e=>new gs({typeName:Oe.ZodNever,...Be(e)});class c1 extends ze{_parse(t){if(this._getType(t)!==he.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.void,received:r.parsedType}),Le}return Lr(t.data)}}c1.create=e=>new c1({typeName:Oe.ZodVoid,...Be(e)});class Io extends ze{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==he.array)return ye(n,{code:ie.invalid_type,expected:he.array,received:n.parsedType}),Le;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(ye(n,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new Sa(n,a,n.path,s)))).then(a=>_r.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new Sa(n,a,n.path,s)));return _r.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Io({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new Io({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new Io({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}Io.create=(e,t)=>new Io({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Be(t)});function Hc(e){if(e instanceof Qt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=rs.create(Hc(r))}return new Qt({...e._def,shape:()=>t})}else return e instanceof Io?new Io({...e._def,type:Hc(e.element)}):e instanceof rs?rs.create(Hc(e.unwrap())):e instanceof rc?rc.create(Hc(e.unwrap())):e instanceof xa?xa.create(e.items.map(t=>Hc(t))):e}class Qt extends ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ut.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==he.object){const u=this._getOrReturnCtx(t);return ye(u,{code:ie.invalid_type,expected:he.object,received:u.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gs&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||s.push(u);const l=[];for(const u of a){const c=o[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Sa(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof gs){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(ye(i,{code:ie.unrecognized_keys,keys:s}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Sa(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key;u.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>_r.mergeObjectSync(r,u)):_r.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Qt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const l=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ie.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Qt({...this._def,unknownKeys:"strip"})}passthrough(){return new Qt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Qt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Qt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Qt({...this._def,catchall:t})}pick(t){const n={};return ut.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Qt({...this._def,shape:()=>n})}omit(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Qt({...this._def,shape:()=>n})}deepPartial(){return Hc(this)}partial(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Qt({...this._def,shape:()=>n})}required(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof rs;)o=o._def.innerType;n[r]=o}}),new Qt({...this._def,shape:()=>n})}keyof(){return cL(ut.objectKeys(this.shape))}}Qt.create=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strip",catchall:gs.create(),typeName:Oe.ZodObject,...Be(t)});Qt.strictCreate=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strict",catchall:gs.create(),typeName:Oe.ZodObject,...Be(t)});Qt.lazycreate=(e,t)=>new Qt({shape:e,unknownKeys:"strip",catchall:gs.create(),typeName:Oe.ZodObject,...Be(t)});class lg extends ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new ko(s.ctx.common.issues));return ye(n,{code:ie.invalid_union,unionErrors:a}),Le}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(l=>new ko(l));return ye(n,{code:ie.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}}lg.create=(e,t)=>new lg({options:e,typeName:Oe.ZodUnion,...Be(t)});const jy=e=>e instanceof dg?jy(e.schema):e instanceof No?jy(e.innerType()):e instanceof fg?[e.value]:e instanceof Il?e.options:e instanceof hg?Object.keys(e.enum):e instanceof pg?jy(e._def.innerType):e instanceof ag?[void 0]:e instanceof sg?[null]:null;class l_ extends ze{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.object)return ye(n,{code:ie.invalid_type,expected:he.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=jy(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new l_({typeName:Oe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}}function _5(e,t){const n=Zs(e),r=Zs(t);if(e===t)return{valid:!0,data:e};if(n===he.object&&r===he.object){const i=ut.objectKeys(t),o=ut.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=_5(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===he.array&&r===he.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(v5(o)||v5(a))return Le;const s=_5(o.value,a.value);return s.valid?((b5(o)||b5(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ie.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ug.create=(e,t,n)=>new ug({left:e,right:t,typeName:Oe.ZodIntersection,...Be(n)});class xa extends ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.array)return ye(r,{code:ie.invalid_type,expected:he.array,received:r.parsedType}),Le;if(r.data.lengththis._def.items.length&&(ye(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Sa(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>_r.mergeArray(n,a)):_r.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new xa({...this._def,rest:t})}}xa.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new xa({items:e,typeName:Oe.ZodTuple,rest:null,...Be(t)})};class cg extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.object)return ye(r,{code:ie.invalid_type,expected:he.object,received:r.parsedType}),Le;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Sa(r,s,r.path,s)),value:a._parse(new Sa(r,r.data[s],r.path,s))});return r.common.async?_r.mergeObjectAsync(n,i):_r.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ze?new cg({keyType:t,valueType:n,typeName:Oe.ZodRecord,...Be(r)}):new cg({keyType:Eo.create(),valueType:t,typeName:Oe.ZodRecord,...Be(n)})}}class d1 extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.map)return ye(r,{code:ie.invalid_type,expected:he.map,received:r.parsedType}),Le;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],u)=>({key:i._parse(new Sa(r,s,r.path,[u,"key"])),value:o._parse(new Sa(r,l,r.path,[u,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return Le;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return Le;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}}}}d1.create=(e,t,n)=>new d1({valueType:t,keyType:e,typeName:Oe.ZodMap,...Be(n)});class nc extends ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.set)return ye(r,{code:ie.invalid_type,expected:he.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(ye(r,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(l){const u=new Set;for(const c of l){if(c.status==="aborted")return Le;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const s=[...r.data.values()].map((l,u)=>o._parse(new Sa(r,l,r.path,u)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new nc({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new nc({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}nc.create=(e,t)=>new nc({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Be(t)});class $d extends ze{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.function)return ye(n,{code:ie.invalid_type,expected:he.function,received:n.parsedType}),Le;function r(s,l){return s1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,a1(),rg].filter(u=>!!u),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function i(s,l){return s1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,a1(),rg].filter(u=>!!u),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof hf){const s=this;return Lr(async function(...l){const u=new ko([]),c=await s._def.args.parseAsync(l,o).catch(h=>{throw u.addIssue(r(l,h)),u}),d=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(d,o).catch(h=>{throw u.addIssue(i(d,h)),u})})}else{const s=this;return Lr(function(...l){const u=s._def.args.safeParse(l,o);if(!u.success)throw new ko([r(l,u.error)]);const c=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(c,o);if(!d.success)throw new ko([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $d({...this._def,args:xa.create(t).rest(zu.create())})}returns(t){return new $d({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new $d({args:t||xa.create([]).rest(zu.create()),returns:n||zu.create(),typeName:Oe.ZodFunction,...Be(r)})}}class dg extends ze{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}dg.create=(e,t)=>new dg({getter:e,typeName:Oe.ZodLazy,...Be(t)});class fg extends ze{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}fg.create=(e,t)=>new fg({value:e,typeName:Oe.ZodLiteral,...Be(t)});function cL(e,t){return new Il({values:e,typeName:Oe.ZodEnum,...Be(t)})}class Il extends ze{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:ut.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Le}return Lr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Il.create(t)}exclude(t){return Il.create(this.options.filter(n=>!t.includes(n)))}}Il.create=cL;class hg extends ze{_parse(t){const n=ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==he.string&&r.parsedType!==he.number){const i=ut.objectValues(n);return ye(r,{expected:ut.joinValues(i),received:r.parsedType,code:ie.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=ut.objectValues(n);return ye(r,{received:r.data,code:ie.invalid_enum_value,options:i}),Le}return Lr(t.data)}get enum(){return this._def.values}}hg.create=(e,t)=>new hg({values:e,typeName:Oe.ZodNativeEnum,...Be(t)});class hf extends ze{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.promise&&n.common.async===!1)return ye(n,{code:ie.invalid_type,expected:he.promise,received:n.parsedType}),Le;const r=n.parsedType===he.promise?n.data:Promise.resolve(n.data);return Lr(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hf.create=(e,t)=>new hf({type:e,typeName:Oe.ZodPromise,...Be(t)});class No extends ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(i.type==="refinement"){const a=s=>{const l=i.refinement(s,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ig(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ig(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);ut.assertNever(i)}}No.create=(e,t,n)=>new No({schema:e,typeName:Oe.ZodEffects,effect:t,...Be(n)});No.createWithPreprocess=(e,t,n)=>new No({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Be(n)});class rs extends ze{_parse(t){return this._getType(t)===he.undefined?Lr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:Oe.ZodOptional,...Be(t)});class rc extends ze{_parse(t){return this._getType(t)===he.null?Lr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rc.create=(e,t)=>new rc({innerType:e,typeName:Oe.ZodNullable,...Be(t)});class pg extends ze{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===he.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}pg.create=(e,t)=>new pg({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});class f1 extends ze{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return l1(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ko(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ko(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}f1.create=(e,t)=>new f1({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});class h1 extends ze{_parse(t){if(this._getType(t)!==he.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}h1.create=e=>new h1({typeName:Oe.ZodNaN,...Be(e)});const aoe=Symbol("zod_brand");class dL extends ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class _m extends ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Le:o.status==="dirty"?(n.dirty(),uL(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new _m({in:t,out:n,typeName:Oe.ZodPipeline})}}class p1 extends ze{_parse(t){const n=this._def.innerType._parse(t);return ig(n)&&(n.value=Object.freeze(n.value)),n}}p1.create=(e,t)=>new p1({innerType:e,typeName:Oe.ZodReadonly,...Be(t)});const fL=(e,t={},n)=>e?ff.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:l})}}):ff.create(),soe={object:Qt.lazycreate};var Oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Oe||(Oe={}));const loe=(e,t={message:`Input not instance of ${e.name}`})=>fL(n=>n instanceof e,t),hL=Eo.create,pL=Pl.create,uoe=h1.create,coe=kl.create,gL=og.create,doe=tc.create,foe=u1.create,hoe=ag.create,poe=sg.create,goe=ff.create,moe=zu.create,yoe=gs.create,voe=c1.create,boe=Io.create,_oe=Qt.create,Soe=Qt.strictCreate,xoe=lg.create,woe=l_.create,Coe=ug.create,Eoe=xa.create,Toe=cg.create,Aoe=d1.create,Poe=nc.create,koe=$d.create,Ioe=dg.create,Moe=fg.create,Roe=Il.create,Ooe=hg.create,$oe=hf.create,C6=No.create,Noe=rs.create,Doe=rc.create,Loe=No.createWithPreprocess,Foe=_m.create,Boe=()=>hL().optional(),zoe=()=>pL().optional(),Voe=()=>gL().optional(),joe={string:e=>Eo.create({...e,coerce:!0}),number:e=>Pl.create({...e,coerce:!0}),boolean:e=>og.create({...e,coerce:!0}),bigint:e=>kl.create({...e,coerce:!0}),date:e=>tc.create({...e,coerce:!0})},Uoe=Le;var F=Object.freeze({__proto__:null,defaultErrorMap:rg,setErrorMap:Wie,getErrorMap:a1,makeIssue:s1,EMPTY_PATH:Kie,addIssueToContext:ye,ParseStatus:_r,INVALID:Le,DIRTY:uL,OK:Lr,isAborted:v5,isDirty:b5,isValid:ig,isAsync:l1,get util(){return ut},get objectUtil(){return y5},ZodParsedType:he,getParsedType:Zs,ZodType:ze,ZodString:Eo,ZodNumber:Pl,ZodBigInt:kl,ZodBoolean:og,ZodDate:tc,ZodSymbol:u1,ZodUndefined:ag,ZodNull:sg,ZodAny:ff,ZodUnknown:zu,ZodNever:gs,ZodVoid:c1,ZodArray:Io,ZodObject:Qt,ZodUnion:lg,ZodDiscriminatedUnion:l_,ZodIntersection:ug,ZodTuple:xa,ZodRecord:cg,ZodMap:d1,ZodSet:nc,ZodFunction:$d,ZodLazy:dg,ZodLiteral:fg,ZodEnum:Il,ZodNativeEnum:hg,ZodPromise:hf,ZodEffects:No,ZodTransformer:No,ZodOptional:rs,ZodNullable:rc,ZodDefault:pg,ZodCatch:f1,ZodNaN:h1,BRAND:aoe,ZodBranded:dL,ZodPipeline:_m,ZodReadonly:p1,custom:fL,Schema:ze,ZodSchema:ze,late:soe,get ZodFirstPartyTypeKind(){return Oe},coerce:joe,any:goe,array:boe,bigint:coe,boolean:gL,date:doe,discriminatedUnion:woe,effect:C6,enum:Roe,function:koe,instanceof:loe,intersection:Coe,lazy:Ioe,literal:Moe,map:Aoe,nan:uoe,nativeEnum:Ooe,never:yoe,null:poe,nullable:Doe,number:pL,object:_oe,oboolean:Voe,onumber:zoe,optional:Noe,ostring:Boe,pipeline:Foe,preprocess:Loe,promise:$oe,record:Toe,set:Poe,strictObject:Soe,string:hL,symbol:foe,transformer:C6,tuple:Eoe,undefined:hoe,union:xoe,unknown:moe,void:voe,NEVER:Uoe,ZodIssueCode:ie,quotelessJson:qie,ZodError:ko});const Goe=F.string(),NLe=e=>Goe.safeParse(e).success,Hoe=F.string(),DLe=e=>Hoe.safeParse(e).success,qoe=F.string(),LLe=e=>qoe.safeParse(e).success,Woe=F.string(),FLe=e=>Woe.safeParse(e).success,Koe=F.number().int().min(1),BLe=e=>Koe.safeParse(e).success,Xoe=F.number().min(1),zLe=e=>Xoe.safeParse(e).success,mL=F.enum(["euler","deis","ddim","ddpm","dpmpp_2s","dpmpp_2m","dpmpp_2m_sde","dpmpp_sde","heun","kdpm_2","lms","pndm","unipc","euler_k","dpmpp_2s_k","dpmpp_2m_k","dpmpp_2m_sde_k","dpmpp_sde_k","heun_k","lms_k","euler_a","kdpm_2_a","lcm"]),VLe=e=>mL.safeParse(e).success,jLe={euler:"Euler",deis:"DEIS",ddim:"DDIM",ddpm:"DDPM",dpmpp_sde:"DPM++ SDE",dpmpp_2s:"DPM++ 2S",dpmpp_2m:"DPM++ 2M",dpmpp_2m_sde:"DPM++ 2M SDE",heun:"Heun",kdpm_2:"KDPM 2",lms:"LMS",pndm:"PNDM",unipc:"UniPC",euler_k:"Euler Karras",dpmpp_sde_k:"DPM++ SDE Karras",dpmpp_2s_k:"DPM++ 2S Karras",dpmpp_2m_k:"DPM++ 2M Karras",dpmpp_2m_sde_k:"DPM++ 2M SDE Karras",heun_k:"Heun Karras",lms_k:"LMS Karras",euler_a:"Euler Ancestral",kdpm_2_a:"KDPM 2 Ancestral",lcm:"LCM"},Qoe=F.number().int().min(0).max(hp),ULe=e=>Qoe.safeParse(e).success,yL=F.number().multipleOf(8).min(64),GLe=e=>yL.safeParse(e).success,vL=F.number().multipleOf(8).min(64),HLe=e=>vL.safeParse(e).success;F.tuple([yL,vL]);const ql=F.enum(["any","sd-1","sd-2","sdxl","sdxl-refiner"]),u_=F.object({model_name:F.string().min(1),base_model:ql,model_type:F.literal("main")}),qLe=e=>u_.safeParse(e).success,$E=F.object({model_name:F.string().min(1),base_model:F.literal("sdxl-refiner"),model_type:F.literal("main")}),WLe=e=>$E.safeParse(e).success,bL=F.object({model_name:F.string().min(1),base_model:ql,model_type:F.literal("onnx")}),Sm=F.union([u_,bL]),_L=F.object({model_name:F.string().min(1),base_model:ql}),KLe=e=>_L.safeParse(e).success,Yoe=F.object({model_name:F.string().min(1),base_model:ql}),XLe=e=>Yoe.safeParse(e).success,Zoe=F.object({model_name:F.string().min(1),base_model:ql}),QLe=e=>Zoe.safeParse(e).success,Joe=F.object({model_name:F.string().min(1),base_model:ql}),eae=F.object({model_name:F.string().min(1),base_model:ql}),YLe=e=>eae.safeParse(e).success,ZLe=e=>Joe.safeParse(e).success,tae=F.number().min(0).max(1),JLe=e=>tae.safeParse(e).success;F.enum(["fp16","fp32"]);const nae=F.enum(["ESRGAN","bilinear"]),eFe=e=>nae.safeParse(e).success,rae=F.number().min(1).max(10),tFe=e=>rae.safeParse(e).success,iae=F.number().min(1).max(10),nFe=e=>iae.safeParse(e).success,oae=F.number().min(0).max(1),rFe=e=>oae.safeParse(e).success;F.enum(["box","gaussian"]);F.enum(["unmasked","mask","edge"]);const aae=F.boolean(),iFe=e=>aae.safeParse(e).success&&e!==null&&e!==void 0,NE={hrfStrength:.45,hrfEnabled:!1,hrfMethod:"ESRGAN",cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,perlin:0,positivePrompt:"",negativePrompt:"",scheduler:"euler",maskBlur:16,maskBlurMethod:"box",canvasCoherenceMode:"unmasked",canvasCoherenceSteps:20,canvasCoherenceStrength:.3,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,infillTileSize:32,infillPatchmatchDownscaleSize:1,variationAmount:.1,width:512,shouldUseSymmetry:!1,horizontalSymmetrySteps:0,verticalSymmetrySteps:0,model:null,vae:null,vaePrecision:"fp32",seamlessXAxis:!1,seamlessYAxis:!1,clipSkip:0,shouldUseCpuNoise:!0,shouldShowAdvancedOptions:!1,aspectRatio:null,shouldLockAspectRatio:!1},sae=NE,SL=Wt({name:"generation",initialState:sae,reducers:{setPositivePrompt:(e,t)=>{e.positivePrompt=t.payload},setNegativePrompt:(e,t)=>{e.negativePrompt=t.payload},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},clampSymmetrySteps:e=>{e.horizontalSymmetrySteps=al(e.horizontalSymmetrySteps,0,e.steps),e.verticalSymmetrySteps=al(e.verticalSymmetrySteps,0,e.steps)},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},toggleSize:e=>{const[t,n]=[e.width,e.height];e.width=n,e.height=t},setScheduler:(e,t)=>{e.scheduler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setSeamlessXAxis:(e,t)=>{e.seamlessXAxis=t.payload},setSeamlessYAxis:(e,t)=>{e.seamlessYAxis=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},resetParametersState:e=>({...e,...NE}),setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setMaskBlur:(e,t)=>{e.maskBlur=t.payload},setMaskBlurMethod:(e,t)=>{e.maskBlurMethod=t.payload},setCanvasCoherenceMode:(e,t)=>{e.canvasCoherenceMode=t.payload},setCanvasCoherenceSteps:(e,t)=>{e.canvasCoherenceSteps=t.payload},setCanvasCoherenceStrength:(e,t)=>{e.canvasCoherenceStrength=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload},setInfillTileSize:(e,t)=>{e.infillTileSize=t.payload},setInfillPatchmatchDownscaleSize:(e,t)=>{e.infillPatchmatchDownscaleSize=t.payload},setShouldUseSymmetry:(e,t)=>{e.shouldUseSymmetry=t.payload},setHorizontalSymmetrySteps:(e,t)=>{e.horizontalSymmetrySteps=t.payload},setVerticalSymmetrySteps:(e,t)=>{e.verticalSymmetrySteps=t.payload},initialImageChanged:(e,t)=>{const{image_name:n,width:r,height:i}=t.payload;e.initialImage={imageName:n,width:r,height:i}},modelChanged:(e,t)=>{if(e.model=t.payload,e.model===null)return;const{maxClip:n}=Gie[e.model.base_model];e.clipSkip=al(e.clipSkip,0,n)},vaeSelected:(e,t)=>{e.vae=t.payload},vaePrecisionChanged:(e,t)=>{e.vaePrecision=t.payload},setClipSkip:(e,t)=>{e.clipSkip=t.payload},setHrfStrength:(e,t)=>{e.hrfStrength=t.payload},setHrfEnabled:(e,t)=>{e.hrfEnabled=t.payload},setHrfMethod:(e,t)=>{e.hrfMethod=t.payload},shouldUseCpuNoiseChanged:(e,t)=>{e.shouldUseCpuNoise=t.payload},setAspectRatio:(e,t)=>{const n=t.payload;e.aspectRatio=n,n&&(e.height=Rr(e.width/n,8))},setShouldLockAspectRatio:(e,t)=>{e.shouldLockAspectRatio=t.payload}},extraReducers:e=>{e.addCase(Qre,(t,n)=>{var i;const r=(i=n.payload.sd)==null?void 0:i.defaultModel;if(r&&!t.model){const[o,a,s]=r.split("/"),l=u_.safeParse({model_name:s,base_model:o,model_type:a});l.success&&(t.model=l.data)}}),e.addMatcher(Uie,(t,n)=>{n.payload.type==="t2i_adapter"&&(t.width=Rr(t.width,64),t.height=Rr(t.height,64))})}}),{clampSymmetrySteps:oFe,clearInitialImage:DE,resetParametersState:aFe,resetSeed:sFe,setCfgScale:lFe,setWidth:E6,setHeight:T6,toggleSize:uFe,setImg2imgStrength:cFe,setInfillMethod:lae,setIterations:dFe,setPerlin:fFe,setPositivePrompt:uae,setNegativePrompt:hFe,setScheduler:pFe,setMaskBlur:gFe,setMaskBlurMethod:mFe,setCanvasCoherenceMode:yFe,setCanvasCoherenceSteps:vFe,setCanvasCoherenceStrength:bFe,setSeed:_Fe,setSeedWeights:SFe,setShouldFitToWidthHeight:xFe,setShouldGenerateVariations:wFe,setShouldRandomizeSeed:CFe,setSteps:EFe,setThreshold:TFe,setInfillTileSize:AFe,setInfillPatchmatchDownscaleSize:PFe,setVariationAmount:kFe,setShouldUseSymmetry:IFe,setHorizontalSymmetrySteps:MFe,setVerticalSymmetrySteps:RFe,initialImageChanged:c_,modelChanged:sl,vaeSelected:xL,setSeamlessXAxis:OFe,setSeamlessYAxis:$Fe,setClipSkip:NFe,setHrfEnabled:DFe,setHrfStrength:LFe,setHrfMethod:FFe,shouldUseCpuNoiseChanged:BFe,setAspectRatio:cae,setShouldLockAspectRatio:zFe,vaePrecisionChanged:VFe}=SL.actions,dae=SL.reducer,C0=(e,t,n,r,i,o,a)=>{const s=Math.floor(e/2-(n+i/2)*a),l=Math.floor(t/2-(r+o/2)*a);return{x:s,y:l}},E0=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r,s=Math.min(1,Math.min(o,a));return s||1},jFe=.999,UFe=.1,GFe=20,T0=.95,HFe=30,qFe=10,fae=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),Mc=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let a=t*n,s=448;for(;a1?(r.width=s,r.height=Rr(s/o,64)):o<1&&(r.height=s,r.width=Rr(s*o,64)),a=r.width*r.height;return r},hae=e=>({width:Rr(e.width,64),height:Rr(e.height,64)}),WFe=[{label:"Base",value:"base"},{label:"Mask",value:"mask"}],KFe=[{label:"None",value:"none"},{label:"Auto",value:"auto"},{label:"Manual",value:"manual"}],wL=e=>e.kind==="line"&&e.layer==="mask",XFe=e=>e.kind==="line"&&e.layer==="base",pae=e=>e.kind==="image"&&e.layer==="base",QFe=e=>e.kind==="fillRect"&&e.layer==="base",YFe=e=>e.kind==="eraseRect"&&e.layer==="base",gae=e=>e.kind==="line";let Tr=[],Pa=(e,t)=>{let n=[],r={get(){return r.lc||r.listen(()=>{})(),r.value},l:t||0,lc:0,listen(i,o){return r.lc=n.push(i,o||r.l)/2,()=>{let a=n.indexOf(i);~a&&(n.splice(a,2),--r.lc||r.off())}},notify(i){let o=!Tr.length;for(let a=0;a(e.events=e.events||{},e.events[n+P0]||(e.events[n+P0]=r(i=>{e.events[n].reduceRight((o,a)=>(a(o),o),{shared:{},...i})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let i=e.events[n],o=i.indexOf(t);i.splice(o,1),i.length||(delete e.events[n],e.events[n+P0](),delete e.events[n+P0])}),vae=1e3,bae=(e,t)=>yae(e,r=>{let i=t(r);i&&e.events[A0].push(i)},mae,r=>{let i=e.listen;e.listen=(...a)=>(!e.lc&&!e.active&&(e.active=!0,r()),i(...a));let o=e.off;return e.events[A0]=[],e.off=()=>{o(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let a of e.events[A0])a();e.events[A0]=[]}},vae)},()=>{e.listen=i,e.off=o}}),_ae=(e,t)=>{Array.isArray(e)||(e=[e]);let n,r=()=>{let o=e.map(a=>a.get());(n===void 0||o.some((a,s)=>a!==n[s]))&&(n=o,i.set(t(...o)))},i=Pa(void 0,Math.max(...e.map(o=>o.l))+1);return bae(i,()=>{let o=e.map(a=>a.listen(r,i.l));return r(),()=>{for(let a of o)a()}}),i};const CL="default",Dn=Pa(CL),Sae={listCursor:void 0,listPriority:void 0,selectedQueueItem:void 0,resumeProcessorOnEnqueue:!0},xae=Sae,EL=Wt({name:"queue",initialState:xae,reducers:{listCursorChanged:(e,t)=>{e.listCursor=t.payload},listPriorityChanged:(e,t)=>{e.listPriority=t.payload},listParamsReset:e=>{e.listCursor=void 0,e.listPriority=void 0},queueItemSelectionToggled:(e,t)=>{e.selectedQueueItem===t.payload?e.selectedQueueItem=void 0:e.selectedQueueItem=t.payload},resumeProcessorOnEnqueueChanged:(e,t)=>{e.resumeProcessorOnEnqueue=t.payload}}}),{listCursorChanged:ZFe,listPriorityChanged:JFe,listParamsReset:wae,queueItemSelectionToggled:eBe,resumeProcessorOnEnqueueChanged:tBe}=EL.actions,Cae=EL.reducer,TL="%[a-f0-9]{2}",A6=new RegExp("("+TL+")|([^%]+?)","gi"),P6=new RegExp("("+TL+")+","gi");function S5(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],S5(n),S5(r))}function Eae(e){try{return decodeURIComponent(e)}catch{let t=e.match(A6)||[];for(let n=1;ne==null,Iae=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),x5=Symbol("encodeFragmentIdentifier");function Mae(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[Sn(t,e),"[",i,"]"].join("")]:[...n,[Sn(t,e),"[",Sn(i,e),"]=",Sn(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[Sn(t,e),"[]"].join("")]:[...n,[Sn(t,e),"[]=",Sn(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[Sn(t,e),":list="].join("")]:[...n,[Sn(t,e),":list=",Sn(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?r:(i=i===null?"":i,r.length===0?[[Sn(n,e),t,Sn(i,e)].join("")]:[[r,Sn(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,Sn(t,e)]:[...n,[Sn(t,e),"=",Sn(r,e)].join("")]}}function Rae(e){let t;switch(e.arrayFormat){case"index":return(n,r,i)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){i[n]=r;return}i[n]===void 0&&(i[n]={}),i[n][t[1]]=r};case"bracket":return(n,r,i)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"colon-list-separator":return(n,r,i)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"comma":case"separator":return(n,r,i)=>{const o=typeof r=="string"&&r.includes(e.arrayFormatSeparator),a=typeof r=="string"&&!o&&Ua(r,e).includes(e.arrayFormatSeparator);r=a?Ua(r,e):r;const s=o||a?r.split(e.arrayFormatSeparator).map(l=>Ua(l,e)):r===null?r:Ua(r,e);i[n]=s};case"bracket-separator":return(n,r,i)=>{const o=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!o){i[n]=r&&Ua(r,e);return}const a=r===null?[]:r.split(e.arrayFormatSeparator).map(s=>Ua(s,e));if(i[n]===void 0){i[n]=a;return}i[n]=[...i[n],...a]};default:return(n,r,i)=>{if(i[n]===void 0){i[n]=r;return}i[n]=[...[i[n]].flat(),r]}}}function PL(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Sn(e,t){return t.encode?t.strict?Iae(e):encodeURIComponent(e):e}function Ua(e,t){return t.decode?Aae(e):e}function kL(e){return Array.isArray(e)?e.sort():typeof e=="object"?kL(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function IL(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function Oae(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function k6(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function LE(e){e=IL(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function FE(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t},PL(t.arrayFormatSeparator);const n=Rae(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const i of e.split("&")){if(i==="")continue;const o=t.decode?i.replace(/\+/g," "):i;let[a,s]=AL(o,"=");a===void 0&&(a=o),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:Ua(s,t),n(Ua(a,t),s,r)}for(const[i,o]of Object.entries(r))if(typeof o=="object"&&o!==null)for(const[a,s]of Object.entries(o))o[a]=k6(s,t);else r[i]=k6(o,t);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((i,o)=>{const a=r[o];return a&&typeof a=="object"&&!Array.isArray(a)?i[o]=kL(a):i[o]=a,i},Object.create(null))}function ML(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},PL(t.arrayFormatSeparator);const n=a=>t.skipNull&&kae(e[a])||t.skipEmptyString&&e[a]==="",r=Mae(t),i={};for(const[a,s]of Object.entries(e))n(a)||(i[a]=s);const o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(a=>{const s=e[a];return s===void 0?"":s===null?Sn(a,t):Array.isArray(s)?s.length===0&&t.arrayFormat==="bracket-separator"?Sn(a,t)+"[]":s.reduce(r(a),[]).join("&"):Sn(a,t)+"="+Sn(s,t)}).filter(a=>a.length>0).join("&")}function RL(e,t){var i;t={decode:!0,...t};let[n,r]=AL(e,"#");return n===void 0&&(n=e),{url:((i=n==null?void 0:n.split("?"))==null?void 0:i[0])??"",query:FE(LE(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:Ua(r,t)}:{}}}function OL(e,t){t={encode:!0,strict:!0,[x5]:!0,...t};const n=IL(e.url).split("?")[0]||"",r=LE(e.url),i={...FE(r,{sort:!1}),...e.query};let o=ML(i,t);o&&(o=`?${o}`);let a=Oae(e.url);if(e.fragmentIdentifier){const s=new URL(n);s.hash=e.fragmentIdentifier,a=t[x5]?s.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${a}`}function $L(e,t,n){n={parseFragmentIdentifier:!0,[x5]:!1,...n};const{url:r,query:i,fragmentIdentifier:o}=RL(e,n);return OL({url:r,query:Pae(i,t),fragmentIdentifier:o},n)}function $ae(e,t,n){const r=Array.isArray(t)?i=>!t.includes(i):(i,o)=>!t(i,o);return $L(e,r,n)}const pp=Object.freeze(Object.defineProperty({__proto__:null,exclude:$ae,extract:LE,parse:FE,parseUrl:RL,pick:$L,stringify:ML,stringifyUrl:OL},Symbol.toStringTag,{value:"Module"}));var g1=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||navigator.onLine===void 0?!0:navigator.onLine}function Gae(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}var O6=$o;function LL(e,t){if(e===t||!(O6(e)&&O6(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,o=Array.isArray(t)?[]:{},a=0,s=n;a=200&&e.status<=299},qae=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function N6(e){if(!$o(e))return e;for(var t=sn({},e),n=0,r=Object.entries(t);n"u"&&s===$6&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(m,v){return v1(t,null,function(){var S,w,C,x,P,E,I,N,M,T,A,R,D,$,L,O,B,U,j,q,Y,Z,V,K,ee,re,fe,Se,Me,De,Ee,tt,ot,we,Xn,Vt;return g1(this,function(Ot){switch(Ot.label){case 0:return S=v.signal,w=v.getState,C=v.extra,x=v.endpoint,P=v.forced,E=v.type,N=typeof m=="string"?{url:m}:m,M=N.url,T=N.headers,A=T===void 0?new Headers(b.headers):T,R=N.params,D=R===void 0?void 0:R,$=N.responseHandler,L=$===void 0?g??"json":$,O=N.validateStatus,B=O===void 0?_??Hae:O,U=N.timeout,j=U===void 0?p:U,q=M6(N,["url","headers","params","responseHandler","validateStatus","timeout"]),Y=sn(la(sn({},b),{signal:S}),q),A=new Headers(N6(A)),Z=Y,[4,o(A,{getState:w,extra:C,endpoint:x,forced:P,type:E})];case 1:Z.headers=Ot.sent()||A,V=function(xt){return typeof xt=="object"&&($o(xt)||Array.isArray(xt)||typeof xt.toJSON=="function")},!Y.headers.has("content-type")&&V(Y.body)&&Y.headers.set("content-type",f),V(Y.body)&&c(Y.headers)&&(Y.body=JSON.stringify(Y.body,h)),D&&(K=~M.indexOf("?")?"&":"?",ee=l?l(D):new URLSearchParams(N6(D)),M+=K+ee),M=jae(r,M),re=new Request(M,Y),fe=new Request(M,Y),I={request:fe},Me=!1,De=j&&setTimeout(function(){Me=!0,v.abort()},j),Ot.label=2;case 2:return Ot.trys.push([2,4,5,6]),[4,s(re)];case 3:return Se=Ot.sent(),[3,6];case 4:return Ee=Ot.sent(),[2,{error:{status:Me?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Ee)},meta:I}];case 5:return De&&clearTimeout(De),[7];case 6:tt=Se.clone(),I.response=tt,we="",Ot.label=7;case 7:return Ot.trys.push([7,9,,10]),[4,Promise.all([y(Se,L).then(function(xt){return ot=xt},function(xt){return Xn=xt}),tt.text().then(function(xt){return we=xt},function(){})])];case 8:if(Ot.sent(),Xn)throw Xn;return[3,10];case 9:return Vt=Ot.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:Se.status,data:we,error:String(Vt)},meta:I}];case 10:return[2,B(Se,ot)?{data:ot,meta:I}:{error:{status:Se.status,data:ot},meta:I}]}})})};function y(m,v){return v1(this,null,function(){var S;return g1(this,function(w){switch(w.label){case 0:return typeof v=="function"?[2,v(m)]:(v==="content-type"&&(v=c(m.headers)?"json":"text"),v!=="json"?[3,2]:[4,m.text()]);case 1:return S=w.sent(),[2,S.length?JSON.parse(S):null];case 2:return[2,m.text()]}})})}}var D6=function(){function e(t,n){n===void 0&&(n=void 0),this.value=t,this.meta=n}return e}(),BE=ge("__rtkq/focused"),FL=ge("__rtkq/unfocused"),zE=ge("__rtkq/online"),BL=ge("__rtkq/offline"),wa;(function(e){e.query="query",e.mutation="mutation"})(wa||(wa={}));function zL(e){return e.type===wa.query}function Kae(e){return e.type===wa.mutation}function VE(e,t,n,r,i,o){return Xae(e)?e(t,n,r,i).map(w5).map(o):Array.isArray(e)?e.map(w5).map(o):[]}function Xae(e){return typeof e=="function"}function w5(e){return typeof e=="string"?{type:e}:e}function Lx(e){return e!=null}var gg=Symbol("forceQueryFn"),C5=function(e){return typeof e[gg]=="function"};function Qae(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,i=e.api,o=e.context,a=new Map,s=new Map,l=i.internalActions,u=l.unsubscribeQueryResult,c=l.removeMutationResult,d=l.updateSubscriptionOptions;return{buildInitiateQuery:y,buildInitiateMutation:m,getRunningQueryThunk:p,getRunningMutationThunk:g,getRunningQueriesThunk:_,getRunningMutationsThunk:b,getRunningOperationPromises:h,removalWarning:f};function f(){throw new Error(`This method had to be removed due to a conceptual bug in RTK. - 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.`)}function h(){typeof process<"u";var v=function(S){return Array.from(S.values()).flatMap(function(w){return w?Object.values(w):[]})};return m1(m1([],v(a)),v(s)).filter(Lx)}function p(v,S){return function(w){var C,x=o.endpointDefinitions[v],P=t({queryArgs:S,endpointDefinition:x,endpointName:v});return(C=a.get(w))==null?void 0:C[P]}}function g(v,S){return function(w){var C;return(C=s.get(w))==null?void 0:C[S]}}function _(){return function(v){return Object.values(a.get(v)||{}).filter(Lx)}}function b(){return function(v){return Object.values(s.get(v)||{}).filter(Lx)}}function y(v,S){var w=function(C,x){var P=x===void 0?{}:x,E=P.subscribe,I=E===void 0?!0:E,N=P.forceRefetch,M=P.subscriptionOptions,T=gg,A=P[T];return function(R,D){var $,L,O=t({queryArgs:C,endpointDefinition:S,endpointName:v}),B=n(($={type:"query",subscribe:I,forceRefetch:N,subscriptionOptions:M,endpointName:v,originalArgs:C,queryCacheKey:O},$[gg]=A,$)),U=i.endpoints[v].select(C),j=R(B),q=U(D()),Y=j.requestId,Z=j.abort,V=q.requestId!==Y,K=(L=a.get(R))==null?void 0:L[O],ee=function(){return U(D())},re=Object.assign(A?j.then(ee):V&&!K?Promise.resolve(q):Promise.all([K,j]).then(ee),{arg:C,requestId:Y,subscriptionOptions:M,queryCacheKey:O,abort:Z,unwrap:function(){return v1(this,null,function(){var Se;return g1(this,function(Me){switch(Me.label){case 0:return[4,re];case 1:if(Se=Me.sent(),Se.isError)throw Se.error;return[2,Se.data]}})})},refetch:function(){return R(w(C,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){I&&R(u({queryCacheKey:O,requestId:Y}))},updateSubscriptionOptions:function(Se){re.subscriptionOptions=Se,R(d({endpointName:v,requestId:Y,queryCacheKey:O,options:Se}))}});if(!K&&!V&&!A){var fe=a.get(R)||{};fe[O]=re,a.set(R,fe),re.then(function(){delete fe[O],Object.keys(fe).length||a.delete(R)})}return re}};return w}function m(v){return function(S,w){var C=w===void 0?{}:w,x=C.track,P=x===void 0?!0:x,E=C.fixedCacheKey;return function(I,N){var M=r({type:"mutation",endpointName:v,originalArgs:S,track:P,fixedCacheKey:E}),T=I(M),A=T.requestId,R=T.abort,D=T.unwrap,$=T.unwrap().then(function(U){return{data:U}}).catch(function(U){return{error:U}}),L=function(){I(c({requestId:A,fixedCacheKey:E}))},O=Object.assign($,{arg:T.arg,requestId:A,abort:R,unwrap:D,unsubscribe:L,reset:L}),B=s.get(I)||{};return s.set(I,B),B[A]=O,O.then(function(){delete B[A],Object.keys(B).length||s.delete(I)}),E&&(B[E]=O,O.then(function(){B[E]===O&&(delete B[E],Object.keys(B).length||s.delete(I))})),O}}}}function L6(e){return e}function Yae(e){var t=this,n=e.reducerPath,r=e.baseQuery,i=e.context.endpointDefinitions,o=e.serializeQueryArgs,a=e.api,s=e.assertTagType,l=function(v,S,w,C){return function(x,P){var E=i[v],I=o({queryArgs:S,endpointDefinition:E,endpointName:v});if(x(a.internalActions.queryResultPatched({queryCacheKey:I,patches:w})),!!C){var N=a.endpoints[v].select(S)(P()),M=VE(E.providesTags,N.data,void 0,S,{},s);x(a.internalActions.updateProvidedBy({queryCacheKey:I,providedTags:M}))}}},u=function(v,S,w,C){return C===void 0&&(C=!0),function(x,P){var E,I,N=a.endpoints[v],M=N.select(S)(P()),T={patches:[],inversePatches:[],undo:function(){return x(a.util.patchQueryData(v,S,T.inversePatches,C))}};if(M.status===Ht.uninitialized)return T;var A;if("data"in M)if(ti(M.data)){var R=nE(M.data,w),D=R[0],$=R[1],L=R[2];(E=T.patches).push.apply(E,$),(I=T.inversePatches).push.apply(I,L),A=D}else A=w(M.data),T.patches.push({op:"replace",path:[],value:A}),T.inversePatches.push({op:"replace",path:[],value:M.data});return x(a.util.patchQueryData(v,S,T.patches,C)),T}},c=function(v,S,w){return function(C){var x;return C(a.endpoints[v].initiate(S,(x={subscribe:!1,forceRefetch:!0},x[gg]=function(){return{data:w}},x)))}},d=function(v,S){return v1(t,[v,S],function(w,C){var x,P,E,I,N,M,T,A,R,D,$,L,O,B,U,j,q,Y,Z=C.signal,V=C.abort,K=C.rejectWithValue,ee=C.fulfillWithValue,re=C.dispatch,fe=C.getState,Se=C.extra;return g1(this,function(Me){switch(Me.label){case 0:x=i[w.endpointName],Me.label=1;case 1:return Me.trys.push([1,8,,13]),P=L6,E=void 0,I={signal:Z,abort:V,dispatch:re,getState:fe,extra:Se,endpoint:w.endpointName,type:w.type,forced:w.type==="query"?f(w,fe()):void 0},N=w.type==="query"?w[gg]:void 0,N?(E=N(),[3,6]):[3,2];case 2:return x.query?[4,r(x.query(w.originalArgs),I,x.extraOptions)]:[3,4];case 3:return E=Me.sent(),x.transformResponse&&(P=x.transformResponse),[3,6];case 4:return[4,x.queryFn(w.originalArgs,I,x.extraOptions,function(De){return r(De,I,x.extraOptions)})];case 5:E=Me.sent(),Me.label=6;case 6:if(typeof process<"u",E.error)throw new D6(E.error,E.meta);return $=ee,[4,P(E.data,E.meta,w.originalArgs)];case 7:return[2,$.apply(void 0,[Me.sent(),(q={fulfilledTimeStamp:Date.now(),baseQueryMeta:E.meta},q[ku]=!0,q)])];case 8:if(L=Me.sent(),O=L,!(O instanceof D6))return[3,12];B=L6,x.query&&x.transformErrorResponse&&(B=x.transformErrorResponse),Me.label=9;case 9:return Me.trys.push([9,11,,12]),U=K,[4,B(O.value,O.meta,w.originalArgs)];case 10:return[2,U.apply(void 0,[Me.sent(),(Y={baseQueryMeta:O.meta},Y[ku]=!0,Y)])];case 11:return j=Me.sent(),O=j,[3,12];case 12:throw typeof process<"u",console.error(O),O;case 13:return[2]}})})};function f(v,S){var w,C,x,P,E=(C=(w=S[n])==null?void 0:w.queries)==null?void 0:C[v.queryCacheKey],I=(x=S[n])==null?void 0:x.config.refetchOnMountOrArgChange,N=E==null?void 0:E.fulfilledTimeStamp,M=(P=v.forceRefetch)!=null?P:v.subscribe&&I;return M?M===!0||(Number(new Date)-Number(N))/1e3>=M:!1}var h=Xv(n+"/executeQuery",d,{getPendingMeta:function(){var v;return v={startedTimeStamp:Date.now()},v[ku]=!0,v},condition:function(v,S){var w=S.getState,C,x,P,E=w(),I=(x=(C=E[n])==null?void 0:C.queries)==null?void 0:x[v.queryCacheKey],N=I==null?void 0:I.fulfilledTimeStamp,M=v.originalArgs,T=I==null?void 0:I.originalArgs,A=i[v.endpointName];return C5(v)?!0:(I==null?void 0:I.status)==="pending"?!1:f(v,E)||zL(A)&&((P=A==null?void 0:A.forceRefetch)!=null&&P.call(A,{currentArg:M,previousArg:T,endpointState:I,state:E}))?!0:!N},dispatchConditionRejection:!0}),p=Xv(n+"/executeMutation",d,{getPendingMeta:function(){var v;return v={startedTimeStamp:Date.now()},v[ku]=!0,v}}),g=function(v){return"force"in v},_=function(v){return"ifOlderThan"in v},b=function(v,S,w){return function(C,x){var P=g(w)&&w.force,E=_(w)&&w.ifOlderThan,I=function(A){return A===void 0&&(A=!0),a.endpoints[v].initiate(S,{forceRefetch:A})},N=a.endpoints[v].select(S)(x());if(P)C(I());else if(E){var M=N==null?void 0:N.fulfilledTimeStamp;if(!M){C(I());return}var T=(Number(new Date)-Number(new Date(M)))/1e3>=E;T&&C(I())}else C(I(!1))}};function y(v){return function(S){var w,C;return((C=(w=S==null?void 0:S.meta)==null?void 0:w.arg)==null?void 0:C.endpointName)===v}}function m(v,S){return{matchPending:Pd(Ub(v),y(S)),matchFulfilled:Pd(Gl(v),y(S)),matchRejected:Pd(uf(v),y(S))}}return{queryThunk:h,mutationThunk:p,prefetch:b,updateQueryData:u,upsertQueryData:c,patchQueryData:l,buildMatchThunkActions:m}}function VL(e,t,n,r){return VE(n[e.meta.arg.endpointName][t],Gl(e)?e.payload:void 0,hm(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function k0(e,t,n){var r=e[t];r&&n(r)}function mg(e){var t;return(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)!=null?t:e.requestId}function F6(e,t,n){var r=e[mg(t)];r&&n(r)}var dh={};function Zae(e){var t=e.reducerPath,n=e.queryThunk,r=e.mutationThunk,i=e.context,o=i.endpointDefinitions,a=i.apiUid,s=i.extractRehydrationInfo,l=i.hasRehydrationInfo,u=e.assertTagType,c=e.config,d=ge(t+"/resetApiState"),f=Wt({name:t+"/queries",initialState:dh,reducers:{removeQueryResult:{reducer:function(S,w){var C=w.payload.queryCacheKey;delete S[C]},prepare:jc()},queryResultPatched:{reducer:function(S,w){var C=w.payload,x=C.queryCacheKey,P=C.patches;k0(S,x,function(E){E.data=t5(E.data,P.concat())})},prepare:jc()}},extraReducers:function(S){S.addCase(n.pending,function(w,C){var x=C.meta,P=C.meta.arg,E,I,N=C5(P);(P.subscribe||N)&&((I=w[E=P.queryCacheKey])!=null||(w[E]={status:Ht.uninitialized,endpointName:P.endpointName})),k0(w,P.queryCacheKey,function(M){M.status=Ht.pending,M.requestId=N&&M.requestId?M.requestId:x.requestId,P.originalArgs!==void 0&&(M.originalArgs=P.originalArgs),M.startedTimeStamp=x.startedTimeStamp})}).addCase(n.fulfilled,function(w,C){var x=C.meta,P=C.payload;k0(w,x.arg.queryCacheKey,function(E){var I;if(!(E.requestId!==x.requestId&&!C5(x.arg))){var N=o[x.arg.endpointName].merge;if(E.status=Ht.fulfilled,N)if(E.data!==void 0){var M=x.fulfilledTimeStamp,T=x.arg,A=x.baseQueryMeta,R=x.requestId,D=Ul(E.data,function($){return N($,P,{arg:T.originalArgs,baseQueryMeta:A,fulfilledTimeStamp:M,requestId:R})});E.data=D}else E.data=P;else E.data=(I=o[x.arg.endpointName].structuralSharing)==null||I?LL(Dr(E.data)?X4(E.data):E.data,P):P;delete E.error,E.fulfilledTimeStamp=x.fulfilledTimeStamp}})}).addCase(n.rejected,function(w,C){var x=C.meta,P=x.condition,E=x.arg,I=x.requestId,N=C.error,M=C.payload;k0(w,E.queryCacheKey,function(T){if(!P){if(T.requestId!==I)return;T.status=Ht.rejected,T.error=M??N}})}).addMatcher(l,function(w,C){for(var x=s(C).queries,P=0,E=Object.entries(x);P"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Sse:_se;GL.useSyncExternalStore=pf.useSyncExternalStore!==void 0?pf.useSyncExternalStore:xse;UL.exports=GL;var wse=UL.exports,HL={exports:{}},qL={};/** - * @license React - * use-sync-external-store-shim/with-selector.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 d_=k,Cse=wse;function Ese(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tse=typeof Object.is=="function"?Object.is:Ese,Ase=Cse.useSyncExternalStore,Pse=d_.useRef,kse=d_.useEffect,Ise=d_.useMemo,Mse=d_.useDebugValue;qL.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Pse(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Ise(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&a.hasValue){var p=a.value;if(i(p,h))return d=p}return d=h}if(p=d,Tse(c,h))return p;var g=r(h);return i!==void 0&&i(p,g)?p:(c=h,d=g)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var s=Ase(e,o[0],o[1]);return kse(function(){a.hasValue=!0,a.value=s},[s]),Mse(s),s};HL.exports=qL;var WL=HL.exports;const Rse=Bl(WL);function Ose(e){e()}let KL=Ose;const $se=e=>KL=e,Nse=()=>KL,H6=Symbol.for("react-redux-context"),q6=typeof globalThis<"u"?globalThis:{};function Dse(){var e;if(!k.createContext)return{};const t=(e=q6[H6])!=null?e:q6[H6]=new Map;let n=t.get(k.createContext);return n||(n=k.createContext(null),t.set(k.createContext,n)),n}const Ml=Dse();function jE(e=Ml){return function(){return k.useContext(e)}}const XL=jE(),Lse=()=>{throw new Error("uSES not initialized!")};let QL=Lse;const Fse=e=>{QL=e},Bse=(e,t)=>e===t;function zse(e=Ml){const t=e===Ml?XL:jE(e);return function(r,i={}){const{equalityFn:o=Bse,stabilityCheck:a=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:l,subscription:u,getServerState:c,stabilityCheck:d,noopCheck:f}=t();k.useRef(!0);const h=k.useCallback({[r.name](g){return r(g)}}[r.name],[r,d,a]),p=QL(u.addNestedSub,l.getState,c||l.getState,h,o);return k.useDebugValue(p),p}}const YL=zse();function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const W6={notify(){},get:()=>[]};function Zse(e,t){let n,r=W6,i=0,o=!1;function a(g){c();const _=r.subscribe(g);let b=!1;return()=>{b||(b=!0,_(),d())}}function s(){r.notify()}function l(){p.onStateChange&&p.onStateChange()}function u(){return o}function c(){i++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=Yse())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=W6)}function f(){o||(o=!0,c())}function h(){o&&(o=!1,d())}const p={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:u,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>r};return p}const Jse=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ele=Jse?k.useLayoutEffect:k.useEffect;function K6(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function _1(e,t){if(K6(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{const u=Zse(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),s=k.useMemo(()=>e.getState(),[e]);ele(()=>{const{subscription:u}=a;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[a,s]);const l=t||Ml;return k.createElement(l.Provider,{value:a},n)}function rF(e=Ml){const t=e===Ml?XL:jE(e);return function(){const{store:r}=t();return r}}const iF=rF();function nle(e=Ml){const t=e===Ml?iF:rF(e);return function(){return t().dispatch}}const oF=nle();Fse(WL.useSyncExternalStoreWithSelector);$se(mi.unstable_batchedUpdates);var rle=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n_le({headers:{...e?{Authorization:`Bearer ${e}`}:{},...n?{"project-id":n}:{}},baseUrl:`${t??""}`}));const Ele=["AppVersion","AppConfig","Board","BoardImagesTotal","BoardAssetsTotal","Image","ImageNameList","ImageList","ImageMetadata","ImageMetadataFromFile","IntermediatesCount","SessionQueueItem","SessionQueueStatus","SessionProcessorStatus","CurrentSessionQueueItem","NextSessionQueueItem","BatchStatus","InvocationCacheStatus","Model","T2IAdapterModel","MainModel","OnnxModel","VaeModel","IPAdapterModel","TextualInversionModel","ControlNetModel","LoRAModel","SDXLRefinerModel","Workflow"],kr="LIST",Tle=async(e,t,n)=>{const r=vg.get(),i=yg.get(),o=x1.get();return Wae({baseUrl:`${r??""}/api/v1`,prepareHeaders:s=>(i&&s.set("Authorization",`Bearer ${i}`),o&&s.set("project-id",o),s)})(e,t,n)},Do=vle({baseQuery:Tle,reducerPath:"api",tagTypes:Ele,endpoints:()=>({})}),Ale=e=>{const t=e?pp.stringify(e,{arrayFormat:"none"}):void 0;return t?`queue/${Dn.get()}/list?${t}`:`queue/${Dn.get()}/list`},xu=Ji({selectId:e=>e.item_id,sortComparer:(e,t)=>e.priority>t.priority?-1:e.priorityt.item_id?1:0}),un=Do.injectEndpoints({endpoints:e=>({enqueueBatch:e.mutation({query:t=>({url:`queue/${Dn.get()}/enqueue_batch`,body:t,method:"POST"}),invalidatesTags:["SessionQueueStatus","CurrentSessionQueueItem","NextSessionQueueItem"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,O0(r)}catch{}}}),resumeProcessor:e.mutation({query:()=>({url:`queue/${Dn.get()}/processor/resume`,method:"PUT"}),invalidatesTags:["CurrentSessionQueueItem","SessionQueueStatus"]}),pauseProcessor:e.mutation({query:()=>({url:`queue/${Dn.get()}/processor/pause`,method:"PUT"}),invalidatesTags:["CurrentSessionQueueItem","SessionQueueStatus"]}),pruneQueue:e.mutation({query:()=>({url:`queue/${Dn.get()}/prune`,method:"PUT"}),invalidatesTags:["SessionQueueStatus","BatchStatus"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,O0(r)}catch{}}}),clearQueue:e.mutation({query:()=>({url:`queue/${Dn.get()}/clear`,method:"PUT"}),invalidatesTags:["SessionQueueStatus","SessionProcessorStatus","BatchStatus","CurrentSessionQueueItem","NextSessionQueueItem"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,O0(r)}catch{}}}),getCurrentQueueItem:e.query({query:()=>({url:`queue/${Dn.get()}/current`,method:"GET"}),providesTags:t=>{const n=["CurrentSessionQueueItem"];return t&&n.push({type:"SessionQueueItem",id:t.item_id}),n}}),getNextQueueItem:e.query({query:()=>({url:`queue/${Dn.get()}/next`,method:"GET"}),providesTags:t=>{const n=["NextSessionQueueItem"];return t&&n.push({type:"SessionQueueItem",id:t.item_id}),n}}),getQueueStatus:e.query({query:()=>({url:`queue/${Dn.get()}/status`,method:"GET"}),providesTags:["SessionQueueStatus"]}),getBatchStatus:e.query({query:({batch_id:t})=>({url:`queue/${Dn.get()}/b/${t}/status`,method:"GET"}),providesTags:t=>t?[{type:"BatchStatus",id:t.batch_id}]:[]}),getQueueItem:e.query({query:t=>({url:`queue/${Dn.get()}/i/${t}`,method:"GET"}),providesTags:t=>t?[{type:"SessionQueueItem",id:t.item_id}]:[]}),cancelQueueItem:e.mutation({query:t=>({url:`queue/${Dn.get()}/i/${t}/cancel`,method:"PUT"}),onQueryStarted:async(t,{dispatch:n,queryFulfilled:r})=>{try{const{data:i}=await r;n(un.util.updateQueryData("listQueueItems",void 0,o=>{xu.updateOne(o,{id:t,changes:{status:i.status,completed_at:i.completed_at,updated_at:i.updated_at}})}))}catch{}},invalidatesTags:t=>t?[{type:"SessionQueueItem",id:t.item_id},{type:"BatchStatus",id:t.batch_id}]:[]}),cancelByBatchIds:e.mutation({query:t=>({url:`queue/${Dn.get()}/cancel_by_batch_ids`,method:"PUT",body:t}),onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,O0(r)}catch{}},invalidatesTags:["SessionQueueStatus","BatchStatus"]}),listQueueItems:e.query({query:t=>({url:Ale(t),method:"GET"}),serializeQueryArgs:()=>`queue/${Dn.get()}/list`,transformResponse:t=>xu.addMany(xu.getInitialState({has_more:t.has_more}),t.items),merge:(t,n)=>{xu.addMany(t,xu.getSelectors().selectAll(n)),t.has_more=n.has_more},forceRefetch:({currentArg:t,previousArg:n})=>t!==n,keepUnusedDataFor:60*5})})}),{useCancelByBatchIdsMutation:nBe,useEnqueueBatchMutation:rBe,usePauseProcessorMutation:iBe,useResumeProcessorMutation:oBe,useClearQueueMutation:aBe,usePruneQueueMutation:sBe,useGetCurrentQueueItemQuery:lBe,useGetQueueStatusQuery:uBe,useGetQueueItemQuery:cBe,useGetNextQueueItemQuery:dBe,useListQueueItemsQuery:fBe,useCancelQueueItemMutation:hBe,useGetBatchStatusQuery:pBe}=un,O0=e=>{e(un.util.updateQueryData("listQueueItems",void 0,t=>{xu.removeAll(t),t.has_more=!1})),e(wae()),e(un.endpoints.listQueueItems.initiate(void 0))},zh={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},aF={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"none",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,futureLayerStates:[],isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:zh,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAntialias:!0,shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush",batchIds:[]},sF=Wt({name:"canvas",initialState:aF,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!wL(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{width:r,height:i}=n,{stageDimensions:o}=e,a={width:b0(al(r,64,512),64),height:b0(al(i,64,512),64)},s={x:Rr(r/2-a.width/2,64),y:Rr(i/2-a.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const c=Mc(a);e.scaledBoundingBoxDimensions=c}e.boundingBoxDimensions=a,e.boundingBoxCoordinates=s,e.pastLayerStates.push(Ye(e.layerState)),e.layerState={...Ye(zh),objects:[{kind:"image",layer:"base",x:0,y:0,width:r,height:i,imageName:n.image_name}]},e.futureLayerStates=[],e.batchIds=[];const l=E0(o.width,o.height,r,i,T0),u=C0(o.width,o.height,0,0,r,i,l);e.stageScale=l,e.stageCoordinates=u},setBoundingBoxDimensions:(e,t)=>{const n=hae(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=Mc(n);e.scaledBoundingBoxDimensions=r}},flipBoundingBoxAxes:e=>{const[t,n]=[e.boundingBoxDimensions.width,e.boundingBoxDimensions.height],[r,i]=[e.scaledBoundingBoxDimensions.width,e.scaledBoundingBoxDimensions.height];e.boundingBoxDimensions={width:n,height:t},e.scaledBoundingBoxDimensions={width:i,height:r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=fae(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},canvasBatchIdAdded:(e,t)=>{e.batchIds.push(t.payload)},canvasBatchIdsReset:e=>{e.batchIds=[]},stagingAreaInitialized:(e,t)=>{const{boundingBox:n}=t.payload;e.layerState.stagingArea={boundingBox:n,images:[],selectedImageIndex:-1}},addImageToStagingArea:(e,t)=>{const n=t.payload;!n||!e.layerState.stagingArea.boundingBox||(e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...e.layerState.stagingArea.boundingBox,imageName:n.image_name}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea=Ye(Ye(zh)).stagingArea,e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0,e.batchIds=[]},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:a}=e;if(n==="move"||n==="colorPicker")return;const s=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(gae);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(Ye(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.layerState=Ye(zh),e.futureLayerStates=[],e.batchIds=[]},canvasResized:(e,t)=>{const{width:n,height:r}=t.payload,i={width:Math.floor(n),height:Math.floor(r)};if(e.stageDimensions=i,!e.layerState.objects.find(pae)){const o=E0(i.width,i.height,512,512,T0),a=C0(i.width,i.height,0,0,512,512,o),s={width:512,height:512};if(e.stageScale=o,e.stageCoordinates=a,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=s,e.boundingBoxScaleMethod==="auto"){const l=Mc(s);e.scaledBoundingBoxDimensions=l}}},resetCanvasView:(e,t)=>{const{contentRect:n,shouldScaleTo1:r}=t.payload,{stageDimensions:{width:i,height:o}}=e,{x:a,y:s,width:l,height:u}=n;if(l!==0&&u!==0){const c=r?1:E0(i,o,l,u,T0),d=C0(i,o,a,s,l,u,c);e.stageScale=c,e.stageCoordinates=d}else{const c=E0(i,o,512,512,T0),d=C0(i,o,0,0,512,512,c),f={width:512,height:512};if(e.stageScale=c,e.stageCoordinates=d,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=f,e.boundingBoxScaleMethod==="auto"){const h=Mc(f);e.scaledBoundingBoxDimensions=h}}},nextStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const t=e.layerState.stagingArea.selectedImageIndex+1,n=e.layerState.stagingArea.images.length-1;e.layerState.stagingArea.selectedImageIndex=t>n?0:t},prevStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const t=e.layerState.stagingArea.selectedImageIndex-1,n=e.layerState.stagingArea.images.length-1;e.layerState.stagingArea.selectedImageIndex=t<0?n:t},commitStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const r=t[n];r&&e.layerState.objects.push({...r}),e.layerState.stagingArea=Ye(zh).stagingArea,e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0,e.batchIds=[]},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:b0(al(o,64,512),64),height:b0(al(a,64,512),64)},l={x:Rr(o/2-s.width/2,64),y:Rr(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=Mc(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=Mc(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldAntialias:(e,t)=>{e.shouldAntialias=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(Ye(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}},extraReducers:e=>{e.addCase(o_,(t,n)=>{const r=n.payload.data.batch_status;t.batchIds.includes(r.batch_id)&&r.in_progress===0&&r.pending===0&&(t.batchIds=t.batchIds.filter(i=>i!==r.batch_id))}),e.addCase(cae,(t,n)=>{const r=n.payload;r&&(t.boundingBoxDimensions.height=Rr(t.boundingBoxDimensions.width/r,64),t.scaledBoundingBoxDimensions.height=Rr(t.scaledBoundingBoxDimensions.width/r,64))}),e.addMatcher(un.endpoints.clearQueue.matchFulfilled,t=>{t.batchIds=[]}),e.addMatcher(un.endpoints.cancelByBatchIds.matchFulfilled,(t,n)=>{t.batchIds=t.batchIds.filter(r=>!n.meta.arg.originalArgs.batch_ids.includes(r))})}}),{addEraseRect:gBe,addFillRect:mBe,addImageToStagingArea:Ple,addLine:yBe,addPointToCurrentLine:vBe,clearCanvasHistory:bBe,clearMask:_Be,commitColorPickerColor:SBe,commitStagingAreaImage:kle,discardStagedImages:Ile,fitBoundingBoxToStage:xBe,mouseLeftCanvas:wBe,nextStagingAreaImage:CBe,prevStagingAreaImage:EBe,redo:TBe,resetCanvas:KE,resetCanvasInteractionState:ABe,resetCanvasView:PBe,setBoundingBoxCoordinates:kBe,setBoundingBoxDimensions:Z6,setBoundingBoxPreviewFill:IBe,setBoundingBoxScaleMethod:MBe,flipBoundingBoxAxes:RBe,setBrushColor:OBe,setBrushSize:$Be,setColorPickerColor:NBe,setCursorPosition:DBe,setInitialCanvasImage:lF,setIsDrawing:LBe,setIsMaskEnabled:FBe,setIsMouseOverBoundingBox:BBe,setIsMoveBoundingBoxKeyHeld:zBe,setIsMoveStageKeyHeld:VBe,setIsMovingBoundingBox:jBe,setIsMovingStage:UBe,setIsTransformingBoundingBox:GBe,setLayer:HBe,setMaskColor:qBe,setMergedCanvas:Mle,setShouldAutoSave:WBe,setShouldCropToBoundingBoxOnSave:KBe,setShouldDarkenOutsideBoundingBox:XBe,setShouldLockBoundingBox:QBe,setShouldPreserveMaskedArea:YBe,setShouldShowBoundingBox:ZBe,setShouldShowBrush:JBe,setShouldShowBrushPreview:eze,setShouldShowCanvasDebugInfo:tze,setShouldShowCheckboardTransparency:nze,setShouldShowGrid:rze,setShouldShowIntermediates:ize,setShouldShowStagingImage:oze,setShouldShowStagingOutline:aze,setShouldSnapToGrid:sze,setStageCoordinates:lze,setStageScale:uze,setTool:cze,toggleShouldLockBoundingBox:dze,toggleTool:fze,undo:hze,setScaledBoundingBoxDimensions:pze,setShouldRestrictStrokesToBox:gze,stagingAreaInitialized:Rle,setShouldAntialias:mze,canvasResized:yze,canvasBatchIdAdded:Ole,canvasBatchIdsReset:$le}=sF.actions,Nle=sF.reducer,Dle={isModalOpen:!1,imagesToChange:[]},uF=Wt({name:"changeBoardModal",initialState:Dle,reducers:{isModalOpenChanged:(e,t)=>{e.isModalOpen=t.payload},imagesToChangeSelected:(e,t)=>{e.imagesToChange=t.payload},changeBoardReset:e=>{e.imagesToChange=[],e.isModalOpen=!1}}}),{isModalOpenChanged:vze,imagesToChangeSelected:bze,changeBoardReset:_ze}=uF.actions,Lle=uF.reducer,Fle={imagesToDelete:[],isModalOpen:!1},cF=Wt({name:"deleteImageModal",initialState:Fle,reducers:{isModalOpenChanged:(e,t)=>{e.isModalOpen=t.payload},imagesToDeleteSelected:(e,t)=>{e.imagesToDelete=t.payload},imageDeletionCanceled:e=>{e.imagesToDelete=[],e.isModalOpen=!1}}}),{isModalOpenChanged:XE,imagesToDeleteSelected:Ble,imageDeletionCanceled:Sze}=cF.actions,zle=cF.reducer,QE={maxPrompts:100,combinatorial:!0,prompts:[],parsingError:void 0,isError:!1,isLoading:!1,seedBehaviour:"PER_ITERATION"},Vle=QE,dF=Wt({name:"dynamicPrompts",initialState:Vle,reducers:{maxPromptsChanged:(e,t)=>{e.maxPrompts=t.payload},maxPromptsReset:e=>{e.maxPrompts=QE.maxPrompts},combinatorialToggled:e=>{e.combinatorial=!e.combinatorial},promptsChanged:(e,t)=>{e.prompts=t.payload},parsingErrorChanged:(e,t)=>{e.parsingError=t.payload},isErrorChanged:(e,t)=>{e.isError=t.payload},isLoadingChanged:(e,t)=>{e.isLoading=t.payload},seedBehaviourChanged:(e,t)=>{e.seedBehaviour=t.payload}}}),{maxPromptsChanged:jle,maxPromptsReset:Ule,combinatorialToggled:Gle,promptsChanged:Hle,parsingErrorChanged:qle,isErrorChanged:J6,isLoadingChanged:Ux,seedBehaviourChanged:xze}=dF.actions,Wle=dF.reducer,Fn=["general"],Pr=["control","mask","user","other"],Kle=100,$0=20,Xle=(e,t)=>{const n=new Date(e),r=new Date(t);return n>r?1:n{if(!e)return!1;const n=bg.selectAll(e);if(n.length<=1)return!0;const r=[],i=[];for(let o=0;o=s}else{const o=i[i.length-1];if(!o)return!1;const a=new Date(t.created_at),s=new Date(o.created_at);return a>=s}},Ni=e=>Fn.includes(e.image_category)?Fn:Pr,Lt=Ji({selectId:e=>e.image_name,sortComparer:(e,t)=>e.starred&&!t.starred?-1:!e.starred&&t.starred?1:Xle(t.created_at,e.created_at)}),bg=Lt.getSelectors(),Vi=e=>`images/?${pp.stringify(e,{arrayFormat:"none"})}`,Qe=Do.injectEndpoints({endpoints:e=>({listBoards:e.query({query:t=>({url:"boards/",params:t}),providesTags:t=>{const n=[{type:"Board",id:kr}];return t&&n.push(...t.items.map(({board_id:r})=>({type:"Board",id:r}))),n}}),listAllBoards:e.query({query:()=>({url:"boards/",params:{all:!0}}),providesTags:t=>{const n=[{type:"Board",id:kr}];return t&&n.push(...t.map(({board_id:r})=>({type:"Board",id:r}))),n}}),listAllImageNamesForBoard:e.query({query:t=>({url:`boards/${t}/image_names`}),providesTags:(t,n,r)=>[{type:"ImageNameList",id:r}],keepUnusedDataFor:0}),getBoardImagesTotal:e.query({query:t=>({url:Vi({board_id:t??"none",categories:Fn,is_intermediate:!1,limit:0,offset:0}),method:"GET"}),providesTags:(t,n,r)=>[{type:"BoardImagesTotal",id:r??"none"}],transformResponse:t=>({total:t.total})}),getBoardAssetsTotal:e.query({query:t=>({url:Vi({board_id:t??"none",categories:Pr,is_intermediate:!1,limit:0,offset:0}),method:"GET"}),providesTags:(t,n,r)=>[{type:"BoardAssetsTotal",id:r??"none"}],transformResponse:t=>({total:t.total})}),createBoard:e.mutation({query:t=>({url:"boards/",method:"POST",params:{board_name:t}}),invalidatesTags:[{type:"Board",id:kr}]}),updateBoard:e.mutation({query:({board_id:t,changes:n})=>({url:`boards/${t}`,method:"PATCH",body:n}),invalidatesTags:(t,n,r)=>[{type:"Board",id:r.board_id}]})})}),{useListBoardsQuery:wze,useListAllBoardsQuery:Cze,useGetBoardImagesTotalQuery:Eze,useGetBoardAssetsTotalQuery:Tze,useCreateBoardMutation:Aze,useUpdateBoardMutation:Pze,useListAllImageNamesForBoardQuery:kze}=Qe;var fF={},R_={},O_={};Object.defineProperty(O_,"__esModule",{value:!0});O_.createLogMethods=void 0;var Qle=function(){return{debug:console.debug.bind(console),error:console.error.bind(console),fatal:console.error.bind(console),info:console.info.bind(console),trace:console.debug.bind(console),warn:console.warn.bind(console)}};O_.createLogMethods=Qle;var YE={},$_={};Object.defineProperty($_,"__esModule",{value:!0});$_.boolean=void 0;const Yle=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};$_.boolean=Yle;var N_={};Object.defineProperty(N_,"__esModule",{value:!0});N_.isBooleanable=void 0;const Zle=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};N_.isBooleanable=Zle;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isBooleanable=e.boolean=void 0;const t=$_;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return t.boolean}});const n=N_;Object.defineProperty(e,"isBooleanable",{enumerable:!0,get:function(){return n.isBooleanable}})})(YE);var eI=Object.prototype.toString,hF=function(t){var n=eI.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&eI.call(t.callee)==="[object Function]"),r},Gx,tI;function Jle(){if(tI)return Gx;tI=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=hF,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(f){var h=f.constructor;return h&&h.prototype===f},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!u["$"+f]&&t.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{l(window[f])}catch{return!0}}catch{return!0}return!1}(),d=function(f){if(typeof window>"u"||!c)return l(f);try{return l(f)}catch{return!1}};e=function(h){var p=h!==null&&typeof h=="object",g=n.call(h)==="[object Function]",_=r(h),b=p&&n.call(h)==="[object String]",y=[];if(!p&&!g&&!_)throw new TypeError("Object.keys called on a non-object");var m=a&&g;if(b&&h.length>0&&!t.call(h,0))for(var v=0;v0)for(var S=0;S"u"||!Bn?We:Bn(Uint8Array),ju={"%AggregateError%":typeof AggregateError>"u"?We:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?We:ArrayBuffer,"%ArrayIteratorPrototype%":Rc&&Bn?Bn([][Symbol.iterator]()):We,"%AsyncFromSyncIteratorPrototype%":We,"%AsyncFunction%":qc,"%AsyncGenerator%":qc,"%AsyncGeneratorFunction%":qc,"%AsyncIteratorPrototype%":qc,"%Atomics%":typeof Atomics>"u"?We:Atomics,"%BigInt%":typeof BigInt>"u"?We:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?We:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?We:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?We:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?We:Float32Array,"%Float64Array%":typeof Float64Array>"u"?We:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?We:FinalizationRegistry,"%Function%":gF,"%GeneratorFunction%":qc,"%Int8Array%":typeof Int8Array>"u"?We:Int8Array,"%Int16Array%":typeof Int16Array>"u"?We:Int16Array,"%Int32Array%":typeof Int32Array>"u"?We:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Rc&&Bn?Bn(Bn([][Symbol.iterator]())):We,"%JSON%":typeof JSON=="object"?JSON:We,"%Map%":typeof Map>"u"?We:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Rc||!Bn?We:Bn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?We:Promise,"%Proxy%":typeof Proxy>"u"?We:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?We:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?We:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Rc||!Bn?We:Bn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?We:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Rc&&Bn?Bn(""[Symbol.iterator]()):We,"%Symbol%":Rc?Symbol:We,"%SyntaxError%":gf,"%ThrowTypeError%":gue,"%TypedArray%":yue,"%TypeError%":Nd,"%Uint8Array%":typeof Uint8Array>"u"?We:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?We:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?We:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?We:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?We:WeakMap,"%WeakRef%":typeof WeakRef>"u"?We:WeakRef,"%WeakSet%":typeof WeakSet>"u"?We:WeakSet};if(Bn)try{null.error}catch(e){var vue=Bn(Bn(e));ju["%Error.prototype%"]=vue}var bue=function e(t){var n;if(t==="%AsyncFunction%")n=qx("async function () {}");else if(t==="%GeneratorFunction%")n=qx("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=qx("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Bn&&(n=Bn(i.prototype))}return ju[t]=n,n},aI={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},xm=pF,w1=pue,_ue=xm.call(Function.call,Array.prototype.concat),Sue=xm.call(Function.apply,Array.prototype.splice),sI=xm.call(Function.call,String.prototype.replace),C1=xm.call(Function.call,String.prototype.slice),xue=xm.call(Function.call,RegExp.prototype.exec),wue=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cue=/\\(\\)?/g,Eue=function(t){var n=C1(t,0,1),r=C1(t,-1);if(n==="%"&&r!=="%")throw new gf("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new gf("invalid intrinsic syntax, expected opening `%`");var i=[];return sI(t,wue,function(o,a,s,l){i[i.length]=s?sI(l,Cue,"$1"):a||o}),i},Tue=function(t,n){var r=t,i;if(w1(aI,r)&&(i=aI[r],r="%"+i[0]+"%"),w1(ju,r)){var o=ju[r];if(o===qc&&(o=bue(r)),typeof o>"u"&&!n)throw new Nd("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new gf("intrinsic "+t+" does not exist!")},Aue=function(t,n){if(typeof t!="string"||t.length===0)throw new Nd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nd('"allowMissing" argument must be a boolean');if(xue(/^%?[^%]*%?$/,t)===null)throw new gf("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Eue(t),i=r.length>0?r[0]:"",o=Tue("%"+i+"%",n),a=o.name,s=o.value,l=!1,u=o.alias;u&&(i=u[0],Sue(r,_ue([0,1],u)));for(var c=1,d=!0;c=r.length){var g=Vu(s,f);d=!!g,d&&"get"in g&&!("originalValue"in g.get)?s=g.get:s=s[f]}else d=w1(s,f),s=s[f];d&&!l&&(ju[a]=s)}}return s},Pue=Aue,T5=Pue("%Object.defineProperty%",!0),A5=function(){if(T5)try{return T5({},"a",{value:1}),!0}catch{return!1}return!1};A5.hasArrayLengthDefineBug=function(){if(!A5())return null;try{return T5([],"length",{value:1}).length!==1}catch{return!0}};var kue=A5,Iue=nue,Mue=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Rue=Object.prototype.toString,Oue=Array.prototype.concat,mF=Object.defineProperty,$ue=function(e){return typeof e=="function"&&Rue.call(e)==="[object Function]"},Nue=kue(),yF=mF&&Nue,Due=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!$ue(r)||!r())return}yF?mF(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},vF=function(e,t){var n=arguments.length>2?arguments[2]:{},r=Iue(t);Mue&&(r=Oue.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i":return t>e;case":<":return t=":return t>=e;case":<=":return t<=e;default:throw new Error("Unimplemented comparison operator: ".concat(n))}};B_.testComparisonRange=ice;var z_={};Object.defineProperty(z_,"__esModule",{value:!0});z_.testRange=void 0;var oce=function(e,t){return typeof e=="number"?!(et.max||e===t.max&&!t.maxInclusive):!1};z_.testRange=oce;(function(e){var t=He&&He.__assign||function(){return t=Object.assign||function(c){for(var d,f=1,h=arguments.length;f0?{path:l.path,query:new RegExp("("+l.keywords.map(function(u){return(0,lce.escapeRegexString)(u.trim())}).join("|")+")")}:{path:l.path}})};V_.highlight=cce;var j_={},EF={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.nearley=n()})(He,function(){function t(u,c,d){return this.id=++t.highestId,this.name=u,this.symbols=c,this.postprocess=d,this}t.highestId=0,t.prototype.toString=function(u){var c=typeof u>"u"?this.symbols.map(l).join(" "):this.symbols.slice(0,u).map(l).join(" ")+" ● "+this.symbols.slice(u).map(l).join(" ");return this.name+" → "+c};function n(u,c,d,f){this.rule=u,this.dot=c,this.reference=d,this.data=[],this.wantedBy=f,this.isComplete=this.dot===u.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(u){var c=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return c.left=this,c.right=u,c.isComplete&&(c.data=c.build(),c.right=void 0),c},n.prototype.build=function(){var u=[],c=this;do u.push(c.right.data),c=c.left;while(c.left);return u.reverse(),u},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,a.fail))};function r(u,c){this.grammar=u,this.index=c,this.states=[],this.wants={},this.scannable=[],this.completed={}}r.prototype.process=function(u){for(var c=this.states,d=this.wants,f=this.completed,h=0;h0&&c.push(" ^ "+f+" more lines identical to this"),f=0,c.push(" "+g)),d=g}},a.prototype.getSymbolDisplay=function(u){return s(u)},a.prototype.buildFirstStateStack=function(u,c){if(c.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var d=u.wantedBy[0],f=[u].concat(c),h=this.buildFirstStateStack(d,f);return h===null?null:[u].concat(h)},a.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},a.prototype.restore=function(u){var c=u.index;this.current=c,this.table[c]=u,this.table.splice(c+1),this.lexerState=u.lexerState,this.results=this.finish()},a.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},a.prototype.finish=function(){var u=[],c=this.grammar.start,d=this.table[this.table.length-1];return d.states.forEach(function(f){f.rule.name===c&&f.dot===f.rule.symbols.length&&f.reference===0&&f.data!==a.fail&&u.push(f)}),u.map(function(f){return f.data})};function s(u){var c=typeof u;if(c==="string")return u;if(c==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function l(u){var c=typeof u;if(c==="string")return u;if(c==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:a,Grammar:i,Rule:t}})})(EF);var dce=EF.exports,ic={},TF={},Wl={};Wl.__esModule=void 0;Wl.__esModule=!0;var fce=typeof Object.setPrototypeOf=="function",hce=typeof Object.getPrototypeOf=="function",pce=typeof Object.defineProperty=="function",gce=typeof Object.create=="function",mce=typeof Object.prototype.hasOwnProperty=="function",yce=function(t,n){fce?Object.setPrototypeOf(t,n):t.__proto__=n};Wl.setPrototypeOf=yce;var vce=function(t){return hce?Object.getPrototypeOf(t):t.__proto__||t.prototype};Wl.getPrototypeOf=vce;var lI=!1,bce=function e(t,n,r){if(pce&&!lI)try{Object.defineProperty(t,n,r)}catch{lI=!0,e(t,n,r)}else t[n]=r.value};Wl.defineProperty=bce;var AF=function(t,n){return mce?t.hasOwnProperty(t,n):t[n]===void 0};Wl.hasOwnProperty=AF;var _ce=function(t,n){if(gce)return Object.create(t,n);var r=function(){};r.prototype=t;var i=new r;if(typeof n>"u")return i;if(typeof n=="null")throw new Error("PropertyDescriptors must not be null.");if(typeof n=="object")for(var o in n)AF(n,o)&&(i[o]=n[o].value);return i};Wl.objectCreate=_ce;(function(e){e.__esModule=void 0,e.__esModule=!0;var t=Wl,n=t.setPrototypeOf,r=t.getPrototypeOf,i=t.defineProperty,o=t.objectCreate,a=new Error().toString()==="[object Error]",s="";function l(u){var c=this.constructor,d=c.name||function(){var _=c.toString().match(/^function\s*([^\s(]+)/);return _===null?s||"Error":_[1]}(),f=d==="Error",h=f?s:d,p=Error.apply(this,arguments);if(n(p,r(this)),!(p instanceof c)||!(p instanceof l)){var p=this;Error.apply(this,arguments),i(p,"message",{configurable:!0,enumerable:!1,value:u,writable:!0})}if(i(p,"name",{configurable:!0,enumerable:!1,value:h,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(p,f?l:c),p.stack===void 0){var g=new Error(u);g.name=p.name,p.stack=g.stack}return a&&i(p,"toString",{configurable:!0,enumerable:!1,value:function(){return(this.name||"Error")+(typeof this.message>"u"?"":": "+this.message)},writable:!0}),p}s=l.name||"ExtendableError",l.prototype=o(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),e.ExtendableError=l,e.default=e.ExtendableError})(TF);var PF=He&&He.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ic,"__esModule",{value:!0});ic.SyntaxError=ic.LiqeError=void 0;var Sce=TF,kF=function(e){PF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Sce.ExtendableError);ic.LiqeError=kF;var xce=function(e){PF(t,e);function t(n,r,i,o){var a=e.call(this,n)||this;return a.message=n,a.offset=r,a.line=i,a.column=o,a}return t}(kF);ic.SyntaxError=xce;var JE={},E1=He&&He.__assign||function(){return E1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$2"]},{name:"comparison_operator$subexpression$1$string$3",symbols:[{literal:":"},{literal:"<"}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$3"]},{name:"comparison_operator$subexpression$1$string$4",symbols:[{literal:":"},{literal:">"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$4"]},{name:"comparison_operator$subexpression$1$string$5",symbols:[{literal:":"},{literal:"<"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$5"]},{name:"comparison_operator",symbols:["comparison_operator$subexpression$1"],postprocess:function(e,t){return{location:{start:t,end:t+e[0][0].length},type:"ComparisonOperator",operator:e[0][0]}}},{name:"regex",symbols:["regex_body","regex_flags"],postprocess:function(e){return e.join("")}},{name:"regex_body$ebnf$1",symbols:[]},{name:"regex_body$ebnf$1",symbols:["regex_body$ebnf$1","regex_body_char"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"regex_body",symbols:[{literal:"/"},"regex_body$ebnf$1",{literal:"/"}],postprocess:function(e){return"/"+e[1].join("")+"/"}},{name:"regex_body_char",symbols:[/[^\\]/],postprocess:$a},{name:"regex_body_char",symbols:[{literal:"\\"},/[^\\]/],postprocess:function(e){return"\\"+e[1]}},{name:"regex_flags",symbols:[]},{name:"regex_flags$ebnf$1",symbols:[/[gmiyusd]/]},{name:"regex_flags$ebnf$1",symbols:["regex_flags$ebnf$1",/[gmiyusd]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"regex_flags",symbols:["regex_flags$ebnf$1"],postprocess:function(e){return e[0].join("")}},{name:"unquoted_value$ebnf$1",symbols:[]},{name:"unquoted_value$ebnf$1",symbols:["unquoted_value$ebnf$1",/[a-zA-Z\.\-_*@#$]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"unquoted_value",symbols:[/[a-zA-Z_*@#$]/,"unquoted_value$ebnf$1"],postprocess:function(e){return e[0]+e[1].join("")}}],ParserStart:"main"};JE.default=wce;var IF={},U_={},Em={};Object.defineProperty(Em,"__esModule",{value:!0});Em.isSafePath=void 0;var Cce=/^(\.(?:[_a-zA-Z][a-zA-Z\d_]*|\0|[1-9]\d*))+$/u,Ece=function(e){return Cce.test(e)};Em.isSafePath=Ece;Object.defineProperty(U_,"__esModule",{value:!0});U_.createGetValueFunctionBody=void 0;var Tce=Em,Ace=function(e){if(!(0,Tce.isSafePath)(e))throw new Error("Unsafe path.");var t="return subject"+e;return t.replace(/(\.(\d+))/g,".[$2]").replace(/\./g,"?.")};U_.createGetValueFunctionBody=Ace;(function(e){var t=He&&He.__assign||function(){return t=Object.assign||function(o){for(var a,s=1,l=arguments.length;s\d+) col (?\d+)/,Oce=function(e){if(e.trim()==="")return{location:{end:0,start:0},type:"EmptyExpression"};var t=new RF.default.Parser(Mce),n;try{n=t.feed(e).results}catch(o){if(typeof(o==null?void 0:o.message)=="string"&&typeof(o==null?void 0:o.offset)=="number"){var r=o.message.match(Rce);throw r?new Pce.SyntaxError("Syntax error at line ".concat(r.groups.line," column ").concat(r.groups.column),o.offset,Number(r.groups.line),Number(r.groups.column)):o}throw o}if(n.length===0)throw new Error("Found no parsings.");if(n.length>1)throw new Error("Ambiguous results.");var i=(0,Ice.hydrateAst)(n[0]);return i};j_.parse=Oce;var G_={};Object.defineProperty(G_,"__esModule",{value:!0});G_.test=void 0;var $ce=wm,Nce=function(e,t){return(0,$ce.filter)(e,[t]).length===1};G_.test=Nce;var OF={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=void 0;var t=function(o,a){return a==="double"?'"'.concat(o,'"'):a==="single"?"'".concat(o,"'"):o},n=function(o){if(o.type==="LiteralExpression")return o.quoted&&typeof o.value=="string"?t(o.value,o.quotes):String(o.value);if(o.type==="RegexExpression")return String(o.value);if(o.type==="RangeExpression"){var a=o.range,s=a.min,l=a.max,u=a.minInclusive,c=a.maxInclusive;return"".concat(u?"[":"{").concat(s," TO ").concat(l).concat(c?"]":"}")}if(o.type==="EmptyExpression")return"";throw new Error("Unexpected AST type.")},r=function(o){if(o.type!=="Tag")throw new Error("Expected a tag expression.");var a=o.field,s=o.expression,l=o.operator;if(a.type==="ImplicitField")return n(s);var u=a.quoted?t(a.name,a.quotes):a.name,c=" ".repeat(s.location.start-l.location.end);return u+l.operator+c+n(s)},i=function(o){if(o.type==="ParenthesizedExpression"){if(!("location"in o.expression))throw new Error("Expected location in expression.");if(!o.location.end)throw new Error("Expected location end.");var a=" ".repeat(o.expression.location.start-(o.location.start+1)),s=" ".repeat(o.location.end-o.expression.location.end-1);return"(".concat(a).concat((0,e.serialize)(o.expression)).concat(s,")")}if(o.type==="Tag")return r(o);if(o.type==="LogicalExpression"){var l="";return o.operator.type==="BooleanOperator"?(l+=" ".repeat(o.operator.location.start-o.left.location.end),l+=o.operator.operator,l+=" ".repeat(o.right.location.start-o.operator.location.end)):l=" ".repeat(o.right.location.start-o.left.location.end),"".concat((0,e.serialize)(o.left)).concat(l).concat((0,e.serialize)(o.right))}if(o.type==="UnaryOperator")return(o.operator==="NOT"?"NOT ":o.operator)+(0,e.serialize)(o.operand);if(o.type==="EmptyExpression")return"";throw new Error("Unexpected AST type.")};e.serialize=i})(OF);var H_={};Object.defineProperty(H_,"__esModule",{value:!0});H_.isSafeUnquotedExpression=void 0;var Dce=function(e){return/^[#$*@A-Z_a-z][#$*.@A-Z_a-z-]*$/.test(e)};H_.isSafeUnquotedExpression=Dce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isSafeUnquotedExpression=e.serialize=e.SyntaxError=e.LiqeError=e.test=e.parse=e.highlight=e.filter=void 0;var t=wm;Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return t.filter}});var n=V_;Object.defineProperty(e,"highlight",{enumerable:!0,get:function(){return n.highlight}});var r=j_;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return r.parse}});var i=G_;Object.defineProperty(e,"test",{enumerable:!0,get:function(){return i.test}});var o=ic;Object.defineProperty(e,"LiqeError",{enumerable:!0,get:function(){return o.LiqeError}}),Object.defineProperty(e,"SyntaxError",{enumerable:!0,get:function(){return o.SyntaxError}});var a=OF;Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return a.serialize}});var s=H_;Object.defineProperty(e,"isSafeUnquotedExpression",{enumerable:!0,get:function(){return s.isSafeUnquotedExpression}})})(CF);var Tm={},$F={},oc={};Object.defineProperty(oc,"__esModule",{value:!0});oc.ROARR_LOG_FORMAT_VERSION=oc.ROARR_VERSION=void 0;oc.ROARR_VERSION="5.0.0";oc.ROARR_LOG_FORMAT_VERSION="2.0.0";var Nf={};Object.defineProperty(Nf,"__esModule",{value:!0});Nf.logLevels=void 0;Nf.logLevels={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};var NF={},q_={};Object.defineProperty(q_,"__esModule",{value:!0});q_.hasOwnProperty=void 0;const Lce=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);q_.hasOwnProperty=Lce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hasOwnProperty=void 0;var t=q_;Object.defineProperty(e,"hasOwnProperty",{enumerable:!0,get:function(){return t.hasOwnProperty}})})(NF);var W_={};Object.defineProperty(W_,"__esModule",{value:!0});W_.isBrowser=void 0;const Fce=()=>typeof window<"u";W_.isBrowser=Fce;var K_={};Object.defineProperty(K_,"__esModule",{value:!0});K_.isTruthy=void 0;const Bce=e=>["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());K_.isTruthy=Bce;var DF={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMockLogger=void 0;const t=Nf,n=(i,o)=>(a,s,l,u,c,d,f,h,p,g)=>{i.child({logLevel:o})(a,s,l,u,c,d,f,h,p,g)},r=(i,o)=>{const a=()=>{};return a.adopt=async s=>s(),a.child=()=>(0,e.createMockLogger)(i,o),a.getContext=()=>({}),a.debug=n(a,t.logLevels.debug),a.debugOnce=n(a,t.logLevels.debug),a.error=n(a,t.logLevels.error),a.errorOnce=n(a,t.logLevels.error),a.fatal=n(a,t.logLevels.fatal),a.fatalOnce=n(a,t.logLevels.fatal),a.info=n(a,t.logLevels.info),a.infoOnce=n(a,t.logLevels.info),a.trace=n(a,t.logLevels.trace),a.traceOnce=n(a,t.logLevels.trace),a.warn=n(a,t.logLevels.warn),a.warnOnce=n(a,t.logLevels.warn),a};e.createMockLogger=r})(DF);var LF={},X_={},Q_={};Object.defineProperty(Q_,"__esModule",{value:!0});Q_.tokenize=void 0;const zce=/(?:%(?([+0-]|-\+))?(?\d+)?(?\d+\$)?(?\.\d+)?(?[%BCESb-iosux]))|(\\%)/g,Vce=e=>{let t;const n=[];let r=0,i=0,o=null;for(;(t=zce.exec(e))!==null;){t.index>i&&(o={literal:e.slice(i,t.index),type:"literal"},n.push(o));const a=t[0];i=t.index+a.length,a==="\\%"||a==="%%"?o&&o.type==="literal"?o.literal+="%":(o={literal:"%",type:"literal"},n.push(o)):t.groups&&(o={conversion:t.groups.conversion,flag:t.groups.flag||null,placeholder:a,position:t.groups.position?Number.parseInt(t.groups.position,10)-1:r++,precision:t.groups.precision?Number.parseInt(t.groups.precision.slice(1),10):null,type:"placeholder",width:t.groups.width?Number.parseInt(t.groups.width,10):null},n.push(o))}return i<=e.length-1&&(o&&o.type==="literal"?o.literal+=e.slice(i):n.push({literal:e.slice(i),type:"literal"})),n};Q_.tokenize=Vce;Object.defineProperty(X_,"__esModule",{value:!0});X_.createPrintf=void 0;const uI=YE,jce=Q_,Uce=(e,t)=>t.placeholder,Gce=e=>{var t;const n=(o,a,s)=>s==="-"?o.padEnd(a," "):s==="-+"?((Number(o)>=0?"+":"")+o).padEnd(a," "):s==="+"?((Number(o)>=0?"+":"")+o).padStart(a," "):s==="0"?o.padStart(a,"0"):o.padStart(a," "),r=(t=e==null?void 0:e.formatUnboundExpression)!==null&&t!==void 0?t:Uce,i={};return(o,...a)=>{let s=i[o];s||(s=i[o]=jce.tokenize(o));let l="";for(const u of s)if(u.type==="literal")l+=u.literal;else{let c=a[u.position];if(c===void 0)l+=r(o,u,a);else if(u.conversion==="b")l+=uI.boolean(c)?"true":"false";else if(u.conversion==="B")l+=uI.boolean(c)?"TRUE":"FALSE";else if(u.conversion==="c")l+=c;else if(u.conversion==="C")l+=String(c).toUpperCase();else if(u.conversion==="i"||u.conversion==="d")c=String(Math.trunc(c)),u.width!==null&&(c=n(c,u.width,u.flag)),l+=c;else if(u.conversion==="e")l+=Number(c).toExponential();else if(u.conversion==="E")l+=Number(c).toExponential().toUpperCase();else if(u.conversion==="f")u.precision!==null&&(c=Number(c).toFixed(u.precision)),u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else if(u.conversion==="o")l+=(Number.parseInt(String(c),10)>>>0).toString(8);else if(u.conversion==="s")u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else if(u.conversion==="S")u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=String(c).toUpperCase();else if(u.conversion==="u")l+=Number.parseInt(String(c),10)>>>0;else if(u.conversion==="x")c=(Number.parseInt(String(c),10)>>>0).toString(16),u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else throw new Error("Unknown format specifier.")}return l}};X_.createPrintf=Gce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printf=e.createPrintf=void 0;const t=X_;Object.defineProperty(e,"createPrintf",{enumerable:!0,get:function(){return t.createPrintf}}),e.printf=t.createPrintf()})(LF);var P5={exports:{}};(function(e,t){const{hasOwnProperty:n}=Object.prototype,r=_();r.configure=_,r.stringify=r,r.default=r,t.stringify=r,t.configure=_,e.exports=r;const i=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function o(b){return b.length<5e3&&!i.test(b)?`"${b}"`:JSON.stringify(b)}function a(b){if(b.length>200)return b.sort();for(let y=1;ym;)b[v]=b[v-1],v--;b[v]=m}return b}const s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function l(b){return s.call(b)!==void 0&&b.length!==0}function u(b,y,m){b.length= 1`)}return m===void 0?1/0:m}function h(b){return b===1?"1 item":`${b} items`}function p(b){const y=new Set;for(const m of b)(typeof m=="string"||typeof m=="number")&&y.add(String(m));return y}function g(b){if(n.call(b,"strict")){const y=b.strict;if(typeof y!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(y)return m=>{let v=`Object can not safely be stringified. Received type ${typeof m}`;throw typeof m!="function"&&(v+=` (${m.toString()})`),new Error(v)}}}function _(b){b={...b};const y=g(b);y&&(b.bigint===void 0&&(b.bigint=!1),"circularValue"in b||(b.circularValue=Error));const m=c(b),v=d(b,"bigint"),S=d(b,"deterministic"),w=f(b,"maximumDepth"),C=f(b,"maximumBreadth");function x(M,T,A,R,D,$){let L=T[M];switch(typeof L=="object"&&L!==null&&typeof L.toJSON=="function"&&(L=L.toJSON(M)),L=R.call(T,M,L),typeof L){case"string":return o(L);case"object":{if(L===null)return"null";if(A.indexOf(L)!==-1)return m;let O="",B=",";const U=$;if(Array.isArray(L)){if(L.length===0)return"[]";if(wC){const fe=L.length-C-1;O+=`${B}"... ${h(fe)} not stringified"`}return D!==""&&(O+=` -${U}`),A.pop(),`[${O}]`}let j=Object.keys(L);const q=j.length;if(q===0)return"{}";if(wC){const K=q-C;O+=`${Z}"...":${Y}"${h(K)} not stringified"`,Z=B}return D!==""&&Z.length>1&&(O=` -${$}${O} -${U}`),A.pop(),`{${O}}`}case"number":return isFinite(L)?String(L):y?y(L):"null";case"boolean":return L===!0?"true":"false";case"undefined":return;case"bigint":if(v)return String(L);default:return y?y(L):void 0}}function P(M,T,A,R,D,$){switch(typeof T=="object"&&T!==null&&typeof T.toJSON=="function"&&(T=T.toJSON(M)),typeof T){case"string":return o(T);case"object":{if(T===null)return"null";if(A.indexOf(T)!==-1)return m;const L=$;let O="",B=",";if(Array.isArray(T)){if(T.length===0)return"[]";if(wC){const V=T.length-C-1;O+=`${B}"... ${h(V)} not stringified"`}return D!==""&&(O+=` -${L}`),A.pop(),`[${O}]`}A.push(T);let U="";D!==""&&($+=D,B=`, -${$}`,U=" ");let j="";for(const q of R){const Y=P(q,T[q],A,R,D,$);Y!==void 0&&(O+=`${j}${o(q)}:${U}${Y}`,j=B)}return D!==""&&j.length>1&&(O=` -${$}${O} -${L}`),A.pop(),`{${O}}`}case"number":return isFinite(T)?String(T):y?y(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(v)return String(T);default:return y?y(T):void 0}}function E(M,T,A,R,D){switch(typeof T){case"string":return o(T);case"object":{if(T===null)return"null";if(typeof T.toJSON=="function"){if(T=T.toJSON(M),typeof T!="object")return E(M,T,A,R,D);if(T===null)return"null"}if(A.indexOf(T)!==-1)return m;const $=D;if(Array.isArray(T)){if(T.length===0)return"[]";if(wC){const re=T.length-C-1;Y+=`${Z}"... ${h(re)} not stringified"`}return Y+=` -${$}`,A.pop(),`[${Y}]`}let L=Object.keys(T);const O=L.length;if(O===0)return"{}";if(wC){const Y=O-C;U+=`${j}"...": "${h(Y)} not stringified"`,j=B}return j!==""&&(U=` -${D}${U} -${$}`),A.pop(),`{${U}}`}case"number":return isFinite(T)?String(T):y?y(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(v)return String(T);default:return y?y(T):void 0}}function I(M,T,A){switch(typeof T){case"string":return o(T);case"object":{if(T===null)return"null";if(typeof T.toJSON=="function"){if(T=T.toJSON(M),typeof T!="object")return I(M,T,A);if(T===null)return"null"}if(A.indexOf(T)!==-1)return m;let R="";if(Array.isArray(T)){if(T.length===0)return"[]";if(wC){const q=T.length-C-1;R+=`,"... ${h(q)} not stringified"`}return A.pop(),`[${R}]`}let D=Object.keys(T);const $=D.length;if($===0)return"{}";if(wC){const B=$-C;R+=`${L}"...":"${h(B)} not stringified"`}return A.pop(),`{${R}}`}case"number":return isFinite(T)?String(T):y?y(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(v)return String(T);default:return y?y(T):void 0}}function N(M,T,A){if(arguments.length>1){let R="";if(typeof A=="number"?R=" ".repeat(Math.min(A,10)):typeof A=="string"&&(R=A.slice(0,10)),T!=null){if(typeof T=="function")return x("",{"":M},[],T,R,"");if(Array.isArray(T))return P("",M,[],p(T),R,"")}if(R.length!==0)return E("",M,[],R,"")}return I("",M,[])}return N}})(P5,P5.exports);var Hce=P5.exports;(function(e){var t=He&&He.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.createLogger=void 0;const n=oc,r=Nf,i=NF,o=W_,a=K_,s=DF,l=LF,u=t(Hce);let c=!1;const d=()=>globalThis.ROARR,f=()=>({messageContext:{},transforms:[]}),h=()=>{const v=d().asyncLocalStorage;if(!v)throw new Error("AsyncLocalContext is unavailable.");const S=v.getStore();return S||f()},p=()=>!!d().asyncLocalStorage,g=()=>{if(p()){const v=h();return(0,i.hasOwnProperty)(v,"sequenceRoot")&&(0,i.hasOwnProperty)(v,"sequence")&&typeof v.sequence=="number"?String(v.sequenceRoot)+"."+String(v.sequence++):String(d().sequence++)}return String(d().sequence++)},_=(v,S)=>(w,C,x,P,E,I,N,M,T,A)=>{v.child({logLevel:S})(w,C,x,P,E,I,N,M,T,A)},b=1e3,y=(v,S)=>(w,C,x,P,E,I,N,M,T,A)=>{const R=(0,u.default)({a:w,b:C,c:x,d:P,e:E,f:I,g:N,h:M,i:T,j:A,logLevel:S});if(!R)throw new Error("Expected key to be a string");const D=d().onceLog;D.has(R)||(D.add(R),D.size>b&&D.clear(),v.child({logLevel:S})(w,C,x,P,E,I,N,M,T,A))},m=(v,S={},w=[])=>{var C;if(!(0,o.isBrowser)()&&typeof process<"u"&&!(0,a.isTruthy)((C={}.ROARR_LOG)!==null&&C!==void 0?C:""))return(0,s.createMockLogger)(v,S);const x=(P,E,I,N,M,T,A,R,D,$)=>{const L=Date.now(),O=g();let B;p()?B=h():B=f();let U,j;if(typeof P=="string"?U={...B.messageContext,...S}:U={...B.messageContext,...S,...P},typeof P=="string"&&E===void 0)j=P;else if(typeof P=="string"){if(!P.includes("%"))throw new Error("When a string parameter is followed by other arguments, then it is assumed that you are attempting to format a message using printf syntax. You either forgot to add printf bindings or if you meant to add context to the log message, pass them in an object as the first parameter.");j=(0,l.printf)(P,E,I,N,M,T,A,R,D,$)}else{let Y=E;if(typeof E!="string")if(E===void 0)Y="";else throw new TypeError("Message must be a string. Received "+typeof E+".");j=(0,l.printf)(Y,I,N,M,T,A,R,D,$)}let q={context:U,message:j,sequence:O,time:L,version:n.ROARR_LOG_FORMAT_VERSION};for(const Y of[...B.transforms,...w])if(q=Y(q),typeof q!="object"||q===null)throw new Error("Message transform function must return a message object.");v(q)};return x.child=P=>{let E;return p()?E=h():E=f(),typeof P=="function"?(0,e.createLogger)(v,{...E.messageContext,...S,...P},[P,...w]):(0,e.createLogger)(v,{...E.messageContext,...S,...P},w)},x.getContext=()=>{let P;return p()?P=h():P=f(),{...P.messageContext,...S}},x.adopt=async(P,E)=>{if(!p())return c===!1&&(c=!0,v({context:{logLevel:r.logLevels.warn,package:"roarr"},message:"async_hooks are unavailable; Roarr.adopt will not function as expected",sequence:g(),time:Date.now(),version:n.ROARR_LOG_FORMAT_VERSION})),P();const I=h();let N;(0,i.hasOwnProperty)(I,"sequenceRoot")&&(0,i.hasOwnProperty)(I,"sequence")&&typeof I.sequence=="number"?N=I.sequenceRoot+"."+String(I.sequence++):N=String(d().sequence++);let M={...I.messageContext};const T=[...I.transforms];typeof E=="function"?T.push(E):M={...M,...E};const A=d().asyncLocalStorage;if(!A)throw new Error("Async local context unavailable.");return A.run({messageContext:M,sequence:0,sequenceRoot:N,transforms:T},()=>P())},x.debug=_(x,r.logLevels.debug),x.debugOnce=y(x,r.logLevels.debug),x.error=_(x,r.logLevels.error),x.errorOnce=y(x,r.logLevels.error),x.fatal=_(x,r.logLevels.fatal),x.fatalOnce=y(x,r.logLevels.fatal),x.info=_(x,r.logLevels.info),x.infoOnce=y(x,r.logLevels.info),x.trace=_(x,r.logLevels.trace),x.traceOnce=y(x,r.logLevels.trace),x.warn=_(x,r.logLevels.warn),x.warnOnce=y(x,r.logLevels.warn),x};e.createLogger=m})($F);var Y_={},qce=function(t,n){for(var r=t.split("."),i=n.split("."),o=0;o<3;o++){var a=Number(r[o]),s=Number(i[o]);if(a>s)return 1;if(s>a)return-1;if(!isNaN(a)&&isNaN(s))return 1;if(isNaN(a)&&!isNaN(s))return-1}return 0},Wce=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Y_,"__esModule",{value:!0});Y_.createRoarrInitialGlobalStateBrowser=void 0;const cI=oc,dI=Wce(qce),Kce=e=>{const t=(e.versions||[]).concat();return t.length>1&&t.sort(dI.default),t.includes(cI.ROARR_VERSION)||t.push(cI.ROARR_VERSION),t.sort(dI.default),{sequence:0,...e,versions:t}};Y_.createRoarrInitialGlobalStateBrowser=Kce;var Z_={};Object.defineProperty(Z_,"__esModule",{value:!0});Z_.getLogLevelName=void 0;const Xce=e=>e<=10?"trace":e<=20?"debug":e<=30?"info":e<=40?"warn":e<=50?"error":"fatal";Z_.getLogLevelName=Xce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getLogLevelName=e.logLevels=e.Roarr=e.ROARR=void 0;const t=$F,r=(0,Y_.createRoarrInitialGlobalStateBrowser)(globalThis.ROARR||{});e.ROARR=r,globalThis.ROARR=r;const i=l=>JSON.stringify(l),o=(0,t.createLogger)(l=>{var u;r.write&&r.write(((u=r.serializeMessage)!==null&&u!==void 0?u:i)(l))});e.Roarr=o;var a=Nf;Object.defineProperty(e,"logLevels",{enumerable:!0,get:function(){return a.logLevels}});var s=Z_;Object.defineProperty(e,"getLogLevelName",{enumerable:!0,get:function(){return s.getLogLevelName}})})(Tm);var fI=He&&He.__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 i=0,r=Object.getOwnPropertySymbols(e);i0?g("%c ".concat(p," %c").concat(f?" [".concat(String(f),"]:"):"","%c ").concat(u.message," %O"),b,y,m,h):g("%c ".concat(p," %c").concat(f?" [".concat(String(f),"]:"):"","%c ").concat(u.message),b,y,m)}}:function(l){var u=JSON.parse(l),c=u.context,d=c.logLevel,f=c.namespace,h=fI(c,["logLevel","namespace"]);if(!(s&&!(0,k5.test)(s,u))){var p=(0,hI.getLogLevelName)(Number(d)),g=a[p];Object.keys(h).length>0?g("".concat(p," ").concat(f?" [".concat(String(f),"]:"):""," ").concat(u.message),h):g("".concat(p," ").concat(f?" [".concat(String(f),"]:"):""," ").concat(u.message))}}};R_.createLogWriter=rde;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createLogWriter=void 0;var t=R_;Object.defineProperty(e,"createLogWriter",{enumerable:!0,get:function(){return t.createLogWriter}})})(fF);Tm.ROARR.write=fF.createLogWriter();const FF={};Tm.Roarr.child(FF);const J_=Pa(Tm.Roarr.child(FF)),se=e=>J_.get().child({namespace:e}),Ize=["trace","debug","info","warn","error","fatal"],Mze={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},BF=Pa(),zF=F.enum(["Any","BoardField","boolean","BooleanCollection","BooleanPolymorphic","ClipField","Collection","CollectionItem","ColorCollection","ColorField","ColorPolymorphic","ConditioningCollection","ConditioningField","ConditioningPolymorphic","ControlCollection","ControlField","ControlNetModelField","ControlPolymorphic","DenoiseMaskField","enum","float","FloatCollection","FloatPolymorphic","ImageCollection","ImageField","ImagePolymorphic","integer","IntegerCollection","IntegerPolymorphic","IPAdapterCollection","IPAdapterField","IPAdapterModelField","IPAdapterPolymorphic","LatentsCollection","LatentsField","LatentsPolymorphic","LoRAModelField","MainModelField","MetadataField","MetadataCollection","MetadataItemField","MetadataItemCollection","MetadataItemPolymorphic","ONNXModelField","Scheduler","SDXLMainModelField","SDXLRefinerModelField","string","StringCollection","StringPolymorphic","T2IAdapterCollection","T2IAdapterField","T2IAdapterModelField","T2IAdapterPolymorphic","UNetField","VaeField","VaeModelField"]),ide=F.enum(["WorkflowField","IsIntermediate","MetadataField"]),gI=e=>zF.safeParse(e).success||ide.safeParse(e).success;F.enum(["connection","direct","any"]);const VF=F.object({id:F.string().trim().min(1),name:F.string().trim().min(1),type:zF}),ode=VF.extend({fieldKind:F.literal("output")}),Ae=VF.extend({fieldKind:F.literal("input"),label:F.string()}),Cs=F.object({model_name:F.string().trim().min(1),base_model:ql}),Df=F.object({image_name:F.string().trim().min(1)}),ade=F.object({board_id:F.string().trim().min(1)}),T1=F.object({latents_name:F.string().trim().min(1),seed:F.number().int().optional()}),A1=F.object({conditioning_name:F.string().trim().min(1)}),sde=F.object({mask_name:F.string().trim().min(1),masked_latents_name:F.string().trim().min(1).optional()}),lde=Ae.extend({type:F.literal("integer"),value:F.number().int().optional()}),ude=Ae.extend({type:F.literal("IntegerCollection"),value:F.array(F.number().int()).optional()}),cde=Ae.extend({type:F.literal("IntegerPolymorphic"),value:F.number().int().optional()}),dde=Ae.extend({type:F.literal("float"),value:F.number().optional()}),fde=Ae.extend({type:F.literal("FloatCollection"),value:F.array(F.number()).optional()}),hde=Ae.extend({type:F.literal("FloatPolymorphic"),value:F.number().optional()}),pde=Ae.extend({type:F.literal("string"),value:F.string().optional()}),gde=Ae.extend({type:F.literal("StringCollection"),value:F.array(F.string()).optional()}),mde=Ae.extend({type:F.literal("StringPolymorphic"),value:F.string().optional()}),yde=Ae.extend({type:F.literal("boolean"),value:F.boolean().optional()}),vde=Ae.extend({type:F.literal("BooleanCollection"),value:F.array(F.boolean()).optional()}),bde=Ae.extend({type:F.literal("BooleanPolymorphic"),value:F.boolean().optional()}),_de=Ae.extend({type:F.literal("enum"),value:F.string().optional()}),Sde=Ae.extend({type:F.literal("LatentsField"),value:T1.optional()}),xde=Ae.extend({type:F.literal("LatentsCollection"),value:F.array(T1).optional()}),wde=Ae.extend({type:F.literal("LatentsPolymorphic"),value:F.union([T1,F.array(T1)]).optional()}),Cde=Ae.extend({type:F.literal("DenoiseMaskField"),value:sde.optional()}),Ede=Ae.extend({type:F.literal("ConditioningField"),value:A1.optional()}),Tde=Ae.extend({type:F.literal("ConditioningCollection"),value:F.array(A1).optional()}),Ade=Ae.extend({type:F.literal("ConditioningPolymorphic"),value:F.union([A1,F.array(A1)]).optional()}),Pde=Cs,_g=F.object({image:Df,control_model:Pde,control_weight:F.union([F.number(),F.array(F.number())]).optional(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional(),control_mode:F.enum(["balanced","more_prompt","more_control","unbalanced"]).optional(),resize_mode:F.enum(["just_resize","crop_resize","fill_resize","just_resize_simple"]).optional()}),kde=Ae.extend({type:F.literal("ControlField"),value:_g.optional()}),Ide=Ae.extend({type:F.literal("ControlPolymorphic"),value:F.union([_g,F.array(_g)]).optional()}),Mde=Ae.extend({type:F.literal("ControlCollection"),value:F.array(_g).optional()}),Rde=Cs,Sg=F.object({image:Df,ip_adapter_model:Rde,weight:F.number(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional()}),Ode=Ae.extend({type:F.literal("IPAdapterField"),value:Sg.optional()}),$de=Ae.extend({type:F.literal("IPAdapterPolymorphic"),value:F.union([Sg,F.array(Sg)]).optional()}),Nde=Ae.extend({type:F.literal("IPAdapterCollection"),value:F.array(Sg).optional()}),Dde=Cs,xg=F.object({image:Df,t2i_adapter_model:Dde,weight:F.union([F.number(),F.array(F.number())]).optional(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional(),resize_mode:F.enum(["just_resize","crop_resize","fill_resize","just_resize_simple"]).optional()}),Lde=Ae.extend({type:F.literal("T2IAdapterField"),value:xg.optional()}),Fde=Ae.extend({type:F.literal("T2IAdapterPolymorphic"),value:F.union([xg,F.array(xg)]).optional()}),Bde=Ae.extend({type:F.literal("T2IAdapterCollection"),value:F.array(xg).optional()}),zde=F.enum(["onnx","main","vae","lora","controlnet","embedding"]),Vde=F.enum(["unet","text_encoder","text_encoder_2","tokenizer","tokenizer_2","vae","vae_decoder","vae_encoder","scheduler","safety_checker"]),mf=Cs.extend({model_type:zde,submodel:Vde.optional()}),jF=mf.extend({weight:F.number().optional()}),jde=F.object({unet:mf,scheduler:mf,loras:F.array(jF)}),Ude=Ae.extend({type:F.literal("UNetField"),value:jde.optional()}),Gde=F.object({tokenizer:mf,text_encoder:mf,skipped_layers:F.number(),loras:F.array(jF)}),Hde=Ae.extend({type:F.literal("ClipField"),value:Gde.optional()}),qde=F.object({vae:mf}),Wde=Ae.extend({type:F.literal("VaeField"),value:qde.optional()}),Kde=Ae.extend({type:F.literal("ImageField"),value:Df.optional()}),Xde=Ae.extend({type:F.literal("BoardField"),value:ade.optional()}),Qde=Ae.extend({type:F.literal("ImagePolymorphic"),value:Df.optional()}),Yde=Ae.extend({type:F.literal("ImageCollection"),value:F.array(Df).optional()}),Zde=Ae.extend({type:F.literal("MainModelField"),value:Sm.optional()}),Jde=Ae.extend({type:F.literal("SDXLMainModelField"),value:Sm.optional()}),efe=Ae.extend({type:F.literal("SDXLRefinerModelField"),value:Sm.optional()}),UF=Cs,tfe=Ae.extend({type:F.literal("VaeModelField"),value:UF.optional()}),GF=Cs,nfe=Ae.extend({type:F.literal("LoRAModelField"),value:GF.optional()}),rfe=Cs,ife=Ae.extend({type:F.literal("ControlNetModelField"),value:rfe.optional()}),ofe=Cs,afe=Ae.extend({type:F.literal("IPAdapterModelField"),value:ofe.optional()}),sfe=Cs,lfe=Ae.extend({type:F.literal("T2IAdapterModelField"),value:sfe.optional()}),ufe=Ae.extend({type:F.literal("Collection"),value:F.array(F.any()).optional()}),cfe=Ae.extend({type:F.literal("CollectionItem"),value:F.any().optional()}),P1=F.object({label:F.string(),value:F.any()}),dfe=Ae.extend({type:F.literal("MetadataItemField"),value:P1.optional()}),ffe=Ae.extend({type:F.literal("MetadataItemCollection"),value:F.array(P1).optional()}),hfe=Ae.extend({type:F.literal("MetadataItemPolymorphic"),value:F.union([P1,F.array(P1)]).optional()}),HF=F.record(F.any()),pfe=Ae.extend({type:F.literal("MetadataField"),value:HF.optional()}),gfe=Ae.extend({type:F.literal("MetadataCollection"),value:F.array(HF).optional()}),k1=F.object({r:F.number().int().min(0).max(255),g:F.number().int().min(0).max(255),b:F.number().int().min(0).max(255),a:F.number().int().min(0).max(255)}),mfe=Ae.extend({type:F.literal("ColorField"),value:k1.optional()}),yfe=Ae.extend({type:F.literal("ColorCollection"),value:F.array(k1).optional()}),vfe=Ae.extend({type:F.literal("ColorPolymorphic"),value:F.union([k1,F.array(k1)]).optional()}),bfe=Ae.extend({type:F.literal("Scheduler"),value:mL.optional()}),_fe=Ae.extend({type:F.literal("Any"),value:F.any().optional()}),Sfe=F.discriminatedUnion("type",[_fe,Xde,vde,yde,bde,Hde,ufe,cfe,mfe,yfe,vfe,Ede,Tde,Ade,kde,ife,Mde,Ide,Cde,_de,fde,dde,hde,Yde,Qde,Kde,ude,cde,lde,Ode,afe,Nde,$de,Sde,xde,wde,nfe,Zde,bfe,Jde,efe,gde,mde,pde,Lde,lfe,Bde,Fde,Ude,Wde,tfe,dfe,ffe,hfe,pfe,gfe]),Rze=e=>!!(e&&e.fieldKind==="input"),Oze=e=>!!(e&&e.fieldKind==="input"),N0=e=>!!(e&&!("$ref"in e)),mI=e=>!!(e&&!("$ref"in e)&&e.type==="array"),D0=e=>!!(e&&!("$ref"in e)&&e.type!=="array"),au=e=>!!(e&&"$ref"in e),xfe=e=>"class"in e&&e.class==="invocation",wfe=e=>"class"in e&&e.class==="output",yI=e=>!("$ref"in e),qF=F.object({lora:GF.deepPartial(),weight:F.number()}),Cfe=_g.deepPartial(),Efe=Sg.deepPartial(),Tfe=xg.deepPartial(),Afe=F.object({app_version:F.string().nullish().catch(null),generation_mode:F.string().nullish().catch(null),created_by:F.string().nullish().catch(null),positive_prompt:F.string().nullish().catch(null),negative_prompt:F.string().nullish().catch(null),width:F.number().int().nullish().catch(null),height:F.number().int().nullish().catch(null),seed:F.number().int().nullish().catch(null),rand_device:F.string().nullish().catch(null),cfg_scale:F.number().nullish().catch(null),steps:F.number().int().nullish().catch(null),scheduler:F.string().nullish().catch(null),clip_skip:F.number().int().nullish().catch(null),model:F.union([u_.deepPartial(),bL.deepPartial()]).nullish().catch(null),controlnets:F.array(Cfe).nullish().catch(null),ipAdapters:F.array(Efe).nullish().catch(null),t2iAdapters:F.array(Tfe).nullish().catch(null),loras:F.array(qF).nullish().catch(null),vae:UF.nullish().catch(null),strength:F.number().nullish().catch(null),hrf_enabled:F.boolean().nullish().catch(null),hrf_strength:F.number().nullish().catch(null),hrf_method:F.string().nullish().catch(null),init_image:F.string().nullish().catch(null),positive_style_prompt:F.string().nullish().catch(null),negative_style_prompt:F.string().nullish().catch(null),refiner_model:$E.deepPartial().nullish().catch(null),refiner_cfg_scale:F.number().nullish().catch(null),refiner_steps:F.number().int().nullish().catch(null),refiner_scheduler:F.string().nullish().catch(null),refiner_positive_aesthetic_score:F.number().nullish().catch(null),refiner_negative_aesthetic_score:F.number().nullish().catch(null),refiner_start:F.number().nullish().catch(null)}).passthrough(),eT=F.string().refine(e=>{const[t,n,r]=e.split(".");return t!==void 0&&Number.isInteger(Number(t))&&n!==void 0&&Number.isInteger(Number(n))&&r!==void 0&&Number.isInteger(Number(r))}),Pfe=eT.transform(e=>{const[t,n,r]=e.split(".");return{major:Number(t),minor:Number(n),patch:Number(r)}}),vI=F.object({id:F.string().trim().min(1),type:F.string().trim().min(1),inputs:F.record(Sfe),outputs:F.record(ode),label:F.string(),isOpen:F.boolean(),notes:F.string(),embedWorkflow:F.boolean(),isIntermediate:F.boolean(),useCache:F.boolean().optional(),version:eT.optional()}),kfe=F.preprocess(e=>{var t;try{const n=vI.parse(e);if(!Hne(n,"useCache")){const r=(t=BF.get())==null?void 0:t.getState().nodes.nodeTemplates,i=r==null?void 0:r[n.type];let o=!0;i&&(o=i.useCache),Object.assign(n,{useCache:o})}return n}catch{return e}},vI.extend({useCache:F.boolean()})),Ife=F.object({id:F.string().trim().min(1),type:F.literal("notes"),label:F.string(),isOpen:F.boolean(),notes:F.string()}),WF=F.object({x:F.number(),y:F.number()}).default({x:0,y:0}),I1=F.number().gt(0).nullish(),KF=F.object({id:F.string().trim().min(1),type:F.literal("invocation"),data:kfe,width:I1,height:I1,position:WF}),I5=e=>KF.safeParse(e).success,Mfe=F.object({id:F.string().trim().min(1),type:F.literal("notes"),data:Ife,width:I1,height:I1,position:WF}),XF=F.discriminatedUnion("type",[KF,Mfe]),Rfe=F.object({source:F.string().trim().min(1),sourceHandle:F.string().trim().min(1),target:F.string().trim().min(1),targetHandle:F.string().trim().min(1),id:F.string().trim().min(1),type:F.literal("default")}),Ofe=F.object({source:F.string().trim().min(1),target:F.string().trim().min(1),id:F.string().trim().min(1),type:F.literal("collapsed")}),QF=F.union([Rfe,Ofe]),$fe=F.object({nodeId:F.string().trim().min(1),fieldName:F.string().trim().min(1)}),Nfe="1.0.0",Dfe=F.object({name:F.string().default(""),author:F.string().default(""),description:F.string().default(""),version:F.string().default(""),contact:F.string().default(""),tags:F.string().default(""),notes:F.string().default(""),nodes:F.array(XF).default([]),edges:F.array(QF).default([]),exposedFields:F.array($fe).default([]),meta:F.object({version:eT}).default({version:Nfe})});Dfe.transform(e=>{const{nodes:t,edges:n}=e,r=[],i=t.filter(I5),o=xE(i,"id");return n.forEach((a,s)=>{const l=o[a.source],u=o[a.target],c=[];if(l?a.type==="default"&&!(a.sourceHandle in l.data.outputs)&&c.push(`${de.t("nodes.outputField")}"${a.source}.${a.sourceHandle}" ${de.t("nodes.doesNotExist")}`):c.push(`${de.t("nodes.outputNode")} ${a.source} ${de.t("nodes.doesNotExist")}`),u?a.type==="default"&&!(a.targetHandle in u.data.inputs)&&c.push(`${de.t("nodes.inputField")} "${a.target}.${a.targetHandle}" ${de.t("nodes.doesNotExist")}`):c.push(`${de.t("nodes.inputNode")} ${a.target} ${de.t("nodes.doesNotExist")}`),c.length){delete n[s];const d=a.type==="default"?a.sourceHandle:a.source,f=a.type==="default"?a.targetHandle:a.target;r.push({message:`${de.t("nodes.edge")} "${d} -> ${f}" ${de.t("nodes.skipped")}`,issues:c,data:a})}}),{workflow:e,warnings:r}});const on=e=>!!(e&&e.type==="invocation"),$ze=e=>!!(e&&!["notes","current_image"].includes(e.type)),bI=e=>!!(e&&e.type==="notes");var wu=(e=>(e[e.PENDING=0]="PENDING",e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.COMPLETED=2]="COMPLETED",e[e.FAILED=3]="FAILED",e))(wu||{});const ce=Do.injectEndpoints({endpoints:e=>({listImages:e.query({query:t=>({url:Vi(t),method:"GET"}),providesTags:(t,n,{board_id:r,categories:i})=>[{type:"ImageList",id:Vi({board_id:r,categories:i})}],serializeQueryArgs:({queryArgs:t})=>{const{board_id:n,categories:r}=t;return Vi({board_id:n,categories:r})},transformResponse(t){const{items:n}=t;return Lt.addMany(Lt.getInitialState(),n)},merge:(t,n)=>{Lt.addMany(t,bg.selectAll(n))},forceRefetch({currentArg:t,previousArg:n}){return(t==null?void 0:t.offset)!==(n==null?void 0:n.offset)},async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r;bg.selectAll(i).forEach(o=>{n(ce.util.upsertQueryData("getImageDTO",o.image_name,o))})}catch{}},keepUnusedDataFor:86400}),getIntermediatesCount:e.query({query:()=>({url:"images/intermediates"}),providesTags:["IntermediatesCount"]}),clearIntermediates:e.mutation({query:()=>({url:"images/intermediates",method:"DELETE"}),invalidatesTags:["IntermediatesCount"]}),getImageDTO:e.query({query:t=>({url:`images/i/${t}`}),providesTags:(t,n,r)=>[{type:"Image",id:r}],keepUnusedDataFor:86400}),getImageMetadata:e.query({query:t=>({url:`images/i/${t}/metadata`}),providesTags:(t,n,r)=>[{type:"ImageMetadata",id:r}],transformResponse:t=>{if(t){const n=Afe.safeParse(t);if(n.success)return n.data;se("images").warn("Problem parsing metadata")}},keepUnusedDataFor:86400}),deleteImage:e.mutation({query:({image_name:t})=>({url:`images/i/${t}`,method:"DELETE"}),async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){const{image_name:i,board_id:o}=t,a=Pr.includes(t.image_category),s={board_id:o??"none",categories:Ni(t)},l=[];l.push(n(ce.util.updateQueryData("listImages",s,u=>{Lt.removeOne(u,i)}))),l.push(n(Qe.util.updateQueryData(a?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",u=>{u.total=Math.max(u.total-1,0)})));try{await r}catch{l.forEach(u=>{u.undo()})}}}),deleteImages:e.mutation({query:({imageDTOs:t})=>({url:"images/delete",method:"POST",body:{image_names:t.map(r=>r.image_name)}}),async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,o=xE(t,"image_name");i.deleted_images.forEach(a=>{const s=o[a];if(s){const l={board_id:s.board_id??"none",categories:Ni(s)};n(ce.util.updateQueryData("listImages",l,c=>{Lt.removeOne(c,a)}));const u=Pr.includes(s.image_category);n(Qe.util.updateQueryData(u?"getBoardAssetsTotal":"getBoardImagesTotal",s.board_id??"none",c=>{c.total=Math.max(c.total-1,0)}))}})}catch{}}}),changeImageIsIntermediate:e.mutation({query:({imageDTO:t,is_intermediate:n})=>({url:`images/i/${t.image_name}`,method:"PATCH",body:{is_intermediate:n}}),async onQueryStarted({imageDTO:t,is_intermediate:n},{dispatch:r,queryFulfilled:i,getState:o}){const a=[];a.push(r(ce.util.updateQueryData("getImageDTO",t.image_name,u=>{Object.assign(u,{is_intermediate:n})})));const s=Ni(t),l=Pr.includes(t.image_category);if(n)a.push(r(ce.util.updateQueryData("listImages",{board_id:t.board_id??"none",categories:s},u=>{Lt.removeOne(u,t.image_name)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",u=>{u.total=Math.max(u.total-1,0)})));else{a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",p=>{p.total+=1})));const u={board_id:t.board_id??"none",categories:s},c=ce.endpoints.listImages.select(u)(o()),{data:d}=Fn.includes(t.image_category)?Qe.endpoints.getBoardImagesTotal.select(t.board_id??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(o()),f=c.data&&c.data.ids.length>=((d==null?void 0:d.total)??0),h=ou(c.data,t);(f||h)&&a.push(r(ce.util.updateQueryData("listImages",u,p=>{Lt.upsertOne(p,t)})))}try{await i}catch{a.forEach(u=>u.undo())}}}),changeImageSessionId:e.mutation({query:({imageDTO:t,session_id:n})=>({url:`images/i/${t.image_name}`,method:"PATCH",body:{session_id:n}}),async onQueryStarted({imageDTO:t,session_id:n},{dispatch:r,queryFulfilled:i}){const o=[];o.push(r(ce.util.updateQueryData("getImageDTO",t.image_name,a=>{Object.assign(a,{session_id:n})})));try{await i}catch{o.forEach(a=>a.undo())}}}),starImages:e.mutation({query:({imageDTOs:t})=>({url:"images/star",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{if(r[0]){const i=Ni(r[0]),o=r[0].board_id??void 0;return[{type:"ImageList",id:Vi({board_id:o,categories:i})},{type:"Board",id:o}]}return[]},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,a=t.filter(u=>o.updated_image_names.includes(u.image_name));if(!a[0])return;const s=Ni(a[0]),l=a[0].board_id;a.forEach(u=>{const{image_name:c}=u;n(ce.util.updateQueryData("getImageDTO",c,_=>{_.starred=!0}));const d={board_id:l??"none",categories:s},f=ce.endpoints.listImages.select(d)(i()),{data:h}=Fn.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(l??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),g=((h==null?void 0:h.total)??0)>=$0?ou(f.data,u):!0;(p||g)&&n(ce.util.updateQueryData("listImages",d,_=>{Lt.upsertOne(_,{...u,starred:!0})}))})}catch{}}}),unstarImages:e.mutation({query:({imageDTOs:t})=>({url:"images/unstar",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{if(r[0]){const i=Ni(r[0]),o=r[0].board_id??void 0;return[{type:"ImageList",id:Vi({board_id:o,categories:i})},{type:"Board",id:o}]}return[]},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,a=t.filter(u=>o.updated_image_names.includes(u.image_name));if(!a[0])return;const s=Ni(a[0]),l=a[0].board_id;a.forEach(u=>{const{image_name:c}=u;n(ce.util.updateQueryData("getImageDTO",c,_=>{_.starred=!1}));const d={board_id:l??"none",categories:s},f=ce.endpoints.listImages.select(d)(i()),{data:h}=Fn.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(l??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),g=((h==null?void 0:h.total)??0)>=$0?ou(f.data,u):!0;(p||g)&&n(ce.util.updateQueryData("listImages",d,_=>{Lt.upsertOne(_,{...u,starred:!1})}))})}catch{}}}),uploadImage:e.mutation({query:({file:t,image_category:n,is_intermediate:r,session_id:i,board_id:o,crop_visible:a})=>{const s=new FormData;return s.append("file",t),{url:"images/upload",method:"POST",body:s,params:{image_category:n,is_intermediate:r,session_id:i,board_id:o==="none"?void 0:o,crop_visible:a}}},async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r;if(i.is_intermediate)return;n(ce.util.upsertQueryData("getImageDTO",i.image_name,i));const o=Ni(i);n(ce.util.updateQueryData("listImages",{board_id:i.board_id??"none",categories:o},a=>{Lt.addOne(a,i)})),n(Qe.util.updateQueryData("getBoardAssetsTotal",i.board_id??"none",a=>{a.total+=1}))}catch{}}}),deleteBoard:e.mutation({query:t=>({url:`boards/${t}`,method:"DELETE"}),invalidatesTags:()=>[{type:"Board",id:kr},{type:"ImageList",id:Vi({board_id:"none",categories:Fn})},{type:"ImageList",id:Vi({board_id:"none",categories:Pr})}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,{deleted_board_images:o}=i;o.forEach(l=>{n(ce.util.updateQueryData("getImageDTO",l,u=>{u.board_id=void 0}))}),n(Qe.util.updateQueryData("getBoardAssetsTotal",t,l=>{l.total=0})),n(Qe.util.updateQueryData("getBoardImagesTotal",t,l=>{l.total=0}));const a=[{categories:Fn},{categories:Pr}],s=o.map(l=>({id:l,changes:{board_id:void 0}}));a.forEach(l=>{n(ce.util.updateQueryData("listImages",l,u=>{Lt.updateMany(u,s)}))})}catch{}}}),deleteBoardAndImages:e.mutation({query:t=>({url:`boards/${t}`,method:"DELETE",params:{include_images:!0}}),invalidatesTags:()=>[{type:"Board",id:kr},{type:"ImageList",id:Vi({board_id:"none",categories:Fn})},{type:"ImageList",id:Vi({board_id:"none",categories:Pr})}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,{deleted_images:o}=i;[{categories:Fn},{categories:Pr}].forEach(s=>{n(ce.util.updateQueryData("listImages",s,l=>{Lt.removeMany(l,o)}))}),n(Qe.util.updateQueryData("getBoardAssetsTotal",t,s=>{s.total=0})),n(Qe.util.updateQueryData("getBoardImagesTotal",t,s=>{s.total=0}))}catch{}}}),addImageToBoard:e.mutation({query:({board_id:t,imageDTO:n})=>{const{image_name:r}=n;return{url:"board_images/",method:"POST",body:{board_id:t,image_name:r}}},invalidatesTags:(t,n,{board_id:r})=>[{type:"Board",id:r}],async onQueryStarted({board_id:t,imageDTO:n},{dispatch:r,queryFulfilled:i,getState:o}){const a=[],s=Ni(n),l=Pr.includes(n.image_category);if(a.push(r(ce.util.updateQueryData("getImageDTO",n.image_name,u=>{u.board_id=t}))),!n.is_intermediate){a.push(r(ce.util.updateQueryData("listImages",{board_id:n.board_id??"none",categories:s},p=>{Lt.removeOne(p,n.image_name)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",n.board_id??"none",p=>{p.total=Math.max(p.total-1,0)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t??"none",p=>{p.total+=1})));const u={board_id:t??"none",categories:s},c=ce.endpoints.listImages.select(u)(o()),{data:d}=Fn.includes(n.image_category)?Qe.endpoints.getBoardImagesTotal.select(n.board_id??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(n.board_id??"none")(o()),f=c.data&&c.data.ids.length>=((d==null?void 0:d.total)??0),h=ou(c.data,n);(f||h)&&a.push(r(ce.util.updateQueryData("listImages",u,p=>{Lt.addOne(p,n)})))}try{await i}catch{a.forEach(u=>u.undo())}}}),removeImageFromBoard:e.mutation({query:({imageDTO:t})=>{const{image_name:n}=t;return{url:"board_images/",method:"DELETE",body:{image_name:n}}},invalidatesTags:(t,n,{imageDTO:r})=>{const{board_id:i}=r;return[{type:"Board",id:i??"none"}]},async onQueryStarted({imageDTO:t},{dispatch:n,queryFulfilled:r,getState:i}){const o=Ni(t),a=[],s=Pr.includes(t.image_category);a.push(n(ce.util.updateQueryData("getImageDTO",t.image_name,h=>{h.board_id=void 0}))),a.push(n(ce.util.updateQueryData("listImages",{board_id:t.board_id??"none",categories:o},h=>{Lt.removeOne(h,t.image_name)}))),a.push(n(Qe.util.updateQueryData(s?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",h=>{h.total=Math.max(h.total-1,0)}))),a.push(n(Qe.util.updateQueryData(s?"getBoardAssetsTotal":"getBoardImagesTotal","none",h=>{h.total+=1})));const l={board_id:"none",categories:o},u=ce.endpoints.listImages.select(l)(i()),{data:c}=Fn.includes(t.image_category)?Qe.endpoints.getBoardImagesTotal.select(t.board_id??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(i()),d=u.data&&u.data.ids.length>=((c==null?void 0:c.total)??0),f=ou(u.data,t);(d||f)&&a.push(n(ce.util.updateQueryData("listImages",l,h=>{Lt.upsertOne(h,t)})));try{await r}catch{a.forEach(h=>h.undo())}}}),addImagesToBoard:e.mutation({query:({board_id:t,imageDTOs:n})=>({url:"board_images/batch",method:"POST",body:{image_names:n.map(r=>r.image_name),board_id:t}}),invalidatesTags:(t,n,{board_id:r})=>[{type:"Board",id:r??"none"}],async onQueryStarted({board_id:t,imageDTOs:n},{dispatch:r,queryFulfilled:i,getState:o}){try{const{data:a}=await i,{added_image_names:s}=a;s.forEach(l=>{r(ce.util.updateQueryData("getImageDTO",l,y=>{y.board_id=t==="none"?void 0:t}));const u=n.find(y=>y.image_name===l);if(!u)return;const c=Ni(u),d=u.board_id,f=Pr.includes(u.image_category);r(ce.util.updateQueryData("listImages",{board_id:d??"none",categories:c},y=>{Lt.removeOne(y,u.image_name)})),r(Qe.util.updateQueryData(f?"getBoardAssetsTotal":"getBoardImagesTotal",d??"none",y=>{y.total=Math.max(y.total-1,0)})),r(Qe.util.updateQueryData(f?"getBoardAssetsTotal":"getBoardImagesTotal",t??"none",y=>{y.total+=1}));const h={board_id:t,categories:c},p=ce.endpoints.listImages.select(h)(o()),{data:g}=Fn.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(t??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(t??"none")(o()),_=p.data&&p.data.ids.length>=((g==null?void 0:g.total)??0),b=((g==null?void 0:g.total)??0)>=$0?ou(p.data,u):!0;(_||b)&&r(ce.util.updateQueryData("listImages",h,y=>{Lt.upsertOne(y,{...u,board_id:t})}))})}catch{}}}),removeImagesFromBoard:e.mutation({query:({imageDTOs:t})=>({url:"board_images/batch/delete",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{const i=[],o=[];return t==null||t.removed_image_names.forEach(a=>{var l;const s=(l=r.find(u=>u.image_name===a))==null?void 0:l.board_id;!s||i.includes(s)||o.push({type:"Board",id:s})}),o},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,{removed_image_names:a}=o;a.forEach(s=>{n(ce.util.updateQueryData("getImageDTO",s,_=>{_.board_id=void 0}));const l=t.find(_=>_.image_name===s);if(!l)return;const u=Ni(l),c=Pr.includes(l.image_category);n(ce.util.updateQueryData("listImages",{board_id:l.board_id??"none",categories:u},_=>{Lt.removeOne(_,l.image_name)})),n(Qe.util.updateQueryData(c?"getBoardAssetsTotal":"getBoardImagesTotal",l.board_id??"none",_=>{_.total=Math.max(_.total-1,0)})),n(Qe.util.updateQueryData(c?"getBoardAssetsTotal":"getBoardImagesTotal","none",_=>{_.total+=1}));const d={board_id:"none",categories:u},f=ce.endpoints.listImages.select(d)(i()),{data:h}=Fn.includes(l.image_category)?Qe.endpoints.getBoardImagesTotal.select(l.board_id??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l.board_id??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),g=((h==null?void 0:h.total)??0)>=$0?ou(f.data,l):!0;(p||g)&&n(ce.util.updateQueryData("listImages",d,_=>{Lt.upsertOne(_,{...l,board_id:"none"})}))})}catch{}}}),bulkDownloadImages:e.mutation({query:({image_names:t,board_id:n})=>({url:"images/download",method:"POST",body:{image_names:t,board_id:n}})})})}),{useGetIntermediatesCountQuery:Nze,useListImagesQuery:Dze,useLazyListImagesQuery:Lze,useGetImageDTOQuery:Fze,useGetImageMetadataQuery:Bze,useDeleteImageMutation:zze,useDeleteImagesMutation:Vze,useUploadImageMutation:jze,useClearIntermediatesMutation:Uze,useAddImagesToBoardMutation:Gze,useRemoveImagesFromBoardMutation:Hze,useAddImageToBoardMutation:qze,useRemoveImageFromBoardMutation:Wze,useChangeImageIsIntermediateMutation:Kze,useChangeImageSessionIdMutation:Xze,useDeleteBoardAndImagesMutation:Qze,useDeleteBoardMutation:Yze,useStarImagesMutation:Zze,useUnstarImagesMutation:Jze,useBulkDownloadImagesMutation:eVe}=ce,YF={selection:[],shouldAutoSwitch:!0,autoAssignBoardOnClick:!0,autoAddBoardId:"none",galleryImageMinimumWidth:96,selectedBoardId:"none",galleryView:"images",boardSearchText:""},ZF=Wt({name:"gallery",initialState:YF,reducers:{imageSelected:(e,t)=>{e.selection=t.payload?[t.payload]:[]},selectionChanged:(e,t)=>{e.selection=g5(t.payload,n=>n.image_name)},shouldAutoSwitchChanged:(e,t)=>{e.shouldAutoSwitch=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},autoAssignBoardOnClickChanged:(e,t)=>{e.autoAssignBoardOnClick=t.payload},boardIdSelected:(e,t)=>{e.selectedBoardId=t.payload.boardId,e.galleryView="images"},autoAddBoardIdChanged:(e,t)=>{if(!t.payload){e.autoAddBoardId="none";return}e.autoAddBoardId=t.payload},galleryViewChanged:(e,t)=>{e.galleryView=t.payload},boardSearchTextChanged:(e,t)=>{e.boardSearchText=t.payload}},extraReducers:e=>{e.addMatcher(Ffe,(t,n)=>{const r=n.meta.arg.originalArgs;r===t.selectedBoardId&&(t.selectedBoardId="none",t.galleryView="images"),r===t.autoAddBoardId&&(t.autoAddBoardId="none")}),e.addMatcher(Qe.endpoints.listAllBoards.matchFulfilled,(t,n)=>{const r=n.payload;t.autoAddBoardId&&(r.map(i=>i.board_id).includes(t.autoAddBoardId)||(t.autoAddBoardId="none"))})}}),{imageSelected:pa,shouldAutoSwitchChanged:tVe,autoAssignBoardOnClickChanged:nVe,setGalleryImageMinimumWidth:rVe,boardIdSelected:M1,autoAddBoardIdChanged:iVe,galleryViewChanged:M5,selectionChanged:JF,boardSearchTextChanged:oVe}=ZF.actions,Lfe=ZF.reducer,Ffe=si(ce.endpoints.deleteBoard.matchFulfilled,ce.endpoints.deleteBoardAndImages.matchFulfilled),_I={weight:.75},Bfe={loras:{}},eB=Wt({name:"lora",initialState:Bfe,reducers:{loraAdded:(e,t)=>{const{model_name:n,id:r,base_model:i}=t.payload;e.loras[r]={id:r,model_name:n,base_model:i,..._I}},loraRecalled:(e,t)=>{const{model_name:n,id:r,base_model:i,weight:o}=t.payload;e.loras[r]={id:r,model_name:n,base_model:i,weight:o}},loraRemoved:(e,t)=>{const n=t.payload;delete e.loras[n]},lorasCleared:e=>{e.loras={}},loraWeightChanged:(e,t)=>{const{id:n,weight:r}=t.payload,i=e.loras[n];i&&(i.weight=r)},loraWeightReset:(e,t)=>{const n=t.payload,r=e.loras[n];r&&(r.weight=_I.weight)}}}),{loraAdded:aVe,loraRemoved:tB,loraWeightChanged:sVe,loraWeightReset:lVe,lorasCleared:uVe,loraRecalled:cVe}=eB.actions,zfe=eB.reducer;function to(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n{let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const d=t;t=u??typeof c!="object"?c:Object.assign({},t,c),n.forEach(f=>f(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,i,s),s},Vfe=e=>e?SI(e):SI,{useSyncExternalStoreWithSelector:jfe}=Rse;function nB(e,t=e.getState,n){const r=jfe(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return k.useDebugValue(r),r}const xI=(e,t)=>{const n=Vfe(e),r=(i,o=t)=>nB(n,i,o);return Object.assign(r,n),r},Ufe=(e,t)=>e?xI(e,t):xI;function ii(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{}};function eS(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}qy.prototype=eS.prototype={constructor:qy,on:function(e,t){var n=this._,r=Hfe(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o0)for(var n=new Array(i),r=0,i,o;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),CI.hasOwnProperty(t)?{space:CI[t],local:e}:e}function Wfe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===R5&&t.documentElement.namespaceURI===R5?t.createElement(e):t.createElementNS(n,e)}}function Kfe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rB(e){var t=tS(e);return(t.local?Kfe:Wfe)(t)}function Xfe(){}function tT(e){return e==null?Xfe:function(){return this.querySelector(e)}}function Qfe(e){typeof e!="function"&&(e=tT(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=m&&(m=y+1);!(S=_[m])&&++m=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function She(e){e||(e=xhe);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;ot?1:e>=t?0:NaN}function whe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Che(){return Array.from(this)}function Ehe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Dhe:typeof t=="function"?Fhe:Lhe)(e,t,n??"")):yf(this.node(),e)}function yf(e,t){return e.style.getPropertyValue(t)||lB(e).getComputedStyle(e,null).getPropertyValue(t)}function zhe(e){return function(){delete this[e]}}function Vhe(e,t){return function(){this[e]=t}}function jhe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Uhe(e,t){return arguments.length>1?this.each((t==null?zhe:typeof t=="function"?jhe:Vhe)(e,t)):this.node()[e]}function uB(e){return e.trim().split(/^|\s+/)}function nT(e){return e.classList||new cB(e)}function cB(e){this._node=e,this._names=uB(e.getAttribute("class")||"")}cB.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function dB(e,t){for(var n=nT(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function ype(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n()=>e;function O5(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}O5.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ape(e){return!e.ctrlKey&&!e.button}function Ppe(){return this.parentNode}function kpe(e,t){return t??{x:e.x,y:e.y}}function Ipe(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mpe(){var e=Ape,t=Ppe,n=kpe,r=Ipe,i={},o=eS("start","drag","end"),a=0,s,l,u,c,d=0;function f(v){v.on("mousedown.drag",h).filter(r).on("touchstart.drag",_).on("touchmove.drag",b,Tpe).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(v,S){if(!(c||!e.call(this,v,S))){var w=m(this,t.call(this,v,S),v,S,"mouse");w&&(So(v.view).on("mousemove.drag",p,wg).on("mouseup.drag",g,wg),gB(v.view),Xx(v),u=!1,s=v.clientX,l=v.clientY,w("start",v))}}function p(v){if(Dd(v),!u){var S=v.clientX-s,w=v.clientY-l;u=S*S+w*w>d}i.mouse("drag",v)}function g(v){So(v.view).on("mousemove.drag mouseup.drag",null),mB(v.view,u),Dd(v),i.mouse("end",v)}function _(v,S){if(e.call(this,v,S)){var w=v.changedTouches,C=t.call(this,v,S),x=w.length,P,E;for(P=0;P>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?F0(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?F0(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ope.exec(e))?new Yr(t[1],t[2],t[3],1):(t=$pe.exec(e))?new Yr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Npe.exec(e))?F0(t[1],t[2],t[3],t[4]):(t=Dpe.exec(e))?F0(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Lpe.exec(e))?MI(t[1],t[2]/100,t[3]/100,1):(t=Fpe.exec(e))?MI(t[1],t[2]/100,t[3]/100,t[4]):EI.hasOwnProperty(e)?PI(EI[e]):e==="transparent"?new Yr(NaN,NaN,NaN,0):null}function PI(e){return new Yr(e>>16&255,e>>8&255,e&255,1)}function F0(e,t,n,r){return r<=0&&(e=t=n=NaN),new Yr(e,t,n,r)}function Vpe(e){return e instanceof Pm||(e=Tg(e)),e?(e=e.rgb(),new Yr(e.r,e.g,e.b,e.opacity)):new Yr}function $5(e,t,n,r){return arguments.length===1?Vpe(e):new Yr(e,t,n,r??1)}function Yr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}rT(Yr,$5,yB(Pm,{brighter(e){return e=e==null?O1:Math.pow(O1,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Cg:Math.pow(Cg,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yr(Uu(this.r),Uu(this.g),Uu(this.b),$1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kI,formatHex:kI,formatHex8:jpe,formatRgb:II,toString:II}));function kI(){return`#${Mu(this.r)}${Mu(this.g)}${Mu(this.b)}`}function jpe(){return`#${Mu(this.r)}${Mu(this.g)}${Mu(this.b)}${Mu((isNaN(this.opacity)?1:this.opacity)*255)}`}function II(){const e=$1(this.opacity);return`${e===1?"rgb(":"rgba("}${Uu(this.r)}, ${Uu(this.g)}, ${Uu(this.b)}${e===1?")":`, ${e})`}`}function $1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Uu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mu(e){return e=Uu(e),(e<16?"0":"")+e.toString(16)}function MI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new xo(e,t,n,r)}function vB(e){if(e instanceof xo)return new xo(e.h,e.s,e.l,e.opacity);if(e instanceof Pm||(e=Tg(e)),!e)return new xo;if(e instanceof xo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&l<1?0:a,new xo(a,s,l,e.opacity)}function Upe(e,t,n,r){return arguments.length===1?vB(e):new xo(e,t,n,r??1)}function xo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}rT(xo,Upe,yB(Pm,{brighter(e){return e=e==null?O1:Math.pow(O1,e),new xo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Cg:Math.pow(Cg,e),new xo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Yr(Qx(e>=240?e-240:e+120,i,r),Qx(e,i,r),Qx(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new xo(RI(this.h),B0(this.s),B0(this.l),$1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$1(this.opacity);return`${e===1?"hsl(":"hsla("}${RI(this.h)}, ${B0(this.s)*100}%, ${B0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function RI(e){return e=(e||0)%360,e<0?e+360:e}function B0(e){return Math.max(0,Math.min(1,e||0))}function Qx(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const bB=e=>()=>e;function Gpe(e,t){return function(n){return e+n*t}}function Hpe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function qpe(e){return(e=+e)==1?_B:function(t,n){return n-t?Hpe(t,n,e):bB(isNaN(t)?n:t)}}function _B(e,t){var n=t-e;return n?Gpe(e,n):bB(isNaN(e)?t:e)}const OI=function e(t){var n=qpe(t);function r(i,o){var a=n((i=$5(i)).r,(o=$5(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=_B(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function qs(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var N5=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Yx=new RegExp(N5.source,"g");function Wpe(e){return function(){return e}}function Kpe(e){return function(t){return e(t)+""}}function Xpe(e,t){var n=N5.lastIndex=Yx.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=N5.exec(e))&&(i=Yx.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:qs(r,i)})),n=Yx.lastIndex;return n180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:qs(u,c)})):c&&d.push(i(d)+"rotate("+c+r)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:qs(u,c)}):c&&d.push(i(d)+"skewX("+c+r)}function l(u,c,d,f,h,p){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");p.push({i:g-4,x:qs(u,d)},{i:g-2,x:qs(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var p=-1,g=f.length,_;++p=0&&e._call.call(void 0,t),e=e._next;--vf}function DI(){ac=(D1=Ag.now())+nS,vf=Vh=0;try{oge()}finally{vf=0,sge(),ac=0}}function age(){var e=Ag.now(),t=e-D1;t>wB&&(nS-=t,D1=e)}function sge(){for(var e,t=N1,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:N1=n);jh=e,L5(r)}function L5(e){if(!vf){Vh&&(Vh=clearTimeout(Vh));var t=e-ac;t>24?(e<1/0&&(Vh=setTimeout(DI,e-Ag.now()-nS)),fh&&(fh=clearInterval(fh))):(fh||(D1=Ag.now(),fh=setInterval(age,wB)),vf=1,CB(DI))}}function LI(e,t,n){var r=new L1;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var lge=eS("start","end","cancel","interrupt"),uge=[],TB=0,FI=1,F5=2,Wy=3,BI=4,B5=5,Ky=6;function rS(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;cge(e,n,{name:t,index:r,group:i,on:lge,tween:uge,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:TB})}function oT(e,t){var n=zo(e,t);if(n.state>TB)throw new Error("too late; already scheduled");return n}function ka(e,t){var n=zo(e,t);if(n.state>Wy)throw new Error("too late; already running");return n}function zo(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function cge(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=EB(o,0,n.time);function o(u){n.state=FI,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==FI)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Wy)return LI(a);h.state===BI?(h.state=Ky,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+cF5&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function zge(e,t,n){var r,i,o=Bge(t)?oT:ka;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function Vge(e,t){var n=this._id;return arguments.length<2?zo(this.node(),n).on.on(e):this.each(zge(n,e,t))}function jge(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Uge(){return this.on("end.remove",jge(this._id))}function Gge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=tT(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a()=>e;function gme(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Za(e,t,n){this.k=e,this.x=t,this.y=n}Za.prototype={constructor:Za,scale:function(e){return e===1?this:new Za(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Za(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vl=new Za(1,0,0);Za.prototype;function Zx(e){e.stopImmediatePropagation()}function hh(e){e.preventDefault(),e.stopImmediatePropagation()}function mme(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function yme(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function zI(){return this.__zoom||vl}function vme(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function bme(){return navigator.maxTouchPoints||"ontouchstart"in this}function _me(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Sme(){var e=mme,t=yme,n=_me,r=vme,i=bme,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=rge,u=eS("start","zoom","end"),c,d,f,h=500,p=150,g=0,_=10;function b(T){T.property("__zoom",zI).on("wheel.zoom",x,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(T,A,R,D){var $=T.selection?T.selection():T;$.property("__zoom",zI),T!==$?S(T,A,R,D):$.interrupt().each(function(){w(this,arguments).event(D).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},b.scaleBy=function(T,A,R,D){b.scaleTo(T,function(){var $=this.__zoom.k,L=typeof A=="function"?A.apply(this,arguments):A;return $*L},R,D)},b.scaleTo=function(T,A,R,D){b.transform(T,function(){var $=t.apply(this,arguments),L=this.__zoom,O=R==null?v($):typeof R=="function"?R.apply(this,arguments):R,B=L.invert(O),U=typeof A=="function"?A.apply(this,arguments):A;return n(m(y(L,U),O,B),$,a)},R,D)},b.translateBy=function(T,A,R,D){b.transform(T,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),a)},null,D)},b.translateTo=function(T,A,R,D,$){b.transform(T,function(){var L=t.apply(this,arguments),O=this.__zoom,B=D==null?v(L):typeof D=="function"?D.apply(this,arguments):D;return n(vl.translate(B[0],B[1]).scale(O.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof R=="function"?-R.apply(this,arguments):-R),L,a)},D,$)};function y(T,A){return A=Math.max(o[0],Math.min(o[1],A)),A===T.k?T:new Za(A,T.x,T.y)}function m(T,A,R){var D=A[0]-R[0]*T.k,$=A[1]-R[1]*T.k;return D===T.x&&$===T.y?T:new Za(T.k,D,$)}function v(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function S(T,A,R,D){T.on("start.zoom",function(){w(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(D).end()}).tween("zoom",function(){var $=this,L=arguments,O=w($,L).event(D),B=t.apply($,L),U=R==null?v(B):typeof R=="function"?R.apply($,L):R,j=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),q=$.__zoom,Y=typeof A=="function"?A.apply($,L):A,Z=l(q.invert(U).concat(j/q.k),Y.invert(U).concat(j/Y.k));return function(V){if(V===1)V=Y;else{var K=Z(V),ee=j/K[2];V=new Za(ee,U[0]-K[0]*ee,U[1]-K[1]*ee)}O.zoom(null,V)}})}function w(T,A,R){return!R&&T.__zooming||new C(T,A)}function C(T,A){this.that=T,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,A),this.taps=0}C.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,A){return this.mouse&&T!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var A=So(this.that).datum();u.call(T,this.that,new gme(T,{sourceEvent:this.sourceEvent,target:b,type:T,transform:this.that.__zoom,dispatch:u}),A)}};function x(T,...A){if(!e.apply(this,arguments))return;var R=w(this,A).event(T),D=this.__zoom,$=Math.max(o[0],Math.min(o[1],D.k*Math.pow(2,r.apply(this,arguments)))),L=Yo(T);if(R.wheel)(R.mouse[0][0]!==L[0]||R.mouse[0][1]!==L[1])&&(R.mouse[1]=D.invert(R.mouse[0]=L)),clearTimeout(R.wheel);else{if(D.k===$)return;R.mouse=[L,D.invert(L)],Xy(this),R.start()}hh(T),R.wheel=setTimeout(O,p),R.zoom("mouse",n(m(y(D,$),R.mouse[0],R.mouse[1]),R.extent,a));function O(){R.wheel=null,R.end()}}function P(T,...A){if(f||!e.apply(this,arguments))return;var R=T.currentTarget,D=w(this,A,!0).event(T),$=So(T.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",j,!0),L=Yo(T,R),O=T.clientX,B=T.clientY;gB(T.view),Zx(T),D.mouse=[L,this.__zoom.invert(L)],Xy(this),D.start();function U(q){if(hh(q),!D.moved){var Y=q.clientX-O,Z=q.clientY-B;D.moved=Y*Y+Z*Z>g}D.event(q).zoom("mouse",n(m(D.that.__zoom,D.mouse[0]=Yo(q,R),D.mouse[1]),D.extent,a))}function j(q){$.on("mousemove.zoom mouseup.zoom",null),mB(q.view,D.moved),hh(q),D.event(q).end()}}function E(T,...A){if(e.apply(this,arguments)){var R=this.__zoom,D=Yo(T.changedTouches?T.changedTouches[0]:T,this),$=R.invert(D),L=R.k*(T.shiftKey?.5:2),O=n(m(y(R,L),D,$),t.apply(this,A),a);hh(T),s>0?So(this).transition().duration(s).call(S,O,D,T):So(this).call(b.transform,O,D,T)}}function I(T,...A){if(e.apply(this,arguments)){var R=T.touches,D=R.length,$=w(this,A,T.changedTouches.length===D).event(T),L,O,B,U;for(Zx(T),O=0;O"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},IB=ys.error001();function fn(e,t){const n=k.useContext(iS);if(n===null)throw new Error(IB);return nB(n,e,t)}const Kn=()=>{const e=k.useContext(iS);if(e===null)throw new Error(IB);return k.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},wme=e=>e.userSelectionActive?"none":"all";function Cme({position:e,children:t,className:n,style:r,...i}){const o=fn(wme),a=`${e}`.split("-");return J.createElement("div",{className:to(["react-flow__panel",n,...a]),style:{...r,pointerEvents:o},...i},t)}function Eme({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:J.createElement(Cme,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev"},J.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const Tme=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:o={},labelBgPadding:a=[2,4],labelBgBorderRadius:s=2,children:l,className:u,...c})=>{const d=k.useRef(null),[f,h]=k.useState({x:0,y:0,width:0,height:0}),p=to(["react-flow__edge-textwrapper",u]);return k.useEffect(()=>{if(d.current){const g=d.current.getBBox();h({x:g.x,y:g.y,width:g.width,height:g.height})}},[n]),typeof n>"u"||!n?null:J.createElement("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:p,visibility:f.width?"visible":"hidden",...c},i&&J.createElement("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:o,rx:s,ry:s}),J.createElement("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:d,style:r},n),l)};var Ame=k.memo(Tme);const sT=e=>({width:e.offsetWidth,height:e.offsetHeight}),bf=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),lT=(e={x:0,y:0},t)=>({x:bf(e.x,t[0][0],t[1][0]),y:bf(e.y,t[0][1],t[1][1])}),VI=(e,t,n)=>en?-bf(Math.abs(e-n),1,50)/50:0,MB=(e,t)=>{const n=VI(e.x,35,t.width-35)*20,r=VI(e.y,35,t.height-35)*20;return[n,r]},RB=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},OB=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Pg=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),$B=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),jI=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),dVe=(e,t)=>$B(OB(Pg(e),Pg(t))),z5=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Pme=e=>Ki(e.width)&&Ki(e.height)&&Ki(e.x)&&Ki(e.y),Ki=e=>!isNaN(e)&&isFinite(e),Rn=Symbol.for("internals"),NB=["Enter"," ","Escape"],kme=(e,t)=>{},Ime=e=>"nativeEvent"in e;function V5(e){var i,o;const t=Ime(e)?e.nativeEvent:e,n=((o=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:o[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const DB=e=>"clientX"in e,bl=(e,t)=>{var o,a;const n=DB(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},F1=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},km=({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h=20})=>J.createElement(J.Fragment,null,J.createElement("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:d,markerStart:f}),h&&J.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),i&&Ki(n)&&Ki(r)?J.createElement(Ame,{x:n,y:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u}):null);km.displayName="BaseEdge";function ph(e,t,n){return n===void 0?n:r=>{const i=t().edges.find(o=>o.id===e);i&&n(r,{...i})}}function LB({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n{const[_,b,y]=BB({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o});return J.createElement(km,{path:_,labelX:b,labelY:y,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,interactionWidth:g})});uT.displayName="SimpleBezierEdge";const GI={[Pe.Left]:{x:-1,y:0},[Pe.Right]:{x:1,y:0},[Pe.Top]:{x:0,y:-1},[Pe.Bottom]:{x:0,y:1}},Mme=({source:e,sourcePosition:t=Pe.Bottom,target:n})=>t===Pe.Left||t===Pe.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Rme({source:e,sourcePosition:t=Pe.Bottom,target:n,targetPosition:r=Pe.Top,center:i,offset:o}){const a=GI[t],s=GI[r],l={x:e.x+a.x*o,y:e.y+a.y*o},u={x:n.x+s.x*o,y:n.y+s.y*o},c=Mme({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",f=c[d];let h=[],p,g;const _={x:0,y:0},b={x:0,y:0},[y,m,v,S]=LB({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){p=i.x||y,g=i.y||m;const C=[{x:p,y:l.y},{x:p,y:u.y}],x=[{x:l.x,y:g},{x:u.x,y:g}];a[d]===f?h=d==="x"?C:x:h=d==="x"?x:C}else{const C=[{x:l.x,y:u.y}],x=[{x:u.x,y:l.y}];if(d==="x"?h=a.x===f?x:C:h=a.y===f?C:x,t===r){const M=Math.abs(e[d]-n[d]);if(M<=o){const T=Math.min(o-1,o-M);a[d]===f?_[d]=(l[d]>e[d]?-1:1)*T:b[d]=(u[d]>n[d]?-1:1)*T}}if(t!==r){const M=d==="x"?"y":"x",T=a[d]===s[M],A=l[M]>u[M],R=l[M]=N?(p=(P.x+E.x)/2,g=h[0].y):(p=h[0].x,g=(P.y+E.y)/2)}return[[e,{x:l.x+_.x,y:l.y+_.y},...h,{x:u.x+b.x,y:u.y+b.y},n],p,g,v,S]}function Ome(e,t,n,r){const i=Math.min(HI(e,t)/2,HI(t,n)/2,r),{x:o,y:a}=t;if(e.x===o&&o===n.x||e.y===a&&a===n.y)return`L${o} ${a}`;if(e.y===a){const u=e.x{let m="";return y>0&&y{const[b,y,m]=j5({sourceX:e,sourceY:t,sourcePosition:d,targetX:n,targetY:r,targetPosition:f,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset});return J.createElement(km,{path:b,labelX:y,labelY:m,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:h,markerStart:p,interactionWidth:_})});oS.displayName="SmoothStepEdge";const cT=k.memo(e=>{var t;return J.createElement(oS,{...e,pathOptions:k.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});cT.displayName="StepEdge";function $me({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,a,s]=LB({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,a,s]}const dT=k.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h})=>{const[p,g,_]=$me({sourceX:e,sourceY:t,targetX:n,targetY:r});return J.createElement(km,{path:p,labelX:g,labelY:_,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h})});dT.displayName="StraightEdge";function j0(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function qI({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case Pe.Left:return[t-j0(t-r,o),n];case Pe.Right:return[t+j0(r-t,o),n];case Pe.Top:return[t,n-j0(n-i,o)];case Pe.Bottom:return[t,n+j0(i-n,o)]}}function zB({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:r,targetY:i,targetPosition:o=Pe.Top,curvature:a=.25}){const[s,l]=qI({pos:n,x1:e,y1:t,x2:r,y2:i,c:a}),[u,c]=qI({pos:o,x1:r,y1:i,x2:e,y2:t,c:a}),[d,f,h,p]=FB({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${r},${i}`,d,f,h,p]}const z1=k.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Pe.Bottom,targetPosition:o=Pe.Top,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,pathOptions:g,interactionWidth:_})=>{const[b,y,m]=zB({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o,curvature:g==null?void 0:g.curvature});return J.createElement(km,{path:b,labelX:y,labelY:m,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,interactionWidth:_})});z1.displayName="BezierEdge";const fT=k.createContext(null),Nme=fT.Provider;fT.Consumer;const Dme=()=>k.useContext(fT),Lme=e=>"id"in e&&"source"in e&&"target"in e,VB=e=>"id"in e&&!("source"in e)&&!("target"in e),Fme=(e,t,n)=>{if(!VB(e))return[];const r=n.filter(i=>i.source===e.id).map(i=>i.target);return t.filter(i=>r.includes(i.id))},Bme=(e,t,n)=>{if(!VB(e))return[];const r=n.filter(i=>i.target===e.id).map(i=>i.source);return t.filter(i=>r.includes(i.id))},jB=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,U5=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,zme=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Uh=(e,t)=>{if(!e.source||!e.target)return t;let n;return Lme(e)?n={...e}:n={...e,id:jB(e)},zme(n,t)?t:t.concat(n)},Vme=(e,t,n,r={shouldReplaceId:!0})=>{const{id:i,...o}=e;if(!t.source||!t.target||!n.find(l=>l.id===i))return n;const s={...o,id:r.shouldReplaceId?jB(t):i,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(l=>l.id!==i).concat(s)},UB=({x:e,y:t},[n,r,i],o,[a,s])=>{const l={x:(e-n)/i,y:(t-r)/i};return o?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},jme=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),Fd=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],i={x:e.position.x-n,y:e.position.y-r};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:i}},hT=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const{x:o,y:a}=Fd(i,t).positionAbsolute;return OB(r,Pg({x:o,y:a,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return $B(n)},GB=(e,t,[n,r,i]=[0,0,1],o=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/i,y:(t.y-r)/i,width:t.width/i,height:t.height/i},u=[];return e.forEach(c=>{const{width:d,height:f,selectable:h=!0,hidden:p=!1}=c;if(a&&!h||p)return!1;const{positionAbsolute:g}=Fd(c,s),_={x:g.x,y:g.y,width:d||0,height:f||0},b=z5(l,_),y=typeof d>"u"||typeof f>"u"||d===null||f===null,m=o&&b>0,v=(d||0)*(f||0);(y||m||b>=v||c.dragging)&&u.push(c)}),u},pT=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},HB=(e,t,n,r,i,o=.1)=>{const a=t/(e.width*(1+o)),s=n/(e.height*(1+o)),l=Math.min(a,s),u=bf(l,r,i),c=e.x+e.width/2,d=e.y+e.height/2,f=t/2-c*u,h=n/2-d*u;return[f,h,u]},mu=(e,t=0)=>e.transition().duration(t);function WI(e,t,n,r){return(t[n]||[]).reduce((i,o)=>{var a,s;return`${e.id}-${o.id}-${n}`!==r&&i.push({id:o.id||null,type:n,nodeId:e.id,x:(((a=e.positionAbsolute)==null?void 0:a.x)??0)+o.x+o.width/2,y:(((s=e.positionAbsolute)==null?void 0:s.y)??0)+o.y+o.height/2}),i},[])}function Ume(e,t,n,r,i,o){const{x:a,y:s}=bl(e),u=t.elementsFromPoint(a,s).find(p=>p.classList.contains("react-flow__handle"));if(u){const p=u.getAttribute("data-nodeid");if(p){const g=gT(void 0,u),_=u.getAttribute("data-handleid"),b=o({nodeId:p,id:_,type:g});if(b)return{handle:{id:_,type:g,nodeId:p,x:n.x,y:n.y},validHandleResult:b}}}let c=[],d=1/0;if(i.forEach(p=>{const g=Math.sqrt((p.x-n.x)**2+(p.y-n.y)**2);if(g<=r){const _=o(p);g<=d&&(gp.isValid),h=c.some(({handle:p})=>p.type==="target");return c.find(({handle:p,validHandleResult:g})=>h?p.type==="target":f?g.isValid:!0)||c[0]}const Gme={source:null,target:null,sourceHandle:null,targetHandle:null},qB=()=>({handleDomNode:null,isValid:!1,connection:Gme,endHandle:null});function WB(e,t,n,r,i,o,a){const s=i==="target",l=a.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...qB(),handleDomNode:l};if(l){const c=gT(void 0,l),d=l.getAttribute("data-nodeid"),f=l.getAttribute("data-handleid"),h=l.classList.contains("connectable"),p=l.classList.contains("connectableend"),g={source:s?d:n,sourceHandle:s?f:r,target:s?n:d,targetHandle:s?r:f};u.connection=g,h&&p&&(t===sc.Strict?s&&c==="source"||!s&&c==="target":d!==n||f!==r)&&(u.endHandle={nodeId:d,handleId:f,type:c},u.isValid=o(g))}return u}function Hme({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((i,o)=>{if(o[Rn]){const{handleBounds:a}=o[Rn];let s=[],l=[];a&&(s=WI(o,a,"source",`${t}-${n}-${r}`),l=WI(o,a,"target",`${t}-${n}-${r}`)),i.push(...s,...l)}return i},[])}function gT(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Jx(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function qme(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function KB({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:i,getState:o,setState:a,isValidConnection:s,edgeUpdaterType:l,onEdgeUpdateEnd:u}){const c=RB(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:h,connectionRadius:p,onConnectStart:g,panBy:_,getNodes:b,cancelConnection:y}=o();let m=0,v;const{x:S,y:w}=bl(e),C=c==null?void 0:c.elementFromPoint(S,w),x=gT(l,C),P=f==null?void 0:f.getBoundingClientRect();if(!P||!x)return;let E,I=bl(e,P),N=!1,M=null,T=!1,A=null;const R=Hme({nodes:b(),nodeId:n,handleId:t,handleType:x}),D=()=>{if(!h)return;const[O,B]=MB(I,P);_({x:O,y:B}),m=requestAnimationFrame(D)};a({connectionPosition:I,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:x,connectionStartHandle:{nodeId:n,handleId:t,type:x},connectionEndHandle:null}),g==null||g(e,{nodeId:n,handleId:t,handleType:x});function $(O){const{transform:B}=o();I=bl(O,P);const{handle:U,validHandleResult:j}=Ume(O,c,UB(I,B,!1,[1,1]),p,R,q=>WB(q,d,n,t,i?"target":"source",s,c));if(v=U,N||(D(),N=!0),A=j.handleDomNode,M=j.connection,T=j.isValid,a({connectionPosition:v&&T?jme({x:v.x,y:v.y},B):I,connectionStatus:qme(!!v,T),connectionEndHandle:j.endHandle}),!v&&!T&&!A)return Jx(E);M.source!==M.target&&A&&(Jx(E),E=A,A.classList.add("connecting","react-flow__handle-connecting"),A.classList.toggle("valid",T),A.classList.toggle("react-flow__handle-valid",T))}function L(O){var B,U;(v||A)&&M&&T&&(r==null||r(M)),(U=(B=o()).onConnectEnd)==null||U.call(B,O),l&&(u==null||u(O)),Jx(E),y(),cancelAnimationFrame(m),N=!1,T=!1,M=null,A=null,c.removeEventListener("mousemove",$),c.removeEventListener("mouseup",L),c.removeEventListener("touchmove",$),c.removeEventListener("touchend",L)}c.addEventListener("mousemove",$),c.addEventListener("mouseup",L),c.addEventListener("touchmove",$),c.addEventListener("touchend",L)}const KI=()=>!0,Wme=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Kme=(e,t,n)=>r=>{const{connectionStartHandle:i,connectionEndHandle:o,connectionClickStartHandle:a}=r;return{connecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n||(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===n}},XB=k.forwardRef(({type:e="source",position:t=Pe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:a,onConnect:s,children:l,className:u,onMouseDown:c,onTouchStart:d,...f},h)=>{var P,E;const p=a||null,g=e==="target",_=Kn(),b=Dme(),{connectOnClick:y,noPanClassName:m}=fn(Wme,ii),{connecting:v,clickConnecting:S}=fn(Kme(b,p,e),ii);b||(E=(P=_.getState()).onError)==null||E.call(P,"010",ys.error010());const w=I=>{const{defaultEdgeOptions:N,onConnect:M,hasDefaultEdges:T}=_.getState(),A={...N,...I};if(T){const{edges:R,setEdges:D}=_.getState();D(Uh(A,R))}M==null||M(A),s==null||s(A)},C=I=>{if(!b)return;const N=DB(I);i&&(N&&I.button===0||!N)&&KB({event:I,handleId:p,nodeId:b,onConnect:w,isTarget:g,getState:_.getState,setState:_.setState,isValidConnection:n||_.getState().isValidConnection||KI}),N?c==null||c(I):d==null||d(I)},x=I=>{const{onClickConnectStart:N,onClickConnectEnd:M,connectionClickStartHandle:T,connectionMode:A,isValidConnection:R}=_.getState();if(!b||!T&&!i)return;if(!T){N==null||N(I,{nodeId:b,handleId:p,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:b,type:e,handleId:p}});return}const D=RB(I.target),$=n||R||KI,{connection:L,isValid:O}=WB({nodeId:b,id:p,type:e},A,T.nodeId,T.handleId||null,T.type,$,D);O&&w(L),M==null||M(I),_.setState({connectionClickStartHandle:null})};return J.createElement("div",{"data-handleid":p,"data-nodeid":b,"data-handlepos":t,"data-id":`${b}-${p}-${e}`,className:to(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!g,target:g,connectable:r,connectablestart:i,connectableend:o,connecting:S,connectionindicator:r&&(i&&!v||o&&v)}]),onMouseDown:C,onTouchStart:C,onClick:y?x:void 0,ref:h,...f},l)});XB.displayName="Handle";var V1=k.memo(XB);const QB=({data:e,isConnectable:t,targetPosition:n=Pe.Top,sourcePosition:r=Pe.Bottom})=>J.createElement(J.Fragment,null,J.createElement(V1,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,J.createElement(V1,{type:"source",position:r,isConnectable:t}));QB.displayName="DefaultNode";var G5=k.memo(QB);const YB=({data:e,isConnectable:t,sourcePosition:n=Pe.Bottom})=>J.createElement(J.Fragment,null,e==null?void 0:e.label,J.createElement(V1,{type:"source",position:n,isConnectable:t}));YB.displayName="InputNode";var ZB=k.memo(YB);const JB=({data:e,isConnectable:t,targetPosition:n=Pe.Top})=>J.createElement(J.Fragment,null,J.createElement(V1,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label);JB.displayName="OutputNode";var ez=k.memo(JB);const mT=()=>null;mT.displayName="GroupNode";const Xme=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),U0=e=>e.id;function Qme(e,t){return ii(e.selectedNodes.map(U0),t.selectedNodes.map(U0))&&ii(e.selectedEdges.map(U0),t.selectedEdges.map(U0))}const tz=k.memo(({onSelectionChange:e})=>{const t=Kn(),{selectedNodes:n,selectedEdges:r}=fn(Xme,Qme);return k.useEffect(()=>{var o,a;const i={nodes:n,edges:r};e==null||e(i),(a=(o=t.getState()).onSelectionChange)==null||a.call(o,i)},[n,r,e]),null});tz.displayName="SelectionListener";const Yme=e=>!!e.onSelectionChange;function Zme({onSelectionChange:e}){const t=fn(Yme);return e||t?J.createElement(tz,{onSelectionChange:e}):null}const Jme=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Oc(e,t){k.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Ue(e,t,n){k.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const e0e=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:o,onConnectEnd:a,onClickConnectStart:s,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:c,nodesFocusable:d,edgesFocusable:f,edgesUpdatable:h,elevateNodesOnSelect:p,minZoom:g,maxZoom:_,nodeExtent:b,onNodesChange:y,onEdgesChange:m,elementsSelectable:v,connectionMode:S,snapGrid:w,snapToGrid:C,translateExtent:x,connectOnClick:P,defaultEdgeOptions:E,fitView:I,fitViewOptions:N,onNodesDelete:M,onEdgesDelete:T,onNodeDrag:A,onNodeDragStart:R,onNodeDragStop:D,onSelectionDrag:$,onSelectionDragStart:L,onSelectionDragStop:O,noPanClassName:B,nodeOrigin:U,rfId:j,autoPanOnConnect:q,autoPanOnNodeDrag:Y,onError:Z,connectionRadius:V,isValidConnection:K,nodeDragThreshold:ee})=>{const{setNodes:re,setEdges:fe,setDefaultNodesAndEdges:Se,setMinZoom:Me,setMaxZoom:De,setTranslateExtent:Ee,setNodeExtent:tt,reset:ot}=fn(Jme,ii),we=Kn();return k.useEffect(()=>{const Xn=r==null?void 0:r.map(Vt=>({...Vt,...E}));return Se(n,Xn),()=>{ot()}},[]),Ue("defaultEdgeOptions",E,we.setState),Ue("connectionMode",S,we.setState),Ue("onConnect",i,we.setState),Ue("onConnectStart",o,we.setState),Ue("onConnectEnd",a,we.setState),Ue("onClickConnectStart",s,we.setState),Ue("onClickConnectEnd",l,we.setState),Ue("nodesDraggable",u,we.setState),Ue("nodesConnectable",c,we.setState),Ue("nodesFocusable",d,we.setState),Ue("edgesFocusable",f,we.setState),Ue("edgesUpdatable",h,we.setState),Ue("elementsSelectable",v,we.setState),Ue("elevateNodesOnSelect",p,we.setState),Ue("snapToGrid",C,we.setState),Ue("snapGrid",w,we.setState),Ue("onNodesChange",y,we.setState),Ue("onEdgesChange",m,we.setState),Ue("connectOnClick",P,we.setState),Ue("fitViewOnInit",I,we.setState),Ue("fitViewOnInitOptions",N,we.setState),Ue("onNodesDelete",M,we.setState),Ue("onEdgesDelete",T,we.setState),Ue("onNodeDrag",A,we.setState),Ue("onNodeDragStart",R,we.setState),Ue("onNodeDragStop",D,we.setState),Ue("onSelectionDrag",$,we.setState),Ue("onSelectionDragStart",L,we.setState),Ue("onSelectionDragStop",O,we.setState),Ue("noPanClassName",B,we.setState),Ue("nodeOrigin",U,we.setState),Ue("rfId",j,we.setState),Ue("autoPanOnConnect",q,we.setState),Ue("autoPanOnNodeDrag",Y,we.setState),Ue("onError",Z,we.setState),Ue("connectionRadius",V,we.setState),Ue("isValidConnection",K,we.setState),Ue("nodeDragThreshold",ee,we.setState),Oc(e,re),Oc(t,fe),Oc(g,Me),Oc(_,De),Oc(x,Ee),Oc(b,tt),null},XI={display:"none"},t0e={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},nz="react-flow__node-desc",rz="react-flow__edge-desc",n0e="react-flow__aria-live",r0e=e=>e.ariaLiveMessage;function i0e({rfId:e}){const t=fn(r0e);return J.createElement("div",{id:`${n0e}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:t0e},t)}function o0e({rfId:e,disableKeyboardA11y:t}){return J.createElement(J.Fragment,null,J.createElement("div",{id:`${nz}-${e}`,style:XI},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),J.createElement("div",{id:`${rz}-${e}`,style:XI},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&J.createElement(i0e,{rfId:e}))}var kg=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=k.useState(!1),i=k.useRef(!1),o=k.useRef(new Set([])),[a,s]=k.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.split("+")),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return k.useEffect(()=>{const l=typeof document<"u"?document:null,u=(t==null?void 0:t.target)||l;if(e!==null){const c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&V5(h))return!1;const g=YI(h.code,s);o.current.add(h[g]),QI(a,o.current,!1)&&(h.preventDefault(),r(!0))},d=h=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&V5(h))return!1;const g=YI(h.code,s);QI(a,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(h[g]),h.key==="Meta"&&o.current.clear(),i.current=!1},f=()=>{o.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",c),u==null||u.addEventListener("keyup",d),window.addEventListener("blur",f),()=>{u==null||u.removeEventListener("keydown",c),u==null||u.removeEventListener("keyup",d),window.removeEventListener("blur",f)}}},[e,r]),n};function QI(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function YI(e,t){return t.includes(e)?"code":"key"}function iz(e,t,n,r){var a,s;if(!e.parentNode)return n;const i=t.get(e.parentNode),o=Fd(i,r);return iz(i,t,{x:(n.x??0)+o.x,y:(n.y??0)+o.y,z:(((a=i[Rn])==null?void 0:a.z)??0)>(n.z??0)?((s=i[Rn])==null?void 0:s.z)??0:n.z??0},r)}function oz(e,t,n){e.forEach(r=>{var i;if(r.parentNode&&!e.has(r.parentNode))throw new Error(`Parent node ${r.parentNode} not found`);if(r.parentNode||n!=null&&n[r.id]){const{x:o,y:a,z:s}=iz(r,e,{...r.position,z:((i=r[Rn])==null?void 0:i.z)??0},t);r.positionAbsolute={x:o,y:a},r[Rn].z=s,n!=null&&n[r.id]&&(r[Rn].isParent=!0)}})}function ew(e,t,n,r){const i=new Map,o={},a=r?1e3:0;return e.forEach(s=>{var d;const l=(Ki(s.zIndex)?s.zIndex:0)+(s.selected?a:0),u=t.get(s.id),c={width:u==null?void 0:u.width,height:u==null?void 0:u.height,...s,positionAbsolute:{x:s.position.x,y:s.position.y}};s.parentNode&&(c.parentNode=s.parentNode,o[s.parentNode]=!0),Object.defineProperty(c,Rn,{enumerable:!1,value:{handleBounds:(d=u==null?void 0:u[Rn])==null?void 0:d.handleBounds,z:l}}),i.set(s.id,c)}),oz(i,n,o),i}function az(e,t={}){const{getNodes:n,width:r,height:i,minZoom:o,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:d}=e(),f=t.initial&&!u&&c;if(s&&l&&(f||!t.initial)){const p=n().filter(_=>{var y;const b=t.includeHiddenNodes?_.width&&_.height:!_.hidden;return(y=t.nodes)!=null&&y.length?b&&t.nodes.some(m=>m.id===_.id):b}),g=p.every(_=>_.width&&_.height);if(p.length>0&&g){const _=hT(p,d),[b,y,m]=HB(_,r,i,t.minZoom??o,t.maxZoom??a,t.padding??.1),v=vl.translate(b,y).scale(m);return typeof t.duration=="number"&&t.duration>0?s.transform(mu(l,t.duration),v):s.transform(l,v),!0}}return!1}function a0e(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[Rn]:r[Rn],selected:n.selected})}),new Map(t)}function s0e(e,t){return t.map(n=>{const r=e.find(i=>i.id===n.id);return r&&(n.selected=r.selected),n})}function G0({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:i,edges:o,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:u}=n();e!=null&&e.length&&(l&&r({nodeInternals:a0e(e,i)}),a==null||a(e)),t!=null&&t.length&&(u&&r({edges:s0e(t,o)}),s==null||s(t))}const $c=()=>{},l0e={zoomIn:$c,zoomOut:$c,zoomTo:$c,getZoom:()=>1,setViewport:$c,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:$c,fitBounds:$c,project:e=>e,viewportInitialized:!1},u0e=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),c0e=()=>{const e=Kn(),{d3Zoom:t,d3Selection:n}=fn(u0e,ii);return k.useMemo(()=>n&&t?{zoomIn:i=>t.scaleBy(mu(n,i==null?void 0:i.duration),1.2),zoomOut:i=>t.scaleBy(mu(n,i==null?void 0:i.duration),1/1.2),zoomTo:(i,o)=>t.scaleTo(mu(n,o==null?void 0:o.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,o)=>{const[a,s,l]=e.getState().transform,u=vl.translate(i.x??a,i.y??s).scale(i.zoom??l);t.transform(mu(n,o==null?void 0:o.duration),u)},getViewport:()=>{const[i,o,a]=e.getState().transform;return{x:i,y:o,zoom:a}},fitView:i=>az(e.getState,i),setCenter:(i,o,a)=>{const{width:s,height:l,maxZoom:u}=e.getState(),c=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:u,d=s/2-i*c,f=l/2-o*c,h=vl.translate(d,f).scale(c);t.transform(mu(n,a==null?void 0:a.duration),h)},fitBounds:(i,o)=>{const{width:a,height:s,minZoom:l,maxZoom:u}=e.getState(),[c,d,f]=HB(i,a,s,l,u,(o==null?void 0:o.padding)??.1),h=vl.translate(c,d).scale(f);t.transform(mu(n,o==null?void 0:o.duration),h)},project:i=>{const{transform:o,snapToGrid:a,snapGrid:s}=e.getState();return UB(i,o,a,s)},viewportInitialized:!0}:l0e,[t,n])};function sz(){const e=c0e(),t=Kn(),n=k.useCallback(()=>t.getState().getNodes().map(g=>({...g})),[]),r=k.useCallback(g=>t.getState().nodeInternals.get(g),[]),i=k.useCallback(()=>{const{edges:g=[]}=t.getState();return g.map(_=>({..._}))},[]),o=k.useCallback(g=>{const{edges:_=[]}=t.getState();return _.find(b=>b.id===g)},[]),a=k.useCallback(g=>{const{getNodes:_,setNodes:b,hasDefaultNodes:y,onNodesChange:m}=t.getState(),v=_(),S=typeof g=="function"?g(v):g;if(y)b(S);else if(m){const w=S.length===0?v.map(C=>({type:"remove",id:C.id})):S.map(C=>({item:C,type:"reset"}));m(w)}},[]),s=k.useCallback(g=>{const{edges:_=[],setEdges:b,hasDefaultEdges:y,onEdgesChange:m}=t.getState(),v=typeof g=="function"?g(_):g;if(y)b(v);else if(m){const S=v.length===0?_.map(w=>({type:"remove",id:w.id})):v.map(w=>({item:w,type:"reset"}));m(S)}},[]),l=k.useCallback(g=>{const _=Array.isArray(g)?g:[g],{getNodes:b,setNodes:y,hasDefaultNodes:m,onNodesChange:v}=t.getState();if(m){const w=[...b(),..._];y(w)}else if(v){const S=_.map(w=>({item:w,type:"add"}));v(S)}},[]),u=k.useCallback(g=>{const _=Array.isArray(g)?g:[g],{edges:b=[],setEdges:y,hasDefaultEdges:m,onEdgesChange:v}=t.getState();if(m)y([...b,..._]);else if(v){const S=_.map(w=>({item:w,type:"add"}));v(S)}},[]),c=k.useCallback(()=>{const{getNodes:g,edges:_=[],transform:b}=t.getState(),[y,m,v]=b;return{nodes:g().map(S=>({...S})),edges:_.map(S=>({...S})),viewport:{x:y,y:m,zoom:v}}},[]),d=k.useCallback(({nodes:g,edges:_})=>{const{nodeInternals:b,getNodes:y,edges:m,hasDefaultNodes:v,hasDefaultEdges:S,onNodesDelete:w,onEdgesDelete:C,onNodesChange:x,onEdgesChange:P}=t.getState(),E=(g||[]).map(A=>A.id),I=(_||[]).map(A=>A.id),N=y().reduce((A,R)=>{const D=!E.includes(R.id)&&R.parentNode&&A.find(L=>L.id===R.parentNode);return(typeof R.deletable=="boolean"?R.deletable:!0)&&(E.includes(R.id)||D)&&A.push(R),A},[]),M=m.filter(A=>typeof A.deletable=="boolean"?A.deletable:!0),T=M.filter(A=>I.includes(A.id));if(N||T){const A=pT(N,M),R=[...T,...A],D=R.reduce(($,L)=>($.includes(L.id)||$.push(L.id),$),[]);if((S||v)&&(S&&t.setState({edges:m.filter($=>!D.includes($.id))}),v&&(N.forEach($=>{b.delete($.id)}),t.setState({nodeInternals:new Map(b)}))),D.length>0&&(C==null||C(R),P&&P(D.map($=>({id:$,type:"remove"})))),N.length>0&&(w==null||w(N),x)){const $=N.map(L=>({id:L.id,type:"remove"}));x($)}}},[]),f=k.useCallback(g=>{const _=Pme(g),b=_?null:t.getState().nodeInternals.get(g.id);return[_?g:jI(b),b,_]},[]),h=k.useCallback((g,_=!0,b)=>{const[y,m,v]=f(g);return y?(b||t.getState().getNodes()).filter(S=>{if(!v&&(S.id===m.id||!S.positionAbsolute))return!1;const w=jI(S),C=z5(w,y);return _&&C>0||C>=g.width*g.height}):[]},[]),p=k.useCallback((g,_,b=!0)=>{const[y]=f(g);if(!y)return!1;const m=z5(y,_);return b&&m>0||m>=g.width*g.height},[]);return k.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:i,getEdge:o,setNodes:a,setEdges:s,addNodes:l,addEdges:u,toObject:c,deleteElements:d,getIntersectingNodes:h,isNodeIntersecting:p}),[e,n,r,i,o,a,s,l,u,c,d,h,p])}const d0e={actInsideInputWithModifier:!1};var f0e=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=Kn(),{deleteElements:r}=sz(),i=kg(e,d0e),o=kg(t);k.useEffect(()=>{if(i){const{edges:a,getNodes:s}=n.getState(),l=s().filter(c=>c.selected),u=a.filter(c=>c.selected);r({nodes:l,edges:u}),n.setState({nodesSelectionActive:!1})}},[i]),k.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])};function h0e(e){const t=Kn();k.useEffect(()=>{let n;const r=()=>{var o,a;if(!e.current)return;const i=sT(e.current);(i.height===0||i.width===0)&&((a=(o=t.getState()).onError)==null||a.call(o,"004",ys.error004())),t.setState({width:i.width||500,height:i.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const yT={position:"absolute",width:"100%",height:"100%",top:0,left:0},p0e=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,H0=e=>({x:e.x,y:e.y,zoom:e.k}),Nc=(e,t)=>e.target.closest(`.${t}`),ZI=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),JI=e=>{const t=e.ctrlKey&&F1()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},g0e=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),m0e=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:o=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=Ru.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:d=!0,defaultViewport:f,translateExtent:h,minZoom:p,maxZoom:g,zoomActivationKeyCode:_,preventScrolling:b=!0,children:y,noWheelClassName:m,noPanClassName:v})=>{const S=k.useRef(),w=Kn(),C=k.useRef(!1),x=k.useRef(!1),P=k.useRef(null),E=k.useRef({x:0,y:0,zoom:0}),{d3Zoom:I,d3Selection:N,d3ZoomHandler:M,userSelectionActive:T}=fn(g0e,ii),A=kg(_),R=k.useRef(0),D=k.useRef(!1),$=k.useRef();return h0e(P),k.useEffect(()=>{if(P.current){const L=P.current.getBoundingClientRect(),O=Sme().scaleExtent([p,g]).translateExtent(h),B=So(P.current).call(O),U=vl.translate(f.x,f.y).scale(bf(f.zoom,p,g)),j=[[0,0],[L.width,L.height]],q=O.constrain()(U,j,h);O.transform(B,q),O.wheelDelta(JI),w.setState({d3Zoom:O,d3Selection:B,d3ZoomHandler:B.on("wheel.zoom"),transform:[q.x,q.y,q.k],domNode:P.current.closest(".react-flow")})}},[]),k.useEffect(()=>{N&&I&&(a&&!A&&!T?N.on("wheel.zoom",L=>{if(Nc(L,m))return!1;L.preventDefault(),L.stopImmediatePropagation();const O=N.property("__zoom").k||1,B=F1();if(L.ctrlKey&&o&&B){const ee=Yo(L),re=JI(L),fe=O*Math.pow(2,re);I.scaleTo(N,fe,ee,L);return}const U=L.deltaMode===1?20:1;let j=l===Ru.Vertical?0:L.deltaX*U,q=l===Ru.Horizontal?0:L.deltaY*U;!B&&L.shiftKey&&l!==Ru.Vertical&&(j=L.deltaY*U,q=0),I.translateBy(N,-(j/O)*s,-(q/O)*s,{internal:!0});const Y=H0(N.property("__zoom")),{onViewportChangeStart:Z,onViewportChange:V,onViewportChangeEnd:K}=w.getState();clearTimeout($.current),D.current||(D.current=!0,t==null||t(L,Y),Z==null||Z(Y)),D.current&&(e==null||e(L,Y),V==null||V(Y),$.current=setTimeout(()=>{n==null||n(L,Y),K==null||K(Y),D.current=!1},150))},{passive:!1}):typeof M<"u"&&N.on("wheel.zoom",function(L,O){if(!b||Nc(L,m))return null;L.preventDefault(),M.call(this,L,O)},{passive:!1}))},[T,a,l,N,I,M,A,o,b,m,t,e,n]),k.useEffect(()=>{I&&I.on("start",L=>{var U,j;if(!L.sourceEvent||L.sourceEvent.internal)return null;R.current=(U=L.sourceEvent)==null?void 0:U.button;const{onViewportChangeStart:O}=w.getState(),B=H0(L.transform);C.current=!0,E.current=B,((j=L.sourceEvent)==null?void 0:j.type)==="mousedown"&&w.setState({paneDragging:!0}),O==null||O(B),t==null||t(L.sourceEvent,B)})},[I,t]),k.useEffect(()=>{I&&(T&&!C.current?I.on("zoom",null):T||I.on("zoom",L=>{var B;const{onViewportChange:O}=w.getState();if(w.setState({transform:[L.transform.x,L.transform.y,L.transform.k]}),x.current=!!(r&&ZI(d,R.current??0)),(e||O)&&!((B=L.sourceEvent)!=null&&B.internal)){const U=H0(L.transform);O==null||O(U),e==null||e(L.sourceEvent,U)}}))},[T,I,e,d,r]),k.useEffect(()=>{I&&I.on("end",L=>{if(!L.sourceEvent||L.sourceEvent.internal)return null;const{onViewportChangeEnd:O}=w.getState();if(C.current=!1,w.setState({paneDragging:!1}),r&&ZI(d,R.current??0)&&!x.current&&r(L.sourceEvent),x.current=!1,(n||O)&&p0e(E.current,L.transform)){const B=H0(L.transform);E.current=B,clearTimeout(S.current),S.current=setTimeout(()=>{O==null||O(B),n==null||n(L.sourceEvent,B)},a?150:0)}})},[I,a,d,n,r]),k.useEffect(()=>{I&&I.filter(L=>{const O=A||i,B=o&&L.ctrlKey;if((d===!0||Array.isArray(d)&&d.includes(1))&&L.button===1&&L.type==="mousedown"&&(Nc(L,"react-flow__node")||Nc(L,"react-flow__edge")))return!0;if(!d&&!O&&!a&&!u&&!o||T||!u&&L.type==="dblclick"||Nc(L,m)&&L.type==="wheel"||Nc(L,v)&&(L.type!=="wheel"||a&&L.type==="wheel")||!o&&L.ctrlKey&&L.type==="wheel"||!O&&!a&&!B&&L.type==="wheel"||!d&&(L.type==="mousedown"||L.type==="touchstart")||Array.isArray(d)&&!d.includes(L.button)&&(L.type==="mousedown"||L.type==="touchstart"))return!1;const U=Array.isArray(d)&&d.includes(L.button)||!L.button||L.button<=1;return(!L.ctrlKey||L.type==="wheel")&&U})},[T,I,i,o,a,u,d,c,A]),J.createElement("div",{className:"react-flow__renderer",ref:P,style:yT},y)},y0e=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function v0e(){const{userSelectionActive:e,userSelectionRect:t}=fn(y0e,ii);return e&&t?J.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function e8(e,t){const n=e.find(r=>r.id===t.parentNode);if(n){const r=t.position.x+t.width-n.width,i=t.position.y+t.height-n.height;if(r>0||i>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,r>0&&(n.style.width+=r),i>0&&(n.style.height+=i),t.position.x<0){const o=Math.abs(t.position.x);n.position.x=n.position.x-o,n.style.width+=o,t.position.x=0}if(t.position.y<0){const o=Math.abs(t.position.y);n.position.y=n.position.y-o,n.style.height+=o,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function lz(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,i)=>{const o=e.filter(s=>s.id===i.id);if(o.length===0)return r.push(i),r;const a={...i};for(const s of o)if(s)switch(s.type){case"select":{a.selected=s.selected;break}case"position":{typeof s.position<"u"&&(a.position=s.position),typeof s.positionAbsolute<"u"&&(a.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(a.dragging=s.dragging),a.expandParent&&e8(r,a);break}case"dimensions":{typeof s.dimensions<"u"&&(a.width=s.dimensions.width,a.height=s.dimensions.height),typeof s.updateStyle<"u"&&(a.style={...a.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(a.resizing=s.resizing),a.expandParent&&e8(r,a);break}case"remove":return r}return r.push(a),r},n)}function yu(e,t){return lz(e,t)}function su(e,t){return lz(e,t)}const Ws=(e,t)=>({id:e,type:"select",selected:t});function ld(e,t){return e.reduce((n,r)=>{const i=t.includes(r.id);return!r.selected&&i?(r.selected=!0,n.push(Ws(r.id,!0))):r.selected&&!i&&(r.selected=!1,n.push(Ws(r.id,!1))),n},[])}const tw=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},b0e=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),uz=k.memo(({isSelecting:e,selectionMode:t=Rl.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:o,onPaneContextMenu:a,onPaneScroll:s,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:c,children:d})=>{const f=k.useRef(null),h=Kn(),p=k.useRef(0),g=k.useRef(0),_=k.useRef(),{userSelectionActive:b,elementsSelectable:y,dragging:m}=fn(b0e,ii),v=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),p.current=0,g.current=0},S=M=>{o==null||o(M),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},w=M=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){M.preventDefault();return}a==null||a(M)},C=s?M=>s(M):void 0,x=M=>{const{resetSelectedElements:T,domNode:A}=h.getState();if(_.current=A==null?void 0:A.getBoundingClientRect(),!y||!e||M.button!==0||M.target!==f.current||!_.current)return;const{x:R,y:D}=bl(M,_.current);T(),h.setState({userSelectionRect:{width:0,height:0,startX:R,startY:D,x:R,y:D}}),r==null||r(M)},P=M=>{const{userSelectionRect:T,nodeInternals:A,edges:R,transform:D,onNodesChange:$,onEdgesChange:L,nodeOrigin:O,getNodes:B}=h.getState();if(!e||!_.current||!T)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});const U=bl(M,_.current),j=T.startX??0,q=T.startY??0,Y={...T,x:U.xre.id),ee=V.map(re=>re.id);if(p.current!==ee.length){p.current=ee.length;const re=ld(Z,ee);re.length&&($==null||$(re))}if(g.current!==K.length){g.current=K.length;const re=ld(R,K);re.length&&(L==null||L(re))}h.setState({userSelectionRect:Y})},E=M=>{if(M.button!==0)return;const{userSelectionRect:T}=h.getState();!b&&T&&M.target===f.current&&(S==null||S(M)),h.setState({nodesSelectionActive:p.current>0}),v(),i==null||i(M)},I=M=>{b&&(h.setState({nodesSelectionActive:p.current>0}),i==null||i(M)),v()},N=y&&(e||b);return J.createElement("div",{className:to(["react-flow__pane",{dragging:m,selection:e}]),onClick:N?void 0:tw(S,f),onContextMenu:tw(w,f),onWheel:tw(C,f),onMouseEnter:N?void 0:l,onMouseDown:N?x:void 0,onMouseMove:N?P:u,onMouseUp:N?E:void 0,onMouseLeave:N?I:c,ref:f,style:yT},d,J.createElement(v0e,null))});uz.displayName="Pane";function cz(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:cz(n,t):!1}function t8(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function _0e(e,t,n,r){return Array.from(e.values()).filter(i=>(i.selected||i.id===r)&&(!i.parentNode||!cz(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var o,a;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((o=i.positionAbsolute)==null?void 0:o.x)??0),y:n.y-(((a=i.positionAbsolute)==null?void 0:a.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode,width:i.width,height:i.height,expandParent:i.expandParent}})}function S0e(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function dz(e,t,n,r,i=[0,0],o){const a=S0e(e,e.extent||r);let s=a;if(e.extent==="parent"&&!e.expandParent)if(e.parentNode&&e.width&&e.height){const c=n.get(e.parentNode),{x:d,y:f}=Fd(c,i).positionAbsolute;s=c&&Ki(d)&&Ki(f)&&Ki(c.width)&&Ki(c.height)?[[d+e.width*i[0],f+e.height*i[1]],[d+c.width-e.width+e.width*i[0],f+c.height-e.height+e.height*i[1]]]:s}else o==null||o("005",ys.error005()),s=a;else if(e.extent&&e.parentNode&&e.extent!=="parent"){const c=n.get(e.parentNode),{x:d,y:f}=Fd(c,i).positionAbsolute;s=[[e.extent[0][0]+d,e.extent[0][1]+f],[e.extent[1][0]+d,e.extent[1][1]+f]]}let l={x:0,y:0};if(e.parentNode){const c=n.get(e.parentNode);l=Fd(c,i).positionAbsolute}const u=s&&s!=="parent"?lT(t,s):t;return{position:{x:u.x-l.x,y:u.y-l.y},positionAbsolute:u}}function nw({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(i=>({...n.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?r.find(i=>i.id===e):r[0],r]}const n8=(e,t,n,r)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const o=Array.from(i),a=t.getBoundingClientRect(),s={x:a.width*r[0],y:a.height*r[1]};return o.map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(u.left-a.left-s.x)/n,y:(u.top-a.top-s.y)/n,...sT(l)}})};function gh(e,t,n){return n===void 0?n:r=>{const i=t().nodeInternals.get(e);i&&n(r,{...i})}}function H5({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:a,nodeInternals:s,onError:l}=t.getState(),u=s.get(e);if(!u){l==null||l("012",ys.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(o({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):i([e])}function x0e(){const e=Kn();return k.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:i,snapToGrid:o}=e.getState(),a=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,l={x:(a-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:o?i[0]*Math.round(l.x/i[0]):l.x,ySnapped:o?i[1]*Math.round(l.y/i[1]):l.y,...l}},[])}function rw(e){return(t,n,r)=>e==null?void 0:e(t,r)}function fz({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,selectNodesOnDrag:a}){const s=Kn(),[l,u]=k.useState(!1),c=k.useRef([]),d=k.useRef({x:null,y:null}),f=k.useRef(0),h=k.useRef(null),p=k.useRef({x:0,y:0}),g=k.useRef(null),_=k.useRef(!1),b=k.useRef(!1),y=x0e();return k.useEffect(()=>{if(e!=null&&e.current){const m=So(e.current),v=({x:C,y:x})=>{const{nodeInternals:P,onNodeDrag:E,onSelectionDrag:I,updateNodePositions:N,nodeExtent:M,snapGrid:T,snapToGrid:A,nodeOrigin:R,onError:D}=s.getState();d.current={x:C,y:x};let $=!1,L={x:0,y:0,x2:0,y2:0};if(c.current.length>1&&M){const B=hT(c.current,R);L=Pg(B)}if(c.current=c.current.map(B=>{const U={x:C-B.distance.x,y:x-B.distance.y};A&&(U.x=T[0]*Math.round(U.x/T[0]),U.y=T[1]*Math.round(U.y/T[1]));const j=[[M[0][0],M[0][1]],[M[1][0],M[1][1]]];c.current.length>1&&M&&!B.extent&&(j[0][0]=B.positionAbsolute.x-L.x+M[0][0],j[1][0]=B.positionAbsolute.x+(B.width??0)-L.x2+M[1][0],j[0][1]=B.positionAbsolute.y-L.y+M[0][1],j[1][1]=B.positionAbsolute.y+(B.height??0)-L.y2+M[1][1]);const q=dz(B,U,P,j,R,D);return $=$||B.position.x!==q.position.x||B.position.y!==q.position.y,B.position=q.position,B.positionAbsolute=q.positionAbsolute,B}),!$)return;N(c.current,!0,!0),u(!0);const O=i?E:rw(I);if(O&&g.current){const[B,U]=nw({nodeId:i,dragItems:c.current,nodeInternals:P});O(g.current,B,U)}},S=()=>{if(!h.current)return;const[C,x]=MB(p.current,h.current);if(C!==0||x!==0){const{transform:P,panBy:E}=s.getState();d.current.x=(d.current.x??0)-C/P[2],d.current.y=(d.current.y??0)-x/P[2],E({x:C,y:x})&&v(d.current)}f.current=requestAnimationFrame(S)},w=C=>{var R;const{nodeInternals:x,multiSelectionActive:P,nodesDraggable:E,unselectNodesAndEdges:I,onNodeDragStart:N,onSelectionDragStart:M}=s.getState();b.current=!0;const T=i?N:rw(M);(!a||!o)&&!P&&i&&((R=x.get(i))!=null&&R.selected||I()),i&&o&&a&&H5({id:i,store:s,nodeRef:e});const A=y(C);if(d.current=A,c.current=_0e(x,E,A,i),T&&c.current){const[D,$]=nw({nodeId:i,dragItems:c.current,nodeInternals:x});T(C.sourceEvent,D,$)}};if(t)m.on(".drag",null);else{const C=Mpe().on("start",x=>{const{domNode:P,nodeDragThreshold:E}=s.getState();E===0&&w(x);const I=y(x);d.current=I,h.current=(P==null?void 0:P.getBoundingClientRect())||null,p.current=bl(x.sourceEvent,h.current)}).on("drag",x=>{var N,M;const P=y(x),{autoPanOnNodeDrag:E,nodeDragThreshold:I}=s.getState();if(!_.current&&b.current&&E&&(_.current=!0,S()),!b.current){const T=P.xSnapped-(((N=d==null?void 0:d.current)==null?void 0:N.x)??0),A=P.ySnapped-(((M=d==null?void 0:d.current)==null?void 0:M.y)??0);Math.sqrt(T*T+A*A)>I&&w(x)}(d.current.x!==P.xSnapped||d.current.y!==P.ySnapped)&&c.current&&b.current&&(g.current=x.sourceEvent,p.current=bl(x.sourceEvent,h.current),v(P))}).on("end",x=>{if(b.current&&(u(!1),_.current=!1,b.current=!1,cancelAnimationFrame(f.current),c.current)){const{updateNodePositions:P,nodeInternals:E,onNodeDragStop:I,onSelectionDragStop:N}=s.getState(),M=i?I:rw(N);if(P(c.current,!1,!1),M){const[T,A]=nw({nodeId:i,dragItems:c.current,nodeInternals:E});M(x.sourceEvent,T,A)}}}).filter(x=>{const P=x.target;return!x.button&&(!n||!t8(P,`.${n}`,e))&&(!r||t8(P,r,e))});return m.call(C),()=>{m.on(".drag",null)}}}},[e,t,n,r,o,s,i,a,y]),l}function hz(){const e=Kn();return k.useCallback(n=>{const{nodeInternals:r,nodeExtent:i,updateNodePositions:o,getNodes:a,snapToGrid:s,snapGrid:l,onError:u,nodesDraggable:c}=e.getState(),d=a().filter(y=>y.selected&&(y.draggable||c&&typeof y.draggable>"u")),f=s?l[0]:5,h=s?l[1]:5,p=n.isShiftPressed?4:1,g=n.x*f*p,_=n.y*h*p,b=d.map(y=>{if(y.positionAbsolute){const m={x:y.positionAbsolute.x+g,y:y.positionAbsolute.y+_};s&&(m.x=l[0]*Math.round(m.x/l[0]),m.y=l[1]*Math.round(m.y/l[1]));const{positionAbsolute:v,position:S}=dz(y,m,r,i,void 0,u);y.position=S,y.positionAbsolute=v}return y});o(b,!0,!1)},[])}const Bd={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var mh=e=>{const t=({id:n,type:r,data:i,xPos:o,yPos:a,xPosOrigin:s,yPosOrigin:l,selected:u,onClick:c,onMouseEnter:d,onMouseMove:f,onMouseLeave:h,onContextMenu:p,onDoubleClick:g,style:_,className:b,isDraggable:y,isSelectable:m,isConnectable:v,isFocusable:S,selectNodesOnDrag:w,sourcePosition:C,targetPosition:x,hidden:P,resizeObserver:E,dragHandle:I,zIndex:N,isParent:M,noDragClassName:T,noPanClassName:A,initialized:R,disableKeyboardA11y:D,ariaLabel:$,rfId:L})=>{const O=Kn(),B=k.useRef(null),U=k.useRef(C),j=k.useRef(x),q=k.useRef(r),Y=m||y||c||d||f||h,Z=hz(),V=gh(n,O.getState,d),K=gh(n,O.getState,f),ee=gh(n,O.getState,h),re=gh(n,O.getState,p),fe=gh(n,O.getState,g),Se=Ee=>{const{nodeDragThreshold:tt}=O.getState();if(m&&(!w||!y||tt>0)&&H5({id:n,store:O,nodeRef:B}),c){const ot=O.getState().nodeInternals.get(n);ot&&c(Ee,{...ot})}},Me=Ee=>{if(!V5(Ee))if(NB.includes(Ee.key)&&m){const tt=Ee.key==="Escape";H5({id:n,store:O,unselect:tt,nodeRef:B})}else!D&&y&&u&&Object.prototype.hasOwnProperty.call(Bd,Ee.key)&&(O.setState({ariaLiveMessage:`Moved selected node ${Ee.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~o}, y: ${~~a}`}),Z({x:Bd[Ee.key].x,y:Bd[Ee.key].y,isShiftPressed:Ee.shiftKey}))};k.useEffect(()=>{if(B.current&&!P){const Ee=B.current;return E==null||E.observe(Ee),()=>E==null?void 0:E.unobserve(Ee)}},[P]),k.useEffect(()=>{const Ee=q.current!==r,tt=U.current!==C,ot=j.current!==x;B.current&&(Ee||tt||ot)&&(Ee&&(q.current=r),tt&&(U.current=C),ot&&(j.current=x),O.getState().updateNodeDimensions([{id:n,nodeElement:B.current,forceUpdate:!0}]))},[n,r,C,x]);const De=fz({nodeRef:B,disabled:P||!y,noDragClassName:T,handleSelector:I,nodeId:n,isSelectable:m,selectNodesOnDrag:w});return P?null:J.createElement("div",{className:to(["react-flow__node",`react-flow__node-${r}`,{[A]:y},b,{selected:u,selectable:m,parent:M,dragging:De}]),ref:B,style:{zIndex:N,transform:`translate(${s}px,${l}px)`,pointerEvents:Y?"all":"none",visibility:R?"visible":"hidden",..._},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:V,onMouseMove:K,onMouseLeave:ee,onContextMenu:re,onClick:Se,onDoubleClick:fe,onKeyDown:S?Me:void 0,tabIndex:S?0:void 0,role:S?"button":void 0,"aria-describedby":D?void 0:`${nz}-${L}`,"aria-label":$},J.createElement(Nme,{value:n},J.createElement(e,{id:n,data:i,type:r,xPos:o,yPos:a,selected:u,isConnectable:v,sourcePosition:C,targetPosition:x,dragging:De,dragHandle:I,zIndex:N})))};return t.displayName="NodeWrapper",k.memo(t)};const w0e=e=>{const t=e.getNodes().filter(n=>n.selected);return{...hT(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function C0e({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Kn(),{width:i,height:o,x:a,y:s,transformString:l,userSelectionActive:u}=fn(w0e,ii),c=hz(),d=k.useRef(null);if(k.useEffect(()=>{var p;n||(p=d.current)==null||p.focus({preventScroll:!0})},[n]),fz({nodeRef:d}),u||!i||!o)return null;const f=e?p=>{const g=r.getState().getNodes().filter(_=>_.selected);e(p,g)}:void 0,h=p=>{Object.prototype.hasOwnProperty.call(Bd,p.key)&&c({x:Bd[p.key].x,y:Bd[p.key].y,isShiftPressed:p.shiftKey})};return J.createElement("div",{className:to(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},J.createElement("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:i,height:o,top:s,left:a}}))}var E0e=k.memo(C0e);const T0e=e=>e.nodesSelectionActive,pz=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:a,deleteKeyCode:s,onMove:l,onMoveStart:u,onMoveEnd:c,selectionKeyCode:d,selectionOnDrag:f,selectionMode:h,onSelectionStart:p,onSelectionEnd:g,multiSelectionKeyCode:_,panActivationKeyCode:b,zoomActivationKeyCode:y,elementsSelectable:m,zoomOnScroll:v,zoomOnPinch:S,panOnScroll:w,panOnScrollSpeed:C,panOnScrollMode:x,zoomOnDoubleClick:P,panOnDrag:E,defaultViewport:I,translateExtent:N,minZoom:M,maxZoom:T,preventScrolling:A,onSelectionContextMenu:R,noWheelClassName:D,noPanClassName:$,disableKeyboardA11y:L})=>{const O=fn(T0e),B=kg(d),j=kg(b)||E,q=B||f&&j!==!0;return f0e({deleteKeyCode:s,multiSelectionKeyCode:_}),J.createElement(m0e,{onMove:l,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:o,elementsSelectable:m,zoomOnScroll:v,zoomOnPinch:S,panOnScroll:w,panOnScrollSpeed:C,panOnScrollMode:x,zoomOnDoubleClick:P,panOnDrag:!B&&j,defaultViewport:I,translateExtent:N,minZoom:M,maxZoom:T,zoomActivationKeyCode:y,preventScrolling:A,noWheelClassName:D,noPanClassName:$},J.createElement(uz,{onSelectionStart:p,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:a,panOnDrag:j,isSelecting:!!q,selectionMode:h},e,O&&J.createElement(E0e,{onSelectionContextMenu:R,noPanClassName:$,disableKeyboardA11y:L})))};pz.displayName="FlowRenderer";var A0e=k.memo(pz);function P0e(e){return fn(k.useCallback(n=>e?GB(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function k0e(e){const t={input:mh(e.input||ZB),default:mh(e.default||G5),output:mh(e.output||ez),group:mh(e.group||mT)},n={},r=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,o)=>(i[o]=mh(e[o]||G5),i),n);return{...t,...r}}const I0e=({x:e,y:t,width:n,height:r,origin:i})=>!n||!r?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-n*i[0],y:t-r*i[1]},M0e=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),gz=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:o,onError:a}=fn(M0e,ii),s=P0e(e.onlyRenderVisibleElements),l=k.useRef(),u=k.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(d=>{const f=d.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));o(f)});return l.current=c,c},[]);return k.useEffect(()=>()=>{var c;(c=l==null?void 0:l.current)==null||c.disconnect()},[]),J.createElement("div",{className:"react-flow__nodes",style:yT},s.map(c=>{var S,w;let d=c.type||"default";e.nodeTypes[d]||(a==null||a("003",ys.error003(d)),d="default");const f=e.nodeTypes[d]||e.nodeTypes.default,h=!!(c.draggable||t&&typeof c.draggable>"u"),p=!!(c.selectable||i&&typeof c.selectable>"u"),g=!!(c.connectable||n&&typeof c.connectable>"u"),_=!!(c.focusable||r&&typeof c.focusable>"u"),b=e.nodeExtent?lT(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,y=(b==null?void 0:b.x)??0,m=(b==null?void 0:b.y)??0,v=I0e({x:y,y:m,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return J.createElement(f,{key:c.id,id:c.id,className:c.className,style:c.style,type:d,data:c.data,sourcePosition:c.sourcePosition||Pe.Bottom,targetPosition:c.targetPosition||Pe.Top,hidden:c.hidden,xPos:y,yPos:m,xPosOrigin:v.x,yPosOrigin:v.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:h,isSelectable:p,isConnectable:g,isFocusable:_,resizeObserver:u,dragHandle:c.dragHandle,zIndex:((S=c[Rn])==null?void 0:S.z)??0,isParent:!!((w=c[Rn])!=null&&w.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel})}))};gz.displayName="NodeRenderer";var R0e=k.memo(gz);const O0e=(e,t,n)=>n===Pe.Left?e-t:n===Pe.Right?e+t:e,$0e=(e,t,n)=>n===Pe.Top?e-t:n===Pe.Bottom?e+t:e,r8="react-flow__edgeupdater",i8=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:a,type:s})=>J.createElement("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:a,className:to([r8,`${r8}-${s}`]),cx:O0e(t,r,e),cy:$0e(n,r,e),r,stroke:"transparent",fill:"transparent"}),N0e=()=>!0;var Dc=e=>{const t=({id:n,className:r,type:i,data:o,onClick:a,onEdgeDoubleClick:s,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:g,style:_,source:b,target:y,sourceX:m,sourceY:v,targetX:S,targetY:w,sourcePosition:C,targetPosition:x,elementsSelectable:P,hidden:E,sourceHandleId:I,targetHandleId:N,onContextMenu:M,onMouseEnter:T,onMouseMove:A,onMouseLeave:R,edgeUpdaterRadius:D,onEdgeUpdate:$,onEdgeUpdateStart:L,onEdgeUpdateEnd:O,markerEnd:B,markerStart:U,rfId:j,ariaLabel:q,isFocusable:Y,isUpdatable:Z,pathOptions:V,interactionWidth:K})=>{const ee=k.useRef(null),[re,fe]=k.useState(!1),[Se,Me]=k.useState(!1),De=Kn(),Ee=k.useMemo(()=>`url(#${U5(U,j)})`,[U,j]),tt=k.useMemo(()=>`url(#${U5(B,j)})`,[B,j]);if(E)return null;const ot=rn=>{var _n;const{edges:$t,addSelectedEdges:li,unselectNodesAndEdges:Ri,multiSelectionActive:fo}=De.getState(),jr=$t.find(ui=>ui.id===n);jr&&(P&&(De.setState({nodesSelectionActive:!1}),jr.selected&&fo?(Ri({nodes:[],edges:[jr]}),(_n=ee.current)==null||_n.blur()):li([n])),a&&a(rn,jr))},we=ph(n,De.getState,s),Xn=ph(n,De.getState,M),Vt=ph(n,De.getState,T),Ot=ph(n,De.getState,A),xt=ph(n,De.getState,R),bn=(rn,$t)=>{if(rn.button!==0)return;const{edges:li,isValidConnection:Ri}=De.getState(),fo=$t?y:b,jr=($t?N:I)||null,_n=$t?"target":"source",ui=Ri||N0e,tu=$t,jo=li.find(wt=>wt.id===n);Me(!0),L==null||L(rn,jo,_n);const nu=wt=>{Me(!1),O==null||O(wt,jo,_n)};KB({event:rn,handleId:jr,nodeId:fo,onConnect:wt=>$==null?void 0:$(jo,wt),isTarget:tu,getState:De.getState,setState:De.setState,isValidConnection:ui,edgeUpdaterType:_n,onEdgeUpdateEnd:nu})},Vr=rn=>bn(rn,!0),co=rn=>bn(rn,!1),Mi=()=>fe(!0),ur=()=>fe(!1),Qn=!P&&!a,xr=rn=>{var $t;if(NB.includes(rn.key)&&P){const{unselectNodesAndEdges:li,addSelectedEdges:Ri,edges:fo}=De.getState();rn.key==="Escape"?(($t=ee.current)==null||$t.blur(),li({edges:[fo.find(_n=>_n.id===n)]})):Ri([n])}};return J.createElement("g",{className:to(["react-flow__edge",`react-flow__edge-${i}`,r,{selected:l,animated:u,inactive:Qn,updating:re}]),onClick:ot,onDoubleClick:we,onContextMenu:Xn,onMouseEnter:Vt,onMouseMove:Ot,onMouseLeave:xt,onKeyDown:Y?xr:void 0,tabIndex:Y?0:void 0,role:Y?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":q===null?void 0:q||`Edge from ${b} to ${y}`,"aria-describedby":Y?`${rz}-${j}`:void 0,ref:ee},!Se&&J.createElement(e,{id:n,source:b,target:y,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:g,data:o,style:_,sourceX:m,sourceY:v,targetX:S,targetY:w,sourcePosition:C,targetPosition:x,sourceHandleId:I,targetHandleId:N,markerStart:Ee,markerEnd:tt,pathOptions:V,interactionWidth:K}),Z&&J.createElement(J.Fragment,null,(Z==="source"||Z===!0)&&J.createElement(i8,{position:C,centerX:m,centerY:v,radius:D,onMouseDown:Vr,onMouseEnter:Mi,onMouseOut:ur,type:"source"}),(Z==="target"||Z===!0)&&J.createElement(i8,{position:x,centerX:S,centerY:w,radius:D,onMouseDown:co,onMouseEnter:Mi,onMouseOut:ur,type:"target"})))};return t.displayName="EdgeWrapper",k.memo(t)};function D0e(e){const t={default:Dc(e.default||z1),straight:Dc(e.bezier||dT),step:Dc(e.step||cT),smoothstep:Dc(e.step||oS),simplebezier:Dc(e.simplebezier||uT)},n={},r=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,o)=>(i[o]=Dc(e[o]||z1),i),n);return{...t,...r}}function o8(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,i=((n==null?void 0:n.y)||0)+t.y,o=(n==null?void 0:n.width)||t.width,a=(n==null?void 0:n.height)||t.height;switch(e){case Pe.Top:return{x:r+o/2,y:i};case Pe.Right:return{x:r+o,y:i+a/2};case Pe.Bottom:return{x:r+o/2,y:i+a};case Pe.Left:return{x:r,y:i+a/2}}}function a8(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const L0e=(e,t,n,r,i,o)=>{const a=o8(n,e,t),s=o8(o,r,i);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}};function F0e({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:o,width:a,height:s,transform:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+o)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=Pg({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),f=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*f)>0}function s8(e){var r,i,o,a,s;const t=((r=e==null?void 0:e[Rn])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)<"u";return[{x:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)||0,y:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}const B0e=[{level:0,isMaxLevel:!0,edges:[]}];function z0e(e,t,n=!1){let r=-1;const i=e.reduce((a,s)=>{var c,d;const l=Ki(s.zIndex);let u=l?s.zIndex:0;if(n){const f=t.get(s.target),h=t.get(s.source),p=s.selected||(f==null?void 0:f.selected)||(h==null?void 0:h.selected),g=Math.max(((c=h==null?void 0:h[Rn])==null?void 0:c.z)||0,((d=f==null?void 0:f[Rn])==null?void 0:d.z)||0,1e3);u=(l?s.zIndex:0)+(p?g:0)}return a[u]?a[u].push(s):a[u]=[s],r=u>r?u:r,a},{}),o=Object.entries(i).map(([a,s])=>{const l=+a;return{edges:s,level:l,isMaxLevel:l===r}});return o.length===0?B0e:o}function V0e(e,t,n){const r=fn(k.useCallback(i=>e?i.edges.filter(o=>{const a=t.get(o.source),s=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&F0e({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return z0e(r,t,n)}const j0e=({color:e="none",strokeWidth:t=1})=>J.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),U0e=({color:e="none",strokeWidth:t=1})=>J.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),l8={[B1.Arrow]:j0e,[B1.ArrowClosed]:U0e};function G0e(e){const t=Kn();return k.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(l8,e)?l8[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",ys.error009(e)),null)},[e])}const H0e=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:a,orient:s="auto-start-reverse"})=>{const l=G0e(t);return l?J.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:s,refX:"0",refY:"0"},J.createElement(l,{color:n,strokeWidth:a})):null},q0e=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((i,o)=>([o.markerStart,o.markerEnd].forEach(a=>{if(a&&typeof a=="object"){const s=U5(a,t);r.includes(s)||(i.push({id:s,color:a.color||e,...a}),r.push(s))}}),i),[]).sort((i,o)=>i.id.localeCompare(o.id))},mz=({defaultColor:e,rfId:t})=>{const n=fn(k.useCallback(q0e({defaultColor:e,rfId:t}),[e,t]),(r,i)=>!(r.length!==i.length||r.some((o,a)=>o.id!==i[a].id)));return J.createElement("defs",null,n.map(r=>J.createElement(H0e,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};mz.displayName="MarkerDefinitions";var W0e=k.memo(mz);const K0e=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),yz=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:o,onEdgeUpdate:a,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:c,onEdgeClick:d,edgeUpdaterRadius:f,onEdgeDoubleClick:h,onEdgeUpdateStart:p,onEdgeUpdateEnd:g,children:_})=>{const{edgesFocusable:b,edgesUpdatable:y,elementsSelectable:m,width:v,height:S,connectionMode:w,nodeInternals:C,onError:x}=fn(K0e,ii),P=V0e(t,C,n);return v?J.createElement(J.Fragment,null,P.map(({level:E,edges:I,isMaxLevel:N})=>J.createElement("svg",{key:E,style:{zIndex:E},width:v,height:S,className:"react-flow__edges react-flow__container"},N&&J.createElement(W0e,{defaultColor:e,rfId:r}),J.createElement("g",null,I.map(M=>{const[T,A,R]=s8(C.get(M.source)),[D,$,L]=s8(C.get(M.target));if(!R||!L)return null;let O=M.type||"default";i[O]||(x==null||x("011",ys.error011(O)),O="default");const B=i[O]||i.default,U=w===sc.Strict?$.target:($.target??[]).concat($.source??[]),j=a8(A.source,M.sourceHandle),q=a8(U,M.targetHandle),Y=(j==null?void 0:j.position)||Pe.Bottom,Z=(q==null?void 0:q.position)||Pe.Top,V=!!(M.focusable||b&&typeof M.focusable>"u"),K=typeof a<"u"&&(M.updatable||y&&typeof M.updatable>"u");if(!j||!q)return x==null||x("008",ys.error008(j,M)),null;const{sourceX:ee,sourceY:re,targetX:fe,targetY:Se}=L0e(T,j,Y,D,q,Z);return J.createElement(B,{key:M.id,id:M.id,className:to([M.className,o]),type:O,data:M.data,selected:!!M.selected,animated:!!M.animated,hidden:!!M.hidden,label:M.label,labelStyle:M.labelStyle,labelShowBg:M.labelShowBg,labelBgStyle:M.labelBgStyle,labelBgPadding:M.labelBgPadding,labelBgBorderRadius:M.labelBgBorderRadius,style:M.style,source:M.source,target:M.target,sourceHandleId:M.sourceHandle,targetHandleId:M.targetHandle,markerEnd:M.markerEnd,markerStart:M.markerStart,sourceX:ee,sourceY:re,targetX:fe,targetY:Se,sourcePosition:Y,targetPosition:Z,elementsSelectable:m,onEdgeUpdate:a,onContextMenu:s,onMouseEnter:l,onMouseMove:u,onMouseLeave:c,onClick:d,edgeUpdaterRadius:f,onEdgeDoubleClick:h,onEdgeUpdateStart:p,onEdgeUpdateEnd:g,rfId:r,ariaLabel:M.ariaLabel,isFocusable:V,isUpdatable:K,pathOptions:"pathOptions"in M?M.pathOptions:void 0,interactionWidth:M.interactionWidth})})))),_):null};yz.displayName="EdgeRenderer";var X0e=k.memo(yz);const Q0e=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Y0e({children:e}){const t=fn(Q0e);return J.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function Z0e(e){const t=sz(),n=k.useRef(!1);k.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const J0e={[Pe.Left]:Pe.Right,[Pe.Right]:Pe.Left,[Pe.Top]:Pe.Bottom,[Pe.Bottom]:Pe.Top},vz=({nodeId:e,handleType:t,style:n,type:r=Js.Bezier,CustomComponent:i,connectionStatus:o})=>{var w,C,x;const{fromNode:a,handleId:s,toX:l,toY:u,connectionMode:c}=fn(k.useCallback(P=>({fromNode:P.nodeInternals.get(e),handleId:P.connectionHandleId,toX:(P.connectionPosition.x-P.transform[0])/P.transform[2],toY:(P.connectionPosition.y-P.transform[1])/P.transform[2],connectionMode:P.connectionMode}),[e]),ii),d=(w=a==null?void 0:a[Rn])==null?void 0:w.handleBounds;let f=d==null?void 0:d[t];if(c===sc.Loose&&(f=f||(d==null?void 0:d[t==="source"?"target":"source"])),!a||!f)return null;const h=s?f.find(P=>P.id===s):f[0],p=h?h.x+h.width/2:(a.width??0)/2,g=h?h.y+h.height/2:a.height??0,_=(((C=a.positionAbsolute)==null?void 0:C.x)??0)+p,b=(((x=a.positionAbsolute)==null?void 0:x.y)??0)+g,y=h==null?void 0:h.position,m=y?J0e[y]:null;if(!y||!m)return null;if(i)return J.createElement(i,{connectionLineType:r,connectionLineStyle:n,fromNode:a,fromHandle:h,fromX:_,fromY:b,toX:l,toY:u,fromPosition:y,toPosition:m,connectionStatus:o});let v="";const S={sourceX:_,sourceY:b,sourcePosition:y,targetX:l,targetY:u,targetPosition:m};return r===Js.Bezier?[v]=zB(S):r===Js.Step?[v]=j5({...S,borderRadius:0}):r===Js.SmoothStep?[v]=j5(S):r===Js.SimpleBezier?[v]=BB(S):v=`M${_},${b} ${l},${u}`,J.createElement("path",{d:v,fill:"none",className:"react-flow__connection-path",style:n})};vz.displayName="ConnectionLine";const eye=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function tye({containerStyle:e,style:t,type:n,component:r}){const{nodeId:i,handleType:o,nodesConnectable:a,width:s,height:l,connectionStatus:u}=fn(eye,ii);return!(i&&o&&s&&a)?null:J.createElement("svg",{style:e,width:s,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},J.createElement("g",{className:to(["react-flow__connection",u])},J.createElement(vz,{nodeId:i,handleType:o,style:t,type:n,CustomComponent:r,connectionStatus:u})))}function u8(e,t){return k.useRef(null),Kn(),k.useMemo(()=>t(e),[e])}const bz=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:o,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:h,onSelectionContextMenu:p,onSelectionStart:g,onSelectionEnd:_,connectionLineType:b,connectionLineStyle:y,connectionLineComponent:m,connectionLineContainerStyle:v,selectionKeyCode:S,selectionOnDrag:w,selectionMode:C,multiSelectionKeyCode:x,panActivationKeyCode:P,zoomActivationKeyCode:E,deleteKeyCode:I,onlyRenderVisibleElements:N,elementsSelectable:M,selectNodesOnDrag:T,defaultViewport:A,translateExtent:R,minZoom:D,maxZoom:$,preventScrolling:L,defaultMarkerColor:O,zoomOnScroll:B,zoomOnPinch:U,panOnScroll:j,panOnScrollSpeed:q,panOnScrollMode:Y,zoomOnDoubleClick:Z,panOnDrag:V,onPaneClick:K,onPaneMouseEnter:ee,onPaneMouseMove:re,onPaneMouseLeave:fe,onPaneScroll:Se,onPaneContextMenu:Me,onEdgeUpdate:De,onEdgeContextMenu:Ee,onEdgeMouseEnter:tt,onEdgeMouseMove:ot,onEdgeMouseLeave:we,edgeUpdaterRadius:Xn,onEdgeUpdateStart:Vt,onEdgeUpdateEnd:Ot,noDragClassName:xt,noWheelClassName:bn,noPanClassName:Vr,elevateEdgesOnSelect:co,disableKeyboardA11y:Mi,nodeOrigin:ur,nodeExtent:Qn,rfId:xr})=>{const rn=u8(e,k0e),$t=u8(t,D0e);return Z0e(o),J.createElement(A0e,{onPaneClick:K,onPaneMouseEnter:ee,onPaneMouseMove:re,onPaneMouseLeave:fe,onPaneContextMenu:Me,onPaneScroll:Se,deleteKeyCode:I,selectionKeyCode:S,selectionOnDrag:w,selectionMode:C,onSelectionStart:g,onSelectionEnd:_,multiSelectionKeyCode:x,panActivationKeyCode:P,zoomActivationKeyCode:E,elementsSelectable:M,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:B,zoomOnPinch:U,zoomOnDoubleClick:Z,panOnScroll:j,panOnScrollSpeed:q,panOnScrollMode:Y,panOnDrag:V,defaultViewport:A,translateExtent:R,minZoom:D,maxZoom:$,onSelectionContextMenu:p,preventScrolling:L,noDragClassName:xt,noWheelClassName:bn,noPanClassName:Vr,disableKeyboardA11y:Mi},J.createElement(Y0e,null,J.createElement(X0e,{edgeTypes:$t,onEdgeClick:s,onEdgeDoubleClick:u,onEdgeUpdate:De,onlyRenderVisibleElements:N,onEdgeContextMenu:Ee,onEdgeMouseEnter:tt,onEdgeMouseMove:ot,onEdgeMouseLeave:we,onEdgeUpdateStart:Vt,onEdgeUpdateEnd:Ot,edgeUpdaterRadius:Xn,defaultMarkerColor:O,noPanClassName:Vr,elevateEdgesOnSelect:!!co,disableKeyboardA11y:Mi,rfId:xr},J.createElement(tye,{style:y,type:b,component:m,containerStyle:v})),J.createElement("div",{className:"react-flow__edgelabel-renderer"}),J.createElement(R0e,{nodeTypes:rn,onNodeClick:a,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:h,selectNodesOnDrag:T,onlyRenderVisibleElements:N,noPanClassName:Vr,noDragClassName:xt,disableKeyboardA11y:Mi,nodeOrigin:ur,nodeExtent:Qn,rfId:xr})))};bz.displayName="GraphView";var nye=k.memo(bz);const q5=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ns={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:q5,nodeExtent:q5,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:sc.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:kme,isValidConnection:void 0},rye=()=>Ufe((e,t)=>({...Ns,setNodes:n=>{const{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:o}=t();e({nodeInternals:ew(n,r,i,o)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(i=>({...r,...i}))})},setDefaultNodesAndEdges:(n,r)=>{const i=typeof n<"u",o=typeof r<"u",a=i?ew(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:o?r:[],hasDefaultNodes:i,hasDefaultEdges:o})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:i,fitViewOnInit:o,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:u}=t(),c=l==null?void 0:l.querySelector(".react-flow__viewport");if(!c)return;const d=window.getComputedStyle(c),{m22:f}=new window.DOMMatrixReadOnly(d.transform),h=n.reduce((g,_)=>{const b=i.get(_.id);if(b){const y=sT(_.nodeElement);!!(y.width&&y.height&&(b.width!==y.width||b.height!==y.height||_.forceUpdate))&&(i.set(b.id,{...b,[Rn]:{...b[Rn],handleBounds:{source:n8(".source",_.nodeElement,f,u),target:n8(".target",_.nodeElement,f,u)}},...y}),g.push({id:b.id,type:"dimensions",dimensions:y}))}return g},[]);oz(i,u);const p=a||o&&!a&&az(t,{initial:!0,...s});e({nodeInternals:new Map(i),fitViewOnInitDone:p}),(h==null?void 0:h.length)>0&&(r==null||r(h))},updateNodePositions:(n,r=!0,i=!1)=>{const{triggerNodeChanges:o}=t(),a=n.map(s=>{const l={id:s.id,type:"position",dragging:i};return r&&(l.positionAbsolute=s.positionAbsolute,l.position=s.position),l});o(a)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:i,hasDefaultNodes:o,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(o){const u=yu(n,s()),c=ew(u,i,a,l);e({nodeInternals:c})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let a,s=null;r?a=n.map(l=>Ws(l,!0)):(a=ld(o(),n),s=ld(i,[])),G0({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let a,s=null;r?a=n.map(l=>Ws(l,!0)):(a=ld(i,n),s=ld(o(),[])),G0({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:i,getNodes:o}=t(),a=n||o(),s=r||i,l=a.map(c=>(c.selected=!1,Ws(c.id,!1))),u=s.map(c=>Ws(c.id,!1));G0({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:i}=t();r==null||r.scaleExtent([n,i]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:i}=t();r==null||r.scaleExtent([i,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),o=r().filter(s=>s.selected).map(s=>Ws(s.id,!1)),a=n.filter(s=>s.selected).map(s=>Ws(s.id,!1));G0({changedNodes:o,changedEdges:a,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(i=>{i.positionAbsolute=lT(i.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:i,height:o,d3Zoom:a,d3Selection:s,translateExtent:l}=t();if(!a||!s||!n.x&&!n.y)return!1;const u=vl.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[i,o]],d=a==null?void 0:a.constrain()(u,c,l);return a.transform(s,d),r[0]!==d.x||r[1]!==d.y||r[2]!==d.k},cancelConnection:()=>e({connectionNodeId:Ns.connectionNodeId,connectionHandleId:Ns.connectionHandleId,connectionHandleType:Ns.connectionHandleType,connectionStatus:Ns.connectionStatus,connectionStartHandle:Ns.connectionStartHandle,connectionEndHandle:Ns.connectionEndHandle}),reset:()=>e({...Ns})}),Object.is),_z=({children:e})=>{const t=k.useRef(null);return t.current||(t.current=rye()),J.createElement(xme,{value:t.current},e)};_z.displayName="ReactFlowProvider";const Sz=({children:e})=>k.useContext(iS)?J.createElement(J.Fragment,null,e):J.createElement(_z,null,e);Sz.displayName="ReactFlowWrapper";const iye={input:ZB,default:G5,output:ez,group:mT},oye={default:z1,straight:dT,step:cT,smoothstep:oS,simplebezier:uT},aye=[0,0],sye=[15,15],lye={x:0,y:0,zoom:1},uye={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},cye=k.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o=iye,edgeTypes:a=oye,onNodeClick:s,onEdgeClick:l,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:p,onConnectEnd:g,onClickConnectStart:_,onClickConnectEnd:b,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:v,onNodeContextMenu:S,onNodeDoubleClick:w,onNodeDragStart:C,onNodeDrag:x,onNodeDragStop:P,onNodesDelete:E,onEdgesDelete:I,onSelectionChange:N,onSelectionDragStart:M,onSelectionDrag:T,onSelectionDragStop:A,onSelectionContextMenu:R,onSelectionStart:D,onSelectionEnd:$,connectionMode:L=sc.Strict,connectionLineType:O=Js.Bezier,connectionLineStyle:B,connectionLineComponent:U,connectionLineContainerStyle:j,deleteKeyCode:q="Backspace",selectionKeyCode:Y="Shift",selectionOnDrag:Z=!1,selectionMode:V=Rl.Full,panActivationKeyCode:K="Space",multiSelectionKeyCode:ee=F1()?"Meta":"Control",zoomActivationKeyCode:re=F1()?"Meta":"Control",snapToGrid:fe=!1,snapGrid:Se=sye,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:De=!0,nodesDraggable:Ee,nodesConnectable:tt,nodesFocusable:ot,nodeOrigin:we=aye,edgesFocusable:Xn,edgesUpdatable:Vt,elementsSelectable:Ot,defaultViewport:xt=lye,minZoom:bn=.5,maxZoom:Vr=2,translateExtent:co=q5,preventScrolling:Mi=!0,nodeExtent:ur,defaultMarkerColor:Qn="#b1b1b7",zoomOnScroll:xr=!0,zoomOnPinch:rn=!0,panOnScroll:$t=!1,panOnScrollSpeed:li=.5,panOnScrollMode:Ri=Ru.Free,zoomOnDoubleClick:fo=!0,panOnDrag:jr=!0,onPaneClick:_n,onPaneMouseEnter:ui,onPaneMouseMove:tu,onPaneMouseLeave:jo,onPaneScroll:nu,onPaneContextMenu:Xt,children:wt,onEdgeUpdate:Yn,onEdgeContextMenu:Nn,onEdgeDoubleClick:cr,onEdgeMouseEnter:wr,onEdgeMouseMove:Ur,onEdgeMouseLeave:Uo,onEdgeUpdateStart:Cr,onEdgeUpdateEnd:Zn,edgeUpdaterRadius:Ra=10,onNodesChange:Is,onEdgesChange:Ms,noDragClassName:Cc="nodrag",noWheelClassName:Oa="nowheel",noPanClassName:Er="nopan",fitView:ru=!1,fitViewOptions:M2,connectOnClick:R2=!0,attributionPosition:O2,proOptions:$2,defaultEdgeOptions:Rs,elevateNodesOnSelect:N2=!0,elevateEdgesOnSelect:D2=!1,disableKeyboardA11y:Ym=!1,autoPanOnConnect:L2=!0,autoPanOnNodeDrag:F2=!0,connectionRadius:B2=20,isValidConnection:Qf,onError:z2,style:Ec,id:Tc,nodeDragThreshold:V2,...Ac},Zm)=>{const Yf=Tc||"1";return J.createElement("div",{...Ac,style:{...Ec,...uye},ref:Zm,className:to(["react-flow",i]),"data-testid":"rf__wrapper",id:Tc},J.createElement(Sz,null,J.createElement(nye,{onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:v,onNodeContextMenu:S,onNodeDoubleClick:w,nodeTypes:o,edgeTypes:a,connectionLineType:O,connectionLineStyle:B,connectionLineComponent:U,connectionLineContainerStyle:j,selectionKeyCode:Y,selectionOnDrag:Z,selectionMode:V,deleteKeyCode:q,multiSelectionKeyCode:ee,panActivationKeyCode:K,zoomActivationKeyCode:re,onlyRenderVisibleElements:Me,selectNodesOnDrag:De,defaultViewport:xt,translateExtent:co,minZoom:bn,maxZoom:Vr,preventScrolling:Mi,zoomOnScroll:xr,zoomOnPinch:rn,zoomOnDoubleClick:fo,panOnScroll:$t,panOnScrollSpeed:li,panOnScrollMode:Ri,panOnDrag:jr,onPaneClick:_n,onPaneMouseEnter:ui,onPaneMouseMove:tu,onPaneMouseLeave:jo,onPaneScroll:nu,onPaneContextMenu:Xt,onSelectionContextMenu:R,onSelectionStart:D,onSelectionEnd:$,onEdgeUpdate:Yn,onEdgeContextMenu:Nn,onEdgeDoubleClick:cr,onEdgeMouseEnter:wr,onEdgeMouseMove:Ur,onEdgeMouseLeave:Uo,onEdgeUpdateStart:Cr,onEdgeUpdateEnd:Zn,edgeUpdaterRadius:Ra,defaultMarkerColor:Qn,noDragClassName:Cc,noWheelClassName:Oa,noPanClassName:Er,elevateEdgesOnSelect:D2,rfId:Yf,disableKeyboardA11y:Ym,nodeOrigin:we,nodeExtent:ur}),J.createElement(e0e,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:p,onConnectEnd:g,onClickConnectStart:_,onClickConnectEnd:b,nodesDraggable:Ee,nodesConnectable:tt,nodesFocusable:ot,edgesFocusable:Xn,edgesUpdatable:Vt,elementsSelectable:Ot,elevateNodesOnSelect:N2,minZoom:bn,maxZoom:Vr,nodeExtent:ur,onNodesChange:Is,onEdgesChange:Ms,snapToGrid:fe,snapGrid:Se,connectionMode:L,translateExtent:co,connectOnClick:R2,defaultEdgeOptions:Rs,fitView:ru,fitViewOptions:M2,onNodesDelete:E,onEdgesDelete:I,onNodeDragStart:C,onNodeDrag:x,onNodeDragStop:P,onSelectionDrag:T,onSelectionDragStart:M,onSelectionDragStop:A,noPanClassName:Er,nodeOrigin:we,rfId:Yf,autoPanOnConnect:L2,autoPanOnNodeDrag:F2,onError:z2,connectionRadius:B2,isValidConnection:Qf,nodeDragThreshold:V2}),J.createElement(Zme,{onSelectionChange:N}),wt,J.createElement(Eme,{proOptions:$2,position:O2}),J.createElement(o0e,{rfId:Yf,disableKeyboardA11y:Ym})))});cye.displayName="ReactFlow";const dye=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function fVe({children:e}){const t=fn(dye);return t?mi.createPortal(e,t):null}function hVe(){const e=Kn();return k.useCallback(t=>{const{domNode:n,updateNodeDimensions:r}=e.getState(),o=(Array.isArray(t)?t:[t]).reduce((a,s)=>{const l=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${s}"]`);return l&&a.push({id:s,nodeElement:l,forceUpdate:!0}),a},[]);requestAnimationFrame(()=>r(o))},[])}function fye(){const e=[];return function(t,n){if(typeof n!="object"||n===null)return n;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(n)?"[Circular]":(e.push(n),n)}}const Ig=Xv("nodes/receivedOpenAPISchema",async(e,{rejectWithValue:t})=>{try{const n=[window.location.origin,"openapi.json"].join("/"),i=await(await fetch(n)).json();return JSON.parse(JSON.stringify(i,fye()))}catch(n){return t({error:n})}}),pVe=500,gVe=320,xz="node-drag-handle",mVe=["ImageField","ImageCollection"],yVe={input:"inputs",output:"outputs"},q0=["Collection","IntegerCollection","BooleanCollection","FloatCollection","StringCollection","ImageCollection","LatentsCollection","ConditioningCollection","ControlCollection","ColorCollection","T2IAdapterCollection","IPAdapterCollection","MetadataItemCollection","MetadataCollection"],Gh=["IntegerPolymorphic","BooleanPolymorphic","FloatPolymorphic","StringPolymorphic","ImagePolymorphic","LatentsPolymorphic","ConditioningPolymorphic","ControlPolymorphic","ColorPolymorphic","T2IAdapterPolymorphic","IPAdapterPolymorphic","MetadataItemPolymorphic"],vVe=["IPAdapterModelField","ControlNetModelField","LoRAModelField","MainModelField","ONNXModelField","SDXLMainModelField","SDXLRefinerModelField","VaeModelField","UNetField","VaeField","ClipField","T2IAdapterModelField","IPAdapterModelField"],vT={integer:"IntegerCollection",boolean:"BooleanCollection",number:"FloatCollection",float:"FloatCollection",string:"StringCollection",ImageField:"ImageCollection",LatentsField:"LatentsCollection",ConditioningField:"ConditioningCollection",ControlField:"ControlCollection",ColorField:"ColorCollection",T2IAdapterField:"T2IAdapterCollection",IPAdapterField:"IPAdapterCollection",MetadataItemField:"MetadataItemCollection",MetadataField:"MetadataCollection"},hye=e=>!!(e&&e in vT),wz={integer:"IntegerPolymorphic",boolean:"BooleanPolymorphic",number:"FloatPolymorphic",float:"FloatPolymorphic",string:"StringPolymorphic",ImageField:"ImagePolymorphic",LatentsField:"LatentsPolymorphic",ConditioningField:"ConditioningPolymorphic",ControlField:"ControlPolymorphic",ColorField:"ColorPolymorphic",T2IAdapterField:"T2IAdapterPolymorphic",IPAdapterField:"IPAdapterPolymorphic",MetadataItemField:"MetadataItemPolymorphic"},pye={IntegerPolymorphic:"integer",BooleanPolymorphic:"boolean",FloatPolymorphic:"float",StringPolymorphic:"string",ImagePolymorphic:"ImageField",LatentsPolymorphic:"LatentsField",ConditioningPolymorphic:"ConditioningField",ControlPolymorphic:"ControlField",ColorPolymorphic:"ColorField",T2IAdapterPolymorphic:"T2IAdapterField",IPAdapterPolymorphic:"IPAdapterField",MetadataItemPolymorphic:"MetadataItemField"},bVe=["string","StringPolymorphic","boolean","BooleanPolymorphic","integer","float","FloatPolymorphic","IntegerPolymorphic","enum","ImageField","ImagePolymorphic","MainModelField","SDXLRefinerModelField","VaeModelField","LoRAModelField","ControlNetModelField","ColorField","SDXLMainModelField","Scheduler","IPAdapterModelField","BoardField","T2IAdapterModelField"],gye=e=>!!(e&&e in wz),_Ve={Any:{color:"gray.500",description:"Any field type is accepted.",title:"Any"},MetadataField:{color:"gray.500",description:"A metadata dict.",title:"Metadata Dict"},MetadataCollection:{color:"gray.500",description:"A collection of metadata dicts.",title:"Metadata Dict Collection"},MetadataItemField:{color:"gray.500",description:"A metadata item.",title:"Metadata Item"},MetadataItemCollection:{color:"gray.500",description:"Any field type is accepted.",title:"Metadata Item Collection"},MetadataItemPolymorphic:{color:"gray.500",description:"MetadataItem or MetadataItemCollection field types are accepted.",title:"Metadata Item Polymorphic"},boolean:{color:"green.500",description:X("nodes.booleanDescription"),title:X("nodes.boolean")},BooleanCollection:{color:"green.500",description:X("nodes.booleanCollectionDescription"),title:X("nodes.booleanCollection")},BooleanPolymorphic:{color:"green.500",description:X("nodes.booleanPolymorphicDescription"),title:X("nodes.booleanPolymorphic")},ClipField:{color:"green.500",description:X("nodes.clipFieldDescription"),title:X("nodes.clipField")},Collection:{color:"base.500",description:X("nodes.collectionDescription"),title:X("nodes.collection")},CollectionItem:{color:"base.500",description:X("nodes.collectionItemDescription"),title:X("nodes.collectionItem")},ColorCollection:{color:"pink.300",description:X("nodes.colorCollectionDescription"),title:X("nodes.colorCollection")},ColorField:{color:"pink.300",description:X("nodes.colorFieldDescription"),title:X("nodes.colorField")},ColorPolymorphic:{color:"pink.300",description:X("nodes.colorPolymorphicDescription"),title:X("nodes.colorPolymorphic")},ConditioningCollection:{color:"cyan.500",description:X("nodes.conditioningCollectionDescription"),title:X("nodes.conditioningCollection")},ConditioningField:{color:"cyan.500",description:X("nodes.conditioningFieldDescription"),title:X("nodes.conditioningField")},ConditioningPolymorphic:{color:"cyan.500",description:X("nodes.conditioningPolymorphicDescription"),title:X("nodes.conditioningPolymorphic")},ControlCollection:{color:"teal.500",description:X("nodes.controlCollectionDescription"),title:X("nodes.controlCollection")},ControlField:{color:"teal.500",description:X("nodes.controlFieldDescription"),title:X("nodes.controlField")},ControlNetModelField:{color:"teal.500",description:"TODO",title:"ControlNet"},ControlPolymorphic:{color:"teal.500",description:"Control info passed between nodes.",title:"Control Polymorphic"},DenoiseMaskField:{color:"blue.300",description:X("nodes.denoiseMaskFieldDescription"),title:X("nodes.denoiseMaskField")},enum:{color:"blue.500",description:X("nodes.enumDescription"),title:X("nodes.enum")},float:{color:"orange.500",description:X("nodes.floatDescription"),title:X("nodes.float")},FloatCollection:{color:"orange.500",description:X("nodes.floatCollectionDescription"),title:X("nodes.floatCollection")},FloatPolymorphic:{color:"orange.500",description:X("nodes.floatPolymorphicDescription"),title:X("nodes.floatPolymorphic")},ImageCollection:{color:"purple.500",description:X("nodes.imageCollectionDescription"),title:X("nodes.imageCollection")},ImageField:{color:"purple.500",description:X("nodes.imageFieldDescription"),title:X("nodes.imageField")},BoardField:{color:"purple.500",description:X("nodes.imageFieldDescription"),title:X("nodes.imageField")},ImagePolymorphic:{color:"purple.500",description:X("nodes.imagePolymorphicDescription"),title:X("nodes.imagePolymorphic")},integer:{color:"red.500",description:X("nodes.integerDescription"),title:X("nodes.integer")},IntegerCollection:{color:"red.500",description:X("nodes.integerCollectionDescription"),title:X("nodes.integerCollection")},IntegerPolymorphic:{color:"red.500",description:X("nodes.integerPolymorphicDescription"),title:X("nodes.integerPolymorphic")},IPAdapterCollection:{color:"teal.500",description:X("nodes.ipAdapterCollectionDescription"),title:X("nodes.ipAdapterCollection")},IPAdapterField:{color:"teal.500",description:X("nodes.ipAdapterDescription"),title:X("nodes.ipAdapter")},IPAdapterModelField:{color:"teal.500",description:X("nodes.ipAdapterModelDescription"),title:X("nodes.ipAdapterModel")},IPAdapterPolymorphic:{color:"teal.500",description:X("nodes.ipAdapterPolymorphicDescription"),title:X("nodes.ipAdapterPolymorphic")},LatentsCollection:{color:"pink.500",description:X("nodes.latentsCollectionDescription"),title:X("nodes.latentsCollection")},LatentsField:{color:"pink.500",description:X("nodes.latentsFieldDescription"),title:X("nodes.latentsField")},LatentsPolymorphic:{color:"pink.500",description:X("nodes.latentsPolymorphicDescription"),title:X("nodes.latentsPolymorphic")},LoRAModelField:{color:"teal.500",description:X("nodes.loRAModelFieldDescription"),title:X("nodes.loRAModelField")},MainModelField:{color:"teal.500",description:X("nodes.mainModelFieldDescription"),title:X("nodes.mainModelField")},ONNXModelField:{color:"teal.500",description:X("nodes.oNNXModelFieldDescription"),title:X("nodes.oNNXModelField")},Scheduler:{color:"base.500",description:X("nodes.schedulerDescription"),title:X("nodes.scheduler")},SDXLMainModelField:{color:"teal.500",description:X("nodes.sDXLMainModelFieldDescription"),title:X("nodes.sDXLMainModelField")},SDXLRefinerModelField:{color:"teal.500",description:X("nodes.sDXLRefinerModelFieldDescription"),title:X("nodes.sDXLRefinerModelField")},string:{color:"yellow.500",description:X("nodes.stringDescription"),title:X("nodes.string")},StringCollection:{color:"yellow.500",description:X("nodes.stringCollectionDescription"),title:X("nodes.stringCollection")},StringPolymorphic:{color:"yellow.500",description:X("nodes.stringPolymorphicDescription"),title:X("nodes.stringPolymorphic")},T2IAdapterCollection:{color:"teal.500",description:X("nodes.t2iAdapterCollectionDescription"),title:X("nodes.t2iAdapterCollection")},T2IAdapterField:{color:"teal.500",description:X("nodes.t2iAdapterFieldDescription"),title:X("nodes.t2iAdapterField")},T2IAdapterModelField:{color:"teal.500",description:"TODO",title:"T2I-Adapter"},T2IAdapterPolymorphic:{color:"teal.500",description:"T2I-Adapter info passed between nodes.",title:"T2I-Adapter Polymorphic"},UNetField:{color:"red.500",description:X("nodes.uNetFieldDescription"),title:X("nodes.uNetField")},VaeField:{color:"blue.500",description:X("nodes.vaeFieldDescription"),title:X("nodes.vaeField")},VaeModelField:{color:"teal.500",description:X("nodes.vaeModelFieldDescription"),title:X("nodes.vaeModelField")}},c8=(e,t,n)=>{let r=t,i=n;for(;e.find(o=>o.position.x===r&&o.position.y===i);)r=r+50,i=i+50;return{x:r,y:i}},mye=(e,t)=>{if(e==="Collection"&&t==="Collection")return!1;if(e===t)return!0;const n=e==="CollectionItem"&&!q0.includes(t),r=t==="CollectionItem"&&!q0.includes(e)&&!Gh.includes(e),i=Gh.includes(t)&&(()=>{if(!Gh.includes(t))return!1;const c=pye[t],d=vT[c];return e===c||e===d})(),o=e==="Collection"&&(q0.includes(t)||Gh.includes(t)),a=t==="Collection"&&q0.includes(e);return n||r||i||o||a||e==="integer"&&t==="float"||(e==="integer"||e==="float")&&t==="string"||t==="Any"};var yye="\0",lu="\0",d8="",Hr,Du,hi,Jg,Kd,Xd,ji,Jo,nl,ea,rl,Ga,Ha,Qd,Yd,qa,yo,em,W5,hO;let vye=(hO=class{constructor(t){Gt(this,em);Gt(this,Hr,!0);Gt(this,Du,!1);Gt(this,hi,!1);Gt(this,Jg,void 0);Gt(this,Kd,()=>{});Gt(this,Xd,()=>{});Gt(this,ji,{});Gt(this,Jo,{});Gt(this,nl,{});Gt(this,ea,{});Gt(this,rl,{});Gt(this,Ga,{});Gt(this,Ha,{});Gt(this,Qd,0);Gt(this,Yd,0);Gt(this,qa,void 0);Gt(this,yo,void 0);t&&($i(this,Hr,t.hasOwnProperty("directed")?t.directed:!0),$i(this,Du,t.hasOwnProperty("multigraph")?t.multigraph:!1),$i(this,hi,t.hasOwnProperty("compound")?t.compound:!1)),te(this,hi)&&($i(this,qa,{}),$i(this,yo,{}),te(this,yo)[lu]={})}isDirected(){return te(this,Hr)}isMultigraph(){return te(this,Du)}isCompound(){return te(this,hi)}setGraph(t){return $i(this,Jg,t),this}graph(){return te(this,Jg)}setDefaultNodeLabel(t){return $i(this,Kd,t),typeof t!="function"&&$i(this,Kd,()=>t),this}nodeCount(){return te(this,Qd)}nodes(){return Object.keys(te(this,ji))}sources(){var t=this;return this.nodes().filter(n=>Object.keys(te(t,Jo)[n]).length===0)}sinks(){var t=this;return this.nodes().filter(n=>Object.keys(te(t,ea)[n]).length===0)}setNodes(t,n){var r=arguments,i=this;return t.forEach(function(o){r.length>1?i.setNode(o,n):i.setNode(o)}),this}setNode(t,n){return te(this,ji).hasOwnProperty(t)?(arguments.length>1&&(te(this,ji)[t]=n),this):(te(this,ji)[t]=arguments.length>1?n:te(this,Kd).call(this,t),te(this,hi)&&(te(this,qa)[t]=lu,te(this,yo)[t]={},te(this,yo)[lu][t]=!0),te(this,Jo)[t]={},te(this,nl)[t]={},te(this,ea)[t]={},te(this,rl)[t]={},++eh(this,Qd)._,this)}node(t){return te(this,ji)[t]}hasNode(t){return te(this,ji).hasOwnProperty(t)}removeNode(t){var n=this;if(te(this,ji).hasOwnProperty(t)){var r=i=>n.removeEdge(te(n,Ga)[i]);delete te(this,ji)[t],te(this,hi)&&(Go(this,em,W5).call(this,t),delete te(this,qa)[t],this.children(t).forEach(function(i){n.setParent(i)}),delete te(this,yo)[t]),Object.keys(te(this,Jo)[t]).forEach(r),delete te(this,Jo)[t],delete te(this,nl)[t],Object.keys(te(this,ea)[t]).forEach(r),delete te(this,ea)[t],delete te(this,rl)[t],--eh(this,Qd)._}return this}setParent(t,n){if(!te(this,hi))throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n=lu;else{n+="";for(var r=n;r!==void 0;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),Go(this,em,W5).call(this,t),te(this,qa)[t]=n,te(this,yo)[n][t]=!0,this}parent(t){if(te(this,hi)){var n=te(this,qa)[t];if(n!==lu)return n}}children(t=lu){if(te(this,hi)){var n=te(this,yo)[t];if(n)return Object.keys(n)}else{if(t===lu)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var n=te(this,nl)[t];if(n)return Object.keys(n)}successors(t){var n=te(this,rl)[t];if(n)return Object.keys(n)}neighbors(t){var n=this.predecessors(t);if(n){const i=new Set(n);for(var r of this.successors(t))i.add(r);return Array.from(i.values())}}isLeaf(t){var n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){var n=new this.constructor({directed:te(this,Hr),multigraph:te(this,Du),compound:te(this,hi)});n.setGraph(this.graph());var r=this;Object.entries(te(this,ji)).forEach(function([a,s]){t(a)&&n.setNode(a,s)}),Object.values(te(this,Ga)).forEach(function(a){n.hasNode(a.v)&&n.hasNode(a.w)&&n.setEdge(a,r.edge(a))});var i={};function o(a){var s=r.parent(a);return s===void 0||n.hasNode(s)?(i[a]=s,s):s in i?i[s]:o(s)}return te(this,hi)&&n.nodes().forEach(a=>n.setParent(a,o(a))),n}setDefaultEdgeLabel(t){return $i(this,Xd,t),typeof t!="function"&&$i(this,Xd,()=>t),this}edgeCount(){return te(this,Yd)}edges(){return Object.values(te(this,Ga))}setPath(t,n){var r=this,i=arguments;return t.reduce(function(o,a){return i.length>1?r.setEdge(o,a,n):r.setEdge(o,a),a}),this}setEdge(){var t,n,r,i,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,n=a.w,r=a.name,arguments.length===2&&(i=arguments[1],o=!0)):(t=a,n=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,n=""+n,r!==void 0&&(r=""+r);var s=Hh(te(this,Hr),t,n,r);if(te(this,Ha).hasOwnProperty(s))return o&&(te(this,Ha)[s]=i),this;if(r!==void 0&&!te(this,Du))throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),te(this,Ha)[s]=o?i:te(this,Xd).call(this,t,n,r);var l=bye(te(this,Hr),t,n,r);return t=l.v,n=l.w,Object.freeze(l),te(this,Ga)[s]=l,f8(te(this,nl)[n],t),f8(te(this,rl)[t],n),te(this,Jo)[n][s]=l,te(this,ea)[t][s]=l,eh(this,Yd)._++,this}edge(t,n,r){var i=arguments.length===1?iw(te(this,Hr),arguments[0]):Hh(te(this,Hr),t,n,r);return te(this,Ha)[i]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,n,r){var i=arguments.length===1?iw(te(this,Hr),arguments[0]):Hh(te(this,Hr),t,n,r);return te(this,Ha).hasOwnProperty(i)}removeEdge(t,n,r){var i=arguments.length===1?iw(te(this,Hr),arguments[0]):Hh(te(this,Hr),t,n,r),o=te(this,Ga)[i];return o&&(t=o.v,n=o.w,delete te(this,Ha)[i],delete te(this,Ga)[i],h8(te(this,nl)[n],t),h8(te(this,rl)[t],n),delete te(this,Jo)[n][i],delete te(this,ea)[t][i],eh(this,Yd)._--),this}inEdges(t,n){var r=te(this,Jo)[t];if(r){var i=Object.values(r);return n?i.filter(o=>o.v===n):i}}outEdges(t,n){var r=te(this,ea)[t];if(r){var i=Object.values(r);return n?i.filter(o=>o.w===n):i}}nodeEdges(t,n){var r=this.inEdges(t,n);if(r)return r.concat(this.outEdges(t,n))}},Hr=new WeakMap,Du=new WeakMap,hi=new WeakMap,Jg=new WeakMap,Kd=new WeakMap,Xd=new WeakMap,ji=new WeakMap,Jo=new WeakMap,nl=new WeakMap,ea=new WeakMap,rl=new WeakMap,Ga=new WeakMap,Ha=new WeakMap,Qd=new WeakMap,Yd=new WeakMap,qa=new WeakMap,yo=new WeakMap,em=new WeakSet,W5=function(t){delete te(this,yo)[te(this,qa)[t]][t]},hO);function f8(e,t){e[t]?e[t]++:e[t]=1}function h8(e,t){--e[t]||delete e[t]}function Hh(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}return i+d8+o+d8+(r===void 0?yye:r)}function bye(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function iw(e,t){return Hh(e,t.v,t.w,t.name)}var bT=vye,_ye="2.1.13",Sye={Graph:bT,version:_ye},xye=bT,wye={write:Cye,read:Aye};function Cye(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Eye(e),edges:Tye(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function Eye(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function Tye(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function Aye(e){var t=new xye(e.options).setGraph(e.value);return e.nodes.forEach(function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var Pye=kye;function kye(e){var t={},n=[],r;function i(o){t.hasOwnProperty(o)||(t[o]=!0,r.push(o),e.successors(o).forEach(i),e.predecessors(o).forEach(i))}return e.nodes().forEach(function(o){r=[],i(o),r.length&&n.push(r)}),n}var pr,Wa,tm,K5,nm,X5,Zd,Qy,pO;let Iye=(pO=class{constructor(){Gt(this,tm);Gt(this,nm);Gt(this,Zd);Gt(this,pr,[]);Gt(this,Wa,{})}size(){return te(this,pr).length}keys(){return te(this,pr).map(function(t){return t.key})}has(t){return te(this,Wa).hasOwnProperty(t)}priority(t){var n=te(this,Wa)[t];if(n!==void 0)return te(this,pr)[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return te(this,pr)[0].key}add(t,n){var r=te(this,Wa);if(t=String(t),!r.hasOwnProperty(t)){var i=te(this,pr),o=i.length;return r[t]=o,i.push({key:t,priority:n}),Go(this,nm,X5).call(this,o),!0}return!1}removeMin(){Go(this,Zd,Qy).call(this,0,te(this,pr).length-1);var t=te(this,pr).pop();return delete te(this,Wa)[t.key],Go(this,tm,K5).call(this,0),t.key}decrease(t,n){var r=te(this,Wa)[t];if(n>te(this,pr)[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+te(this,pr)[r].priority+" New: "+n);te(this,pr)[r].priority=n,Go(this,nm,X5).call(this,r)}},pr=new WeakMap,Wa=new WeakMap,tm=new WeakSet,K5=function(t){var n=te(this,pr),r=2*t,i=r+1,o=t;r>1,!(n[i].priority1;function Oye(e,t,n,r){return $ye(e,String(t),n||Rye,r||function(i){return e.outEdges(i)})}function $ye(e,t,n,r){var i={},o=new Mye,a,s,l=function(u){var c=u.v!==a?u.v:u.w,d=i[c],f=n(u),h=s.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+f);h0&&(a=o.removeMin(),s=i[a],s.distance!==Number.POSITIVE_INFINITY);)r(a).forEach(l);return i}var Nye=Ez,Dye=Lye;function Lye(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=Nye(e,i,t,n),r},{})}var Tz=Fye;function Fye(e){var t=0,n=[],r={},i=[];function o(a){var s=r[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(c){r.hasOwnProperty(c)?r[c].onStack&&(s.lowlink=Math.min(s.lowlink,r[c].index)):(o(c),s.lowlink=Math.min(s.lowlink,r[c].lowlink))}),s.lowlink===s.index){var l=[],u;do u=n.pop(),r[u].onStack=!1,l.push(u);while(a!==u);i.push(l)}}return e.nodes().forEach(function(a){r.hasOwnProperty(a)||o(a)}),i}var Bye=Tz,zye=Vye;function Vye(e){return Bye(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var jye=Gye,Uye=()=>1;function Gye(e,t,n){return Hye(e,t||Uye,n||function(r){return e.outEdges(r)})}function Hye(e,t,n){var r={},i=e.nodes();return i.forEach(function(o){r[o]={},r[o][o]={distance:0},i.forEach(function(a){o!==a&&(r[o][a]={distance:Number.POSITIVE_INFINITY})}),n(o).forEach(function(a){var s=a.v===o?a.w:a.v,l=t(a);r[o][s]={distance:l,predecessor:o}})}),i.forEach(function(o){var a=r[o];i.forEach(function(s){var l=r[s];i.forEach(function(u){var c=l[o],d=a[u],f=l[u],h=c.distance+d.distance;he.successors(s):s=>e.neighbors(s),i=n==="post"?Xye:Qye,o=[],a={};return t.forEach(s=>{if(!e.hasNode(s))throw new Error("Graph does not have node: "+s);i(s,r,a,o)}),o}function Xye(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):n.hasOwnProperty(o[0])||(n[o[0]]=!0,i.push([o[0],!0]),Iz(t(o[0]),a=>i.push([a,!1])))}}function Qye(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();n.hasOwnProperty(o)||(n[o]=!0,r.push(o),Iz(t(o),a=>i.push(a)))}}function Iz(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}var Yye=kz,Zye=Jye;function Jye(e,t){return Yye(e,t,"post")}var eve=kz,tve=nve;function nve(e,t){return eve(e,t,"pre")}var rve=bT,ive=Cz,ove=ave;function ave(e,t){var n=new rve,r={},i=new ive,o;function a(l){var u=l.v===o?l.w:l.v,c=i.priority(u);if(c!==void 0){var d=t(l);d0;){if(o=i.removeMin(),r.hasOwnProperty(o))n.setEdge(o,r[o]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(o).forEach(a)}return n}var sve={components:Pye,dijkstra:Ez,dijkstraAll:Dye,findCycles:zye,floydWarshall:jye,isAcyclic:qye,postorder:Zye,preorder:tve,prim:ove,tarjan:Tz,topsort:Pz},g8=Sye,lve={Graph:g8.Graph,json:wye,alg:sve,version:g8.version};const m8=Bl(lve),y8=(e,t,n,r)=>{const i=new m8.Graph;return n.forEach(o=>{i.setNode(o.id)}),r.forEach(o=>{i.setEdge(o.source,o.target)}),i.setEdge(e,t),m8.alg.isAcyclic(i)},v8=(e,t,n,r,i)=>{let o=!0;return t==="source"?e.find(a=>a.target===r.id&&a.targetHandle===i.name)&&(o=!1):e.find(a=>a.source===r.id&&a.sourceHandle===i.name)&&(o=!1),mye(n,i.type)||(o=!1),o},b8=(e,t,n,r,i,o,a)=>{if(e.id===r)return null;const s=o=="source"?e.data.inputs:e.data.outputs;if(s[i]){const l=s[i],u=o=="source"?r:e.id,c=o=="source"?e.id:r,d=o=="source"?i:l.name,f=o=="source"?l.name:i,h=y8(u,c,t,n),p=v8(n,o,a,e,l);if(h&&p)return{source:u,sourceHandle:d,target:c,targetHandle:f}}for(const l in s){const u=s[l],c=o=="source"?r:e.id,d=o=="source"?e.id:r,f=o=="source"?i:u.name,h=o=="source"?u.name:i,p=y8(c,d,t,n),g=v8(n,o,a,e,u);if(p&&g)return{source:c,sourceHandle:f,target:d,targetHandle:h}}return null},uve="1.0.0",ow={status:wu.PENDING,error:null,progress:null,progressImage:null,outputs:[]},Y5={meta:{version:uve},name:"",author:"",description:"",notes:"",tags:"",contact:"",version:"",exposedFields:[]},Mz={nodes:[],edges:[],nodeTemplates:{},isReady:!1,connectionStartParams:null,currentConnectionFieldType:null,connectionMade:!1,modifyingEdge:!1,addNewNodePosition:null,shouldShowFieldTypeLegend:!1,shouldShowMinimapPanel:!0,shouldValidateGraph:!0,shouldAnimateEdges:!0,shouldSnapToGrid:!1,shouldColorEdges:!0,isAddNodePopoverOpen:!1,nodeOpacity:1,selectedNodes:[],selectedEdges:[],workflow:Y5,nodeExecutionStates:{},viewport:{x:0,y:0,zoom:1},mouseOverField:null,mouseOverNode:null,nodesToCopy:[],edgesToCopy:[],selectionMode:Rl.Partial},Ar=(e,t)=>{var l,u;const{nodeId:n,fieldName:r,value:i}=t.payload,o=e.nodes.findIndex(c=>c.id===n),a=(l=e.nodes)==null?void 0:l[o];if(!on(a))return;const s=(u=a.data)==null?void 0:u.inputs[r];s&&o>-1&&(s.value=i)},Rz=Wt({name:"nodes",initialState:Mz,reducers:{nodesChanged:(e,t)=>{e.nodes=yu(t.payload,e.nodes)},nodeReplaced:(e,t)=>{const n=e.nodes.findIndex(r=>r.id===t.payload.nodeId);n<0||(e.nodes[n]=t.payload.node)},nodeAdded:(e,t)=>{var i,o;const n=t.payload,r=c8(e.nodes,((i=e.addNewNodePosition)==null?void 0:i.x)??n.position.x,((o=e.addNewNodePosition)==null?void 0:o.y)??n.position.y);if(n.position=r,n.selected=!0,e.nodes=yu(e.nodes.map(a=>({id:a.id,type:"select",selected:!1})),e.nodes),e.edges=su(e.edges.map(a=>({id:a.id,type:"select",selected:!1})),e.edges),e.nodes.push(n),!!on(n)){if(e.nodeExecutionStates[n.id]={nodeId:n.id,...ow},e.connectionStartParams){const{nodeId:a,handleId:s,handleType:l}=e.connectionStartParams;if(a&&s&&l&&e.currentConnectionFieldType){const u=b8(n,e.nodes,e.edges,a,s,l,e.currentConnectionFieldType);u&&(e.edges=Uh({...u,type:"default"},e.edges))}}e.connectionStartParams=null,e.currentConnectionFieldType=null}},edgeChangeStarted:e=>{e.modifyingEdge=!0},edgesChanged:(e,t)=>{e.edges=su(t.payload,e.edges)},edgeAdded:(e,t)=>{e.edges=Uh(t.payload,e.edges)},edgeUpdated:(e,t)=>{const{oldEdge:n,newConnection:r}=t.payload;e.edges=Vme(n,r,e.edges)},connectionStarted:(e,t)=>{var l;e.connectionStartParams=t.payload,e.connectionMade=e.modifyingEdge;const{nodeId:n,handleId:r,handleType:i}=t.payload;if(!n||!r)return;const o=e.nodes.findIndex(u=>u.id===n),a=(l=e.nodes)==null?void 0:l[o];if(!on(a))return;const s=i==="source"?a.data.outputs[r]:a.data.inputs[r];e.currentConnectionFieldType=(s==null?void 0:s.type)??null},connectionMade:(e,t)=>{e.currentConnectionFieldType&&(e.edges=Uh({...t.payload,type:"default"},e.edges),e.connectionMade=!0)},connectionEnded:(e,t)=>{var n;if(e.connectionMade)e.connectionStartParams=null,e.currentConnectionFieldType=null;else if(e.mouseOverNode){const r=e.nodes.findIndex(o=>o.id===e.mouseOverNode),i=(n=e.nodes)==null?void 0:n[r];if(i&&e.connectionStartParams){const{nodeId:o,handleId:a,handleType:s}=e.connectionStartParams;if(o&&a&&s&&e.currentConnectionFieldType){const l=b8(i,e.nodes,e.edges,o,a,s,e.currentConnectionFieldType);l&&(e.edges=Uh({...l,type:"default"},e.edges))}}e.connectionStartParams=null,e.currentConnectionFieldType=null}else e.addNewNodePosition=t.payload.cursorPosition,e.isAddNodePopoverOpen=!0;e.modifyingEdge=!1},workflowExposedFieldAdded:(e,t)=>{e.workflow.exposedFields=g5(e.workflow.exposedFields.concat(t.payload),n=>`${n.nodeId}-${n.fieldName}`)},workflowExposedFieldRemoved:(e,t)=>{e.workflow.exposedFields=e.workflow.exposedFields.filter(n=>!SE(n,t.payload))},fieldLabelChanged:(e,t)=>{const{nodeId:n,fieldName:r,label:i}=t.payload,o=e.nodes.find(s=>s.id===n);if(!on(o))return;const a=o.data.inputs[r];a&&(a.label=i)},nodeEmbedWorkflowChanged:(e,t)=>{var a;const{nodeId:n,embedWorkflow:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.embedWorkflow=r)},nodeUseCacheChanged:(e,t)=>{var a;const{nodeId:n,useCache:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.useCache=r)},nodeIsIntermediateChanged:(e,t)=>{var a;const{nodeId:n,isIntermediate:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.isIntermediate=r)},nodeIsOpenChanged:(e,t)=>{var s;const{nodeId:n,isOpen:r}=t.payload,i=e.nodes.findIndex(l=>l.id===n),o=(s=e.nodes)==null?void 0:s[i];if(!on(o)&&!bI(o)||(o.data.isOpen=r,!on(o)))return;const a=pT([o],e.edges);if(r)a.forEach(l=>{delete l.hidden}),a.forEach(l=>{l.type==="collapsed"&&(e.edges=e.edges.filter(u=>u.id!==l.id))});else{const l=Bme(o,e.nodes,e.edges).filter(d=>on(d)&&d.data.isOpen===!1),u=Fme(o,e.nodes,e.edges).filter(d=>on(d)&&d.data.isOpen===!1),c=[];a.forEach(d=>{var f,h;if(d.target===n&&l.find(p=>p.id===d.source)){d.hidden=!0;const p=c.find(g=>g.source===d.source&&g.target===d.target);p?p.data={count:(((f=p.data)==null?void 0:f.count)??0)+1}:c.push({id:`${d.source}-${d.target}-collapsed`,source:d.source,target:d.target,type:"collapsed",data:{count:1},updatable:!1})}if(d.source===n&&u.find(p=>p.id===d.target)){const p=c.find(g=>g.source===d.source&&g.target===d.target);d.hidden=!0,p?p.data={count:(((h=p.data)==null?void 0:h.count)??0)+1}:c.push({id:`${d.source}-${d.target}-collapsed`,source:d.source,target:d.target,type:"collapsed",data:{count:1},updatable:!1})}}),c.length&&(e.edges=su(c.map(d=>({type:"add",item:d})),e.edges))}},edgeDeleted:(e,t)=>{e.edges=e.edges.filter(n=>n.id!==t.payload)},edgesDeleted:(e,t)=>{const r=t.payload.filter(i=>i.type==="collapsed");if(r.length){const i=[];r.forEach(o=>{e.edges.forEach(a=>{a.source===o.source&&a.target===o.target&&i.push({id:a.id,type:"remove"})})}),e.edges=su(i,e.edges)}},nodesDeleted:(e,t)=>{t.payload.forEach(n=>{e.workflow.exposedFields=e.workflow.exposedFields.filter(r=>r.nodeId!==n.id),on(n)&&delete e.nodeExecutionStates[n.id]})},nodeLabelChanged:(e,t)=>{var a;const{nodeId:n,label:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.label=r)},nodeNotesChanged:(e,t)=>{var a;const{nodeId:n,notes:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.notes=r)},nodeExclusivelySelected:(e,t)=>{const n=t.payload;e.nodes=yu(e.nodes.map(r=>({id:r.id,type:"select",selected:r.id===n})),e.nodes)},selectedNodesChanged:(e,t)=>{e.selectedNodes=t.payload},selectedEdgesChanged:(e,t)=>{e.selectedEdges=t.payload},fieldStringValueChanged:(e,t)=>{Ar(e,t)},fieldNumberValueChanged:(e,t)=>{Ar(e,t)},fieldBooleanValueChanged:(e,t)=>{Ar(e,t)},fieldBoardValueChanged:(e,t)=>{Ar(e,t)},fieldImageValueChanged:(e,t)=>{Ar(e,t)},fieldColorValueChanged:(e,t)=>{Ar(e,t)},fieldMainModelValueChanged:(e,t)=>{Ar(e,t)},fieldRefinerModelValueChanged:(e,t)=>{Ar(e,t)},fieldVaeModelValueChanged:(e,t)=>{Ar(e,t)},fieldLoRAModelValueChanged:(e,t)=>{Ar(e,t)},fieldControlNetModelValueChanged:(e,t)=>{Ar(e,t)},fieldIPAdapterModelValueChanged:(e,t)=>{Ar(e,t)},fieldT2IAdapterModelValueChanged:(e,t)=>{Ar(e,t)},fieldEnumModelValueChanged:(e,t)=>{Ar(e,t)},fieldSchedulerValueChanged:(e,t)=>{Ar(e,t)},imageCollectionFieldValueChanged:(e,t)=>{var u,c;const{nodeId:n,fieldName:r,value:i}=t.payload,o=e.nodes.findIndex(d=>d.id===n);if(o===-1)return;const a=(u=e.nodes)==null?void 0:u[o];if(!on(a))return;const s=(c=a.data)==null?void 0:c.inputs[r];if(!s)return;const l=Ye(s.value);if(!l){s.value=i;return}s.value=g5(l.concat(i),"image_name")},notesNodeValueChanged:(e,t)=>{var a;const{nodeId:n,value:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];bI(o)&&(o.data.notes=r)},shouldShowFieldTypeLegendChanged:(e,t)=>{e.shouldShowFieldTypeLegend=t.payload},shouldShowMinimapPanelChanged:(e,t)=>{e.shouldShowMinimapPanel=t.payload},nodeTemplatesBuilt:(e,t)=>{e.nodeTemplates=t.payload,e.isReady=!0},nodeEditorReset:e=>{e.nodes=[],e.edges=[],e.workflow=Ye(Y5)},shouldValidateGraphChanged:(e,t)=>{e.shouldValidateGraph=t.payload},shouldAnimateEdgesChanged:(e,t)=>{e.shouldAnimateEdges=t.payload},shouldSnapToGridChanged:(e,t)=>{e.shouldSnapToGrid=t.payload},shouldColorEdgesChanged:(e,t)=>{e.shouldColorEdges=t.payload},nodeOpacityChanged:(e,t)=>{e.nodeOpacity=t.payload},workflowNameChanged:(e,t)=>{e.workflow.name=t.payload},workflowDescriptionChanged:(e,t)=>{e.workflow.description=t.payload},workflowTagsChanged:(e,t)=>{e.workflow.tags=t.payload},workflowAuthorChanged:(e,t)=>{e.workflow.author=t.payload},workflowNotesChanged:(e,t)=>{e.workflow.notes=t.payload},workflowVersionChanged:(e,t)=>{e.workflow.version=t.payload},workflowContactChanged:(e,t)=>{e.workflow.contact=t.payload},workflowLoaded:(e,t)=>{const{nodes:n,edges:r,...i}=t.payload;e.workflow=i,e.nodes=yu(n.map(o=>({item:{...o,dragHandle:`.${xz}`},type:"add"})),[]),e.edges=su(r.map(o=>({item:o,type:"add"})),[]),e.nodeExecutionStates=n.reduce((o,a)=>(o[a.id]={nodeId:a.id,...ow},o),{})},workflowReset:e=>{e.workflow=Ye(Y5)},viewportChanged:(e,t)=>{e.viewport=t.payload},mouseOverFieldChanged:(e,t)=>{e.mouseOverField=t.payload},mouseOverNodeChanged:(e,t)=>{e.mouseOverNode=t.payload},selectedAll:e=>{e.nodes=yu(e.nodes.map(t=>({id:t.id,type:"select",selected:!0})),e.nodes),e.edges=su(e.edges.map(t=>({id:t.id,type:"select",selected:!0})),e.edges)},selectionCopied:e=>{if(e.nodesToCopy=e.nodes.filter(t=>t.selected).map(Ye),e.edgesToCopy=e.edges.filter(t=>t.selected).map(Ye),e.nodesToCopy.length>0){const t={x:0,y:0};e.nodesToCopy.forEach(n=>{const r=.15*(n.width??0),i=.5*(n.height??0);t.x+=n.position.x+r,t.y+=n.position.y+i}),t.x/=e.nodesToCopy.length,t.y/=e.nodesToCopy.length,e.nodesToCopy.forEach(n=>{n.position.x-=t.x,n.position.y-=t.y})}},selectionPasted:(e,t)=>{const{cursorPosition:n}=t.payload,r=e.nodesToCopy.map(Ye),i=r.map(c=>c.data.id),o=e.edgesToCopy.filter(c=>i.includes(c.source)&&i.includes(c.target)).map(Ye);o.forEach(c=>c.selected=!0),r.forEach(c=>{const d=yl();o.forEach(h=>{h.source===c.data.id&&(h.source=d,h.id=h.id.replace(c.data.id,d)),h.target===c.data.id&&(h.target=d,h.id=h.id.replace(c.data.id,d))}),c.selected=!0,c.id=d,c.data.id=d;const f=c8(e.nodes,c.position.x+((n==null?void 0:n.x)??0),c.position.y+((n==null?void 0:n.y)??0));c.position=f});const a=r.map(c=>({item:c,type:"add"})),s=e.nodes.map(c=>({id:c.data.id,type:"select",selected:!1})),l=o.map(c=>({item:c,type:"add"})),u=e.edges.map(c=>({id:c.id,type:"select",selected:!1}));e.nodes=yu(a.concat(s),e.nodes),e.edges=su(l.concat(u),e.edges),r.forEach(c=>{e.nodeExecutionStates[c.id]={nodeId:c.id,...ow}})},addNodePopoverOpened:e=>{e.addNewNodePosition=null,e.isAddNodePopoverOpen=!0},addNodePopoverClosed:e=>{e.isAddNodePopoverOpen=!1,e.connectionStartParams=null,e.currentConnectionFieldType=null},addNodePopoverToggled:e=>{e.isAddNodePopoverOpen=!e.isAddNodePopoverOpen},selectionModeChanged:(e,t)=>{e.selectionMode=t.payload?Rl.Full:Rl.Partial}},extraReducers:e=>{e.addCase(Ig.pending,t=>{t.isReady=!1}),e.addCase(EE,(t,n)=>{const{source_node_id:r}=n.payload.data,i=t.nodeExecutionStates[r];i&&(i.status=wu.IN_PROGRESS)}),e.addCase(AE,(t,n)=>{const{source_node_id:r,result:i}=n.payload.data,o=t.nodeExecutionStates[r];o&&(o.status=wu.COMPLETED,o.progress!==null&&(o.progress=1),o.outputs.push(i))}),e.addCase(i_,(t,n)=>{const{source_node_id:r}=n.payload.data,i=t.nodeExecutionStates[r];i&&(i.status=wu.FAILED,i.error=n.payload.data.error,i.progress=null,i.progressImage=null)}),e.addCase(PE,(t,n)=>{const{source_node_id:r,step:i,total_steps:o,progress_image:a}=n.payload.data,s=t.nodeExecutionStates[r];s&&(s.status=wu.IN_PROGRESS,s.progress=(i+1)/o,s.progressImage=a??null)}),e.addCase(o_,(t,n)=>{["in_progress"].includes(n.payload.data.queue_item.status)&&ps(t.nodeExecutionStates,r=>{r.status=wu.PENDING,r.error=null,r.progress=null,r.progressImage=null,r.outputs=[]})})}}),{addNodePopoverClosed:wVe,addNodePopoverOpened:CVe,addNodePopoverToggled:EVe,connectionEnded:TVe,connectionMade:AVe,connectionStarted:PVe,edgeDeleted:kVe,edgeChangeStarted:IVe,edgesChanged:MVe,edgesDeleted:RVe,edgeUpdated:OVe,fieldBoardValueChanged:$Ve,fieldBooleanValueChanged:NVe,fieldColorValueChanged:DVe,fieldControlNetModelValueChanged:LVe,fieldEnumModelValueChanged:FVe,fieldImageValueChanged:aS,fieldIPAdapterModelValueChanged:BVe,fieldT2IAdapterModelValueChanged:zVe,fieldLabelChanged:VVe,fieldLoRAModelValueChanged:jVe,fieldMainModelValueChanged:UVe,fieldNumberValueChanged:GVe,fieldRefinerModelValueChanged:HVe,fieldSchedulerValueChanged:qVe,fieldStringValueChanged:WVe,fieldVaeModelValueChanged:KVe,imageCollectionFieldValueChanged:XVe,mouseOverFieldChanged:QVe,mouseOverNodeChanged:YVe,nodeAdded:ZVe,nodeReplaced:Oz,nodeEditorReset:cve,nodeEmbedWorkflowChanged:JVe,nodeExclusivelySelected:eje,nodeIsIntermediateChanged:tje,nodeIsOpenChanged:nje,nodeLabelChanged:rje,nodeNotesChanged:ije,nodeOpacityChanged:oje,nodesChanged:aje,nodesDeleted:sje,nodeTemplatesBuilt:$z,nodeUseCacheChanged:lje,notesNodeValueChanged:uje,selectedAll:cje,selectedEdgesChanged:dje,selectedNodesChanged:fje,selectionCopied:hje,selectionModeChanged:pje,selectionPasted:gje,shouldAnimateEdgesChanged:mje,shouldColorEdgesChanged:yje,shouldShowFieldTypeLegendChanged:vje,shouldShowMinimapPanelChanged:bje,shouldSnapToGridChanged:_je,shouldValidateGraphChanged:Sje,viewportChanged:xje,workflowAuthorChanged:wje,workflowContactChanged:Cje,workflowDescriptionChanged:Eje,workflowExposedFieldAdded:dve,workflowExposedFieldRemoved:Tje,workflowLoaded:fve,workflowNameChanged:Aje,workflowNotesChanged:Pje,workflowTagsChanged:kje,workflowVersionChanged:Ije,edgeAdded:Mje}=Rz.actions,hve=Rz.reducer,Nz={esrganModelName:"RealESRGAN_x4plus.pth"},Dz=Wt({name:"postprocessing",initialState:Nz,reducers:{esrganModelNameChanged:(e,t)=>{e.esrganModelName=t.payload}}}),{esrganModelNameChanged:Rje}=Dz.actions,pve=Dz.reducer,Lz={positiveStylePrompt:"",negativeStylePrompt:"",shouldConcatSDXLStylePrompt:!0,shouldUseSDXLRefiner:!1,sdxlImg2ImgDenoisingStrength:.7,refinerModel:null,refinerSteps:20,refinerCFGScale:7.5,refinerScheduler:"euler",refinerPositiveAestheticScore:6,refinerNegativeAestheticScore:2.5,refinerStart:.8},Fz=Wt({name:"sdxl",initialState:Lz,reducers:{setPositiveStylePromptSDXL:(e,t)=>{e.positiveStylePrompt=t.payload},setNegativeStylePromptSDXL:(e,t)=>{e.negativeStylePrompt=t.payload},setShouldConcatSDXLStylePrompt:(e,t)=>{e.shouldConcatSDXLStylePrompt=t.payload},setShouldUseSDXLRefiner:(e,t)=>{e.shouldUseSDXLRefiner=t.payload},setSDXLImg2ImgDenoisingStrength:(e,t)=>{e.sdxlImg2ImgDenoisingStrength=t.payload},refinerModelChanged:(e,t)=>{e.refinerModel=t.payload},setRefinerSteps:(e,t)=>{e.refinerSteps=t.payload},setRefinerCFGScale:(e,t)=>{e.refinerCFGScale=t.payload},setRefinerScheduler:(e,t)=>{e.refinerScheduler=t.payload},setRefinerPositiveAestheticScore:(e,t)=>{e.refinerPositiveAestheticScore=t.payload},setRefinerNegativeAestheticScore:(e,t)=>{e.refinerNegativeAestheticScore=t.payload},setRefinerStart:(e,t)=>{e.refinerStart=t.payload}}}),{setPositiveStylePromptSDXL:Oje,setNegativeStylePromptSDXL:$je,setShouldConcatSDXLStylePrompt:Nje,setShouldUseSDXLRefiner:gve,setSDXLImg2ImgDenoisingStrength:Dje,refinerModelChanged:_8,setRefinerSteps:Lje,setRefinerCFGScale:Fje,setRefinerScheduler:Bje,setRefinerPositiveAestheticScore:zje,setRefinerNegativeAestheticScore:Vje,setRefinerStart:jje}=Fz.actions,mve=Fz.reducer,yve=(e,t,n)=>t===0?0:n===2?Math.floor((e+1+1)/2)/Math.floor((t+1)/2):(e+1+1)/(t+1),vs=e=>typeof e=="string"?{title:e,status:"info",isClosable:!0,duration:2500}:{status:"info",isClosable:!0,duration:2500,...e},Bz={isInitialized:!1,isConnected:!1,shouldConfirmOnDelete:!0,enableImageDebugging:!1,toastQueue:[],denoiseProgress:null,shouldAntialiasProgressImage:!1,consoleLogLevel:"debug",shouldLogToConsole:!0,language:"en",shouldUseNSFWChecker:!1,shouldUseWatermarker:!1,shouldEnableInformationalPopovers:!1,status:"DISCONNECTED"},zz=Wt({name:"system",initialState:Bz,reducers:{setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},consoleLogLevelChanged:(e,t)=>{e.consoleLogLevel=t.payload},shouldLogToConsoleChanged:(e,t)=>{e.shouldLogToConsole=t.payload},shouldAntialiasProgressImageChanged:(e,t)=>{e.shouldAntialiasProgressImage=t.payload},languageChanged:(e,t)=>{e.language=t.payload},shouldUseNSFWCheckerChanged(e,t){e.shouldUseNSFWChecker=t.payload},shouldUseWatermarkerChanged(e,t){e.shouldUseWatermarker=t.payload},setShouldEnableInformationalPopovers(e,t){e.shouldEnableInformationalPopovers=t.payload},isInitializedChanged(e,t){e.isInitialized=t.payload}},extraReducers(e){e.addCase(CE,t=>{t.isConnected=!0,t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(UD,t=>{t.isConnected=!1,t.denoiseProgress=null,t.status="DISCONNECTED"}),e.addCase(EE,t=>{t.denoiseProgress=null,t.status="PROCESSING"}),e.addCase(PE,(t,n)=>{const{step:r,total_steps:i,order:o,progress_image:a,graph_execution_state_id:s,queue_batch_id:l}=n.payload.data;t.denoiseProgress={step:r,total_steps:i,order:o,percentage:yve(r,i,o),progress_image:a,session_id:s,batch_id:l},t.status="PROCESSING"}),e.addCase(AE,t=>{t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(WD,t=>{t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(QD,t=>{t.status="LOADING_MODEL"}),e.addCase(ZD,t=>{t.status="CONNECTED"}),e.addCase(o_,(t,n)=>{["completed","canceled","failed"].includes(n.payload.data.queue_item.status)&&(t.status="CONNECTED",t.denoiseProgress=null)}),e.addMatcher(wve,(t,n)=>{t.toastQueue.push(vs({title:X("toast.serverError"),status:"error",description:wE(n.payload.data.error_type)}))})}}),{setShouldConfirmOnDelete:Uje,setEnableImageDebugging:Gje,addToast:it,clearToastQueue:vve,consoleLogLevelChanged:Hje,shouldLogToConsoleChanged:qje,shouldAntialiasProgressImageChanged:Wje,languageChanged:Kje,shouldUseNSFWCheckerChanged:bve,shouldUseWatermarkerChanged:_ve,setShouldEnableInformationalPopovers:Xje,isInitializedChanged:Sve}=zz.actions,xve=zz.reducer,wve=si(i_,eL,nL),Cve={searchFolder:null,advancedAddScanModel:null},Vz=Wt({name:"modelmanager",initialState:Cve,reducers:{setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setAdvancedAddScanModel:(e,t)=>{e.advancedAddScanModel=t.payload}}}),{setSearchFolder:Qje,setAdvancedAddScanModel:Yje}=Vz.actions,Eve=Vz.reducer,jz={shift:!1,ctrl:!1,meta:!1},Uz=Wt({name:"hotkeys",initialState:jz,reducers:{shiftKeyPressed:(e,t)=>{e.shift=t.payload},ctrlKeyPressed:(e,t)=>{e.ctrl=t.payload},metaKeyPressed:(e,t)=>{e.meta=t.payload}}}),{shiftKeyPressed:Zje,ctrlKeyPressed:Jje,metaKeyPressed:eUe}=Uz.actions,Tve=Uz.reducer,Gz={activeTab:"txt2img",shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,shouldHidePreview:!1,shouldShowProgressInViewer:!0,shouldShowEmbeddingPicker:!1,shouldAutoChangeDimensions:!1,favoriteSchedulers:[],globalContextMenuCloseTrigger:0,panels:{}},Hz=Wt({name:"ui",initialState:Gz,reducers:{setActiveTab:(e,t)=>{e.activeTab=t.payload},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldHidePreview:(e,t)=>{e.shouldHidePreview=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload},setShouldUseSliders:(e,t)=>{e.shouldUseSliders=t.payload},setShouldShowProgressInViewer:(e,t)=>{e.shouldShowProgressInViewer=t.payload},favoriteSchedulersChanged:(e,t)=>{e.favoriteSchedulers=t.payload},toggleEmbeddingPicker:e=>{e.shouldShowEmbeddingPicker=!e.shouldShowEmbeddingPicker},setShouldAutoChangeDimensions:(e,t)=>{e.shouldAutoChangeDimensions=t.payload},contextMenusClosed:e=>{e.globalContextMenuCloseTrigger+=1},panelsChanged:(e,t)=>{e.panels[t.payload.name]=t.payload.value}},extraReducers(e){e.addCase(c_,t=>{t.activeTab="img2img"})}}),{setActiveTab:qz,setShouldShowImageDetails:tUe,setShouldUseCanvasBetaLayout:nUe,setShouldShowExistingModelsInSearch:rUe,setShouldUseSliders:iUe,setShouldHidePreview:oUe,setShouldShowProgressInViewer:aUe,favoriteSchedulersChanged:sUe,toggleEmbeddingPicker:lUe,setShouldAutoChangeDimensions:uUe,contextMenusClosed:cUe,panelsChanged:dUe}=Hz.actions,Ave=Hz.reducer,Pve=pq(iX);Wz=Z5=void 0;var kve=Pve,Ive=function(){var t=[],n=[],r=void 0,i=function(u){return r=u,function(c){return function(d){return kve.compose.apply(void 0,n)(c)(d)}}},o=function(){for(var u,c,d=arguments.length,f=Array(d),h=0;h=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return o=u.done,u},e:function(u){a=!0,s=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function Xz(e,t){if(e){if(typeof e=="string")return x8(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 x8(e,t)}}function x8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=r.prefix,o=r.driver,a=r.persistWholeStore,s=r.serialize;try{var l=a?Gve:Hve;yield l(t,n,{prefix:i,driver:o,serialize:s})}catch(u){console.warn("redux-remember: persist error",u)}});return function(){return e.apply(this,arguments)}}();function T8(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(u){n(u);return}s.done?t(l):Promise.resolve(l).then(r,i)}function A8(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(l){T8(o,r,i,a,s,"next",l)}function s(l){T8(o,r,i,a,s,"throw",l)}a(void 0)})}}var Wve=function(){var e=A8(function*(t,n,r){var i=r.prefix,o=r.driver,a=r.serialize,s=r.unserialize,l=r.persistThrottle,u=r.persistDebounce,c=r.persistWholeStore;yield Bve(t,n,{prefix:i,driver:o,unserialize:s,persistWholeStore:c});var d={},f=function(){var h=A8(function*(){var p=Kz(t.getState(),n);yield qve(p,d,{prefix:i,driver:o,serialize:a,persistWholeStore:c}),ST(p,d)||t.dispatch({type:$ve,payload:p}),d=p});return function(){return h.apply(this,arguments)}}();u&&u>0?t.subscribe(Dve(f,u)):t.subscribe(Nve(f,l))});return function(n,r,i){return e.apply(this,arguments)}}();const Kve=Wve;function Mg(e){"@babel/helpers - typeof";return Mg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mg(e)}function P8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lw(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:n.state,i=arguments.length>1?arguments[1]:void 0;i.type&&(i.type==="@@INIT"||i.type.startsWith("@@redux/INIT"))&&(n.state=lw({},r));var o=typeof t=="function"?t:Mf(t);switch(i.type){case J5:{var a=lw(lw({},n.state),i.payload||{});return n.state=o(a,{type:J5,payload:a}),n.state}default:return o(r,i)}}},Jve=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.prefix,o=i===void 0?"@@remember-":i,a=r.serialize,s=a===void 0?function(_,b){return JSON.stringify(_)}:a,l=r.unserialize,u=l===void 0?function(_,b){return JSON.parse(_)}:l,c=r.persistThrottle,d=c===void 0?100:c,f=r.persistDebounce,h=r.persistWholeStore,p=h===void 0?!1:h;if(!t)throw Error("redux-remember error: driver required");if(!Array.isArray(n))throw Error("redux-remember error: rememberedKeys needs to be an array");var g=function(b){return function(y,m,v){var S=b(y,m,v);return Kve(S,n,{driver:t,prefix:o,serialize:s,unserialize:u,persistThrottle:d,persistDebounce:f,persistWholeStore:p}),S}};return g};const fUe=["chakra-ui-color-mode","i18nextLng","ROARR_FILTER","ROARR_LOG"],e1e="@@invokeai-",t1e=["cursorPosition"],n1e=["pendingControlImages"],r1e=["prompts"],i1e=["selection","selectedBoardId","galleryView"],o1e=["nodeTemplates","connectionStartParams","currentConnectionFieldType","selectedNodes","selectedEdges","isReady","nodesToCopy","edgesToCopy","connectionMade","modifyingEdge","addNewNodePosition"],a1e=[],s1e=[],l1e=["isInitialized","isConnected","denoiseProgress","status"],u1e=["shouldShowImageDetails","globalContextMenuCloseTrigger","panels"],c1e={canvas:t1e,gallery:i1e,generation:a1e,nodes:o1e,postprocessing:s1e,system:l1e,ui:u1e,controlNet:n1e,dynamicPrompts:r1e},d1e=(e,t)=>{const n=$f(e,c1e[t]??[]);return JSON.stringify(n)},f1e={canvas:aF,gallery:YF,generation:NE,nodes:Mz,postprocessing:Nz,system:Bz,config:BD,ui:Gz,hotkeys:jz,controlAdapters:m5,dynamicPrompts:QE,sdxl:Lz},h1e=(e,t)=>ID(JSON.parse(e),f1e[t]),p1e=ge("nodes/textToImageGraphBuilt"),g1e=ge("nodes/imageToImageGraphBuilt"),Yz=ge("nodes/canvasGraphBuilt"),m1e=ge("nodes/nodesGraphBuilt"),y1e=si(p1e,g1e,Yz,m1e),v1e=ge("nodes/workflowLoadRequested"),b1e=ge("nodes/updateAllNodesRequested"),_1e=e=>{if(y1e(e)&&e.payload.nodes){const t={};return{...e,payload:{...e.payload,nodes:t}}}return Ig.fulfilled.match(e)?{...e,payload:""}:$z.match(e)?{...e,payload:""}:e},S1e=["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine","socket/socketGeneratorProgress","socket/appSocketGeneratorProgress","@@REMEMBER_PERSISTED"],x1e=e=>e,w1e=si(kle,Ile),C1e=()=>{pe({matcher:w1e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n(),{batchIds:o}=i.canvas;try{const a=t(un.endpoints.cancelByBatchIds.initiate({batch_ids:o},{fixedCacheKey:"cancelByBatchIds"})),{canceled:s}=await a.unwrap();a.reset(),s>0&&(r.debug(`Canceled ${s} canvas batches`),t(it({title:X("queue.cancelBatchSucceeded"),status:"success"}))),t($le())}catch{r.error("Failed to cancel canvas batches"),t(it({title:X("queue.cancelBatchFailed"),status:"error"}))}}})};ge("app/appStarted");const E1e=()=>{pe({matcher:ce.endpoints.listImages.matchFulfilled,effect:async(e,{dispatch:t,unsubscribe:n,cancelActiveListeners:r})=>{if(e.meta.arg.queryCacheKey!==Vi({board_id:"none",categories:Fn}))return;r(),n();const i=e.payload;if(i.ids.length>0){const o=Lt.getSelectors().selectAll(i)[0];t(pa(o??null))}}})},T1e=()=>{pe({matcher:un.endpoints.enqueueBatch.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{data:r}=un.endpoints.getQueueStatus.select()(n());!r||r.processor.is_started||t(un.endpoints.resumeProcessor.initiate(void 0,{fixedCacheKey:"resumeProcessor"}))}})},Zz=Do.injectEndpoints({endpoints:e=>({getAppVersion:e.query({query:()=>({url:"app/version",method:"GET"}),providesTags:["AppVersion"],keepUnusedDataFor:864e5}),getAppConfig:e.query({query:()=>({url:"app/config",method:"GET"}),providesTags:["AppConfig"],keepUnusedDataFor:864e5}),getInvocationCacheStatus:e.query({query:()=>({url:"app/invocation_cache/status",method:"GET"}),providesTags:["InvocationCacheStatus"]}),clearInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache",method:"DELETE"}),invalidatesTags:["InvocationCacheStatus"]}),enableInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache/enable",method:"PUT"}),invalidatesTags:["InvocationCacheStatus"]}),disableInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache/disable",method:"PUT"}),invalidatesTags:["InvocationCacheStatus"]})})}),{useGetAppVersionQuery:hUe,useGetAppConfigQuery:pUe,useClearInvocationCacheMutation:gUe,useDisableInvocationCacheMutation:mUe,useEnableInvocationCacheMutation:yUe,useGetInvocationCacheStatusQuery:vUe}=Zz,A1e=()=>{pe({matcher:Zz.endpoints.getAppConfig.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{const{infill_methods:r=[],nsfw_methods:i=[],watermarking_methods:o=[]}=e.payload,a=t().generation.infillMethod;r.includes(a)||n(lae(r[0])),i.includes("nsfw_checker")||n(bve(!1)),o.includes("invisible_watermark")||n(_ve(!1))}})},P1e=ge("app/appStarted"),k1e=()=>{pe({actionCreator:P1e,effect:async(e,{unsubscribe:t,cancelActiveListeners:n})=>{n(),t()}})};function I1e(e){if(e.sheet)return e.sheet;for(var t=0;t0?ir(Lf,--oi):0,_f--,wn===10&&(_f=1,uS--),wn}function Si(){return wn=oi2||Og(wn)>3?"":" "}function U1e(e,t){for(;--t&&Si()&&!(wn<48||wn>102||wn>57&&wn<65||wn>70&&wn<97););return Im(e,Yy()+(t<6&&ma()==32&&Si()==32))}function n3(e){for(;Si();)switch(wn){case e:return oi;case 34:case 39:e!==34&&e!==39&&n3(wn);break;case 40:e===41&&n3(e);break;case 92:Si();break}return oi}function G1e(e,t){for(;Si()&&e+wn!==47+10;)if(e+wn===42+42&&ma()===47)break;return"/*"+Im(t,oi-1)+"*"+lS(e===47?e:Si())}function H1e(e){for(;!Og(ma());)Si();return Im(e,oi)}function q1e(e){return iV(Jy("",null,null,null,[""],e=rV(e),0,[0],e))}function Jy(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,d=a,f=0,h=0,p=0,g=1,_=1,b=1,y=0,m="",v=i,S=o,w=r,C=m;_;)switch(p=y,y=Si()){case 40:if(p!=108&&ir(C,d-1)==58){t3(C+=ht(Zy(y),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:C+=Zy(y);break;case 9:case 10:case 13:case 32:C+=j1e(p);break;case 92:C+=U1e(Yy()-1,7);continue;case 47:switch(ma()){case 42:case 47:W0(W1e(G1e(Si(),Yy()),t,n),l);break;default:C+="/"}break;case 123*g:s[u++]=ta(C)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+c:b==-1&&(C=ht(C,/\f/g,"")),h>0&&ta(C)-d&&W0(h>32?I8(C+";",r,n,d-1):I8(ht(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(W0(w=k8(C,t,n,u,c,i,s,m,v=[],S=[],d),o),y===123)if(c===0)Jy(C,t,w,w,v,o,d,s,S);else switch(f===99&&ir(C,3)===110?100:f){case 100:case 108:case 109:case 115:Jy(e,w,w,r&&W0(k8(e,w,w,0,0,i,s,m,i,v=[],d),S),i,S,d,s,r?v:S);break;default:Jy(C,w,w,w,[""],S,0,s,S)}}u=c=h=0,g=b=1,m=C="",d=a;break;case 58:d=1+ta(C),h=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&V1e()==125)continue}switch(C+=lS(y),y*g){case 38:b=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(ta(C)-1)*b,b=1;break;case 64:ma()===45&&(C+=Zy(Si())),f=ma(),c=d=ta(m=C+=H1e(Yy())),y++;break;case 45:p===45&&ta(C)==2&&(g=0)}}return o}function k8(e,t,n,r,i,o,a,s,l,u,c){for(var d=i-1,f=i===0?o:[""],h=CT(f),p=0,g=0,_=0;p0?f[b]+" "+y:ht(y,/&\f/g,f[b])))&&(l[_++]=m);return cS(e,t,n,i===0?xT:s,l,u,c)}function W1e(e,t,n){return cS(e,t,n,Jz,lS(z1e()),Rg(e,2,-2),0)}function I8(e,t,n,r){return cS(e,t,n,wT,Rg(e,0,r),Rg(e,r+1,-1),r)}function zd(e,t){for(var n="",r=CT(e),i=0;i6)switch(ir(e,t+1)){case 109:if(ir(e,t+4)!==45)break;case 102:return ht(e,/(.+:)(.+)-([^]+)/,"$1"+ft+"$2-$3$1"+U1+(ir(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~t3(e,"stretch")?aV(ht(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ir(e,t+1)!==115)break;case 6444:switch(ir(e,ta(e)-3-(~t3(e,"!important")&&10))){case 107:return ht(e,":",":"+ft)+e;case 101:return ht(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ft+(ir(e,14)===45?"inline-":"")+"box$3$1"+ft+"$2$3$1"+hr+"$2box$3")+e}break;case 5936:switch(ir(e,t+11)){case 114:return ft+e+hr+ht(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ft+e+hr+ht(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ft+e+hr+ht(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ft+e+hr+e+e}return e}var nbe=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case wT:t.return=aV(t.value,t.length);break;case eV:return zd([yh(t,{value:ht(t.value,"@","@"+ft)})],i);case xT:if(t.length)return B1e(t.props,function(o){switch(F1e(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zd([yh(t,{props:[ht(o,/:(read-\w+)/,":"+U1+"$1")]})],i);case"::placeholder":return zd([yh(t,{props:[ht(o,/:(plac\w+)/,":"+ft+"input-$1")]}),yh(t,{props:[ht(o,/:(plac\w+)/,":"+U1+"$1")]}),yh(t,{props:[ht(o,/:(plac\w+)/,hr+"input-$1")]})],i)}return""})}},rbe=[nbe],ibe=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var _=g.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||rbe,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var _=g.getAttribute("data-emotion").split(" "),b=1;b<_.length;b++)o[_[b]]=!0;s.push(g)});var l,u=[ebe,tbe];{var c,d=[K1e,Q1e(function(g){c.insert(g)})],f=X1e(u.concat(i,d)),h=function(_){return zd(q1e(_),f)};l=function(_,b,y,m){c=y,h(_?_+"{"+b.styles+"}":b.styles),m&&(p.inserted[b.name]=!0)}}var p={key:n,sheet:new R1e({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(s),p},obe=!0;function abe(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var sV=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||obe===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},lV=function(t,n,r){sV(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function sbe(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var lbe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ube=/[A-Z]|^ms/g,cbe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uV=function(t){return t.charCodeAt(1)===45},O8=function(t){return t!=null&&typeof t!="boolean"},uw=oV(function(e){return uV(e)?e:e.replace(ube,"-$&").toLowerCase()}),$8=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(cbe,function(r,i,o){return na={name:i,styles:o,next:na},i})}return lbe[t]!==1&&!uV(t)&&typeof n=="number"&&n!==0?n+"px":n};function $g(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return na={name:n.name,styles:n.styles,next:na},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)na={name:r.name,styles:r.styles,next:na},r=r.next;var i=n.styles+";";return i}return dbe(e,t,n)}case"function":{if(e!==void 0){var o=na,a=n(e);return na=o,$g(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function dbe(e,t,n){var r="";if(Array.isArray(n))for(var i=0;ioe.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Tbe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=k.useState(null),o=k.useRef(null),[,a]=k.useState({});k.useEffect(()=>a({}),[]);const s=wbe(),l=Sbe();G1(()=>{if(!r)return;const c=r.ownerDocument,d=t?s??c.body:c.body;if(!d)return;o.current=c.createElement("div"),o.current.className=TT,d.appendChild(o.current),a({});const f=o.current;return()=>{d.contains(f)&&d.removeChild(f)}},[r]);const u=l!=null&&l.zIndex?oe.jsx(Ebe,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return o.current?mi.createPortal(oe.jsx(pV,{value:o.current,children:u}),o.current):oe.jsx("span",{ref:c=>{c&&i(c)}})},Abe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=k.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=TT),l},[i]),[,s]=k.useState({});return G1(()=>s({}),[]),G1(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?mi.createPortal(oe.jsx(pV,{value:r?a:null,children:t}),a):null};function dS(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?oe.jsx(Abe,{containerRef:n,...r}):oe.jsx(Tbe,{...r})}dS.className=TT;dS.selector=Cbe;dS.displayName="Portal";function gV(){const e=k.useContext(Ng);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var AT=k.createContext({});AT.displayName="ColorModeContext";function fS(){const e=k.useContext(AT);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function bUe(e,t){const{colorMode:n}=fS();return n==="dark"?t:e}function mV(){const e=fS(),t=gV();return{...e,theme:t}}function Pbe(e,t,n){var r,i;if(t==null)return t;const o=a=>{var s,l;return(l=(s=e.__breakpoints)==null?void 0:s.asArray)==null?void 0:l[a]};return(i=(r=o(t))!=null?r:o(n))!=null?i:n}function kbe(e,t,n){var r,i;if(t==null)return t;const o=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.value};return(i=(r=o(t))!=null?r:o(n))!=null?i:n}function _Ue(e,t,n){const r=gV();return Ibe(e,t,n)(r)}function Ibe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{var c,d;if(e==="breakpoints")return Pbe(o,l,(c=a[u])!=null?c:l);const f=`${e}.${l}`;return kbe(o,f,(d=a[u])!=null?d:l)});return Array.isArray(t)?s:s[0]}}var Kl=(...e)=>e.filter(Boolean).join(" ");function Mbe(){return!1}function ya(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var SUe=e=>{const{condition:t,message:n}=e;t&&Mbe()&&console.warn(n)};function ua(e,...t){return Rbe(e)?e(...t):e}var Rbe=e=>typeof e=="function",xUe=e=>e?"":void 0,wUe=e=>e?!0:void 0;function CUe(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function EUe(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var H1={exports:{}};H1.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",_="[object Number]",b="[object Null]",y="[object Object]",m="[object Proxy]",v="[object RegExp]",S="[object Set]",w="[object String]",C="[object Undefined]",x="[object WeakMap]",P="[object ArrayBuffer]",E="[object DataView]",I="[object Float32Array]",N="[object Float64Array]",M="[object Int8Array]",T="[object Int16Array]",A="[object Int32Array]",R="[object Uint8Array]",D="[object Uint8ClampedArray]",$="[object Uint16Array]",L="[object Uint32Array]",O=/[\\^$.*+?()[\]{}|]/g,B=/^\[object .+?Constructor\]$/,U=/^(?:0|[1-9]\d*)$/,j={};j[I]=j[N]=j[M]=j[T]=j[A]=j[R]=j[D]=j[$]=j[L]=!0,j[s]=j[l]=j[P]=j[c]=j[E]=j[d]=j[f]=j[h]=j[g]=j[_]=j[y]=j[v]=j[S]=j[w]=j[x]=!1;var q=typeof He=="object"&&He&&He.Object===Object&&He,Y=typeof self=="object"&&self&&self.Object===Object&&self,Z=q||Y||Function("return this")(),V=t&&!t.nodeType&&t,K=V&&!0&&e&&!e.nodeType&&e,ee=K&&K.exports===V,re=ee&&q.process,fe=function(){try{var z=K&&K.require&&K.require("util").types;return z||re&&re.binding&&re.binding("util")}catch{}}(),Se=fe&&fe.isTypedArray;function Me(z,G,Q){switch(Q.length){case 0:return z.call(G);case 1:return z.call(G,Q[0]);case 2:return z.call(G,Q[0],Q[1]);case 3:return z.call(G,Q[0],Q[1],Q[2])}return z.apply(G,Q)}function De(z,G){for(var Q=-1,me=Array(z);++Q-1}function Oa(z,G){var Q=this.__data__,me=Ec(Q,z);return me<0?(++this.size,Q.push([z,G])):Q[me][1]=G,this}Zn.prototype.clear=Ra,Zn.prototype.delete=Is,Zn.prototype.get=Ms,Zn.prototype.has=Cc,Zn.prototype.set=Oa;function Er(z){var G=-1,Q=z==null?0:z.length;for(this.clear();++G1?Q[nt-1]:void 0,jt=nt>2?Q[2]:void 0;for(Ct=z.length>3&&typeof Ct=="function"?(nt--,Ct):void 0,jt&&YH(Q[0],Q[1],jt)&&(Ct=nt<3?void 0:Ct,nt=1),G=Object(G);++me-1&&z%1==0&&z0){if(++G>=i)return arguments[0]}else G=0;return z.apply(void 0,arguments)}}function oq(z){if(z!=null){try{return xt.call(z)}catch{}try{return z+""}catch{}}return""}function e0(z,G){return z===G||z!==z&&G!==G}var G2=Zm(function(){return arguments}())?Zm:function(z){return Zf(z)&&bn.call(z,"callee")&&!fo.call(z,"callee")},H2=Array.isArray;function q2(z){return z!=null&&KA(z.length)&&!W2(z)}function aq(z){return Zf(z)&&q2(z)}var WA=tu||dq;function W2(z){if(!iu(z))return!1;var G=Ac(z);return G==h||G==p||G==u||G==m}function KA(z){return typeof z=="number"&&z>-1&&z%1==0&&z<=a}function iu(z){var G=typeof z;return z!=null&&(G=="object"||G=="function")}function Zf(z){return z!=null&&typeof z=="object"}function sq(z){if(!Zf(z)||Ac(z)!=y)return!1;var G=li(z);if(G===null)return!0;var Q=bn.call(G,"constructor")&&G.constructor;return typeof Q=="function"&&Q instanceof Q&&xt.call(Q)==Mi}var XA=Se?Ee(Se):LH;function lq(z){return qH(z,QA(z))}function QA(z){return q2(z)?B2(z,!0):FH(z)}var uq=WH(function(z,G,Q,me){GA(z,G,Q,me)});function cq(z){return function(){return z}}function YA(z){return z}function dq(){return!1}e.exports=uq})(H1,H1.exports);var Obe=H1.exports;const ca=Bl(Obe);var $be=e=>/!(important)?$/.test(e),L8=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Nbe=(e,t)=>n=>{const r=String(t),i=$be(r),o=L8(r),a=e?`${e}.${o}`:o;let s=ya(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=L8(s),i?`${s} !important`:s};function PT(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var s;const l=Nbe(t,o)(a);let u=(s=n==null?void 0:n(l,a))!=null?s:l;return r&&(u=r(u,a)),u}}var K0=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Di(e,t){return n=>{const r={property:n,scale:e};return r.transform=PT({scale:e,transform:t}),r}}var Dbe=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function Lbe(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:Dbe(t),transform:n?PT({scale:n,compose:r}):r}}var yV=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function Fbe(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...yV].join(" ")}function Bbe(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...yV].join(" ")}var zbe={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Vbe={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function jbe(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var Ube={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},r3={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Gbe=new Set(Object.values(r3)),i3=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Hbe=e=>e.trim();function qbe(e,t){if(e==null||i3.has(e))return e;if(!(o3(e)||i3.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],a=i==null?void 0:i[2];if(!o||!a)return e;const s=o.includes("-gradient")?o:`${o}-gradient`,[l,...u]=a.split(",").map(Hbe).filter(Boolean);if((u==null?void 0:u.length)===0)return e;const c=l in r3?r3[l]:l;u.unshift(c);const d=u.map(f=>{if(Gbe.has(f))return f;const h=f.indexOf(" "),[p,g]=h!==-1?[f.substr(0,h),f.substr(h+1)]:[f],_=o3(g)?g:g&&g.split(" "),b=`colors.${p}`,y=b in t.__cssMap?t.__cssMap[b].varRef:p;return _?[y,...Array.isArray(_)?_:[_]].join(" "):y});return`${s}(${d.join(", ")})`}var o3=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),Wbe=(e,t)=>qbe(e,t??{});function Kbe(e){return/^var\(--.+\)$/.test(e)}var Xbe=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},qo=e=>t=>`${e}(${t})`,Je={filter(e){return e!=="auto"?e:zbe},backdropFilter(e){return e!=="auto"?e:Vbe},ring(e){return jbe(Je.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?Fbe():e==="auto-gpu"?Bbe():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=Xbe(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(Kbe(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:Wbe,blur:qo("blur"),opacity:qo("opacity"),brightness:qo("brightness"),contrast:qo("contrast"),dropShadow:qo("drop-shadow"),grayscale:qo("grayscale"),hueRotate:e=>qo("hue-rotate")(Je.degree(e)),invert:qo("invert"),saturate:qo("saturate"),sepia:qo("sepia"),bgImage(e){return e==null||o3(e)||i3.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=Ube[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},H={borderWidths:Di("borderWidths"),borderStyles:Di("borderStyles"),colors:Di("colors"),borders:Di("borders"),gradients:Di("gradients",Je.gradient),radii:Di("radii",Je.px),space:Di("space",K0(Je.vh,Je.px)),spaceT:Di("space",K0(Je.vh,Je.px)),degreeT(e){return{property:e,transform:Je.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:PT({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Di("sizes",K0(Je.vh,Je.px)),sizesT:Di("sizes",K0(Je.vh,Je.fraction)),shadows:Di("shadows"),logical:Lbe,blur:Di("blur",Je.blur)},ev={background:H.colors("background"),backgroundColor:H.colors("backgroundColor"),backgroundImage:H.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Je.bgClip},bgSize:H.prop("backgroundSize"),bgPosition:H.prop("backgroundPosition"),bg:H.colors("background"),bgColor:H.colors("backgroundColor"),bgPos:H.prop("backgroundPosition"),bgRepeat:H.prop("backgroundRepeat"),bgAttachment:H.prop("backgroundAttachment"),bgGradient:H.gradients("backgroundImage"),bgClip:{transform:Je.bgClip}};Object.assign(ev,{bgImage:ev.backgroundImage,bgImg:ev.backgroundImage});var dt={border:H.borders("border"),borderWidth:H.borderWidths("borderWidth"),borderStyle:H.borderStyles("borderStyle"),borderColor:H.colors("borderColor"),borderRadius:H.radii("borderRadius"),borderTop:H.borders("borderTop"),borderBlockStart:H.borders("borderBlockStart"),borderTopLeftRadius:H.radii("borderTopLeftRadius"),borderStartStartRadius:H.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:H.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:H.radii("borderTopRightRadius"),borderStartEndRadius:H.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:H.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:H.borders("borderRight"),borderInlineEnd:H.borders("borderInlineEnd"),borderBottom:H.borders("borderBottom"),borderBlockEnd:H.borders("borderBlockEnd"),borderBottomLeftRadius:H.radii("borderBottomLeftRadius"),borderBottomRightRadius:H.radii("borderBottomRightRadius"),borderLeft:H.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:H.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:H.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:H.borders(["borderLeft","borderRight"]),borderInline:H.borders("borderInline"),borderY:H.borders(["borderTop","borderBottom"]),borderBlock:H.borders("borderBlock"),borderTopWidth:H.borderWidths("borderTopWidth"),borderBlockStartWidth:H.borderWidths("borderBlockStartWidth"),borderTopColor:H.colors("borderTopColor"),borderBlockStartColor:H.colors("borderBlockStartColor"),borderTopStyle:H.borderStyles("borderTopStyle"),borderBlockStartStyle:H.borderStyles("borderBlockStartStyle"),borderBottomWidth:H.borderWidths("borderBottomWidth"),borderBlockEndWidth:H.borderWidths("borderBlockEndWidth"),borderBottomColor:H.colors("borderBottomColor"),borderBlockEndColor:H.colors("borderBlockEndColor"),borderBottomStyle:H.borderStyles("borderBottomStyle"),borderBlockEndStyle:H.borderStyles("borderBlockEndStyle"),borderLeftWidth:H.borderWidths("borderLeftWidth"),borderInlineStartWidth:H.borderWidths("borderInlineStartWidth"),borderLeftColor:H.colors("borderLeftColor"),borderInlineStartColor:H.colors("borderInlineStartColor"),borderLeftStyle:H.borderStyles("borderLeftStyle"),borderInlineStartStyle:H.borderStyles("borderInlineStartStyle"),borderRightWidth:H.borderWidths("borderRightWidth"),borderInlineEndWidth:H.borderWidths("borderInlineEndWidth"),borderRightColor:H.colors("borderRightColor"),borderInlineEndColor:H.colors("borderInlineEndColor"),borderRightStyle:H.borderStyles("borderRightStyle"),borderInlineEndStyle:H.borderStyles("borderInlineEndStyle"),borderTopRadius:H.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:H.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:H.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:H.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(dt,{rounded:dt.borderRadius,roundedTop:dt.borderTopRadius,roundedTopLeft:dt.borderTopLeftRadius,roundedTopRight:dt.borderTopRightRadius,roundedTopStart:dt.borderStartStartRadius,roundedTopEnd:dt.borderStartEndRadius,roundedBottom:dt.borderBottomRadius,roundedBottomLeft:dt.borderBottomLeftRadius,roundedBottomRight:dt.borderBottomRightRadius,roundedBottomStart:dt.borderEndStartRadius,roundedBottomEnd:dt.borderEndEndRadius,roundedLeft:dt.borderLeftRadius,roundedRight:dt.borderRightRadius,roundedStart:dt.borderInlineStartRadius,roundedEnd:dt.borderInlineEndRadius,borderStart:dt.borderInlineStart,borderEnd:dt.borderInlineEnd,borderTopStartRadius:dt.borderStartStartRadius,borderTopEndRadius:dt.borderStartEndRadius,borderBottomStartRadius:dt.borderEndStartRadius,borderBottomEndRadius:dt.borderEndEndRadius,borderStartRadius:dt.borderInlineStartRadius,borderEndRadius:dt.borderInlineEndRadius,borderStartWidth:dt.borderInlineStartWidth,borderEndWidth:dt.borderInlineEndWidth,borderStartColor:dt.borderInlineStartColor,borderEndColor:dt.borderInlineEndColor,borderStartStyle:dt.borderInlineStartStyle,borderEndStyle:dt.borderInlineEndStyle});var Qbe={color:H.colors("color"),textColor:H.colors("color"),fill:H.colors("fill"),stroke:H.colors("stroke")},a3={boxShadow:H.shadows("boxShadow"),mixBlendMode:!0,blendMode:H.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:H.prop("backgroundBlendMode"),opacity:!0};Object.assign(a3,{shadow:a3.boxShadow});var Ybe={filter:{transform:Je.filter},blur:H.blur("--chakra-blur"),brightness:H.propT("--chakra-brightness",Je.brightness),contrast:H.propT("--chakra-contrast",Je.contrast),hueRotate:H.propT("--chakra-hue-rotate",Je.hueRotate),invert:H.propT("--chakra-invert",Je.invert),saturate:H.propT("--chakra-saturate",Je.saturate),dropShadow:H.propT("--chakra-drop-shadow",Je.dropShadow),backdropFilter:{transform:Je.backdropFilter},backdropBlur:H.blur("--chakra-backdrop-blur"),backdropBrightness:H.propT("--chakra-backdrop-brightness",Je.brightness),backdropContrast:H.propT("--chakra-backdrop-contrast",Je.contrast),backdropHueRotate:H.propT("--chakra-backdrop-hue-rotate",Je.hueRotate),backdropInvert:H.propT("--chakra-backdrop-invert",Je.invert),backdropSaturate:H.propT("--chakra-backdrop-saturate",Je.saturate)},q1={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Je.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:H.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:H.space("gap"),rowGap:H.space("rowGap"),columnGap:H.space("columnGap")};Object.assign(q1,{flexDir:q1.flexDirection});var vV={gridGap:H.space("gridGap"),gridColumnGap:H.space("gridColumnGap"),gridRowGap:H.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Zbe={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Je.outline},outlineOffset:!0,outlineColor:H.colors("outlineColor")},Bi={width:H.sizesT("width"),inlineSize:H.sizesT("inlineSize"),height:H.sizes("height"),blockSize:H.sizes("blockSize"),boxSize:H.sizes(["width","height"]),minWidth:H.sizes("minWidth"),minInlineSize:H.sizes("minInlineSize"),minHeight:H.sizes("minHeight"),minBlockSize:H.sizes("minBlockSize"),maxWidth:H.sizes("maxWidth"),maxInlineSize:H.sizes("maxInlineSize"),maxHeight:H.sizes("maxHeight"),maxBlockSize:H.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:H.propT("float",Je.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Bi,{w:Bi.width,h:Bi.height,minW:Bi.minWidth,maxW:Bi.maxWidth,minH:Bi.minHeight,maxH:Bi.maxHeight,overscroll:Bi.overscrollBehavior,overscrollX:Bi.overscrollBehaviorX,overscrollY:Bi.overscrollBehaviorY});var Jbe={listStyleType:!0,listStylePosition:!0,listStylePos:H.prop("listStylePosition"),listStyleImage:!0,listStyleImg:H.prop("listStyleImage")};function e_e(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},n_e=t_e(e_e),r_e={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},i_e={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},cw=(e,t,n)=>{const r={},i=n_e(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},o_e={srOnly:{transform(e){return e===!0?r_e:e==="focusable"?i_e:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>cw(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>cw(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>cw(t,e,n)}},gp={position:!0,pos:H.prop("position"),zIndex:H.prop("zIndex","zIndices"),inset:H.spaceT("inset"),insetX:H.spaceT(["left","right"]),insetInline:H.spaceT("insetInline"),insetY:H.spaceT(["top","bottom"]),insetBlock:H.spaceT("insetBlock"),top:H.spaceT("top"),insetBlockStart:H.spaceT("insetBlockStart"),bottom:H.spaceT("bottom"),insetBlockEnd:H.spaceT("insetBlockEnd"),left:H.spaceT("left"),insetInlineStart:H.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:H.spaceT("right"),insetInlineEnd:H.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(gp,{insetStart:gp.insetInlineStart,insetEnd:gp.insetInlineEnd});var a_e={ring:{transform:Je.ring},ringColor:H.colors("--chakra-ring-color"),ringOffset:H.prop("--chakra-ring-offset-width"),ringOffsetColor:H.colors("--chakra-ring-offset-color"),ringInset:H.prop("--chakra-ring-inset")},Dt={margin:H.spaceT("margin"),marginTop:H.spaceT("marginTop"),marginBlockStart:H.spaceT("marginBlockStart"),marginRight:H.spaceT("marginRight"),marginInlineEnd:H.spaceT("marginInlineEnd"),marginBottom:H.spaceT("marginBottom"),marginBlockEnd:H.spaceT("marginBlockEnd"),marginLeft:H.spaceT("marginLeft"),marginInlineStart:H.spaceT("marginInlineStart"),marginX:H.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:H.spaceT("marginInline"),marginY:H.spaceT(["marginTop","marginBottom"]),marginBlock:H.spaceT("marginBlock"),padding:H.space("padding"),paddingTop:H.space("paddingTop"),paddingBlockStart:H.space("paddingBlockStart"),paddingRight:H.space("paddingRight"),paddingBottom:H.space("paddingBottom"),paddingBlockEnd:H.space("paddingBlockEnd"),paddingLeft:H.space("paddingLeft"),paddingInlineStart:H.space("paddingInlineStart"),paddingInlineEnd:H.space("paddingInlineEnd"),paddingX:H.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:H.space("paddingInline"),paddingY:H.space(["paddingTop","paddingBottom"]),paddingBlock:H.space("paddingBlock")};Object.assign(Dt,{m:Dt.margin,mt:Dt.marginTop,mr:Dt.marginRight,me:Dt.marginInlineEnd,marginEnd:Dt.marginInlineEnd,mb:Dt.marginBottom,ml:Dt.marginLeft,ms:Dt.marginInlineStart,marginStart:Dt.marginInlineStart,mx:Dt.marginX,my:Dt.marginY,p:Dt.padding,pt:Dt.paddingTop,py:Dt.paddingY,px:Dt.paddingX,pb:Dt.paddingBottom,pl:Dt.paddingLeft,ps:Dt.paddingInlineStart,paddingStart:Dt.paddingInlineStart,pr:Dt.paddingRight,pe:Dt.paddingInlineEnd,paddingEnd:Dt.paddingInlineEnd});var s_e={textDecorationColor:H.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:H.shadows("textShadow")},l_e={clipPath:!0,transform:H.propT("transform",Je.transform),transformOrigin:!0,translateX:H.spaceT("--chakra-translate-x"),translateY:H.spaceT("--chakra-translate-y"),skewX:H.degreeT("--chakra-skew-x"),skewY:H.degreeT("--chakra-skew-y"),scaleX:H.prop("--chakra-scale-x"),scaleY:H.prop("--chakra-scale-y"),scale:H.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:H.degreeT("--chakra-rotate")},u_e={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:H.prop("transitionDuration","transition.duration"),transitionProperty:H.prop("transitionProperty","transition.property"),transitionTimingFunction:H.prop("transitionTimingFunction","transition.easing")},c_e={fontFamily:H.prop("fontFamily","fonts"),fontSize:H.prop("fontSize","fontSizes",Je.px),fontWeight:H.prop("fontWeight","fontWeights"),lineHeight:H.prop("lineHeight","lineHeights"),letterSpacing:H.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},d_e={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:H.spaceT("scrollMargin"),scrollMarginTop:H.spaceT("scrollMarginTop"),scrollMarginBottom:H.spaceT("scrollMarginBottom"),scrollMarginLeft:H.spaceT("scrollMarginLeft"),scrollMarginRight:H.spaceT("scrollMarginRight"),scrollMarginX:H.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:H.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:H.spaceT("scrollPadding"),scrollPaddingTop:H.spaceT("scrollPaddingTop"),scrollPaddingBottom:H.spaceT("scrollPaddingBottom"),scrollPaddingLeft:H.spaceT("scrollPaddingLeft"),scrollPaddingRight:H.spaceT("scrollPaddingRight"),scrollPaddingX:H.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:H.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bV(e){return ya(e)&&e.reference?e.reference:String(e)}var hS=(e,...t)=>t.map(bV).join(` ${e} `).replace(/calc/g,""),F8=(...e)=>`calc(${hS("+",...e)})`,B8=(...e)=>`calc(${hS("-",...e)})`,s3=(...e)=>`calc(${hS("*",...e)})`,z8=(...e)=>`calc(${hS("/",...e)})`,V8=e=>{const t=bV(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:s3(t,-1)},Cu=Object.assign(e=>({add:(...t)=>Cu(F8(e,...t)),subtract:(...t)=>Cu(B8(e,...t)),multiply:(...t)=>Cu(s3(e,...t)),divide:(...t)=>Cu(z8(e,...t)),negate:()=>Cu(V8(e)),toString:()=>e.toString()}),{add:F8,subtract:B8,multiply:s3,divide:z8,negate:V8});function f_e(e,t="-"){return e.replace(/\s+/g,t)}function h_e(e){const t=f_e(e.toString());return g_e(p_e(t))}function p_e(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function g_e(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function m_e(e,t=""){return[t,e].filter(Boolean).join("-")}function y_e(e,t){return`var(${e}${t?`, ${t}`:""})`}function v_e(e,t=""){return h_e(`--${m_e(e,t)}`)}function ke(e,t,n){const r=v_e(e,n);return{variable:r,reference:y_e(r,t)}}function b_e(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=ke(`${e}-${i}`,o);continue}n[r]=ke(`${e}-${r}`)}return n}function __e(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function S_e(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function l3(e){if(e==null)return e;const{unitless:t}=S_e(e);return t||typeof e=="number"?`${e}px`:e}var _V=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,kT=e=>Object.fromEntries(Object.entries(e).sort(_V));function j8(e){const t=kT(e);return Object.assign(Object.values(t),t)}function x_e(e){const t=Object.keys(kT(e));return new Set(t)}function U8(e){var t;if(!e)return e;e=(t=l3(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function qh(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${l3(e)})`),t&&n.push("and",`(max-width: ${l3(t)})`),n.join(" ")}function w_e(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=j8(e),r=Object.entries(e).sort(_V).map(([a,s],l,u)=>{var c;let[,d]=(c=u[l+1])!=null?c:[];return d=parseFloat(d)>0?U8(d):void 0,{_minW:U8(s),breakpoint:a,minW:s,maxW:d,maxWQuery:qh(null,d),minWQuery:qh(s),minMaxQuery:qh(s,d)}}),i=x_e(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>i.has(l))},asObject:kT(e),asArray:j8(e),details:r,get(a){return r.find(s=>s.breakpoint===a)},media:[null,...n.map(a=>qh(a)).slice(1)],toArrayValue(a){if(!ya(a))throw new Error("toArrayValue: value must be an object");const s=o.map(l=>{var u;return(u=a[l])!=null?u:null});for(;__e(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,u)=>{const c=o[u];return c!=null&&l!=null&&(s[c]=l),s},{})}}}var Jn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ds=e=>SV(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Da=e=>SV(t=>e(t,"~ &"),"[data-peer]",".peer"),SV=(e,...t)=>t.map(e).join(", "),pS={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ds(Jn.hover),_peerHover:Da(Jn.hover),_groupFocus:Ds(Jn.focus),_peerFocus:Da(Jn.focus),_groupFocusVisible:Ds(Jn.focusVisible),_peerFocusVisible:Da(Jn.focusVisible),_groupActive:Ds(Jn.active),_peerActive:Da(Jn.active),_groupDisabled:Ds(Jn.disabled),_peerDisabled:Da(Jn.disabled),_groupInvalid:Ds(Jn.invalid),_peerInvalid:Da(Jn.invalid),_groupChecked:Ds(Jn.checked),_peerChecked:Da(Jn.checked),_groupFocusWithin:Ds(Jn.focusWithin),_peerFocusWithin:Da(Jn.focusWithin),_peerPlaceholderShown:Da(Jn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},xV=Object.keys(pS);function G8(e,t){return ke(String(e).replace(/\./g,"-"),void 0,t)}function C_e(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=G8(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const f=i.split("."),[h,...p]=f,g=`${h}.-${p.join(".")}`,_=Cu.negate(s),b=Cu.negate(u);r[g]={value:_,var:l,varRef:b}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const c=f=>{const p=[String(i).split(".")[0],f].join(".");if(!e[p])return f;const{reference:_}=G8(p,t==null?void 0:t.cssVarPrefix);return _},d=ya(s)?s:{default:s};n=ca(n,Object.entries(d).reduce((f,[h,p])=>{var g,_;if(!p)return f;const b=c(`${p}`);if(h==="default")return f[l]=b,f;const y=(_=(g=pS)==null?void 0:g[h])!=null?_:h;return f[y]={[l]:b},f},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function E_e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function T_e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function A_e(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function H8(e,t,n={}){const{stop:r,getKey:i}=n;function o(a,s=[]){var l;if(A_e(a)||Array.isArray(a)){const u={};for(const[c,d]of Object.entries(a)){const f=(l=i==null?void 0:i(c))!=null?l:c,h=[...s,f];if(r!=null&&r(a,h))return t(a,s);u[f]=o(d,h)}return u}return t(a,s)}return o(e)}var P_e=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function k_e(e){return T_e(e,P_e)}function I_e(e){return e.semanticTokens}function M_e(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var R_e=e=>xV.includes(e)||e==="default";function O_e({tokens:e,semanticTokens:t}){const n={};return H8(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),H8(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(R_e)}),n}function $_e(e){var t;const n=M_e(e),r=k_e(n),i=I_e(n),o=O_e({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=C_e(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:w_e(n.breakpoints)}),n}var IT=ca({},ev,dt,Qbe,q1,Bi,Ybe,a_e,Zbe,vV,o_e,gp,a3,Dt,d_e,c_e,s_e,l_e,Jbe,u_e),N_e=Object.assign({},Dt,Bi,q1,vV,gp),TUe=Object.keys(N_e),D_e=[...Object.keys(IT),...xV],L_e={...IT,...pS},F_e=e=>e in L_e,B_e=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=ua(e[a],t);if(s==null)continue;if(s=ya(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!V_e(t),U_e=(e,t)=>{var n,r;if(t==null)return t;const i=l=>{var u,c;return(c=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:c.varRef},o=l=>{var u;return(u=i(l))!=null?u:l},[a,s]=z_e(t);return t=(r=(n=i(a))!=null?n:o(s))!=null?r:o(t),t};function G_e(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s,l,u;const c=ua(o,r),d=B_e(c)(r);let f={};for(let h in d){const p=d[h];let g=ua(p,r);h in n&&(h=n[h]),j_e(h,g)&&(g=U_e(r,g));let _=t[h];if(_===!0&&(_={property:h}),ya(g)){f[h]=(s=f[h])!=null?s:{},f[h]=ca({},f[h],i(g,!0));continue}let b=(u=(l=_==null?void 0:_.transform)==null?void 0:l.call(_,g,r,c))!=null?u:g;b=_!=null&&_.processResult?i(b,!0):b;const y=ua(_==null?void 0:_.property,r);if(!a&&(_!=null&&_.static)){const m=ua(_.static,r);f=ca({},f,m)}if(y&&Array.isArray(y)){for(const m of y)f[m]=b;continue}if(y){y==="&"&&ya(b)?f=ca({},f,b):f[y]=b;continue}if(ya(b)){f=ca({},f,b);continue}f[h]=b}return f};return i}var wV=e=>t=>G_e({theme:t,pseudos:pS,configs:IT})(e);function Ve(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function H_e(e,t){if(Array.isArray(e))return e;if(ya(e))return t(e);if(e!=null)return[e]}function q_e(e,t){for(let n=t+1;n{ca(u,{[m]:f?y[m]:{[b]:y[m]}})});continue}if(!h){f?ca(u,y):u[b]=y;continue}u[b]=y}}return u}}function K_e(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,a=W_e(o);return ca({},ua((n=e.baseStyle)!=null?n:{},t),a(e,"sizes",i,t),a(e,"variants",r,t))}}function AUe(e,t,n){var r,i,o;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function Rm(e){return E_e(e,["styleConfig","size","variant","colorScheme"])}var X_e={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Q_e={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Y_e={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Z_e={property:X_e,easing:Q_e,duration:Y_e},J_e=Z_e,eSe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},tSe=eSe,nSe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},rSe=nSe,iSe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},oSe=iSe,aSe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},sSe=aSe,lSe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},uSe=lSe,cSe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},dSe=cSe,fSe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},hSe=fSe,pSe={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},CV=pSe,EV={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},gSe={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},mSe={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},ySe={...EV,...gSe,container:mSe},TV=ySe,vSe={breakpoints:oSe,zIndices:tSe,radii:uSe,blur:hSe,colors:sSe,...CV,sizes:TV,shadows:dSe,space:EV,borders:rSe,transition:J_e},{defineMultiStyleConfig:bSe,definePartsStyle:Wh}=Ve(["stepper","step","title","description","indicator","separator","icon","number"]),Ka=ke("stepper-indicator-size"),ud=ke("stepper-icon-size"),cd=ke("stepper-title-font-size"),Kh=ke("stepper-description-font-size"),vh=ke("stepper-accent-color"),_Se=Wh(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[vh.variable]:`colors.${e}.500`,_dark:{[vh.variable]:`colors.${e}.200`}},title:{fontSize:cd.reference,fontWeight:"medium"},description:{fontSize:Kh.reference,color:"chakra-subtle-text"},number:{fontSize:cd.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:ud.reference,height:ud.reference},indicator:{flexShrink:0,borderRadius:"full",width:Ka.reference,height:Ka.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:vh.reference},"&[data-status=complete]":{bg:vh.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:vh.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Ka.reference} - 8px)`,top:`calc(${Ka.reference} + 4px)`,insetStart:`calc(${Ka.reference} / 2 - 1px)`}}})),SSe=bSe({baseStyle:_Se,sizes:{xs:Wh({stepper:{[Ka.variable]:"sizes.4",[ud.variable]:"sizes.3",[cd.variable]:"fontSizes.xs",[Kh.variable]:"fontSizes.xs"}}),sm:Wh({stepper:{[Ka.variable]:"sizes.6",[ud.variable]:"sizes.4",[cd.variable]:"fontSizes.sm",[Kh.variable]:"fontSizes.xs"}}),md:Wh({stepper:{[Ka.variable]:"sizes.8",[ud.variable]:"sizes.5",[cd.variable]:"fontSizes.md",[Kh.variable]:"fontSizes.sm"}}),lg:Wh({stepper:{[Ka.variable]:"sizes.10",[ud.variable]:"sizes.6",[cd.variable]:"fontSizes.lg",[Kh.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function mt(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...c){r();for(const d of c)t[d]=l(d);return mt(e,t)}function o(...c){for(const d of c)d in t||(t[d]=l(d));return mt(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function l(c){const h=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:h,selector:`.${h}`,toString:()=>c}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var AV=mt("accordion").parts("root","container","button","panel").extend("icon"),xSe=mt("alert").parts("title","description","container").extend("icon","spinner"),wSe=mt("avatar").parts("label","badge","container").extend("excessLabel","group"),CSe=mt("breadcrumb").parts("link","item","container").extend("separator");mt("button").parts();var PV=mt("checkbox").parts("control","icon","container").extend("label");mt("progress").parts("track","filledTrack").extend("label");var ESe=mt("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),kV=mt("editable").parts("preview","input","textarea"),TSe=mt("form").parts("container","requiredIndicator","helperText"),ASe=mt("formError").parts("text","icon"),IV=mt("input").parts("addon","field","element","group"),PSe=mt("list").parts("container","item","icon"),MV=mt("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),RV=mt("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),OV=mt("numberinput").parts("root","field","stepperGroup","stepper");mt("pininput").parts("field");var $V=mt("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),NV=mt("progress").parts("label","filledTrack","track"),kSe=mt("radio").parts("container","control","label"),DV=mt("select").parts("field","icon"),LV=mt("slider").parts("container","track","thumb","filledTrack","mark"),ISe=mt("stat").parts("container","label","helpText","number","icon"),FV=mt("switch").parts("container","track","thumb","label"),MSe=mt("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),BV=mt("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),RSe=mt("tag").parts("container","label","closeButton"),OSe=mt("card").parts("container","header","body","footer");mt("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function Ou(e,t,n){return Math.min(Math.max(e,n),t)}class $Se extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Xh=$Se;function MT(e){if(typeof e!="string")throw new Xh(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=jSe.test(e)?LSe(e):e;const n=FSe.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(Dg(s,2),16)),parseInt(Dg(a[3]||"f",2),16)/255]}const r=BSe.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const i=zSe.exec(t);if(i){const a=Array.from(i).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const o=VSe.exec(t);if(o){const[a,s,l,u]=Array.from(o).slice(1).map(parseFloat);if(Ou(0,100,s)!==s)throw new Xh(e);if(Ou(0,100,l)!==l)throw new Xh(e);return[...USe(a,s,l),Number.isNaN(u)?1:u]}throw new Xh(e)}function NSe(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const q8=e=>parseInt(e.replace(/_/g,""),36),DSe="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=q8(t.substring(0,3)),r=q8(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function LSe(e){const t=e.toLowerCase().trim(),n=DSe[NSe(t)];if(!n)throw new Xh(e);return`#${n}`}const Dg=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),FSe=new RegExp(`^#${Dg("([a-f0-9])",3)}([a-f0-9])?$`,"i"),BSe=new RegExp(`^#${Dg("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),zSe=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Dg(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),VSe=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,jSe=/^[a-z]+$/i,W8=e=>Math.round(e*255),USe=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(W8);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),a=o*(1-Math.abs(i%2-1));let s=0,l=0,u=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,u=a):i>=3&&i<4?(l=a,u=o):i>=4&&i<5?(s=a,u=o):i>=5&&i<6&&(s=o,u=a);const c=r-o/2,d=s+c,f=l+c,h=u+c;return[d,f,h].map(W8)};function GSe(e,t,n,r){return`rgba(${Ou(0,255,e).toFixed()}, ${Ou(0,255,t).toFixed()}, ${Ou(0,255,n).toFixed()}, ${parseFloat(Ou(0,1,r).toFixed(3))})`}function HSe(e,t){const[n,r,i,o]=MT(e);return GSe(n,r,i,o-t)}function qSe(e){const[t,n,r,i]=MT(e);let o=a=>{const s=Ou(0,255,a).toString(16);return s.length===1?`0${s}`:s};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function WSe(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Or=(e,t,n)=>{const r=WSe(e,`colors.${t}`,t);try{return qSe(r),r}catch{return n??"#000000"}},XSe=e=>{const[t,n,r]=MT(e);return(t*299+n*587+r*114)/1e3},QSe=e=>t=>{const n=Or(t,e);return XSe(n)<128?"dark":"light"},YSe=e=>t=>QSe(e)(t)==="dark",Sf=(e,t)=>n=>{const r=Or(n,e);return HSe(r,1-t)};function K8(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}var ZSe=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function JSe(e){const t=ZSe();return!e||KSe(e)?t:e.string&&e.colors?t2e(e.string,e.colors):e.string&&!e.colors?e2e(e.string):e.colors&&!e.string?n2e(e.colors):t}function e2e(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function t2e(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function RT(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function zV(e){return ya(e)&&e.reference?e.reference:String(e)}var gS=(e,...t)=>t.map(zV).join(` ${e} `).replace(/calc/g,""),X8=(...e)=>`calc(${gS("+",...e)})`,Q8=(...e)=>`calc(${gS("-",...e)})`,u3=(...e)=>`calc(${gS("*",...e)})`,Y8=(...e)=>`calc(${gS("/",...e)})`,Z8=e=>{const t=zV(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:u3(t,-1)},Xa=Object.assign(e=>({add:(...t)=>Xa(X8(e,...t)),subtract:(...t)=>Xa(Q8(e,...t)),multiply:(...t)=>Xa(u3(e,...t)),divide:(...t)=>Xa(Y8(e,...t)),negate:()=>Xa(Z8(e)),toString:()=>e.toString()}),{add:X8,subtract:Q8,multiply:u3,divide:Y8,negate:Z8});function r2e(e){return!Number.isInteger(parseFloat(e.toString()))}function i2e(e,t="-"){return e.replace(/\s+/g,t)}function VV(e){const t=i2e(e.toString());return t.includes("\\.")?e:r2e(e)?t.replace(".","\\."):e}function o2e(e,t=""){return[t,VV(e)].filter(Boolean).join("-")}function a2e(e,t){return`var(${VV(e)}${t?`, ${t}`:""})`}function s2e(e,t=""){return`--${o2e(e,t)}`}function tn(e,t){const n=s2e(e,t==null?void 0:t.prefix);return{variable:n,reference:a2e(n,l2e(t==null?void 0:t.fallback))}}function l2e(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:u2e,definePartsStyle:tv}=Ve(FV.keys),mp=tn("switch-track-width"),Gu=tn("switch-track-height"),dw=tn("switch-track-diff"),c2e=Xa.subtract(mp,Gu),c3=tn("switch-thumb-x"),bh=tn("switch-bg"),d2e=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[mp.reference],height:[Gu.reference],transitionProperty:"common",transitionDuration:"fast",[bh.variable]:"colors.gray.300",_dark:{[bh.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[bh.variable]:`colors.${t}.500`,_dark:{[bh.variable]:`colors.${t}.200`}},bg:bh.reference}},f2e={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Gu.reference],height:[Gu.reference],_checked:{transform:`translateX(${c3.reference})`}},h2e=tv(e=>({container:{[dw.variable]:c2e,[c3.variable]:dw.reference,_rtl:{[c3.variable]:Xa(dw).negate().toString()}},track:d2e(e),thumb:f2e})),p2e={sm:tv({container:{[mp.variable]:"1.375rem",[Gu.variable]:"sizes.3"}}),md:tv({container:{[mp.variable]:"1.875rem",[Gu.variable]:"sizes.4"}}),lg:tv({container:{[mp.variable]:"2.875rem",[Gu.variable]:"sizes.6"}})},g2e=u2e({baseStyle:h2e,sizes:p2e,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:m2e,definePartsStyle:Vd}=Ve(MSe.keys),y2e=Vd({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),W1={"&[data-is-numeric=true]":{textAlign:"end"}},v2e=Vd(e=>{const{colorScheme:t}=e;return{th:{color:W("gray.600","gray.400")(e),borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...W1},td:{borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...W1},caption:{color:W("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),b2e=Vd(e=>{const{colorScheme:t}=e;return{th:{color:W("gray.600","gray.400")(e),borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...W1},td:{borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...W1},caption:{color:W("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e)},td:{background:W(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),_2e={simple:v2e,striped:b2e,unstyled:{}},S2e={sm:Vd({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Vd({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Vd({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},x2e=m2e({baseStyle:y2e,variants:_2e,sizes:S2e,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Kr=ke("tabs-color"),wo=ke("tabs-bg"),X0=ke("tabs-border-color"),{defineMultiStyleConfig:w2e,definePartsStyle:va}=Ve(BV.keys),C2e=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},E2e=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},T2e=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},A2e={p:4},P2e=va(e=>({root:C2e(e),tab:E2e(e),tablist:T2e(e),tabpanel:A2e})),k2e={sm:va({tab:{py:1,px:4,fontSize:"sm"}}),md:va({tab:{fontSize:"md",py:2,px:4}}),lg:va({tab:{fontSize:"lg",py:3,px:4}})},I2e=va(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Kr.variable]:`colors.${t}.600`,_dark:{[Kr.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[wo.variable]:"colors.gray.200",_dark:{[wo.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Kr.reference,bg:wo.reference}}}),M2e=va(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[X0.variable]:"transparent",_selected:{[Kr.variable]:`colors.${t}.600`,[X0.variable]:"colors.white",_dark:{[Kr.variable]:`colors.${t}.300`,[X0.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:X0.reference},color:Kr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),R2e=va(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[wo.variable]:"colors.gray.50",_dark:{[wo.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[wo.variable]:"colors.white",[Kr.variable]:`colors.${t}.600`,_dark:{[wo.variable]:"colors.gray.800",[Kr.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Kr.reference,bg:wo.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),O2e=va(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Or(n,`${t}.700`),bg:Or(n,`${t}.100`)}}}}),$2e=va(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Kr.variable]:"colors.gray.600",_dark:{[Kr.variable]:"inherit"},_selected:{[Kr.variable]:"colors.white",[wo.variable]:`colors.${t}.600`,_dark:{[Kr.variable]:"colors.gray.800",[wo.variable]:`colors.${t}.300`}},color:Kr.reference,bg:wo.reference}}}),N2e=va({}),D2e={line:I2e,enclosed:M2e,"enclosed-colored":R2e,"soft-rounded":O2e,"solid-rounded":$2e,unstyled:N2e},L2e=w2e({baseStyle:P2e,sizes:k2e,variants:D2e,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),yn=b_e("badge",["bg","color","shadow"]),F2e={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:yn.bg.reference,color:yn.color.reference,boxShadow:yn.shadow.reference},B2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.500`,.6)(n);return{[yn.bg.variable]:`colors.${t}.500`,[yn.color.variable]:"colors.white",_dark:{[yn.bg.variable]:r,[yn.color.variable]:"colors.whiteAlpha.800"}}},z2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.200`,.16)(n);return{[yn.bg.variable]:`colors.${t}.100`,[yn.color.variable]:`colors.${t}.800`,_dark:{[yn.bg.variable]:r,[yn.color.variable]:`colors.${t}.200`}}},V2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.200`,.8)(n);return{[yn.color.variable]:`colors.${t}.500`,_dark:{[yn.color.variable]:r},[yn.shadow.variable]:`inset 0 0 0px 1px ${yn.color.reference}`}},j2e={solid:B2e,subtle:z2e,outline:V2e},yp={baseStyle:F2e,variants:j2e,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:U2e,definePartsStyle:Hu}=Ve(RSe.keys),J8=ke("tag-bg"),e9=ke("tag-color"),fw=ke("tag-shadow"),nv=ke("tag-min-height"),rv=ke("tag-min-width"),iv=ke("tag-font-size"),ov=ke("tag-padding-inline"),G2e={fontWeight:"medium",lineHeight:1.2,outline:0,[e9.variable]:yn.color.reference,[J8.variable]:yn.bg.reference,[fw.variable]:yn.shadow.reference,color:e9.reference,bg:J8.reference,boxShadow:fw.reference,borderRadius:"md",minH:nv.reference,minW:rv.reference,fontSize:iv.reference,px:ov.reference,_focusVisible:{[fw.variable]:"shadows.outline"}},H2e={lineHeight:1.2,overflow:"visible"},q2e={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},W2e=Hu({container:G2e,label:H2e,closeButton:q2e}),K2e={sm:Hu({container:{[nv.variable]:"sizes.5",[rv.variable]:"sizes.5",[iv.variable]:"fontSizes.xs",[ov.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hu({container:{[nv.variable]:"sizes.6",[rv.variable]:"sizes.6",[iv.variable]:"fontSizes.sm",[ov.variable]:"space.2"}}),lg:Hu({container:{[nv.variable]:"sizes.8",[rv.variable]:"sizes.8",[iv.variable]:"fontSizes.md",[ov.variable]:"space.3"}})},X2e={subtle:Hu(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.subtle(e)}}),solid:Hu(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.solid(e)}}),outline:Hu(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.outline(e)}})},Q2e=U2e({variants:X2e,baseStyle:W2e,sizes:K2e,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:Ja,defineMultiStyleConfig:Y2e}=Ve(IV.keys),dd=ke("input-height"),fd=ke("input-font-size"),hd=ke("input-padding"),pd=ke("input-border-radius"),Z2e=Ja({addon:{height:dd.reference,fontSize:fd.reference,px:hd.reference,borderRadius:pd.reference},field:{width:"100%",height:dd.reference,fontSize:fd.reference,px:hd.reference,borderRadius:pd.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Ls={lg:{[fd.variable]:"fontSizes.lg",[hd.variable]:"space.4",[pd.variable]:"radii.md",[dd.variable]:"sizes.12"},md:{[fd.variable]:"fontSizes.md",[hd.variable]:"space.4",[pd.variable]:"radii.md",[dd.variable]:"sizes.10"},sm:{[fd.variable]:"fontSizes.sm",[hd.variable]:"space.3",[pd.variable]:"radii.sm",[dd.variable]:"sizes.8"},xs:{[fd.variable]:"fontSizes.xs",[hd.variable]:"space.2",[pd.variable]:"radii.sm",[dd.variable]:"sizes.6"}},J2e={lg:Ja({field:Ls.lg,group:Ls.lg}),md:Ja({field:Ls.md,group:Ls.md}),sm:Ja({field:Ls.sm,group:Ls.sm}),xs:Ja({field:Ls.xs,group:Ls.xs})};function OT(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||W("blue.500","blue.300")(e),errorBorderColor:n||W("red.500","red.300")(e)}}var exe=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=OT(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:W("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Or(t,r),boxShadow:`0 0 0 1px ${Or(t,r)}`},_focusVisible:{zIndex:1,borderColor:Or(t,n),boxShadow:`0 0 0 1px ${Or(t,n)}`}},addon:{border:"1px solid",borderColor:W("inherit","whiteAlpha.50")(e),bg:W("gray.100","whiteAlpha.300")(e)}}}),txe=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=OT(e);return{field:{border:"2px solid",borderColor:"transparent",bg:W("gray.100","whiteAlpha.50")(e),_hover:{bg:W("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Or(t,r)},_focusVisible:{bg:"transparent",borderColor:Or(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:W("gray.100","whiteAlpha.50")(e)}}}),nxe=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=OT(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Or(t,r),boxShadow:`0px 1px 0px 0px ${Or(t,r)}`},_focusVisible:{borderColor:Or(t,n),boxShadow:`0px 1px 0px 0px ${Or(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),rxe=Ja({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),ixe={outline:exe,filled:txe,flushed:nxe,unstyled:rxe},gt=Y2e({baseStyle:Z2e,sizes:J2e,variants:ixe,defaultProps:{size:"md",variant:"outline"}}),t9,oxe={...(t9=gt.baseStyle)==null?void 0:t9.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},n9,r9,axe={outline:e=>{var t,n;return(n=(t=gt.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=gt.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=gt.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(r9=(n9=gt.variants)==null?void 0:n9.unstyled.field)!=null?r9:{}},i9,o9,a9,s9,l9,u9,c9,d9,sxe={xs:(o9=(i9=gt.sizes)==null?void 0:i9.xs.field)!=null?o9:{},sm:(s9=(a9=gt.sizes)==null?void 0:a9.sm.field)!=null?s9:{},md:(u9=(l9=gt.sizes)==null?void 0:l9.md.field)!=null?u9:{},lg:(d9=(c9=gt.sizes)==null?void 0:c9.lg.field)!=null?d9:{}},lxe={baseStyle:oxe,sizes:sxe,variants:axe,defaultProps:{size:"md",variant:"outline"}},Q0=tn("tooltip-bg"),hw=tn("tooltip-fg"),uxe=tn("popper-arrow-bg"),cxe={bg:Q0.reference,color:hw.reference,[Q0.variable]:"colors.gray.700",[hw.variable]:"colors.whiteAlpha.900",_dark:{[Q0.variable]:"colors.gray.300",[hw.variable]:"colors.gray.900"},[uxe.variable]:Q0.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},dxe={baseStyle:cxe},{defineMultiStyleConfig:fxe,definePartsStyle:Qh}=Ve(NV.keys),hxe=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=W(K8(),K8("1rem","rgba(0,0,0,0.1)"))(e),a=W(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Or(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},pxe={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},gxe=e=>({bg:W("gray.100","whiteAlpha.300")(e)}),mxe=e=>({transitionProperty:"common",transitionDuration:"slow",...hxe(e)}),yxe=Qh(e=>({label:pxe,filledTrack:mxe(e),track:gxe(e)})),vxe={xs:Qh({track:{h:"1"}}),sm:Qh({track:{h:"2"}}),md:Qh({track:{h:"3"}}),lg:Qh({track:{h:"4"}})},bxe=fxe({sizes:vxe,baseStyle:yxe,defaultProps:{size:"md",colorScheme:"blue"}}),_xe=e=>typeof e=="function";function Nr(e,...t){return _xe(e)?e(...t):e}var{definePartsStyle:av,defineMultiStyleConfig:Sxe}=Ve(PV.keys),vp=ke("checkbox-size"),xxe=e=>{const{colorScheme:t}=e;return{w:vp.reference,h:vp.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:W(`${t}.500`,`${t}.200`)(e),borderColor:W(`${t}.500`,`${t}.200`)(e),color:W("white","gray.900")(e),_hover:{bg:W(`${t}.600`,`${t}.300`)(e),borderColor:W(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:W("gray.200","transparent")(e),bg:W("gray.200","whiteAlpha.300")(e),color:W("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:W(`${t}.500`,`${t}.200`)(e),borderColor:W(`${t}.500`,`${t}.200`)(e),color:W("white","gray.900")(e)},_disabled:{bg:W("gray.100","whiteAlpha.100")(e),borderColor:W("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:W("red.500","red.300")(e)}}},wxe={_disabled:{cursor:"not-allowed"}},Cxe={userSelect:"none",_disabled:{opacity:.4}},Exe={transitionProperty:"transform",transitionDuration:"normal"},Txe=av(e=>({icon:Exe,container:wxe,control:Nr(xxe,e),label:Cxe})),Axe={sm:av({control:{[vp.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:av({control:{[vp.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:av({control:{[vp.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},K1=Sxe({baseStyle:Txe,sizes:Axe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Pxe,definePartsStyle:sv}=Ve(kSe.keys),kxe=e=>{var t;const n=(t=Nr(K1.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Ixe=sv(e=>{var t,n,r,i;return{label:(n=(t=K1).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=K1).baseStyle)==null?void 0:i.call(r,e).container,control:kxe(e)}}),Mxe={md:sv({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:sv({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:sv({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Rxe=Pxe({baseStyle:Ixe,sizes:Mxe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Oxe,definePartsStyle:$xe}=Ve(DV.keys),Y0=ke("select-bg"),f9,Nxe={...(f9=gt.baseStyle)==null?void 0:f9.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Y0.reference,[Y0.variable]:"colors.white",_dark:{[Y0.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Y0.reference}},Dxe={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Lxe=$xe({field:Nxe,icon:Dxe}),Z0={paddingInlineEnd:"8"},h9,p9,g9,m9,y9,v9,b9,_9,Fxe={lg:{...(h9=gt.sizes)==null?void 0:h9.lg,field:{...(p9=gt.sizes)==null?void 0:p9.lg.field,...Z0}},md:{...(g9=gt.sizes)==null?void 0:g9.md,field:{...(m9=gt.sizes)==null?void 0:m9.md.field,...Z0}},sm:{...(y9=gt.sizes)==null?void 0:y9.sm,field:{...(v9=gt.sizes)==null?void 0:v9.sm.field,...Z0}},xs:{...(b9=gt.sizes)==null?void 0:b9.xs,field:{...(_9=gt.sizes)==null?void 0:_9.xs.field,...Z0},icon:{insetEnd:"1"}}},Bxe=Oxe({baseStyle:Lxe,sizes:Fxe,variants:gt.variants,defaultProps:gt.defaultProps}),pw=ke("skeleton-start-color"),gw=ke("skeleton-end-color"),zxe={[pw.variable]:"colors.gray.100",[gw.variable]:"colors.gray.400",_dark:{[pw.variable]:"colors.gray.800",[gw.variable]:"colors.gray.600"},background:pw.reference,borderColor:gw.reference,opacity:.7,borderRadius:"sm"},Vxe={baseStyle:zxe},mw=ke("skip-link-bg"),jxe={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[mw.variable]:"colors.white",_dark:{[mw.variable]:"colors.gray.700"},bg:mw.reference}},Uxe={baseStyle:jxe},{defineMultiStyleConfig:Gxe,definePartsStyle:mS}=Ve(LV.keys),Lg=ke("slider-thumb-size"),Fg=ke("slider-track-size"),el=ke("slider-bg"),Hxe=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...RT({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},qxe=e=>({...RT({orientation:e.orientation,horizontal:{h:Fg.reference},vertical:{w:Fg.reference}}),overflow:"hidden",borderRadius:"sm",[el.variable]:"colors.gray.200",_dark:{[el.variable]:"colors.whiteAlpha.200"},_disabled:{[el.variable]:"colors.gray.300",_dark:{[el.variable]:"colors.whiteAlpha.300"}},bg:el.reference}),Wxe=e=>{const{orientation:t}=e;return{...RT({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Lg.reference,h:Lg.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Kxe=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[el.variable]:`colors.${t}.500`,_dark:{[el.variable]:`colors.${t}.200`},bg:el.reference}},Xxe=mS(e=>({container:Hxe(e),track:qxe(e),thumb:Wxe(e),filledTrack:Kxe(e)})),Qxe=mS({container:{[Lg.variable]:"sizes.4",[Fg.variable]:"sizes.1"}}),Yxe=mS({container:{[Lg.variable]:"sizes.3.5",[Fg.variable]:"sizes.1"}}),Zxe=mS({container:{[Lg.variable]:"sizes.2.5",[Fg.variable]:"sizes.0.5"}}),Jxe={lg:Qxe,md:Yxe,sm:Zxe},ewe=Gxe({baseStyle:Xxe,sizes:Jxe,defaultProps:{size:"md",colorScheme:"blue"}}),Eu=tn("spinner-size"),twe={width:[Eu.reference],height:[Eu.reference]},nwe={xs:{[Eu.variable]:"sizes.3"},sm:{[Eu.variable]:"sizes.4"},md:{[Eu.variable]:"sizes.6"},lg:{[Eu.variable]:"sizes.8"},xl:{[Eu.variable]:"sizes.12"}},rwe={baseStyle:twe,sizes:nwe,defaultProps:{size:"md"}},{defineMultiStyleConfig:iwe,definePartsStyle:jV}=Ve(ISe.keys),owe={fontWeight:"medium"},awe={opacity:.8,marginBottom:"2"},swe={verticalAlign:"baseline",fontWeight:"semibold"},lwe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},uwe=jV({container:{},label:owe,helpText:awe,number:swe,icon:lwe}),cwe={md:jV({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},dwe=iwe({baseStyle:uwe,sizes:cwe,defaultProps:{size:"md"}}),yw=ke("kbd-bg"),fwe={[yw.variable]:"colors.gray.100",_dark:{[yw.variable]:"colors.whiteAlpha.100"},bg:yw.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hwe={baseStyle:fwe},pwe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},gwe={baseStyle:pwe},{defineMultiStyleConfig:mwe,definePartsStyle:ywe}=Ve(PSe.keys),vwe={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},bwe=ywe({icon:vwe}),_we=mwe({baseStyle:bwe}),{defineMultiStyleConfig:Swe,definePartsStyle:xwe}=Ve(MV.keys),Zo=ke("menu-bg"),vw=ke("menu-shadow"),wwe={[Zo.variable]:"#fff",[vw.variable]:"shadows.sm",_dark:{[Zo.variable]:"colors.gray.700",[vw.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Zo.reference,boxShadow:vw.reference},Cwe={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Zo.variable]:"colors.gray.100",_dark:{[Zo.variable]:"colors.whiteAlpha.100"}},_active:{[Zo.variable]:"colors.gray.200",_dark:{[Zo.variable]:"colors.whiteAlpha.200"}},_expanded:{[Zo.variable]:"colors.gray.100",_dark:{[Zo.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Zo.reference},Ewe={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Twe={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},Awe={opacity:.6},Pwe={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},kwe={transitionProperty:"common",transitionDuration:"normal"},Iwe=xwe({button:kwe,list:wwe,item:Cwe,groupTitle:Ewe,icon:Twe,command:Awe,divider:Pwe}),Mwe=Swe({baseStyle:Iwe}),{defineMultiStyleConfig:Rwe,definePartsStyle:d3}=Ve(RV.keys),bw=ke("modal-bg"),_w=ke("modal-shadow"),Owe={bg:"blackAlpha.600",zIndex:"modal"},$we=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},Nwe=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[bw.variable]:"colors.white",[_w.variable]:"shadows.lg",_dark:{[bw.variable]:"colors.gray.700",[_w.variable]:"shadows.dark-lg"},bg:bw.reference,boxShadow:_w.reference}},Dwe={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Lwe={position:"absolute",top:"2",insetEnd:"3"},Fwe=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Bwe={px:"6",py:"4"},zwe=d3(e=>({overlay:Owe,dialogContainer:Nr($we,e),dialog:Nr(Nwe,e),header:Dwe,closeButton:Lwe,body:Nr(Fwe,e),footer:Bwe}));function po(e){return d3(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Vwe={xs:po("xs"),sm:po("sm"),md:po("md"),lg:po("lg"),xl:po("xl"),"2xl":po("2xl"),"3xl":po("3xl"),"4xl":po("4xl"),"5xl":po("5xl"),"6xl":po("6xl"),full:po("full")},jwe=Rwe({baseStyle:zwe,sizes:Vwe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Uwe,definePartsStyle:UV}=Ve(OV.keys),$T=tn("number-input-stepper-width"),GV=tn("number-input-input-padding"),Gwe=Xa($T).add("0.5rem").toString(),Sw=tn("number-input-bg"),xw=tn("number-input-color"),ww=tn("number-input-border-color"),Hwe={[$T.variable]:"sizes.6",[GV.variable]:Gwe},qwe=e=>{var t,n;return(n=(t=Nr(gt.baseStyle,e))==null?void 0:t.field)!=null?n:{}},Wwe={width:$T.reference},Kwe={borderStart:"1px solid",borderStartColor:ww.reference,color:xw.reference,bg:Sw.reference,[xw.variable]:"colors.chakra-body-text",[ww.variable]:"colors.chakra-border-color",_dark:{[xw.variable]:"colors.whiteAlpha.800",[ww.variable]:"colors.whiteAlpha.300"},_active:{[Sw.variable]:"colors.gray.200",_dark:{[Sw.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Xwe=UV(e=>{var t;return{root:Hwe,field:(t=Nr(qwe,e))!=null?t:{},stepperGroup:Wwe,stepper:Kwe}});function J0(e){var t,n,r;const i=(t=gt.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},a=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",s=CV.fontSizes[a];return UV({field:{...i.field,paddingInlineEnd:GV.reference,verticalAlign:"top"},stepper:{fontSize:Xa(s).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var Qwe={xs:J0("xs"),sm:J0("sm"),md:J0("md"),lg:J0("lg")},Ywe=Uwe({baseStyle:Xwe,sizes:Qwe,variants:gt.variants,defaultProps:gt.defaultProps}),S9,Zwe={...(S9=gt.baseStyle)==null?void 0:S9.field,textAlign:"center"},Jwe={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},x9,w9,eCe={outline:e=>{var t,n,r;return(r=(n=Nr((t=gt.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=Nr((t=gt.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=Nr((t=gt.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(w9=(x9=gt.variants)==null?void 0:x9.unstyled.field)!=null?w9:{}},tCe={baseStyle:Zwe,sizes:Jwe,variants:eCe,defaultProps:gt.defaultProps},{defineMultiStyleConfig:nCe,definePartsStyle:rCe}=Ve($V.keys),ey=tn("popper-bg"),iCe=tn("popper-arrow-bg"),C9=tn("popper-arrow-shadow-color"),oCe={zIndex:10},aCe={[ey.variable]:"colors.white",bg:ey.reference,[iCe.variable]:ey.reference,[C9.variable]:"colors.gray.200",_dark:{[ey.variable]:"colors.gray.700",[C9.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sCe={px:3,py:2,borderBottomWidth:"1px"},lCe={px:3,py:2},uCe={px:3,py:2,borderTopWidth:"1px"},cCe={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},dCe=rCe({popper:oCe,content:aCe,header:sCe,body:lCe,footer:uCe,closeButton:cCe}),fCe=nCe({baseStyle:dCe}),{definePartsStyle:f3,defineMultiStyleConfig:hCe}=Ve(ESe.keys),Cw=ke("drawer-bg"),Ew=ke("drawer-box-shadow");function Lc(e){return f3(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var pCe={bg:"blackAlpha.600",zIndex:"modal"},gCe={display:"flex",zIndex:"modal",justifyContent:"center"},mCe=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Cw.variable]:"colors.white",[Ew.variable]:"shadows.lg",_dark:{[Cw.variable]:"colors.gray.700",[Ew.variable]:"shadows.dark-lg"},bg:Cw.reference,boxShadow:Ew.reference}},yCe={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},vCe={position:"absolute",top:"2",insetEnd:"3"},bCe={px:"6",py:"2",flex:"1",overflow:"auto"},_Ce={px:"6",py:"4"},SCe=f3(e=>({overlay:pCe,dialogContainer:gCe,dialog:Nr(mCe,e),header:yCe,closeButton:vCe,body:bCe,footer:_Ce})),xCe={xs:Lc("xs"),sm:Lc("md"),md:Lc("lg"),lg:Lc("2xl"),xl:Lc("4xl"),full:Lc("full")},wCe=hCe({baseStyle:SCe,sizes:xCe,defaultProps:{size:"xs"}}),{definePartsStyle:CCe,defineMultiStyleConfig:ECe}=Ve(kV.keys),TCe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},ACe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},PCe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},kCe=CCe({preview:TCe,input:ACe,textarea:PCe}),ICe=ECe({baseStyle:kCe}),{definePartsStyle:MCe,defineMultiStyleConfig:RCe}=Ve(TSe.keys),jd=ke("form-control-color"),OCe={marginStart:"1",[jd.variable]:"colors.red.500",_dark:{[jd.variable]:"colors.red.300"},color:jd.reference},$Ce={mt:"2",[jd.variable]:"colors.gray.600",_dark:{[jd.variable]:"colors.whiteAlpha.600"},color:jd.reference,lineHeight:"normal",fontSize:"sm"},NCe=MCe({container:{width:"100%",position:"relative"},requiredIndicator:OCe,helperText:$Ce}),DCe=RCe({baseStyle:NCe}),{definePartsStyle:LCe,defineMultiStyleConfig:FCe}=Ve(ASe.keys),Ud=ke("form-error-color"),BCe={[Ud.variable]:"colors.red.500",_dark:{[Ud.variable]:"colors.red.300"},color:Ud.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},zCe={marginEnd:"0.5em",[Ud.variable]:"colors.red.500",_dark:{[Ud.variable]:"colors.red.300"},color:Ud.reference},VCe=LCe({text:BCe,icon:zCe}),jCe=FCe({baseStyle:VCe}),UCe={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},GCe={baseStyle:UCe},HCe={fontFamily:"heading",fontWeight:"bold"},qCe={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},WCe={baseStyle:HCe,sizes:qCe,defaultProps:{size:"xl"}},{defineMultiStyleConfig:KCe,definePartsStyle:XCe}=Ve(CSe.keys),Tw=ke("breadcrumb-link-decor"),QCe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Tw.reference,[Tw.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Tw.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},YCe=XCe({link:QCe}),ZCe=KCe({baseStyle:YCe}),JCe={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},HV=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:W("gray.800","whiteAlpha.900")(e),_hover:{bg:W("gray.100","whiteAlpha.200")(e)},_active:{bg:W("gray.200","whiteAlpha.300")(e)}};const r=Sf(`${t}.200`,.12)(n),i=Sf(`${t}.200`,.24)(n);return{color:W(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:W(`${t}.50`,r)(e)},_active:{bg:W(`${t}.100`,i)(e)}}},e5e=e=>{const{colorScheme:t}=e,n=W("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...Nr(HV,e)}},t5e={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},n5e=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const l=W("gray.100","whiteAlpha.200")(e);return{bg:l,color:W("gray.800","whiteAlpha.900")(e),_hover:{bg:W("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:W("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:a=`${n}.700`}=(t=t5e[n])!=null?t:{},s=W(r,`${n}.200`)(e);return{bg:s,color:W(i,"gray.800")(e),_hover:{bg:W(o,`${n}.300`)(e),_disabled:{bg:s}},_active:{bg:W(a,`${n}.400`)(e)}}},r5e=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:W(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:W(`${t}.700`,`${t}.500`)(e)}}},i5e={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},o5e={ghost:HV,outline:e5e,solid:n5e,link:r5e,unstyled:i5e},a5e={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},s5e={baseStyle:JCe,variants:o5e,sizes:a5e,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:qu,defineMultiStyleConfig:l5e}=Ve(OSe.keys),X1=ke("card-bg"),is=ke("card-padding"),qV=ke("card-shadow"),lv=ke("card-radius"),WV=ke("card-border-width","0"),KV=ke("card-border-color"),u5e=qu({container:{[X1.variable]:"colors.chakra-body-bg",backgroundColor:X1.reference,boxShadow:qV.reference,borderRadius:lv.reference,color:"chakra-body-text",borderWidth:WV.reference,borderColor:KV.reference},body:{padding:is.reference,flex:"1 1 0%"},header:{padding:is.reference},footer:{padding:is.reference}}),c5e={sm:qu({container:{[lv.variable]:"radii.base",[is.variable]:"space.3"}}),md:qu({container:{[lv.variable]:"radii.md",[is.variable]:"space.5"}}),lg:qu({container:{[lv.variable]:"radii.xl",[is.variable]:"space.7"}})},d5e={elevated:qu({container:{[qV.variable]:"shadows.base",_dark:{[X1.variable]:"colors.gray.700"}}}),outline:qu({container:{[WV.variable]:"1px",[KV.variable]:"colors.chakra-border-color"}}),filled:qu({container:{[X1.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[is.variable]:0},header:{[is.variable]:0},footer:{[is.variable]:0}}},f5e=l5e({baseStyle:u5e,variants:d5e,sizes:c5e,defaultProps:{variant:"elevated",size:"md"}}),bp=tn("close-button-size"),_h=tn("close-button-bg"),h5e={w:[bp.reference],h:[bp.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_h.variable]:"colors.blackAlpha.100",_dark:{[_h.variable]:"colors.whiteAlpha.100"}},_active:{[_h.variable]:"colors.blackAlpha.200",_dark:{[_h.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_h.reference},p5e={lg:{[bp.variable]:"sizes.10",fontSize:"md"},md:{[bp.variable]:"sizes.8",fontSize:"xs"},sm:{[bp.variable]:"sizes.6",fontSize:"2xs"}},g5e={baseStyle:h5e,sizes:p5e,defaultProps:{size:"md"}},{variants:m5e,defaultProps:y5e}=yp,v5e={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:yn.bg.reference,color:yn.color.reference,boxShadow:yn.shadow.reference},b5e={baseStyle:v5e,variants:m5e,defaultProps:y5e},_5e={w:"100%",mx:"auto",maxW:"prose",px:"4"},S5e={baseStyle:_5e},x5e={opacity:.6,borderColor:"inherit"},w5e={borderStyle:"solid"},C5e={borderStyle:"dashed"},E5e={solid:w5e,dashed:C5e},T5e={baseStyle:x5e,variants:E5e,defaultProps:{variant:"solid"}},{definePartsStyle:A5e,defineMultiStyleConfig:P5e}=Ve(AV.keys),k5e={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},I5e={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},M5e={pt:"2",px:"4",pb:"5"},R5e={fontSize:"1.25em"},O5e=A5e({container:k5e,button:I5e,panel:M5e,icon:R5e}),$5e=P5e({baseStyle:O5e}),{definePartsStyle:Om,defineMultiStyleConfig:N5e}=Ve(xSe.keys),xi=ke("alert-fg"),bs=ke("alert-bg"),D5e=Om({container:{bg:bs.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:xi.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:xi.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function NT(e){const{theme:t,colorScheme:n}=e,r=Sf(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var L5e=Om(e=>{const{colorScheme:t}=e,n=NT(e);return{container:{[xi.variable]:`colors.${t}.600`,[bs.variable]:n.light,_dark:{[xi.variable]:`colors.${t}.200`,[bs.variable]:n.dark}}}}),F5e=Om(e=>{const{colorScheme:t}=e,n=NT(e);return{container:{[xi.variable]:`colors.${t}.600`,[bs.variable]:n.light,_dark:{[xi.variable]:`colors.${t}.200`,[bs.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:xi.reference}}}),B5e=Om(e=>{const{colorScheme:t}=e,n=NT(e);return{container:{[xi.variable]:`colors.${t}.600`,[bs.variable]:n.light,_dark:{[xi.variable]:`colors.${t}.200`,[bs.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:xi.reference}}}),z5e=Om(e=>{const{colorScheme:t}=e;return{container:{[xi.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[xi.variable]:"colors.gray.900",[bs.variable]:`colors.${t}.200`},color:xi.reference}}}),V5e={subtle:L5e,"left-accent":F5e,"top-accent":B5e,solid:z5e},j5e=N5e({baseStyle:D5e,variants:V5e,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:XV,defineMultiStyleConfig:U5e}=Ve(wSe.keys),Gd=ke("avatar-border-color"),_p=ke("avatar-bg"),Bg=ke("avatar-font-size"),xf=ke("avatar-size"),G5e={borderRadius:"full",border:"0.2em solid",borderColor:Gd.reference,[Gd.variable]:"white",_dark:{[Gd.variable]:"colors.gray.800"}},H5e={bg:_p.reference,fontSize:Bg.reference,width:xf.reference,height:xf.reference,lineHeight:"1",[_p.variable]:"colors.gray.200",_dark:{[_p.variable]:"colors.whiteAlpha.400"}},q5e=e=>{const{name:t,theme:n}=e,r=t?JSe({string:t}):"colors.gray.400",i=YSe(r)(n);let o="white";return i||(o="gray.800"),{bg:_p.reference,fontSize:Bg.reference,color:o,borderColor:Gd.reference,verticalAlign:"top",width:xf.reference,height:xf.reference,"&:not([data-loaded])":{[_p.variable]:r},[Gd.variable]:"colors.white",_dark:{[Gd.variable]:"colors.gray.800"}}},W5e={fontSize:Bg.reference,lineHeight:"1"},K5e=XV(e=>({badge:Nr(G5e,e),excessLabel:Nr(H5e,e),container:Nr(q5e,e),label:W5e}));function Fs(e){const t=e!=="100%"?TV[e]:void 0;return XV({container:{[xf.variable]:t??e,[Bg.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[xf.variable]:t??e,[Bg.variable]:`calc(${t??e} / 2.5)`}})}var X5e={"2xs":Fs(4),xs:Fs(6),sm:Fs(8),md:Fs(12),lg:Fs(16),xl:Fs(24),"2xl":Fs(32),full:Fs("100%")},Q5e=U5e({baseStyle:K5e,sizes:X5e,defaultProps:{size:"md"}}),Y5e={Accordion:$5e,Alert:j5e,Avatar:Q5e,Badge:yp,Breadcrumb:ZCe,Button:s5e,Checkbox:K1,CloseButton:g5e,Code:b5e,Container:S5e,Divider:T5e,Drawer:wCe,Editable:ICe,Form:DCe,FormError:jCe,FormLabel:GCe,Heading:WCe,Input:gt,Kbd:hwe,Link:gwe,List:_we,Menu:Mwe,Modal:jwe,NumberInput:Ywe,PinInput:tCe,Popover:fCe,Progress:bxe,Radio:Rxe,Select:Bxe,Skeleton:Vxe,SkipLink:Uxe,Slider:ewe,Spinner:rwe,Stat:dwe,Switch:g2e,Table:x2e,Tabs:L2e,Tag:Q2e,Textarea:lxe,Tooltip:dxe,Card:f5e,Stepper:SSe},Z5e={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},J5e={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},e3e="ltr",t3e={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},n3e={semanticTokens:Z5e,direction:e3e,...vSe,components:Y5e,styles:J5e,config:t3e};function r3e(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function i3e(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},QV=o3e(i3e);function YV(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var ZV=e=>YV(e,t=>t!=null);function a3e(e){return typeof e=="function"}function JV(e,...t){return a3e(e)?e(...t):e}function PUe(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var s3e=typeof Element<"u",l3e=typeof Map=="function",u3e=typeof Set=="function",c3e=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function uv(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!uv(e[r],t[r]))return!1;return!0}var o;if(l3e&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!uv(r.value[1],t.get(r.value[0])))return!1;return!0}if(u3e&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(c3e&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(s3e&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!uv(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var d3e=function(t,n){try{return uv(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const f3e=Bl(d3e);function ej(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:a}=mV(),s=e?QV(o,`components.${e}`):void 0,l=r||s,u=ca({theme:o,colorMode:a},(n=l==null?void 0:l.defaultProps)!=null?n:{},ZV(r3e(i,["children"]))),c=k.useRef({});if(l){const f=K_e(l)(u);f3e(c.current,f)||(c.current=f)}return c.current}function $m(e,t={}){return ej(e,t)}function h3e(e,t={}){return ej(e,t)}var p3e=new Set([...D_e,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),g3e=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function m3e(e){return g3e.has(e)||!p3e.has(e)}function y3e(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function v3e(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var b3e=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,_3e=oV(function(e){return b3e.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),S3e=_3e,x3e=function(t){return t!=="theme"},E9=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?S3e:x3e},T9=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},w3e=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return sV(n,r,i),hbe(function(){return lV(n,r,i)}),null},C3e=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=T9(t,n,r),l=s||E9(i),u=!l("as");return function(){var c=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,h=1;ht=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=YV(a,(d,f)=>F_e(f)),l=JV(e,t),u=y3e({},i,l,ZV(s),o),c=wV(u)(t.theme);return r?[c,r]:c};function Aw(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=m3e);const i=A3e({baseStyle:n}),o=T3e(e,r)(i);return J.forwardRef(function(l,u){const{colorMode:c,forced:d}=fS();return J.createElement(o,{ref:u,"data-theme":d?c:void 0,...l})})}function P3e(){const e=new Map;return new Proxy(Aw,{apply(t,n,r){return Aw(...r)},get(t,n){return e.has(n)||e.set(n,Aw(n)),e.get(n)}})}var lr=P3e();function Ii(e){return k.forwardRef(e)}function k3e(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=k.createContext(void 0);i.displayName=r;function o(){var a;const s=k.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}function I3e(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=k.useMemo(()=>$_e(n),[n]);return oe.jsxs(mbe,{theme:i,children:[oe.jsx(M3e,{root:t}),r]})}function M3e({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return oe.jsx(hV,{styles:n=>({[t]:n.__cssVars})})}k3e({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function kUe(){const{colorMode:e}=fS();return oe.jsx(hV,{styles:t=>{const n=QV(t,"styles.global"),r=JV(n,{theme:t,colorMode:e});return r?wV(r)(t):void 0}})}var R3e=(e,t)=>e.find(n=>n.id===t);function P9(e,t){const n=tj(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function tj(e,t){for(const[n,r]of Object.entries(e))if(R3e(r,t))return n}function O3e(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function $3e(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}function N3e(e,t=[]){const n=k.useRef(e);return k.useEffect(()=>{n.current=e}),k.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function D3e(e,t){const n=N3e(e);k.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function k9(e,t){const n=k.useRef(!1),r=k.useRef(!1);k.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),k.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const nj=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),yS=k.createContext({}),Nm=k.createContext(null),vS=typeof document<"u",DT=vS?k.useLayoutEffect:k.useEffect,rj=k.createContext({strict:!1});function L3e(e,t,n,r){const{visualElement:i}=k.useContext(yS),o=k.useContext(rj),a=k.useContext(Nm),s=k.useContext(nj).reducedMotion,l=k.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;k.useInsertionEffect(()=>{u&&u.update(n,a)});const c=k.useRef(!!window.HandoffAppearAnimations);return DT(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),k.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function gd(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function F3e(e,t,n){return k.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):gd(n)&&(n.current=r))},[t])}function zg(e){return typeof e=="string"||Array.isArray(e)}function bS(e){return typeof e=="object"&&typeof e.start=="function"}const LT=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],FT=["initial",...LT];function _S(e){return bS(e.animate)||FT.some(t=>zg(e[t]))}function ij(e){return!!(_S(e)||e.variants)}function B3e(e,t){if(_S(e)){const{initial:n,animate:r}=e;return{initial:n===!1||zg(n)?n:void 0,animate:zg(r)?r:void 0}}return e.inherit!==!1?t:{}}function z3e(e){const{initial:t,animate:n}=B3e(e,k.useContext(yS));return k.useMemo(()=>({initial:t,animate:n}),[I9(t),I9(n)])}function I9(e){return Array.isArray(e)?e.join(" "):e}const M9={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Vg={};for(const e in M9)Vg[e]={isEnabled:t=>M9[e].some(n=>!!t[n])};function V3e(e){for(const t in e)Vg[t]={...Vg[t],...e[t]}}const BT=k.createContext({}),oj=k.createContext({}),j3e=Symbol.for("motionComponentSymbol");function U3e({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&V3e(e);function o(s,l){let u;const c={...k.useContext(nj),...s,layoutId:G3e(s)},{isStatic:d}=c,f=z3e(s),h=r(s,d);if(!d&&vS){f.visualElement=L3e(i,h,c,t);const p=k.useContext(oj),g=k.useContext(rj).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,g,e,p))}return k.createElement(yS.Provider,{value:f},u&&f.visualElement?k.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,s,F3e(h,f.visualElement,l),h,d,f.visualElement))}const a=k.forwardRef(o);return a[j3e]=i,a}function G3e({layoutId:e}){const t=k.useContext(BT).id;return t&&e!==void 0?t+"-"+e:e}function H3e(e){function t(r,i={}){return U3e(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const q3e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function zT(e){return typeof e!="string"||e.includes("-")?!1:!!(q3e.indexOf(e)>-1||/[A-Z]/.test(e))}const Y1={};function W3e(e){Object.assign(Y1,e)}const Dm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hc=new Set(Dm);function aj(e,{layout:t,layoutId:n}){return hc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Y1[e]||e==="opacity")}const ai=e=>!!(e&&e.getVelocity),K3e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},X3e=Dm.length;function Q3e(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let a=0;at=>typeof t=="string"&&t.startsWith(e),lj=sj("--"),h3=sj("var(--"),Y3e=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Z3e=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ol=(e,t,n)=>Math.min(Math.max(n,e),t),pc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Sp={...pc,transform:e=>Ol(0,1,e)},ty={...pc,default:1},xp=e=>Math.round(e*1e5)/1e5,SS=/(-)?([\d]*\.?[\d])+/g,uj=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,J3e=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Lm(e){return typeof e=="string"}const Fm=e=>({test:t=>Lm(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vs=Fm("deg"),ba=Fm("%"),Re=Fm("px"),e4e=Fm("vh"),t4e=Fm("vw"),R9={...ba,parse:e=>ba.parse(e)/100,transform:e=>ba.transform(e*100)},O9={...pc,transform:Math.round},cj={borderWidth:Re,borderTopWidth:Re,borderRightWidth:Re,borderBottomWidth:Re,borderLeftWidth:Re,borderRadius:Re,radius:Re,borderTopLeftRadius:Re,borderTopRightRadius:Re,borderBottomRightRadius:Re,borderBottomLeftRadius:Re,width:Re,maxWidth:Re,height:Re,maxHeight:Re,size:Re,top:Re,right:Re,bottom:Re,left:Re,padding:Re,paddingTop:Re,paddingRight:Re,paddingBottom:Re,paddingLeft:Re,margin:Re,marginTop:Re,marginRight:Re,marginBottom:Re,marginLeft:Re,rotate:Vs,rotateX:Vs,rotateY:Vs,rotateZ:Vs,scale:ty,scaleX:ty,scaleY:ty,scaleZ:ty,skew:Vs,skewX:Vs,skewY:Vs,distance:Re,translateX:Re,translateY:Re,translateZ:Re,x:Re,y:Re,z:Re,perspective:Re,transformPerspective:Re,opacity:Sp,originX:R9,originY:R9,originZ:Re,zIndex:O9,fillOpacity:Sp,strokeOpacity:Sp,numOctaves:O9};function VT(e,t,n,r){const{style:i,vars:o,transform:a,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(lj(d)){o[d]=f;continue}const h=cj[d],p=Z3e(f,h);if(hc.has(d)){if(l=!0,a[d]=p,!c)continue;f!==(h.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=p):i[d]=p}if(t.transform||(l||r?i.transform=Q3e(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:h=0}=s;i.transformOrigin=`${d} ${f} ${h}`}}const jT=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dj(e,t,n){for(const r in t)!ai(t[r])&&!aj(r,n)&&(e[r]=t[r])}function n4e({transformTemplate:e},t,n){return k.useMemo(()=>{const r=jT();return VT(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function r4e(e,t,n){const r=e.style||{},i={};return dj(i,r,e),Object.assign(i,n4e(e,t,n)),e.transformValues?e.transformValues(i):i}function i4e(e,t,n){const r={},i=r4e(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const o4e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Z1(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||o4e.has(e)}let fj=e=>!Z1(e);function a4e(e){e&&(fj=t=>t.startsWith("on")?!Z1(t):e(t))}try{a4e(require("@emotion/is-prop-valid").default)}catch{}function s4e(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(fj(i)||n===!0&&Z1(i)||!t&&!Z1(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function $9(e,t,n){return typeof e=="string"?e:Re.transform(t+n*e)}function l4e(e,t,n){const r=$9(t,e.x,e.width),i=$9(n,e.y,e.height);return`${r} ${i}`}const u4e={offset:"stroke-dashoffset",array:"stroke-dasharray"},c4e={offset:"strokeDashoffset",array:"strokeDasharray"};function d4e(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?u4e:c4e;e[o.offset]=Re.transform(-r);const a=Re.transform(t),s=Re.transform(n);e[o.array]=`${a} ${s}`}function UT(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...u},c,d,f){if(VT(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:g}=e;h.transform&&(g&&(p.transform=h.transform),delete h.transform),g&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=l4e(g,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&d4e(h,a,s,l,!1)}const hj=()=>({...jT(),attrs:{}}),GT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function f4e(e,t,n,r){const i=k.useMemo(()=>{const o=hj();return UT(o,t,{enableHardwareAcceleration:!1},GT(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};dj(o,e.style,e),i.style={...o,...i.style}}return i}function h4e(e=!1){return(n,r,i,{latestValues:o},a)=>{const l=(zT(n)?f4e:i4e)(r,o,a,n),c={...s4e(r,typeof n=="string",e),...l,ref:i},{children:d}=r,f=k.useMemo(()=>ai(d)?d.get():d,[d]);return k.createElement(n,{...c,children:f})}}const HT=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function pj(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const gj=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function mj(e,t,n,r){pj(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gj.has(i)?i:HT(i),t.attrs[i])}function qT(e,t){const{style:n}=e,r={};for(const i in n)(ai(n[i])||t.style&&ai(t.style[i])||aj(i,e))&&(r[i]=n[i]);return r}function yj(e,t){const n=qT(e,t);for(const r in e)if(ai(e[r])||ai(t[r])){const i=Dm.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function WT(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function vj(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const J1=e=>Array.isArray(e),p4e=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),g4e=e=>J1(e)?e[e.length-1]||0:e;function cv(e){const t=ai(e)?e.get():e;return p4e(t)?t.toValue():t}function m4e({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:y4e(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const bj=e=>(t,n)=>{const r=k.useContext(yS),i=k.useContext(Nm),o=()=>m4e(e,t,r,i);return n?o():vj(o)};function y4e(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=cv(o[f]);let{initial:a,animate:s}=e;const l=_S(e),u=ij(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let c=n?n.initial===!1:!1;c=c||a===!1;const d=c?s:a;return d&&typeof d!="boolean"&&!bS(d)&&(Array.isArray(d)?d:[d]).forEach(h=>{const p=WT(e,h);if(!p)return;const{transitionEnd:g,transition:_,...b}=p;for(const y in b){let m=b[y];if(Array.isArray(m)){const v=c?m.length-1:0;m=m[v]}m!==null&&(i[y]=m)}for(const y in g)i[y]=g[y]}),i}const cn=e=>e;class N9{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function v4e(e){let t=new N9,n=new N9,r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,c=!1)=>{const d=c&&i,f=d?t:n;return u&&a.add(l),f.add(l)&&d&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(d[f]=v4e(()=>n=!0),d),{}),a=d=>o[d].process(i),s=()=>{const d=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(d-i.timestamp,b4e),1),i.timestamp=d,i.isProcessing=!0,ny.forEach(a),i.isProcessing=!1,n&&t&&(r=!1,e(s))},l=()=>{n=!0,r=!0,i.isProcessing||e(s)};return{schedule:ny.reduce((d,f)=>{const h=o[f];return d[f]=(p,g=!1,_=!1)=>(n||l(),h.schedule(p,g,_)),d},{}),cancel:d=>ny.forEach(f=>o[f].cancel(d)),state:i,steps:o}}const{schedule:Rt,cancel:_s,state:zn,steps:Pw}=_4e(typeof requestAnimationFrame<"u"?requestAnimationFrame:cn,!0),S4e={useVisualState:bj({scrapeMotionValuesFromProps:yj,createRenderState:hj,onMount:(e,t,{renderState:n,latestValues:r})=>{Rt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Rt.render(()=>{UT(n,r,{enableHardwareAcceleration:!1},GT(t.tagName),e.transformTemplate),mj(t,n)})}})},x4e={useVisualState:bj({scrapeMotionValuesFromProps:qT,createRenderState:jT})};function w4e(e,{forwardMotionProps:t=!1},n,r){return{...zT(e)?S4e:x4e,preloadedFeatures:n,useRender:h4e(t),createVisualElement:r,Component:e}}function es(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const _j=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xS(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const C4e=e=>t=>_j(t)&&e(t,xS(t));function os(e,t,n,r){return es(e,t,C4e(n),r)}const E4e=(e,t)=>n=>t(e(n)),_l=(...e)=>e.reduce(E4e);function Sj(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const D9=Sj("dragHorizontal"),L9=Sj("dragVertical");function xj(e){let t=!1;if(e==="y")t=L9();else if(e==="x")t=D9();else{const n=D9(),r=L9();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function wj(){const e=xj(!0);return e?(e(),!1):!0}class Xl{constructor(t){this.isMounted=!1,this.node=t}update(){}}function F9(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,a)=>{if(o.type==="touch"||wj())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&Rt.update(()=>s[r](o,a))};return os(e.current,n,i,{passive:!e.getProps()[r]})}class T4e extends Xl{mount(){this.unmount=_l(F9(this.node,!0),F9(this.node,!1))}unmount(){}}class A4e extends Xl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_l(es(this.node.current,"focus",()=>this.onFocus()),es(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Cj=(e,t)=>t?e===t?!0:Cj(e,t.parentElement):!1;function kw(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,xS(n))}class P4e extends Xl{constructor(){super(...arguments),this.removeStartListeners=cn,this.removeEndListeners=cn,this.removeAccessibleListeners=cn,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=os(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();Rt.update(()=>{Cj(this.node.current,s.target)?u&&u(s,l):c&&c(s,l)})},{passive:!(r.onTap||r.onPointerUp)}),a=os(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_l(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||kw("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&Rt.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=es(this.node.current,"keyup",a),kw("down",(s,l)=>{this.startPress(s,l)})},n=es(this.node.current,"keydown",t),r=()=>{this.isPressing&&kw("cancel",(o,a)=>this.cancelPress(o,a))},i=es(this.node.current,"blur",r);this.removeAccessibleListeners=_l(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Rt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!wj()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Rt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=os(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=es(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_l(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const p3=new WeakMap,Iw=new WeakMap,k4e=e=>{const t=p3.get(e.target);t&&t(e)},I4e=e=>{e.forEach(k4e)};function M4e({root:e,...t}){const n=e||document;Iw.has(n)||Iw.set(n,{});const r=Iw.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(I4e,{root:e,...t})),r[i]}function R4e(e,t,n){const r=M4e(t);return p3.set(e,n),r.observe(e),()=>{p3.delete(e),r.unobserve(e)}}const O4e={some:0,all:1};class $4e extends Xl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:O4e[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return R4e(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(N4e(t,n))&&this.startObserver()}unmount(){}}function N4e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const D4e={inView:{Feature:$4e},tap:{Feature:P4e},focus:{Feature:A4e},hover:{Feature:T4e}};function Ej(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function F4e(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function wS(e,t,n){const r=e.getProps();return WT(r,t,n!==void 0?n:r.custom,L4e(e),F4e(e))}const B4e="framerAppearId",z4e="data-"+HT(B4e);let V4e=cn,KT=cn;const Sl=e=>e*1e3,as=e=>e/1e3,j4e={current:!1},Tj=e=>Array.isArray(e)&&typeof e[0]=="number";function Aj(e){return!!(!e||typeof e=="string"&&Pj[e]||Tj(e)||Array.isArray(e)&&e.every(Aj))}const Yh=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Pj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yh([0,.65,.55,1]),circOut:Yh([.55,0,1,.45]),backIn:Yh([.31,.01,.66,-.59]),backOut:Yh([.33,1.53,.69,.99])};function kj(e){if(e)return Tj(e)?Yh(e):Array.isArray(e)?e.map(kj):Pj[e]}function U4e(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=kj(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function G4e(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Ij=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,H4e=1e-7,q4e=12;function W4e(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Ij(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>H4e&&++sW4e(o,0,1,e,n);return o=>o===0||o===1?o:Ij(i(o),t,r)}const K4e=Bm(.42,0,1,1),X4e=Bm(0,0,.58,1),Mj=Bm(.42,0,.58,1),Q4e=e=>Array.isArray(e)&&typeof e[0]!="number",Rj=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Oj=e=>t=>1-e(1-t),$j=e=>1-Math.sin(Math.acos(e)),XT=Oj($j),Y4e=Rj(XT),Nj=Bm(.33,1.53,.69,.99),QT=Oj(Nj),Z4e=Rj(QT),J4e=e=>(e*=2)<1?.5*QT(e):.5*(2-Math.pow(2,-10*(e-1))),eEe={linear:cn,easeIn:K4e,easeInOut:Mj,easeOut:X4e,circIn:$j,circInOut:Y4e,circOut:XT,backIn:QT,backInOut:Z4e,backOut:Nj,anticipate:J4e},B9=e=>{if(Array.isArray(e)){KT(e.length===4);const[t,n,r,i]=e;return Bm(t,n,r,i)}else if(typeof e=="string")return eEe[e];return e},YT=(e,t)=>n=>!!(Lm(n)&&J3e.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Dj=(e,t,n)=>r=>{if(!Lm(r))return r;const[i,o,a,s]=r.match(SS);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},tEe=e=>Ol(0,255,e),Mw={...pc,transform:e=>Math.round(tEe(e))},$u={test:YT("rgb","red"),parse:Dj("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mw.transform(e)+", "+Mw.transform(t)+", "+Mw.transform(n)+", "+xp(Sp.transform(r))+")"};function nEe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const g3={test:YT("#"),parse:nEe,transform:$u.transform},md={test:YT("hsl","hue"),parse:Dj("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ba.transform(xp(t))+", "+ba.transform(xp(n))+", "+xp(Sp.transform(r))+")"},Ir={test:e=>$u.test(e)||g3.test(e)||md.test(e),parse:e=>$u.test(e)?$u.parse(e):md.test(e)?md.parse(e):g3.parse(e),transform:e=>Lm(e)?e:e.hasOwnProperty("red")?$u.transform(e):md.transform(e)},Zt=(e,t,n)=>-n*e+n*t+e;function Rw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rEe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Rw(l,s,e+1/3),o=Rw(l,s,e),a=Rw(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Ow=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},iEe=[g3,$u,md],oEe=e=>iEe.find(t=>t.test(e));function z9(e){const t=oEe(e);let n=t.parse(e);return t===md&&(n=rEe(n)),n}const Lj=(e,t)=>{const n=z9(e),r=z9(t),i={...n};return o=>(i.red=Ow(n.red,r.red,o),i.green=Ow(n.green,r.green,o),i.blue=Ow(n.blue,r.blue,o),i.alpha=Zt(n.alpha,r.alpha,o),$u.transform(i))};function aEe(e){var t,n;return isNaN(e)&&Lm(e)&&(((t=e.match(SS))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(uj))===null||n===void 0?void 0:n.length)||0)>0}const Fj={regex:Y3e,countKey:"Vars",token:"${v}",parse:cn},Bj={regex:uj,countKey:"Colors",token:"${c}",parse:Ir.parse},zj={regex:SS,countKey:"Numbers",token:"${n}",parse:pc.parse};function $w(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function eb(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&$w(n,Fj),$w(n,Bj),$w(n,zj),n}function Vj(e){return eb(e).values}function jj(e){const{values:t,numColors:n,numVars:r,tokenised:i}=eb(e),o=t.length;return a=>{let s=i;for(let l=0;ltypeof e=="number"?0:e;function lEe(e){const t=Vj(e);return jj(e)(t.map(sEe))}const $l={test:aEe,parse:Vj,createTransformer:jj,getAnimatableNone:lEe},Uj=(e,t)=>n=>`${n>0?t:e}`;function Gj(e,t){return typeof e=="number"?n=>Zt(e,t,n):Ir.test(e)?Lj(e,t):e.startsWith("var(")?Uj(e,t):qj(e,t)}const Hj=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>Gj(o,t[a]));return o=>{for(let a=0;a{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Gj(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},qj=(e,t)=>{const n=$l.createTransformer(t),r=eb(e),i=eb(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?_l(Hj(r.values,i.values),n):Uj(e,t)},jg=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},V9=(e,t)=>n=>Zt(e,t,n);function cEe(e){return typeof e=="number"?V9:typeof e=="string"?Ir.test(e)?Lj:qj:Array.isArray(e)?Hj:typeof e=="object"?uEe:V9}function dEe(e,t,n){const r=[],i=n||cEe(e[0]),o=e.length-1;for(let a=0;at[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=dEe(t,r,i),s=a.length,l=u=>{let c=0;if(s>1)for(;cl(Ol(e[0],e[o-1],u)):l}function fEe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=jg(0,t,r);e.push(Zt(n,1,i))}}function hEe(e){const t=[0];return fEe(t,e.length-1),t}function pEe(e,t){return e.map(n=>n*t)}function gEe(e,t){return e.map(()=>t||Mj).splice(0,e.length-1)}function tb({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Q4e(r)?r.map(B9):B9(r),o={done:!1,value:t[0]},a=pEe(n&&n.length===t.length?n:hEe(t),e),s=Wj(a,t,{ease:Array.isArray(i)?i:gEe(t,i)});return{calculatedDuration:e,next:l=>(o.value=s(l),o.done=l>=e,o)}}function Kj(e,t){return t?e*(1e3/t):0}const mEe=5;function Xj(e,t,n){const r=Math.max(t-mEe,0);return Kj(n-e(r),t-r)}const Nw=.001,yEe=.01,j9=10,vEe=.05,bEe=1;function _Ee({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;V4e(e<=Sl(j9));let a=1-t;a=Ol(vEe,bEe,a),e=Ol(yEe,j9,as(e)),a<1?(i=u=>{const c=u*a,d=c*e,f=c-n,h=m3(u,a),p=Math.exp(-d);return Nw-f/h*p},o=u=>{const d=u*a*e,f=d*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,p=Math.exp(-d),g=m3(Math.pow(u,2),a);return(-i(u)+Nw>0?-1:1)*((f-h)*p)/g}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Nw+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const s=5/e,l=xEe(i,o,s);if(e=Sl(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const SEe=12;function xEe(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function EEe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!U9(e,CEe)&&U9(e,wEe)){const n=_Ee(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Qj({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=EEe(r),h=c?-as(c):0,p=l/(2*Math.sqrt(s*u)),g=o-i,_=as(Math.sqrt(s/u)),b=Math.abs(g)<5;n||(n=b?.01:2),t||(t=b?.005:.5);let y;if(p<1){const m=m3(_,p);y=v=>{const S=Math.exp(-p*_*v);return o-S*((h+p*_*g)/m*Math.sin(m*v)+g*Math.cos(m*v))}}else if(p===1)y=m=>o-Math.exp(-_*m)*(g+(h+_*g)*m);else{const m=_*Math.sqrt(p*p-1);y=v=>{const S=Math.exp(-p*_*v),w=Math.min(m*v,300);return o-S*((h+p*_*g)*Math.sinh(w)+m*g*Math.cosh(w))/m}}return{calculatedDuration:f&&d||null,next:m=>{const v=y(m);if(f)a.done=m>=d;else{let S=h;m!==0&&(p<1?S=Xj(y,m,v):S=0);const w=Math.abs(S)<=n,C=Math.abs(o-v)<=t;a.done=w&&C}return a.value=a.done?o:v,a}}}function G9({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=x=>s!==void 0&&xl,p=x=>s===void 0?l:l===void 0||Math.abs(s-x)-g*Math.exp(-x/r),m=x=>b+y(x),v=x=>{const P=y(x),E=m(x);f.done=Math.abs(P)<=u,f.value=f.done?b:E};let S,w;const C=x=>{h(f.value)&&(S=x,w=Qj({keyframes:[f.value,p(f.value)],velocity:Xj(m,x,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:x=>{let P=!1;return!w&&S===void 0&&(P=!0,v(x),C(x)),S!==void 0&&x>S?w.next(x-S):(!P&&v(x),f)}}}const TEe=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Rt.update(t,!0),stop:()=>_s(t),now:()=>zn.isProcessing?zn.timestamp:performance.now()}},H9=2e4;function q9(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=H9?1/0:t}const AEe={decay:G9,inertia:G9,tween:tb,keyframes:tb,spring:Qj};function nb({autoplay:e=!0,delay:t=0,driver:n=TEe,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let h=1,p=!1,g,_;const b=()=>{_=new Promise(B=>{g=B})};b();let y;const m=AEe[i]||tb;let v;m!==tb&&typeof r[0]!="number"&&(v=Wj([0,100],r,{clamp:!1}),r=[0,100]);const S=m({...f,keyframes:r});let w;s==="mirror"&&(w=m({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let C="idle",x=null,P=null,E=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=q9(S));const{calculatedDuration:I}=S;let N=1/0,M=1/0;I!==null&&(N=I+a,M=N*(o+1)-a);let T=0;const A=B=>{if(P===null)return;h>0&&(P=Math.min(P,B)),h<0&&(P=Math.min(B-M/h,P)),x!==null?T=x:T=Math.round(B-P)*h;const U=T-t*(h>=0?1:-1),j=h>=0?U<0:U>M;T=Math.max(U,0),C==="finished"&&x===null&&(T=M);let q=T,Y=S;if(o){const ee=T/N;let re=Math.floor(ee),fe=ee%1;!fe&&ee>=1&&(fe=1),fe===1&&re--,re=Math.min(re,o+1);const Se=!!(re%2);Se&&(s==="reverse"?(fe=1-fe,a&&(fe-=a/N)):s==="mirror"&&(Y=w));let Me=Ol(0,1,fe);T>M&&(Me=s==="reverse"&&Se?1:0),q=Me*N}const Z=j?{done:!1,value:r[0]}:Y.next(q);v&&(Z.value=v(Z.value));let{done:V}=Z;!j&&I!==null&&(V=h>=0?T>=M:T<=0);const K=x===null&&(C==="finished"||C==="running"&&V);return d&&d(Z.value),K&&$(),Z},R=()=>{y&&y.stop(),y=void 0},D=()=>{C="idle",R(),g(),b(),P=E=null},$=()=>{C="finished",c&&c(),R(),g()},L=()=>{if(p)return;y||(y=n(A));const B=y.now();l&&l(),x!==null?P=B-x:(!P||C==="finished")&&(P=B),C==="finished"&&b(),E=P,x=null,C="running",y.start()};e&&L();const O={then(B,U){return _.then(B,U)},get time(){return as(T)},set time(B){B=Sl(B),T=B,x!==null||!y||h===0?x=B:P=y.now()-B/h},get duration(){const B=S.calculatedDuration===null?q9(S):S.calculatedDuration;return as(B)},get speed(){return h},set speed(B){B===h||!y||(h=B,O.time=as(T))},get state(){return C},play:L,pause:()=>{C="paused",x=T},stop:()=>{p=!0,C!=="idle"&&(C="idle",u&&u(),D())},cancel:()=>{E!==null&&A(E),D()},complete:()=>{C="finished"},sample:B=>(P=0,A(B))};return O}function PEe(e){let t;return()=>(t===void 0&&(t=e()),t)}const kEe=PEe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),IEe=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ry=10,MEe=2e4,REe=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Aj(t.ease);function OEe(e,t,{onUpdate:n,onComplete:r,...i}){if(!(kEe()&&IEe.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let a=!1,s,l;const u=()=>{l=new Promise(y=>{s=y})};u();let{keyframes:c,duration:d=300,ease:f,times:h}=i;if(REe(t,i)){const y=nb({...i,repeat:0,delay:0});let m={done:!1,value:c[0]};const v=[];let S=0;for(;!m.done&&Sp.cancel(),_=()=>{Rt.update(g),s(),u()};return p.onfinish=()=>{e.set(G4e(c,i)),r&&r(),_()},{then(y,m){return l.then(y,m)},attachTimeline(y){return p.timeline=y,p.onfinish=null,cn},get time(){return as(p.currentTime||0)},set time(y){p.currentTime=Sl(y)},get speed(){return p.playbackRate},set speed(y){p.playbackRate=y},get duration(){return as(d)},play:()=>{a||(p.play(),_s(g))},pause:()=>p.pause(),stop:()=>{if(a=!0,p.playState==="idle")return;const{currentTime:y}=p;if(y){const m=nb({...i,autoplay:!1});e.setWithVelocity(m.sample(y-ry).value,m.sample(y).value,ry)}_()},complete:()=>p.finish(),cancel:_}}function $Ee({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:cn,pause:cn,stop:cn,then:o=>(o(),Promise.resolve()),cancel:cn,complete:cn});return t?nb({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const NEe={type:"spring",stiffness:500,damping:25,restSpeed:10},DEe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LEe={type:"keyframes",duration:.8},FEe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BEe=(e,{keyframes:t})=>t.length>2?LEe:hc.has(e)?e.startsWith("scale")?DEe(t[1]):NEe:FEe,y3=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&($l.test(t)||t==="0")&&!t.startsWith("url(")),zEe=new Set(["brightness","contrast","saturate","opacity"]);function VEe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(SS)||[];if(!r)return e;const i=n.replace(r,"");let o=zEe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const jEe=/([a-z-]*)\(.*?\)/g,v3={...$l,getAnimatableNone:e=>{const t=e.match(jEe);return t?t.map(VEe).join(" "):e}},UEe={...cj,color:Ir,backgroundColor:Ir,outlineColor:Ir,fill:Ir,stroke:Ir,borderColor:Ir,borderTopColor:Ir,borderRightColor:Ir,borderBottomColor:Ir,borderLeftColor:Ir,filter:v3,WebkitFilter:v3},ZT=e=>UEe[e];function Yj(e,t){let n=ZT(e);return n!==v3&&(n=$l),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Zj=e=>/^0[^.\s]+$/.test(e);function GEe(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Zj(e)}function HEe(e,t,n,r){const i=y3(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const a=r.from!==void 0?r.from:e.get();let s;const l=[];for(let u=0;ui=>{const o=Jj(r,e)||{},a=o.delay||r.delay||0;let{elapsed:s=0}=r;s=s-Sl(a);const l=HEe(t,e,n,o),u=l[0],c=l[l.length-1],d=y3(e,u),f=y3(e,c);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-s,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(qEe(o)||(h={...h,...BEe(e,h)}),h.duration&&(h.duration=Sl(h.duration)),h.repeatDelay&&(h.repeatDelay=Sl(h.repeatDelay)),!d||!f||j4e.current||o.type===!1)return $Ee(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=OEe(t,e,h);if(p)return p}return nb(h)};function rb(e){return!!(ai(e)&&e.add)}const eU=e=>/^\-?\d*\.?\d+$/.test(e);function eA(e,t){e.indexOf(t)===-1&&e.push(t)}function tA(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class nA{constructor(){this.subscriptions=[]}add(t){return eA(this.subscriptions,t),()=>tA(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class KEe{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:a}=zn;this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,Rt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Rt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=WEe(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new nA);const r=this.events[t].add(n);return t==="change"?()=>{r(),Rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Kj(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wf(e,t){return new KEe(e,t)}const tU=e=>t=>t.test(e),XEe={test:e=>e==="auto",parse:e=>e},nU=[pc,Re,ba,Vs,t4e,e4e,XEe],Sh=e=>nU.find(tU(e)),QEe=[...nU,Ir,$l],YEe=e=>QEe.find(tU(e));function ZEe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wf(n))}function JEe(e,t){const n=wS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=g4e(o[a]);ZEe(e,a,s)}}function eTe(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(a)for(let s=0;sl.remove(d))),u.push(g)}return a&&Promise.all(u).then(()=>{a&&JEe(e,a)}),u}function b3(e,t,n={}){const r=wS(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(rU(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return iTe(e,t,u+l,c,d,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,u]=s==="beforeChildren"?[o,a]:[a,o];return l().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function iTe(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(oTe).forEach((u,c)=>{u.notify("AnimationStart",t),a.push(b3(u,t,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function oTe(e,t){return e.sortNodePosition(t)}function aTe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>b3(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=b3(e,t,n);else{const i=typeof t=="function"?wS(e,t,n.custom):t;r=Promise.all(rU(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const sTe=[...LT].reverse(),lTe=LT.length;function uTe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>aTe(e,n,r)))}function cTe(e){let t=uTe(e);const n=fTe();let r=!0;const i=(l,u)=>{const c=wS(e,u);if(c){const{transition:d,transitionEnd:f,...h}=c;l={...l,...h,...f}}return l};function o(l){t=l(e)}function a(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},g=1/0;for(let b=0;bg&&S;const E=Array.isArray(v)?v:[v];let I=E.reduce(i,{});w===!1&&(I={});const{prevResolvedValues:N={}}=m,M={...N,...I},T=A=>{P=!0,h.delete(A),m.needsAnimating[A]=!0};for(const A in M){const R=I[A],D=N[A];p.hasOwnProperty(A)||(R!==D?J1(R)&&J1(D)?!Ej(R,D)||x?T(A):m.protectedKeys[A]=!0:R!==void 0?T(A):h.add(A):R!==void 0&&h.has(A)?T(A):m.protectedKeys[A]=!0)}m.prevProp=v,m.prevResolvedValues=I,m.isActive&&(p={...p,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&!C&&f.push(...E.map(A=>({animation:A,options:{type:y,...l}})))}if(h.size){const b={};h.forEach(y=>{const m=e.getBaseTarget(y);m!==void 0&&(b[y]=m)}),f.push({animation:b})}let _=!!f.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(f):Promise.resolve()}function s(l,u,c){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const f=a(c,l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function dTe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ej(t,e):!1}function uu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fTe(){return{animate:uu(!0),whileInView:uu(),whileHover:uu(),whileTap:uu(),whileDrag:uu(),whileFocus:uu(),exit:uu()}}class hTe extends Xl{constructor(t){super(t),t.animationState||(t.animationState=cTe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),bS(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let pTe=0;class gTe extends Xl{constructor(){super(...arguments),this.id=pTe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const mTe={animation:{Feature:hTe},exit:{Feature:gTe}},W9=(e,t)=>Math.abs(e-t);function yTe(e,t){const n=W9(e.x,t.x),r=W9(e.y,t.y);return Math.sqrt(n**2+r**2)}class iU{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Lw(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=yTe(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:f}=u,{timestamp:h}=zn;this.history.push({...f,timestamp:h});const{onStart:p,onMove:g}=this.handlers;c||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Dw(c,this.transformPagePoint),Rt.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:f}=this.handlers,h=Lw(u.type==="pointercancel"?this.lastMoveEventInfo:Dw(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,h),f&&f(u,h)},!_j(t))return;this.handlers=n,this.transformPagePoint=r;const i=xS(t),o=Dw(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=zn;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Lw(o,this.history)),this.removeListeners=_l(os(window,"pointermove",this.handlePointerMove),os(window,"pointerup",this.handlePointerUp),os(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_s(this.updatePoint)}}function Dw(e,t){return t?{point:t(e.point)}:e}function K9(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lw({point:e},t){return{point:e,delta:K9(e,oU(t)),offset:K9(e,vTe(t)),velocity:bTe(t,.1)}}function vTe(e){return e[0]}function oU(e){return e[e.length-1]}function bTe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=oU(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Sl(t)));)n--;if(!r)return{x:0,y:0};const o=as(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ti(e){return e.max-e.min}function _3(e,t=0,n=.01){return Math.abs(e-t)<=n}function X9(e,t,n,r=.5){e.origin=r,e.originPoint=Zt(t.min,t.max,e.origin),e.scale=Ti(n)/Ti(t),(_3(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Zt(n.min,n.max,e.origin)-e.originPoint,(_3(e.translate)||isNaN(e.translate))&&(e.translate=0)}function wp(e,t,n,r){X9(e.x,t.x,n.x,r?r.originX:void 0),X9(e.y,t.y,n.y,r?r.originY:void 0)}function Q9(e,t,n){e.min=n.min+t.min,e.max=e.min+Ti(t)}function _Te(e,t,n){Q9(e.x,t.x,n.x),Q9(e.y,t.y,n.y)}function Y9(e,t,n){e.min=t.min-n.min,e.max=e.min+Ti(t)}function Cp(e,t,n){Y9(e.x,t.x,n.x),Y9(e.y,t.y,n.y)}function STe(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Zt(n,e,r.max):Math.min(e,n)),e}function Z9(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function xTe(e,{top:t,left:n,bottom:r,right:i}){return{x:Z9(e.x,n,i),y:Z9(e.y,t,r)}}function J9(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=jg(t.min,t.max-r,e.min):r>i&&(n=jg(e.min,e.max-i,t.min)),Ol(0,1,n)}function ETe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const S3=.35;function TTe(e=S3){return e===!1?e=0:e===!0&&(e=S3),{x:eM(e,"left","right"),y:eM(e,"top","bottom")}}function eM(e,t,n){return{min:tM(e,t),max:tM(e,n)}}function tM(e,t){return typeof e=="number"?e:e[t]||0}const nM=()=>({translate:0,scale:1,origin:0,originPoint:0}),yd=()=>({x:nM(),y:nM()}),rM=()=>({min:0,max:0}),xn=()=>({x:rM(),y:rM()});function Xo(e){return[e("x"),e("y")]}function aU({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ATe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function PTe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fw(e){return e===void 0||e===1}function x3({scale:e,scaleX:t,scaleY:n}){return!Fw(e)||!Fw(t)||!Fw(n)}function vu(e){return x3(e)||sU(e)||e.z||e.rotate||e.rotateX||e.rotateY}function sU(e){return iM(e.x)||iM(e.y)}function iM(e){return e&&e!=="0%"}function ib(e,t,n){const r=e-n,i=t*r;return n+i}function oM(e,t,n,r,i){return i!==void 0&&(e=ib(e,i,r)),ib(e,n,r)+t}function w3(e,t=0,n=1,r,i){e.min=oM(e.min,t,n,r,i),e.max=oM(e.max,t,n,r,i)}function lU(e,{x:t,y:n}){w3(e.x,t.translate,t.scale,t.originPoint),w3(e.y,n.translate,n.scale,n.originPoint)}function kTe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function Ks(e,t){e.min=e.min+t,e.max=e.max+t}function sM(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=Zt(e.min,e.max,o);w3(e,t[n],t[r],a,t.scale)}const ITe=["x","scaleX","originX"],MTe=["y","scaleY","originY"];function vd(e,t){sM(e.x,t,ITe),sM(e.y,t,MTe)}function uU(e,t){return aU(PTe(e.getBoundingClientRect(),t))}function RTe(e,t,n){const r=uU(e,n),{scroll:i}=t;return i&&(Ks(r.x,i.offset.x),Ks(r.y,i.offset.y)),r}const OTe=new WeakMap;class $Te{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(xS(l,"page").point)},o=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:f}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=xj(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xo(p=>{let g=this.getAxisMotionValue(p).get()||0;if(ba.test(g)){const{projection:_}=this.visualElement;if(_&&_.layout){const b=_.layout.layoutBox[p];b&&(g=Ti(b)*(parseFloat(g)/100))}}this.originPoint[p]=g}),f&&Rt.update(()=>f(l,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:f,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(d&&this.currentDirection===null){this.currentDirection=NTe(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),h&&h(l,u)},s=(l,u)=>this.stop(l,u);this.panSession=new iU(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Rt.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!iy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=STe(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&gd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=xTe(r.layoutBox,t):this.constraints=!1,this.elastic=TTe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xo(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=ETe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gd(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=RTe(r,i.root,this.visualElement.getTransformPagePoint());let a=wTe(i.layout.layoutBox,o);if(n){const s=n(ATe(a));this.hasMutatedConstraints=!!s,s&&(a=aU(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Xo(c=>{if(!iy(c,n,this.currentDirection))return;let d=l&&l[c]||{};a&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(JT(t,r,0,n))}stopAnimation(){Xo(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xo(n=>{const{drag:r}=this.getProps();if(!iy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Zt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gd(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Xo(a=>{const s=this.getAxisMotionValue(a);if(s){const l=s.get();i[a]=CTe({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xo(a=>{if(!iy(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(Zt(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;OTe.set(this.visualElement,this);const t=this.visualElement.current,n=os(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();gd(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const a=es(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xo(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=S3,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function iy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function NTe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class DTe extends Xl{constructor(t){super(t),this.removeGroupControls=cn,this.removeListeners=cn,this.controls=new $Te(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const lM=e=>(t,n)=>{e&&Rt.update(()=>e(t,n))};class LTe extends Xl{constructor(){super(...arguments),this.removePointerDownListener=cn}onPointerDown(t){this.session=new iU(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:lM(t),onStart:lM(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Rt.update(()=>i(o,a))}}}mount(){this.removePointerDownListener=os(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function FTe(){const e=k.useContext(Nm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=k.useId();return k.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function BTe(){return zTe(k.useContext(Nm))}function zTe(e){return e===null?!0:e.isPresent}const dv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function uM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Re.test(e))e=parseFloat(e);else return e;const n=uM(e,t.target.x),r=uM(e,t.target.y);return`${n}% ${r}%`}},VTe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=$l.parse(e);if(i.length>5)return r;const o=$l.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const u=Zt(s,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),o(i)}};class jTe extends J.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;W3e(UTe),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),dv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Rt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function cU(e){const[t,n]=FTe(),r=k.useContext(BT);return J.createElement(jTe,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(oj),isPresent:t,safeToRemove:n})}const UTe={borderRadius:{...xh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xh,borderTopRightRadius:xh,borderBottomLeftRadius:xh,borderBottomRightRadius:xh,boxShadow:VTe},dU=["TopLeft","TopRight","BottomLeft","BottomRight"],GTe=dU.length,cM=e=>typeof e=="string"?parseFloat(e):e,dM=e=>typeof e=="number"||Re.test(e);function HTe(e,t,n,r,i,o){i?(e.opacity=Zt(0,n.opacity!==void 0?n.opacity:1,qTe(r)),e.opacityExit=Zt(t.opacity!==void 0?t.opacity:1,0,WTe(r))):o&&(e.opacity=Zt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(jg(e,t,r))}function hM(e,t){e.min=t.min,e.max=t.max}function Li(e,t){hM(e.x,t.x),hM(e.y,t.y)}function pM(e,t,n,r,i){return e-=t,e=ib(e,1/n,r),i!==void 0&&(e=ib(e,1/i,r)),e}function KTe(e,t=0,n=1,r=.5,i,o=e,a=e){if(ba.test(t)&&(t=parseFloat(t),t=Zt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Zt(o.min,o.max,r);e===o&&(s-=t),e.min=pM(e.min,t,n,s,i),e.max=pM(e.max,t,n,s,i)}function gM(e,t,[n,r,i],o,a){KTe(e,t[n],t[r],t[i],t.scale,o,a)}const XTe=["x","scaleX","originX"],QTe=["y","scaleY","originY"];function mM(e,t,n,r){gM(e.x,t,XTe,n?n.x:void 0,r?r.x:void 0),gM(e.y,t,QTe,n?n.y:void 0,r?r.y:void 0)}function yM(e){return e.translate===0&&e.scale===1}function hU(e){return yM(e.x)&&yM(e.y)}function YTe(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function pU(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function vM(e){return Ti(e.x)/Ti(e.y)}class ZTe{constructor(){this.members=[]}add(t){eA(this.members,t),t.scheduleRender()}remove(t){if(tA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function bM(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const JTe=(e,t)=>e.depth-t.depth;class eAe{constructor(){this.children=[],this.isDirty=!1}add(t){eA(this.children,t),this.isDirty=!0}remove(t){tA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(JTe),this.isDirty=!1,this.children.forEach(t)}}function tAe(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(_s(r),e(o-t))};return Rt.read(r,!0),()=>_s(r)}function nAe(e){window.MotionDebug&&window.MotionDebug.record(e)}function rAe(e){return e instanceof SVGElement&&e.tagName!=="svg"}function iAe(e,t,n){const r=ai(e)?e:wf(e);return r.start(JT("",r,t,n)),r.animation}const _M=["","X","Y","Z"],SM=1e3;let oAe=0;const bu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function gU({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=oAe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{bu.totalNodes=bu.resolvedTargetDeltas=bu.recalculatedProjection=0,this.nodes.forEach(lAe),this.nodes.forEach(hAe),this.nodes.forEach(pAe),this.nodes.forEach(uAe),nAe(bu)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=tAe(f,250),dv.hasAnimatedSinceResize&&(dv.hasAnimatedSinceResize=!1,this.nodes.forEach(wM))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||bAe,{onLayoutAnimationStart:_,onLayoutAnimationComplete:b}=c.getProps(),y=!this.targetLayout||!pU(this.targetLayout,p)||h,m=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||m||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,m);const v={...Jj(g,"layout"),onPlay:_,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v)}else f||wM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,_s(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gAe),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(cAe),this.sharedNodes.forEach(mAe)}scheduleUpdateProjection(){Rt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=v/1e3;CM(d.x,a.x,S),CM(d.y,a.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cp(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yAe(this.relativeTarget,this.relativeTargetOrigin,f,S),m&&YTe(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=xn()),Li(m,this.relativeTarget)),g&&(this.animationValues=c,HTe(c,u,this.latestValues,S,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(_s(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rt.update(()=>{dv.hasAnimatedSinceResize=!0,this.currentAnimation=iAe(0,SM,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(SM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&mU(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||xn();const d=Ti(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=Ti(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Li(s,l),vd(s,c),wp(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new ZTe),this.sharedNodes.get(a).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let c=0;c<_M.length;c++){const d="rotate"+_M[c];l[d]&&(u[d]=l[d],a.setStaticValue(d,0))}a.render();for(const c in u)a.setStaticValue(c,u[c]);a.scheduleRender()}getProjectionStyles(a={}){var s,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=cv(a.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=cv(a.pointerEvents)||""),this.hasProjected&&!vu(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=bM(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Y1){if(f[g]===void 0)continue;const{correct:_,applyTo:b}=Y1[g],y=u.transform==="none"?f[g]:_(f[g],d);if(b){const m=b.length;for(let v=0;v{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xM),this.root.sharedNodes.clear()}}}function aAe(e){e.updateLayout()}function sAe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?Xo(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],h=Ti(f);f.min=r[d].min,f.max=f.min+h}):mU(o,n.layoutBox,r)&&Xo(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],h=Ti(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const s=yd();wp(s,r,n.layoutBox);const l=yd();a?wp(l,e.applyTransform(i,!0),n.measuredBox):wp(l,r,n.layoutBox);const u=!hU(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=xn();Cp(p,n.layoutBox,f.layoutBox);const g=xn();Cp(g,r,h.layoutBox),pU(p,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function lAe(e){bu.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function uAe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cAe(e){e.clearSnapshot()}function xM(e){e.clearMeasurements()}function dAe(e){e.isLayoutDirty=!1}function fAe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hAe(e){e.resolveTargetDelta()}function pAe(e){e.calcProjection()}function gAe(e){e.resetRotation()}function mAe(e){e.removeLeadSnapshot()}function CM(e,t,n){e.translate=Zt(t.translate,0,n),e.scale=Zt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function EM(e,t,n,r){e.min=Zt(t.min,n.min,r),e.max=Zt(t.max,n.max,r)}function yAe(e,t,n,r){EM(e.x,t.x,n.x,r),EM(e.y,t.y,n.y,r)}function vAe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bAe={duration:.45,ease:[.4,0,.1,1]},TM=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),AM=TM("applewebkit/")&&!TM("chrome/")?Math.round:cn;function PM(e){e.min=AM(e.min),e.max=AM(e.max)}function _Ae(e){PM(e.x),PM(e.y)}function mU(e,t,n){return e==="position"||e==="preserve-aspect"&&!_3(vM(t),vM(n),.2)}const SAe=gU({attachResizeListener:(e,t)=>es(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bw={current:void 0},yU=gU({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bw.current){const e=new SAe({});e.mount(window),e.setOptions({layoutScroll:!0}),Bw.current=e}return Bw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xAe={pan:{Feature:LTe},drag:{Feature:DTe,ProjectionNode:yU,MeasureLayout:cU}},wAe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function CAe(e){const t=wAe.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function C3(e,t,n=1){const[r,i]=CAe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return eU(a)?parseFloat(a):a}else return h3(i)?C3(i,t,n+1):i}function EAe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!h3(o))return;const a=C3(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!h3(o))continue;const a=C3(o,r);a&&(t[i]=a,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const TAe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),vU=e=>TAe.has(e),AAe=e=>Object.keys(e).some(vU),kM=e=>e===pc||e===Re,IM=(e,t)=>parseFloat(e.split(", ")[t]),MM=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return IM(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?IM(o[1],e):0}},PAe=new Set(["x","y","z"]),kAe=Dm.filter(e=>!PAe.has(e));function IAe(e){const t=[];return kAe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Cf={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:MM(4,13),y:MM(5,14)};Cf.translateX=Cf.x;Cf.translateY=Cf.y;const MAe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=Cf[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(s[u]),e[u]=Cf[u](l,o)}),e},RAe=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(vU);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],d=Sh(c);const f=t[l];let h;if(J1(f)){const p=f.length,g=f[0]===null?1:0;c=f[g],d=Sh(c);for(let _=g;_=0?window.pageYOffset:null,u=MAe(t,e,s);return o.length&&o.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),vS&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function OAe(e,t,n,r){return AAe(t)?RAe(e,t,n,r):{target:t,transitionEnd:r}}const $Ae=(e,t,n,r)=>{const i=EAe(e,t,r);return t=i.target,r=i.transitionEnd,OAe(e,t,n,r)},E3={current:null},bU={current:!1};function NAe(){if(bU.current=!0,!!vS)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>E3.current=e.matches;e.addListener(t),t()}else E3.current=!1}function DAe(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ai(o))e.addValue(i,o),rb(r)&&r.add(i);else if(ai(a))e.addValue(i,wf(o,{owner:e})),rb(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,wf(s!==void 0?s:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const RM=new WeakMap,_U=Object.keys(Vg),LAe=_U.length,OM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],FAe=FT.length;class BAe{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Rt.render(this.render,!1,!0);const{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.isControllingVariants=_S(n),this.isVariantNode=ij(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const d in c){const f=c[d];s[d]!==void 0&&ai(f)&&(f.set(s[d],!1),rb(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,RM.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),bU.current||NAe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:E3.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){RM.delete(this.current),this.projection&&this.projection.unmount(),_s(this.notifyUpdate),_s(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=hc.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Rt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let a,s;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return s}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=wf(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=WT(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ai(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new nA),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class SU extends BAe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=nTe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){eTe(this,r,a);const s=$Ae(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function zAe(e){return window.getComputedStyle(e)}class VAe extends SU{readValueFromInstance(t,n){if(hc.has(n)){const r=ZT(n);return r&&r.default||0}else{const r=zAe(t),i=(lj(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uU(t,n)}build(t,n,r,i){VT(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return qT(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ai(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){pj(t,n,r,i)}}class jAe extends SU{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hc.has(n)){const r=ZT(n);return r&&r.default||0}return n=gj.has(n)?n:HT(n),t.getAttribute(n)}measureInstanceViewportBox(){return xn()}scrapeMotionValuesFromProps(t,n){return yj(t,n)}build(t,n,r,i){UT(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){mj(t,n,r,i)}mount(t){this.isSVGTag=GT(t.tagName),super.mount(t)}}const UAe=(e,t)=>zT(e)?new jAe(t,{enableHardwareAcceleration:!1}):new VAe(t,{enableHardwareAcceleration:!0}),GAe={layout:{ProjectionNode:yU,MeasureLayout:cU}},HAe={...mTe,...D4e,...xAe,...GAe},xU=H3e((e,t)=>w4e(e,t,HAe,UAe));function wU(){const e=k.useRef(!1);return DT(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function qAe(){const e=wU(),[t,n]=k.useState(0),r=k.useCallback(()=>{e.current&&n(t+1)},[t]);return[k.useCallback(()=>Rt.postRender(r),[r]),t]}class WAe extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function KAe({children:e,isPresent:t}){const n=k.useId(),r=k.useRef(null),i=k.useRef({width:0,height:0,top:0,left:0});return k.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),k.createElement(WAe,{isPresent:t,childRef:r,sizeRef:i},k.cloneElement(e,{ref:r}))}const zw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=vj(XAe),l=k.useId(),u=k.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:c=>{s.set(c,!0);for(const d of s.values())if(!d)return;r&&r()},register:c=>(s.set(c,!1),()=>s.delete(c))}),o?void 0:[n]);return k.useMemo(()=>{s.forEach((c,d)=>s.set(d,!1))},[n]),k.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=k.createElement(KAe,{isPresent:n},e)),k.createElement(Nm.Provider,{value:u},e)};function XAe(){return new Map}function QAe(e){return k.useEffect(()=>()=>e(),[])}const Wc=e=>e.key||"";function YAe(e,t){e.forEach(n=>{const r=Wc(n);t.set(r,n)})}function ZAe(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const CU=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const s=k.useContext(BT).forceRender||qAe()[0],l=wU(),u=ZAe(e);let c=u;const d=k.useRef(new Map).current,f=k.useRef(c),h=k.useRef(new Map).current,p=k.useRef(!0);if(DT(()=>{p.current=!1,YAe(u,h),f.current=c}),QAe(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return k.createElement(k.Fragment,null,c.map(y=>k.createElement(zw,{key:Wc(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},y)));c=[...c];const g=f.current.map(Wc),_=u.map(Wc),b=g.length;for(let y=0;y{if(_.indexOf(m)!==-1)return;const v=h.get(m);if(!v)return;const S=g.indexOf(m);let w=y;if(!w){const C=()=>{h.delete(m),d.delete(m);const x=f.current.findIndex(P=>P.key===m);if(f.current.splice(x,1),!d.size){if(f.current=u,l.current===!1)return;s(),r&&r()}};w=k.createElement(zw,{key:Wc(v),isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:o,mode:a},v),d.set(m,w)}c.splice(S,0,w)}),c=c.map(y=>{const m=y.key;return d.has(m)?y:k.createElement(zw,{key:Wc(y),isPresent:!0,presenceAffectsLayout:o,mode:a},y)}),k.createElement(k.Fragment,null,d.size?c:c.map(y=>k.cloneElement(y)))};var JAe={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},EU=k.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=JAe,toastSpacing:c="0.5rem"}=e,[d,f]=k.useState(s),h=BTe();k9(()=>{h||r==null||r()},[h]),k9(()=>{f(s)},[s]);const p=()=>f(null),g=()=>f(s),_=()=>{h&&i()};k.useEffect(()=>{h&&o&&i()},[h,o,i]),D3e(_,d);const b=k.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),y=k.useMemo(()=>O3e(a),[a]);return oe.jsx(xU.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:g,custom:{position:a},style:y,children:oe.jsx(lr.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:b,children:ua(n,{id:t,onClose:_})})})});EU.displayName="ToastComponent";function ePe(e,t){var n;const r=e??"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return(n=o==null?void 0:o[t])!=null?n:r}var $M={path:oe.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[oe.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),oe.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),oe.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},zm=Ii((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,c=Kl("chakra-icon",s),d=$m("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l,...d},h={ref:t,focusable:o,className:c,__css:f},p=r??$M.viewBox;if(n&&typeof n!="string")return oe.jsx(lr.svg,{as:n,...h,...u});const g=a??$M.path;return oe.jsx(lr.svg,{verticalAlign:"middle",viewBox:p,...h,...u,children:g})});zm.displayName="Icon";function tPe(e){return oe.jsx(zm,{viewBox:"0 0 24 24",...e,children:oe.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function nPe(e){return oe.jsx(zm,{viewBox:"0 0 24 24",...e,children:oe.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function NM(e){return oe.jsx(zm,{viewBox:"0 0 24 24",...e,children:oe.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var rPe=vbe({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),rA=Ii((e,t)=>{const n=$m("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=Rm(e),u=Kl("chakra-spinner",s),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${rPe} ${o} linear infinite`,...n};return oe.jsx(lr.div,{ref:t,__css:c,className:u,...l,children:r&&oe.jsx(lr.span,{srOnly:!0,children:r})})});rA.displayName="Spinner";var[iPe,iA]=Mm({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[oPe,oA]=Mm({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),TU={info:{icon:nPe,colorScheme:"blue"},warning:{icon:NM,colorScheme:"orange"},success:{icon:tPe,colorScheme:"green"},error:{icon:NM,colorScheme:"red"},loading:{icon:rA,colorScheme:"blue"}};function aPe(e){return TU[e].colorScheme}function sPe(e){return TU[e].icon}var AU=Ii(function(t,n){const r=oA(),{status:i}=iA(),o={display:"inline",...r.description};return oe.jsx(lr.div,{ref:n,"data-status":i,...t,className:Kl("chakra-alert__desc",t.className),__css:o})});AU.displayName="AlertDescription";function PU(e){const{status:t}=iA(),n=sPe(t),r=oA(),i=t==="loading"?r.spinner:r.icon;return oe.jsx(lr.span,{display:"inherit","data-status":t,...e,className:Kl("chakra-alert__icon",e.className),__css:i,children:e.children||oe.jsx(n,{h:"100%",w:"100%"})})}PU.displayName="AlertIcon";var kU=Ii(function(t,n){const r=oA(),{status:i}=iA();return oe.jsx(lr.div,{ref:n,"data-status":i,...t,className:Kl("chakra-alert__title",t.className),__css:r.title})});kU.displayName="AlertTitle";var IU=Ii(function(t,n){var r;const{status:i="info",addRole:o=!0,...a}=Rm(t),s=(r=t.colorScheme)!=null?r:aPe(i),l=h3e("Alert",{...t,colorScheme:s}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return oe.jsx(iPe,{value:{status:i},children:oe.jsx(oPe,{value:l,children:oe.jsx(lr.div,{"data-status":i,role:o?"alert":void 0,ref:n,...a,className:Kl("chakra-alert",t.className),__css:u})})})});IU.displayName="Alert";function lPe(e){return oe.jsx(zm,{focusable:"false","aria-hidden":!0,...e,children:oe.jsx("path",{fill:"currentColor",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"})})}var MU=Ii(function(t,n){const r=$m("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=Rm(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return oe.jsx(lr.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s,children:i||oe.jsx(lPe,{width:"1em",height:"1em"})})});MU.displayName="CloseButton";var uPe={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ia=cPe(uPe);function cPe(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dPe(i,o),{position:s,id:l}=a;return r(u=>{var c,d;const h=s.includes("top")?[a,...(c=u[s])!=null?c:[]]:[...(d=u[s])!=null?d:[],a];return{...u,[s]:h}}),l},update:(i,o)=>{i&&r(a=>{const s={...a},{position:l,index:u}=P9(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:RU(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(c=>({...c,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=tj(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>!!P9(ia.getState(),i).position}}var DM=0;function dPe(e,t={}){var n,r;DM+=1;const i=(n=t.id)!=null?n:DM,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ia.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fPe=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,colorScheme:l,icon:u}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return oe.jsxs(IU,{addRole:!1,status:t,variant:n,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[oe.jsx(PU,{children:u}),oe.jsxs(lr.div,{flex:"1",maxWidth:"100%",children:[i&&oe.jsx(kU,{id:c==null?void 0:c.title,children:i}),s&&oe.jsx(AU,{id:c==null?void 0:c.description,display:"block",children:s})]}),o&&oe.jsx(MU,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function RU(e={}){const{render:t,toastComponent:n=fPe}=e;return i=>typeof t=="function"?t({...i,...e}):oe.jsx(n,{...i,...e})}function OU(e,t){const n=i=>{var o;return{...t,...i,position:ePe((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),a=RU(o);return ia.notify(a,o)};return r.update=(i,o)=>{ia.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...ua(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...ua(o.error,s)}))},r.closeAll=ia.closeAll,r.close=ia.close,r.isActive=ia.isActive,r}var[MUe,hPe]=Mm({name:"ToastOptionsContext",strict:!1}),pPe=e=>{const t=k.useSyncExternalStore(ia.subscribe,ia.getState,ia.getState),{motionVariants:n,component:r=EU,portalProps:i}=e,a=Object.keys(t).map(s=>{const l=t[s];return oe.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${s}`,id:`chakra-toast-manager-${s}`,style:$3e(s),children:oe.jsx(CU,{initial:!1,children:l.map(u=>oe.jsx(r,{motionVariants:n,...u},u.id))})},s)});return oe.jsx(dS,{...i,children:a})};function gPe(e){const{theme:t}=mV(),n=hPe();return k.useMemo(()=>OU(t.direction,{...n,...e}),[e,t.direction,n])}var mPe={duration:5e3,variant:"solid"},Fc={theme:n3e,colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{},defaultOptions:mPe,forced:!1};function yPe({theme:e=Fc.theme,colorMode:t=Fc.colorMode,toggleColorMode:n=Fc.toggleColorMode,setColorMode:r=Fc.setColorMode,defaultOptions:i=Fc.defaultOptions,motionVariants:o,toastSpacing:a,component:s,forced:l}=Fc){const u={colorMode:t,setColorMode:r,toggleColorMode:n,forced:l};return{ToastContainer:()=>oe.jsx(I3e,{theme:e,children:oe.jsx(AT.Provider,{value:u,children:oe.jsx(pPe,{defaultOptions:i,motionVariants:o,toastSpacing:a,component:s})})}),toast:OU(e.direction,i)}}var T3=Ii(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return oe.jsx("img",{width:r,height:i,ref:n,alt:o,...a})});T3.displayName="NativeImage";function vPe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,c]=k.useState("pending");k.useEffect(()=>{c(n?"loading":"pending")},[n]);const d=k.useRef(),f=k.useCallback(()=>{if(!n)return;h();const p=new Image;p.src=n,a&&(p.crossOrigin=a),r&&(p.srcset=r),s&&(p.sizes=s),t&&(p.loading=t),p.onload=g=>{h(),c("loaded"),i==null||i(g)},p.onerror=g=>{h(),c("failed"),o==null||o(g)},d.current=p},[n,a,r,s,i,o,t]),h=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return G1(()=>{if(!l)return u==="loading"&&f(),()=>{h()}},[u,f,l]),l?"loaded":u}var bPe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function _Pe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var aA=Ii(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:c,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:h,...p}=t,g=r!==void 0||i!==void 0,_=u!=null||c||!g,b=vPe({...t,crossOrigin:d,ignoreFallback:_}),y=bPe(b,f),m={ref:n,objectFit:l,objectPosition:s,..._?p:_Pe(p,["onError","onLoad"])};return y?i||oe.jsx(lr.img,{as:T3,className:"chakra-image__placeholder",src:r,...m}):oe.jsx(lr.img,{as:T3,src:o,srcSet:a,crossOrigin:d,loading:u,referrerPolicy:h,className:"chakra-image",...m})});aA.displayName="Image";var $U=Ii(function(t,n){const r=$m("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=Rm(t),u=v3e({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return oe.jsx(lr.p,{ref:n,className:Kl("chakra-text",t.className),...u,...l,__css:r})});$U.displayName="Text";var A3=Ii(function(t,n){const r=$m("Heading",t),{className:i,...o}=Rm(t);return oe.jsx(lr.h2,{ref:n,className:Kl("chakra-heading",t.className),...o,__css:r})});A3.displayName="Heading";var ob=lr("div");ob.displayName="Box";var NU=Ii(function(t,n){const{size:r,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return oe.jsx(ob,{ref:n,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});NU.displayName="Square";var SPe=Ii(function(t,n){const{size:r,...i}=t;return oe.jsx(NU,{size:r,ref:n,borderRadius:"9999px",...i})});SPe.displayName="Circle";var sA=Ii(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...c}=t,d={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return oe.jsx(lr.div,{ref:n,__css:d,...c})});sA.displayName="Flex";const pt=e=>{try{return JSON.parse(JSON.stringify(e))}catch{return"Error parsing object"}},xPe=F.object({status:F.literal(422),data:F.object({detail:F.array(F.object({loc:F.array(F.string()),msg:F.string(),type:F.string()}))})});function Gr(e,t,n=!1){e=String(e),t=String(t);const r=Array.from({length:21},(a,s)=>s*50),i=[0,5,10,15,20,25,30,35,40,45,50,55,59,64,68,73,77,82,86,95,100];return r.reduce((a,s,l)=>{const u=n?i[l]/100:1,c=n?50:i[r.length-1-l];return a[s]=`hsl(${e} ${t}% ${c}% / ${u})`,a},{})}const oy={H:220,S:16},ay={H:250,S:42},sy={H:47,S:42},ly={H:40,S:70},uy={H:28,S:42},cy={H:113,S:42},dy={H:0,S:42},wPe={base:Gr(oy.H,oy.S),baseAlpha:Gr(oy.H,oy.S,!0),accent:Gr(ay.H,ay.S),accentAlpha:Gr(ay.H,ay.S,!0),working:Gr(sy.H,sy.S),workingAlpha:Gr(sy.H,sy.S,!0),gold:Gr(ly.H,ly.S),goldAlpha:Gr(ly.H,ly.S,!0),warning:Gr(uy.H,uy.S),warningAlpha:Gr(uy.H,uy.S,!0),ok:Gr(cy.H,cy.S),okAlpha:Gr(cy.H,cy.S,!0),error:Gr(dy.H,dy.S),errorAlpha:Gr(dy.H,dy.S,!0)},{definePartsStyle:CPe,defineMultiStyleConfig:EPe}=Ve(AV.keys),TPe={border:"none"},APe=e=>{const{colorScheme:t}=e;return{fontWeight:"600",fontSize:"sm",border:"none",borderRadius:"base",bg:W(`${t}.200`,`${t}.700`)(e),color:W(`${t}.900`,`${t}.100`)(e),_hover:{bg:W(`${t}.250`,`${t}.650`)(e)},_expanded:{bg:W(`${t}.250`,`${t}.650`)(e),borderBottomRadius:"none",_hover:{bg:W(`${t}.300`,`${t}.600`)(e)}}}},PPe=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.100`,`${t}.800`)(e),borderRadius:"base",borderTopRadius:"none"}},kPe={},IPe=CPe(e=>({container:TPe,button:APe(e),panel:PPe(e),icon:kPe})),MPe=EPe({variants:{invokeAI:IPe},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),RPe=e=>{const{colorScheme:t}=e;if(t==="base"){const r={bg:W("base.150","base.700")(e),color:W("base.300","base.500")(e),svg:{fill:W("base.300","base.500")(e)},opacity:1},i={bg:"none",color:W("base.300","base.500")(e),svg:{fill:W("base.500","base.500")(e)},opacity:1};return{bg:W("base.250","base.600")(e),color:W("base.850","base.100")(e),borderRadius:"base",svg:{fill:W("base.850","base.100")(e)},_hover:{bg:W("base.300","base.500")(e),color:W("base.900","base.50")(e),svg:{fill:W("base.900","base.50")(e)},_disabled:r},_disabled:r,'&[data-progress="true"]':{...i,_hover:i}}}const n={bg:W(`${t}.400`,`${t}.700`)(e),color:W(`${t}.600`,`${t}.500`)(e),svg:{fill:W(`${t}.600`,`${t}.500`)(e),filter:"unset"},opacity:.7,filter:"saturate(65%)"};return{bg:W(`${t}.400`,`${t}.600`)(e),color:W("base.50","base.100")(e),borderRadius:"base",svg:{fill:W("base.50","base.100")(e)},_disabled:n,_hover:{bg:W(`${t}.500`,`${t}.500`)(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)},_disabled:n}}},OPe=e=>{const{colorScheme:t}=e,n=W("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",_hover:{bg:W(`${t}.500`,`${t}.500`)(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)}},".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"}}},$Pe={variants:{invokeAI:RPe,invokeAIOutline:OPe},defaultProps:{variant:"invokeAI",colorScheme:"base"}},{definePartsStyle:NPe,defineMultiStyleConfig:DPe}=Ve(PV.keys),LPe=e=>{const{colorScheme:t}=e;return{bg:W("base.200","base.700")(e),borderColor:W("base.300","base.600")(e),color:W("base.900","base.100")(e),_checked:{bg:W(`${t}.300`,`${t}.500`)(e),borderColor:W(`${t}.300`,`${t}.500`)(e),color:W(`${t}.900`,`${t}.100`)(e),_hover:{bg:W(`${t}.400`,`${t}.500`)(e),borderColor:W(`${t}.400`,`${t}.500`)(e)},_disabled:{borderColor:"transparent",bg:"whiteAlpha.300",color:"whiteAlpha.500"}},_indeterminate:{bg:W(`${t}.300`,`${t}.600`)(e),borderColor:W(`${t}.300`,`${t}.600`)(e),color:W(`${t}.900`,`${t}.100`)(e)},_disabled:{bg:"whiteAlpha.100",borderColor:"transparent"},_focusVisible:{boxShadow:"none",outline:"none"},_invalid:{borderColor:W("error.600","error.300")(e)}}},FPe=NPe(e=>({control:LPe(e)})),BPe=DPe({variants:{invokeAI:FPe},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{definePartsStyle:zPe,defineMultiStyleConfig:VPe}=Ve(kV.keys),jPe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},UPe=e=>({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6},"::selection":{color:W("accent.900","accent.50")(e),bg:W("accent.200","accent.400")(e)}}),GPe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},HPe=zPe(e=>({preview:jPe,input:UPe(e),textarea:GPe})),qPe=VPe({variants:{invokeAI:HPe},defaultProps:{size:"sm",variant:"invokeAI"}}),WPe=e=>({fontSize:"sm",marginEnd:0,mb:1,fontWeight:"400",transitionProperty:"common",transitionDuration:"normal",whiteSpace:"nowrap",_disabled:{opacity:.4},color:W("base.700","base.300")(e),_invalid:{color:W("error.500","error.300")(e)}}),KPe={variants:{invokeAI:WPe},defaultProps:{variant:"invokeAI"}},CS=e=>({outline:"none",borderWidth:2,borderStyle:"solid",borderColor:W("base.200","base.800")(e),bg:W("base.50","base.900")(e),borderRadius:"base",color:W("base.900","base.100")(e),boxShadow:"none",_hover:{borderColor:W("base.300","base.600")(e)},_focus:{borderColor:W("accent.200","accent.600")(e),boxShadow:"none",_hover:{borderColor:W("accent.300","accent.500")(e)}},_invalid:{borderColor:W("error.300","error.600")(e),boxShadow:"none",_hover:{borderColor:W("error.400","error.500")(e)}},_disabled:{borderColor:W("base.300","base.700")(e),bg:W("base.300","base.700")(e),color:W("base.600","base.400")(e),_hover:{borderColor:W("base.300","base.700")(e)}},_placeholder:{color:W("base.700","base.400")(e)},"::selection":{bg:W("accent.200","accent.400")(e)}}),{definePartsStyle:XPe,defineMultiStyleConfig:QPe}=Ve(IV.keys),YPe=XPe(e=>({field:CS(e)})),ZPe=QPe({variants:{invokeAI:YPe},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:JPe,defineMultiStyleConfig:eke}=Ve(MV.keys),tke=JPe(e=>({button:{fontWeight:500,bg:W("base.300","base.500")(e),color:W("base.900","base.100")(e),_hover:{bg:W("base.400","base.600")(e),color:W("base.900","base.50")(e),fontWeight:600}},list:{zIndex:9999,color:W("base.900","base.150")(e),bg:W("base.200","base.800")(e),shadow:"dark-lg",border:"none"},item:{fontSize:"sm",bg:W("base.200","base.800")(e),_hover:{bg:W("base.300","base.700")(e),svg:{opacity:1}},_focus:{bg:W("base.400","base.600")(e)},svg:{opacity:.7,fontSize:14}}})),nke=eke({variants:{invokeAI:tke},defaultProps:{variant:"invokeAI"}}),RUe={variants:{enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.07,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.07,easings:"easeOut"}}}},{defineMultiStyleConfig:rke,definePartsStyle:ike}=Ve(RV.keys),oke=e=>({bg:W("blackAlpha.700","blackAlpha.700")(e)}),ake={},ske=()=>({layerStyle:"first",maxH:"80vh"}),lke=()=>({fontWeight:"600",fontSize:"lg",layerStyle:"first",borderTopRadius:"base",borderInlineEndRadius:"base"}),uke={},cke={overflowY:"scroll"},dke={},fke=ike(e=>({overlay:oke(e),dialogContainer:ake,dialog:ske(),header:lke(),closeButton:uke,body:cke,footer:dke})),hke=rke({variants:{invokeAI:fke},defaultProps:{variant:"invokeAI",size:"lg"}}),{defineMultiStyleConfig:pke,definePartsStyle:gke}=Ve(OV.keys),mke=e=>({height:8}),yke=e=>({border:"none",fontWeight:"600",height:"auto",py:1,ps:2,pe:6,...CS(e)}),vke=e=>({display:"flex"}),bke=e=>({border:"none",px:2,py:0,mx:-2,my:0,svg:{color:W("base.700","base.300")(e),width:2.5,height:2.5,_hover:{color:W("base.900","base.100")(e)}}}),_ke=gke(e=>({root:mke(e),field:yke(e),stepperGroup:vke(e),stepper:bke(e)})),Ske=pke({variants:{invokeAI:_ke},defaultProps:{size:"sm",variant:"invokeAI"}}),{defineMultiStyleConfig:xke,definePartsStyle:DU}=Ve($V.keys),LU=tn("popper-bg"),FU=tn("popper-arrow-bg"),BU=tn("popper-arrow-shadow-color"),wke=e=>({[FU.variable]:W("colors.base.100","colors.base.800")(e),[LU.variable]:W("colors.base.100","colors.base.800")(e),[BU.variable]:W("colors.base.400","colors.base.600")(e),minW:"unset",width:"unset",p:4,bg:W("base.100","base.800")(e),border:"none",shadow:"dark-lg"}),Cke=e=>({[FU.variable]:W("colors.base.100","colors.base.700")(e),[LU.variable]:W("colors.base.100","colors.base.700")(e),[BU.variable]:W("colors.base.400","colors.base.400")(e),p:4,bg:W("base.100","base.700")(e),border:"none",shadow:"dark-lg"}),Eke=DU(e=>({content:wke(e),body:{padding:0}})),Tke=DU(e=>({content:Cke(e),body:{padding:0}})),Ake=xke({variants:{invokeAI:Eke,informational:Tke},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:Pke,definePartsStyle:kke}=Ve(NV.keys),Ike=e=>({bg:"accentAlpha.700"}),Mke=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.200`,`${t}.700`)(e)}},Rke=kke(e=>({filledTrack:Ike(e),track:Mke(e)})),Oke=Pke({variants:{invokeAI:Rke},defaultProps:{variant:"invokeAI"}}),$ke={"::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"},{definePartsStyle:Nke,defineMultiStyleConfig:Dke}=Ve(DV.keys),Lke=e=>({color:W("base.200","base.300")(e)}),Fke=e=>({fontWeight:"600",...CS(e)}),Bke=Nke(e=>({field:Fke(e),icon:Lke(e)})),zke=Dke({variants:{invokeAI:Bke},defaultProps:{size:"sm",variant:"invokeAI"}}),LM=ke("skeleton-start-color"),FM=ke("skeleton-end-color"),Vke={borderRadius:"base",maxW:"full",maxH:"full",_light:{[LM.variable]:"colors.base.250",[FM.variable]:"colors.base.450"},_dark:{[LM.variable]:"colors.base.700",[FM.variable]:"colors.base.500"}},jke={variants:{invokeAI:Vke},defaultProps:{variant:"invokeAI"}},{definePartsStyle:Uke,defineMultiStyleConfig:Gke}=Ve(LV.keys),Hke=e=>({bg:W("base.400","base.600")(e),h:1.5}),qke=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.400`,`${t}.600`)(e),h:1.5}},Wke=e=>({w:e.orientation==="horizontal"?2:4,h:e.orientation==="horizontal"?4:2,bg:W("base.50","base.100")(e)}),Kke=e=>({fontSize:"2xs",fontWeight:"500",color:W("base.700","base.400")(e),mt:2,insetInlineStart:"unset"}),Xke=Uke(e=>({container:{_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"}},track:Hke(e),filledTrack:qke(e),thumb:Wke(e),mark:Kke(e)})),Qke=Gke({variants:{invokeAI:Xke},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:Yke,definePartsStyle:Zke}=Ve(FV.keys),Jke=e=>{const{colorScheme:t}=e;return{bg:W("base.300","base.600")(e),_focusVisible:{boxShadow:"none"},_checked:{bg:W(`${t}.400`,`${t}.500`)(e)}}},e6e=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.50`,`${t}.50`)(e)}},t6e=Zke(e=>({container:{},track:Jke(e),thumb:e6e(e)})),n6e=Yke({variants:{invokeAI:t6e},defaultProps:{size:"md",variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:r6e,definePartsStyle:zU}=Ve(BV.keys),i6e=e=>({display:"flex",columnGap:4}),o6e=e=>({}),a6e=e=>{const{colorScheme:t}=e;return{display:"flex",flexDirection:"column",gap:1,color:W("base.700","base.400")(e),button:{fontSize:"sm",padding:2,borderRadius:"base",textShadow:W("0 0 0.3rem var(--invokeai-colors-accent-100)","0 0 0.3rem var(--invokeai-colors-accent-900)")(e),svg:{fill:W("base.700","base.300")(e)},_selected:{bg:W("accent.400","accent.600")(e),color:W("base.50","base.100")(e),svg:{fill:W("base.50","base.100")(e),filter:W(`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${t}-600))`,`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${t}-800))`)(e)},_hover:{bg:W("accent.500","accent.500")(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)}}},_hover:{bg:W("base.100","base.800")(e),color:W("base.900","base.50")(e),svg:{fill:W("base.800","base.100")(e)}}}}},s6e=e=>({padding:0,height:"100%"}),l6e=zU(e=>({root:i6e(e),tab:o6e(e),tablist:a6e(e),tabpanel:s6e(e)})),u6e=zU(e=>({tab:{borderTopRadius:"base",px:4,py:1,fontSize:"sm",color:W("base.600","base.400")(e),fontWeight:500,_selected:{color:W("accent.600","accent.400")(e)}},tabpanel:{p:0,pt:4,w:"full",h:"full"},tabpanels:{w:"full",h:"full"}})),c6e=r6e({variants:{line:u6e,appTabs:l6e},defaultProps:{variant:"appTabs",colorScheme:"accent"}}),d6e=e=>({color:W("error.500","error.400")(e)}),f6e=e=>({color:W("base.500","base.400")(e)}),h6e={variants:{subtext:f6e,error:d6e}},p6e=e=>({...CS(e),"::-webkit-scrollbar":{display:"initial"},"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, - var(--invokeai-colors-base-50) 0%, - var(--invokeai-colors-base-50) 70%, - var(--invokeai-colors-base-200) 70%, - var(--invokeai-colors-base-200) 100%)`},_disabled:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, - var(--invokeai-colors-base-50) 0%, - var(--invokeai-colors-base-50) 70%, - var(--invokeai-colors-base-200) 70%, - var(--invokeai-colors-base-200) 100%)`}},_dark:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, - var(--invokeai-colors-base-900) 0%, - var(--invokeai-colors-base-900) 70%, - var(--invokeai-colors-base-800) 70%, - var(--invokeai-colors-base-800) 100%)`},_disabled:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, - var(--invokeai-colors-base-900) 0%, - var(--invokeai-colors-base-900) 70%, - var(--invokeai-colors-base-800) 70%, - var(--invokeai-colors-base-800) 100%)`}}},p:2}),g6e={variants:{invokeAI:p6e},defaultProps:{size:"md",variant:"invokeAI"}},m6e=tn("popper-arrow-bg"),y6e=e=>({borderRadius:"base",shadow:"dark-lg",bg:W("base.700","base.200")(e),[m6e.variable]:W("colors.base.700","colors.base.200")(e),pb:1.5}),v6e={baseStyle:y6e},BM={backgroundColor:"accentAlpha.150 !important",borderColor:"accentAlpha.700 !important",borderRadius:"base !important",borderStyle:"dashed !important",_dark:{borderColor:"accent.400 !important"}},b6e={".react-flow__nodesselection-rect":{...BM,padding:"1rem !important",boxSizing:"content-box !important",transform:"translate(-1rem, -1rem) !important"},".react-flow__selection":BM},_6e={config:{cssVarPrefix:"invokeai",initialColorMode:"dark",useSystemColorMode:!1},layerStyles:{body:{bg:"base.50",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.50"}},first:{bg:"base.100",color:"base.900",".chakra-ui-dark &":{bg:"base.850",color:"base.100"}},second:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.800",color:"base.100"}},third:{bg:"base.300",color:"base.900",".chakra-ui-dark &":{bg:"base.750",color:"base.100"}},nodeBody:{bg:"base.100",color:"base.900",".chakra-ui-dark &":{bg:"base.800",color:"base.100"}},nodeHeader:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.100"}},nodeFooter:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.100"}}},styles:{global:()=>({layerStyle:"body","*":{...$ke},...b6e})},direction:"ltr",fonts:{body:"'Inter Variable', sans-serif",heading:"'Inter Variable', sans-serif"},shadows:{light:{accent:"0 0 10px 0 var(--invokeai-colors-accent-300)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-400)",ok:"0 0 7px var(--invokeai-colors-ok-600)",working:"0 0 7px var(--invokeai-colors-working-600)",error:"0 0 7px var(--invokeai-colors-error-600)"},dark:{accent:"0 0 10px 0 var(--invokeai-colors-accent-600)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-500)",ok:"0 0 7px var(--invokeai-colors-ok-400)",working:"0 0 7px var(--invokeai-colors-working-400)",error:"0 0 7px var(--invokeai-colors-error-400)"},selected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 4px var(--invokeai-colors-accent-400)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 4px var(--invokeai-colors-accent-500)"},hoverSelected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 4px var(--invokeai-colors-accent-500)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 4px var(--invokeai-colors-accent-400)"},hoverUnselected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 3px var(--invokeai-colors-accent-500)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 3px var(--invokeai-colors-accent-400)"},nodeSelected:{light:"0 0 0 3px var(--invokeai-colors-accent-400)",dark:"0 0 0 3px var(--invokeai-colors-accent-500)"},nodeHovered:{light:"0 0 0 2px var(--invokeai-colors-accent-500)",dark:"0 0 0 2px var(--invokeai-colors-accent-400)"},nodeHoveredSelected:{light:"0 0 0 3px var(--invokeai-colors-accent-500)",dark:"0 0 0 3px var(--invokeai-colors-accent-400)"},nodeInProgress:{light:"0 0 0 2px var(--invokeai-colors-accent-500), 0 0 10px 2px var(--invokeai-colors-accent-600)",dark:"0 0 0 2px var(--invokeai-colors-yellow-400), 0 0 20px 2px var(--invokeai-colors-orange-700)"}},colors:wPe,components:{Button:$Pe,Input:ZPe,Editable:qPe,Textarea:g6e,Tabs:c6e,Progress:Oke,Accordion:MPe,FormLabel:KPe,Switch:n6e,NumberInput:Ske,Select:zke,Skeleton:jke,Slider:Qke,Popover:Ake,Modal:hke,Checkbox:BPe,Menu:nke,Text:h6e,Tooltip:v6e}},S6e={defaultOptions:{isClosable:!0}},{toast:wh}=yPe({theme:_6e,defaultOptions:S6e.defaultOptions}),x6e=()=>{pe({matcher:un.endpoints.enqueueBatch.matchFulfilled,effect:async e=>{const t=e.payload,n=e.meta.arg.originalArgs;se("queue").debug({enqueueResult:pt(t)},"Batch enqueued"),wh.isActive("batch-queued")||wh({id:"batch-queued",title:X("queue.batchQueued"),description:X("queue.batchQueuedDesc",{count:t.enqueued,direction:n.prepend?X("queue.front"):X("queue.back")}),duration:1e3,status:"success"})}}),pe({matcher:un.endpoints.enqueueBatch.matchRejected,effect:async e=>{const t=e.payload,n=e.meta.arg.originalArgs;if(!t){wh({title:X("queue.batchFailedToQueue"),status:"error",description:"Unknown Error"}),se("queue").error({batchConfig:pt(n),error:pt(t)},X("queue.batchFailedToQueue"));return}const r=xPe.safeParse(t);if(r.success)r.data.data.detail.map(i=>{wh({id:"batch-failed-to-queue",title:u6(XN(i.msg),{length:128}),status:"error",description:u6(`Path: - ${i.loc.join(".")}`,{length:128})})});else{let i="Unknown Error",o;t.status===403&&"body"in t?i=Vy(t,"body.detail","Unknown Error"):t.status===403&&"error"in t?i=Vy(t,"error.detail","Unknown Error"):t.status===403&&"data"in t&&(i=Vy(t,"data.detail","Unknown Error"),o=15e3),wh({title:X("queue.batchFailedToQueue"),status:"error",description:i,...o?{duration:o}:{}})}se("queue").error({batchConfig:pt(n),error:pt(t)},X("queue.batchFailedToQueue"))}})},Vm={memoizeOptions:{resultEqualityCheck:SE}},VU=(e,t)=>{var d;const{generation:n,canvas:r,nodes:i,controlAdapters:o}=e,a=((d=n.initialImage)==null?void 0:d.imageName)===t,s=r.layerState.objects.some(f=>f.kind==="image"&&f.imageName===t),l=i.nodes.filter(on).some(f=>Gc(f.data.inputs,h=>{var p;return h.type==="ImageField"&&((p=h.value)==null?void 0:p.image_name)===t})),u=Aa(o).some(f=>f.controlImage===t||gi(f)&&f.processedControlImage===t);return{isInitialImage:a,isCanvasImage:s,isNodesImage:l,isControlImage:u}},w6e=qn([e=>e],e=>{const{imagesToDelete:t}=e.deleteImageModal;return t.length?t.map(r=>VU(e,r.image_name)):[]},Vm),C6e=()=>{pe({matcher:ce.endpoints.deleteBoardAndImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{deleted_images:r}=e.payload;let i=!1,o=!1,a=!1,s=!1;const l=n();r.forEach(u=>{const c=VU(l,u);c.isInitialImage&&!i&&(t(DE()),i=!0),c.isCanvasImage&&!o&&(t(KE()),o=!0),c.isNodesImage&&!a&&(t(cve()),a=!0),c.isControlImage&&!s&&(t(zie()),s=!0)})}})},E6e=()=>{pe({matcher:si(M1,M5),effect:async(e,{getState:t,dispatch:n,condition:r,cancelActiveListeners:i})=>{i();const o=t(),a=M1.match(e)?e.payload.boardId:o.gallery.selectedBoardId,l=(M5.match(e)?e.payload:o.gallery.galleryView)==="images"?Fn:Pr,u={board_id:a??"none",categories:l};if(await r(()=>ce.endpoints.listImages.select(u)(t()).isSuccess,5e3)){const{data:d}=ce.endpoints.listImages.select(u)(t());if(d){const f=bg.selectAll(d)[0],h=bg.selectById(d,e.payload.selectedImageName);n(pa(h||f||null))}else n(pa(null))}else n(pa(null))}})},T6e=ge("canvas/canvasSavedToGallery"),A6e=ge("canvas/canvasMaskSavedToGallery"),P6e=ge("canvas/canvasCopiedToClipboard"),k6e=ge("canvas/canvasDownloadedAsImage"),I6e=ge("canvas/canvasMerged"),M6e=ge("canvas/stagingAreaImageSaved"),R6e=ge("canvas/canvasMaskToControlAdapter"),O6e=ge("canvas/canvasImageToControlAdapter");let jU=null,UU=null;const OUe=e=>{jU=e},ES=()=>jU,$Ue=e=>{UU=e},$6e=()=>UU,N6e=async e=>new Promise((t,n)=>{e.toBlob(r=>{if(r){t(r);return}n("Unable to create Blob")})}),ab=async(e,t)=>await N6e(e.toCanvas(t)),TS=async(e,t=!1)=>{const n=ES();if(!n)throw new Error("Problem getting base layer blob");const{shouldCropToBoundingBoxOnSave:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e.canvas,a=n.clone();a.scale({x:1,y:1});const s=a.getAbsolutePosition(),l=r||t?{x:i.x+s.x,y:i.y+s.y,width:o.width,height:o.height}:a.getClientRect();return ab(a,l)},D6e=(e,t="image/png")=>{navigator.clipboard.write([new ClipboardItem({[t]:e})])},L6e=()=>{pe({actionCreator:P6e,effect:async(e,{dispatch:t,getState:n})=>{const r=J_.get().child({namespace:"canvasCopiedToClipboardListener"}),i=n();try{const o=TS(i);D6e(o)}catch(o){r.error(String(o)),t(it({title:X("toast.problemCopyingCanvas"),description:X("toast.problemCopyingCanvasDesc"),status:"error"}));return}t(it({title:X("toast.canvasCopiedClipboard"),status:"success"}))}})},F6e=(e,t)=>{const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),r.remove()},B6e=()=>{pe({actionCreator:k6e,effect:async(e,{dispatch:t,getState:n})=>{const r=J_.get().child({namespace:"canvasSavedToGalleryListener"}),i=n();let o;try{o=await TS(i)}catch(a){r.error(String(a)),t(it({title:X("toast.problemDownloadingCanvas"),description:X("toast.problemDownloadingCanvasDesc"),status:"error"}));return}F6e(o,"canvas.png"),t(it({title:X("toast.canvasDownloaded"),status:"success"}))}})},z6e=()=>{pe({actionCreator:O6e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n(),{id:o}=e.payload;let a;try{a=await TS(i,!0)}catch(c){r.error(String(c)),t(it({title:X("toast.problemSavingCanvas"),description:X("toast.problemSavingCanvasDesc"),status:"error"}));return}const{autoAddBoardId:s}=i.gallery,l=await t(ce.endpoints.uploadImage.initiate({file:new File([a],"savedCanvas.png",{type:"image/png"}),image_category:"control",is_intermediate:!1,board_id:s==="none"?void 0:s,crop_visible:!1,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.canvasSentControlnetAssets")}}})).unwrap(),{image_name:u}=l;t(Hl({id:o,controlImage:u}))}})};var lA={exports:{}},AS={},GU={},Ge={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof He<"u"?He:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.2.3",isBrowser:n(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return e.Konva.angleDeg?i*t:i},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(i){e.glob.Konva=i}};const r=i=>{e.Konva[i.prototype.getClassName()]=i};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(Ge);var nn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=Ge;class n{constructor(v=[1,0,0,1,0,0]){this.dirty=!1,this.m=v&&v.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(v){v.m[0]=this.m[0],v.m[1]=this.m[1],v.m[2]=this.m[2],v.m[3]=this.m[3],v.m[4]=this.m[4],v.m[5]=this.m[5]}point(v){var S=this.m;return{x:S[0]*v.x+S[2]*v.y+S[4],y:S[1]*v.x+S[3]*v.y+S[5]}}translate(v,S){return this.m[4]+=this.m[0]*v+this.m[2]*S,this.m[5]+=this.m[1]*v+this.m[3]*S,this}scale(v,S){return this.m[0]*=v,this.m[1]*=v,this.m[2]*=S,this.m[3]*=S,this}rotate(v){var S=Math.cos(v),w=Math.sin(v),C=this.m[0]*S+this.m[2]*w,x=this.m[1]*S+this.m[3]*w,P=this.m[0]*-w+this.m[2]*S,E=this.m[1]*-w+this.m[3]*S;return this.m[0]=C,this.m[1]=x,this.m[2]=P,this.m[3]=E,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(v,S){var w=this.m[0]+this.m[2]*S,C=this.m[1]+this.m[3]*S,x=this.m[2]+this.m[0]*v,P=this.m[3]+this.m[1]*v;return this.m[0]=w,this.m[1]=C,this.m[2]=x,this.m[3]=P,this}multiply(v){var S=this.m[0]*v.m[0]+this.m[2]*v.m[1],w=this.m[1]*v.m[0]+this.m[3]*v.m[1],C=this.m[0]*v.m[2]+this.m[2]*v.m[3],x=this.m[1]*v.m[2]+this.m[3]*v.m[3],P=this.m[0]*v.m[4]+this.m[2]*v.m[5]+this.m[4],E=this.m[1]*v.m[4]+this.m[3]*v.m[5]+this.m[5];return this.m[0]=S,this.m[1]=w,this.m[2]=C,this.m[3]=x,this.m[4]=P,this.m[5]=E,this}invert(){var v=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),S=this.m[3]*v,w=-this.m[1]*v,C=-this.m[2]*v,x=this.m[0]*v,P=v*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),E=v*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=S,this.m[1]=w,this.m[2]=C,this.m[3]=x,this.m[4]=P,this.m[5]=E,this}getMatrix(){return this.m}decompose(){var v=this.m[0],S=this.m[1],w=this.m[2],C=this.m[3],x=this.m[4],P=this.m[5],E=v*C-S*w;let I={x,y:P,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(v!=0||S!=0){var N=Math.sqrt(v*v+S*S);I.rotation=S>0?Math.acos(v/N):-Math.acos(v/N),I.scaleX=N,I.scaleY=E/N,I.skewX=(v*w+S*C)/E,I.skewY=0}else if(w!=0||C!=0){var M=Math.sqrt(w*w+C*C);I.rotation=Math.PI/2-(C>0?Math.acos(-w/M):-Math.acos(w/M)),I.scaleX=E/M,I.scaleY=M,I.skewX=0,I.skewY=(v*w+S*C)/E}return I.rotation=e.Util._getRotation(I.rotation),I}}e.Transform=n;var r="[object Array]",i="[object Number]",o="[object String]",a="[object Boolean]",s=Math.PI/180,l=180/Math.PI,u="#",c="",d="0",f="Konva warning: ",h="Konva error: ",p="rgb(",g={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,b=[];const y=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(m){setTimeout(m,60)};e.Util={_isElement(m){return!!(m&&m.nodeType==1)},_isFunction(m){return!!(m&&m.constructor&&m.call&&m.apply)},_isPlainObject(m){return!!m&&m.constructor===Object},_isArray(m){return Object.prototype.toString.call(m)===r},_isNumber(m){return Object.prototype.toString.call(m)===i&&!isNaN(m)&&isFinite(m)},_isString(m){return Object.prototype.toString.call(m)===o},_isBoolean(m){return Object.prototype.toString.call(m)===a},isObject(m){return m instanceof Object},isValidSelector(m){if(typeof m!="string")return!1;var v=m[0];return v==="#"||v==="."||v===v.toUpperCase()},_sign(m){return m===0||m>0?1:-1},requestAnimFrame(m){b.push(m),b.length===1&&y(function(){const v=b;b=[],v.forEach(function(S){S()})})},createCanvasElement(){var m=document.createElement("canvas");try{m.style=m.style||{}}catch{}return m},createImageElement(){return document.createElement("img")},_isInDocument(m){for(;m=m.parentNode;)if(m==document)return!0;return!1},_urlToImage(m,v){var S=e.Util.createImageElement();S.onload=function(){v(S)},S.src=m},_rgbToHex(m,v,S){return((1<<24)+(m<<16)+(v<<8)+S).toString(16).slice(1)},_hexToRgb(m){m=m.replace(u,c);var v=parseInt(m,16);return{r:v>>16&255,g:v>>8&255,b:v&255}},getRandomColor(){for(var m=(Math.random()*16777215<<0).toString(16);m.length<6;)m=d+m;return u+m},getRGB(m){var v;return m in g?(v=g[m],{r:v[0],g:v[1],b:v[2]}):m[0]===u?this._hexToRgb(m.substring(1)):m.substr(0,4)===p?(v=_.exec(m.replace(/ /g,"")),{r:parseInt(v[1],10),g:parseInt(v[2],10),b:parseInt(v[3],10)}):{r:0,g:0,b:0}},colorToRGBA(m){return m=m||"black",e.Util._namedColorToRBA(m)||e.Util._hex3ColorToRGBA(m)||e.Util._hex4ColorToRGBA(m)||e.Util._hex6ColorToRGBA(m)||e.Util._hex8ColorToRGBA(m)||e.Util._rgbColorToRGBA(m)||e.Util._rgbaColorToRGBA(m)||e.Util._hslColorToRGBA(m)},_namedColorToRBA(m){var v=g[m.toLowerCase()];return v?{r:v[0],g:v[1],b:v[2],a:1}:null},_rgbColorToRGBA(m){if(m.indexOf("rgb(")===0){m=m.match(/rgb\(([^)]+)\)/)[1];var v=m.split(/ *, */).map(Number);return{r:v[0],g:v[1],b:v[2],a:1}}},_rgbaColorToRGBA(m){if(m.indexOf("rgba(")===0){m=m.match(/rgba\(([^)]+)\)/)[1];var v=m.split(/ *, */).map((S,w)=>S.slice(-1)==="%"?w===3?parseInt(S)/100:parseInt(S)/100*255:Number(S));return{r:v[0],g:v[1],b:v[2],a:v[3]}}},_hex8ColorToRGBA(m){if(m[0]==="#"&&m.length===9)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:parseInt(m.slice(7,9),16)/255}},_hex6ColorToRGBA(m){if(m[0]==="#"&&m.length===7)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:1}},_hex4ColorToRGBA(m){if(m[0]==="#"&&m.length===5)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:parseInt(m[4]+m[4],16)/255}},_hex3ColorToRGBA(m){if(m[0]==="#"&&m.length===4)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:1}},_hslColorToRGBA(m){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(m)){const[v,...S]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(m),w=Number(S[0])/360,C=Number(S[1])/100,x=Number(S[2])/100;let P,E,I;if(C===0)return I=x*255,{r:Math.round(I),g:Math.round(I),b:Math.round(I),a:1};x<.5?P=x*(1+C):P=x+C-x*C;const N=2*x-P,M=[0,0,0];for(let T=0;T<3;T++)E=w+1/3*-(T-1),E<0&&E++,E>1&&E--,6*E<1?I=N+(P-N)*6*E:2*E<1?I=P:3*E<2?I=N+(P-N)*(2/3-E)*6:I=N,M[T]=I*255;return{r:Math.round(M[0]),g:Math.round(M[1]),b:Math.round(M[2]),a:1}}},haveIntersection(m,v){return!(v.x>m.x+m.width||v.x+v.widthm.y+m.height||v.y+v.height1?(P=S,E=w,I=(S-C)*(S-C)+(w-x)*(w-x)):(P=m+M*(S-m),E=v+M*(w-v),I=(P-C)*(P-C)+(E-x)*(E-x))}return[P,E,I]},_getProjectionToLine(m,v,S){var w=e.Util.cloneObject(m),C=Number.MAX_VALUE;return v.forEach(function(x,P){if(!(!S&&P===v.length-1)){var E=v[(P+1)%v.length],I=e.Util._getProjectionToSegment(x.x,x.y,E.x,E.y,m.x,m.y),N=I[0],M=I[1],T=I[2];Tv.length){var P=v;v=m,m=P}for(w=0;w{v.width=0,v.height=0})},drawRoundedRectPath(m,v,S,w){let C=0,x=0,P=0,E=0;typeof w=="number"?C=x=P=E=Math.min(w,v/2,S/2):(C=Math.min(w[0]||0,v/2,S/2),x=Math.min(w[1]||0,v/2,S/2),E=Math.min(w[2]||0,v/2,S/2),P=Math.min(w[3]||0,v/2,S/2)),m.moveTo(C,0),m.lineTo(v-x,0),m.arc(v-x,x,x,Math.PI*3/2,0,!1),m.lineTo(v,S-E),m.arc(v-E,S-E,E,0,Math.PI/2,!1),m.lineTo(P,S),m.arc(P,S-P,P,Math.PI/2,Math.PI,!1),m.lineTo(0,C),m.arc(C,C,C,Math.PI,Math.PI*3/2,!1)}}})(nn);var Kt={},je={},Te={};Object.defineProperty(Te,"__esModule",{value:!0});Te.getComponentValidator=Te.getBooleanValidator=Te.getNumberArrayValidator=Te.getFunctionValidator=Te.getStringOrGradientValidator=Te.getStringValidator=Te.getNumberOrAutoValidator=Te.getNumberOrArrayOfNumbersValidator=Te.getNumberValidator=Te.alphaComponent=Te.RGBComponent=void 0;const Es=Ge,dn=nn;function Ts(e){return dn.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||dn.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function V6e(e){return e>255?255:e<0?0:Math.round(e)}Te.RGBComponent=V6e;function j6e(e){return e>1?1:e<1e-4?1e-4:e}Te.alphaComponent=j6e;function U6e(){if(Es.Konva.isUnminified)return function(e,t){return dn.Util._isNumber(e)||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}Te.getNumberValidator=U6e;function G6e(e){if(Es.Konva.isUnminified)return function(t,n){let r=dn.Util._isNumber(t),i=dn.Util._isArray(t)&&t.length==e;return!r&&!i&&dn.Util.warn(Ts(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}Te.getNumberOrArrayOfNumbersValidator=G6e;function H6e(){if(Es.Konva.isUnminified)return function(e,t){var n=dn.Util._isNumber(e),r=e==="auto";return n||r||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}Te.getNumberOrAutoValidator=H6e;function q6e(){if(Es.Konva.isUnminified)return function(e,t){return dn.Util._isString(e)||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}Te.getStringValidator=q6e;function W6e(){if(Es.Konva.isUnminified)return function(e,t){const n=dn.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}Te.getStringOrGradientValidator=W6e;function K6e(){if(Es.Konva.isUnminified)return function(e,t){return dn.Util._isFunction(e)||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}Te.getFunctionValidator=K6e;function X6e(){if(Es.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(dn.Util._isArray(e)?e.forEach(function(r){dn.Util._isNumber(r)||dn.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}Te.getNumberArrayValidator=X6e;function Q6e(){if(Es.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}Te.getBooleanValidator=Q6e;function Y6e(e){if(Es.Konva.isUnminified)return function(t,n){return t==null||dn.Util.isObject(t)||dn.Util.warn(Ts(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}Te.getComponentValidator=Y6e;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=nn,n=Te;var r="get",i="set";e.Factory={addGetterSetter(o,a,s,l,u){e.Factory.addGetter(o,a,s),e.Factory.addSetter(o,a,l,u),e.Factory.addOverloadedGetterSetter(o,a)},addGetter(o,a,s){var l=r+t.Util._capitalize(a);o.prototype[l]=o.prototype[l]||function(){var u=this.attrs[a];return u===void 0?s:u}},addSetter(o,a,s,l){var u=i+t.Util._capitalize(a);o.prototype[u]||e.Factory.overWriteSetter(o,a,s,l)},overWriteSetter(o,a,s,l){var u=i+t.Util._capitalize(a);o.prototype[u]=function(c){return s&&c!==void 0&&c!==null&&(c=s.call(this,c,a)),this._setAttr(a,c),l&&l.call(this),this}},addComponentsGetterSetter(o,a,s,l,u){var c=s.length,d=t.Util._capitalize,f=r+d(a),h=i+d(a),p,g;o.prototype[f]=function(){var b={};for(p=0;p{this._setAttr(a+d(v),void 0)}),this._fireChangeEvent(a,y,b),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(o,a)},addOverloadedGetterSetter(o,a){var s=t.Util._capitalize(a),l=i+s,u=r+s;o.prototype[a]=function(){return arguments.length?(this[l](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(o,a,s,l){t.Util.error("Adding deprecated "+a);var u=r+t.Util._capitalize(a),c=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";o.prototype[u]=function(){t.Util.error(c);var d=this.attrs[a];return d===void 0?s:d},e.Factory.addSetter(o,a,l,function(){t.Util.error(c)}),e.Factory.addOverloadedGetterSetter(o,a)},backCompat(o,a){t.Util.each(a,function(s,l){var u=o.prototype[l],c=r+t.Util._capitalize(s),d=i+t.Util._capitalize(s);function f(){u.apply(this,arguments),t.Util.error('"'+s+'" method is deprecated and will be removed soon. Use ""'+l+'" instead.')}o.prototype[s]=f,o.prototype[c]=f,o.prototype[d]=f})},afterSetFilter(){this._filterUpToDate=!1}}})(je);var Mo={},ss={};Object.defineProperty(ss,"__esModule",{value:!0});ss.HitContext=ss.SceneContext=ss.Context=void 0;const HU=nn,Z6e=Ge;function J6e(e){var t=[],n=e.length,r=HU.Util,i,o;for(i=0;itypeof c=="number"?Math.floor(c):c)),o+=eIe+u.join(zM)+tIe)):(o+=s.property,t||(o+=aIe+s.val)),o+=iIe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lIe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var c=arguments,d=this._context;c.length===3?d.drawImage(t,n,r):c.length===5?d.drawImage(t,n,r,i,o):c.length===9&&d.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n,r,i){return r?this._context.isPointInPath(r,t,n,i):this._context.isPointInPath(t,n,i)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=VM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{i.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(i=>{r=i.node}),r},_dragElements:new Map,_drag(r){const i=[];e.DD._dragElements.forEach((o,a)=>{const{node:s}=o,l=s.getStage();l.setPointersPositions(r),o.pointerId===void 0&&(o.pointerId=n.Util._getFirstPointerId(r));const u=l._changedPointerPositions.find(f=>f.id===o.pointerId);if(u){if(o.dragStatus!=="dragging"){var c=s.dragDistance(),d=Math.max(Math.abs(u.x-o.startPointerPos.x),Math.abs(u.y-o.startPointerPos.y));if(d{o.fire("dragmove",{type:"dragmove",target:o,evt:r},!0)})},_endDragBefore(r){const i=[];e.DD._dragElements.forEach(o=>{const{node:a}=o,s=a.getStage();if(r&&s.setPointersPositions(r),!s._changedPointerPositions.find(c=>c.id===o.pointerId))return;(o.dragStatus==="dragging"||o.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,o.dragStatus="stopped");const u=o.node.getLayer()||o.node instanceof t.Konva.Stage&&o.node;u&&i.indexOf(u)===-1&&i.push(u)}),i.forEach(o=>{o.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((i,o)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:r},!0),i.dragStatus!=="dragging"&&e.DD._dragElements.delete(o)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(IS);Object.defineProperty(Kt,"__esModule",{value:!0});Kt.Node=void 0;const qe=nn,jm=je,hy=Mo,cu=Ge,Fi=IS,vn=Te;var fv="absoluteOpacity",py="allEventListeners",za="absoluteTransform",jM="absoluteScale",du="canvas",mIe="Change",yIe="children",vIe="konva",P3="listening",UM="mouseenter",GM="mouseleave",HM="set",qM="Shape",hv=" ",WM="stage",js="transform",bIe="Stage",k3="visible",_Ie=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(hv);let SIe=1;class Ne{constructor(t){this._id=SIe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===js||t===za)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===js||t===za,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(hv);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(du)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===za&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(du)){const{scene:t,filter:n,hit:r}=this._cache.get(du);qe.Util.releaseCanvas(t,n,r),this._cache.delete(du)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,c=n.drawBorder||!1,d=n.hitCanvasPixelRatio||1;if(!i||!o){qe.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var f=new hy.SceneCanvas({pixelRatio:a,width:i,height:o}),h=new hy.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),p=new hy.HitCanvas({pixelRatio:d,width:i,height:o}),g=f.getContext(),_=p.getContext();return p.isCache=!0,f.isCache=!0,this._cache.delete(du),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(f.getContext()._context.imageSmoothingEnabled=!1,h.getContext()._context.imageSmoothingEnabled=!1),g.save(),_.save(),g.translate(-s,-l),_.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(fv),this._clearSelfAndDescendantCache(jM),this.drawScene(f,this),this.drawHit(p,this),this._isUnderCache=!1,g.restore(),_.restore(),c&&(g.save(),g.beginPath(),g.rect(0,0,i,o),g.closePath(),g.setAttr("strokeStyle","red"),g.setAttr("lineWidth",5),g.stroke(),g.restore()),this._cache.set(du,{scene:f,filter:h,hit:p,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(du)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i=1/0,o=1/0,a=-1/0,s=-1/0,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var c=l.point(u);i===void 0&&(i=a=c.x,o=s=c.y),i=Math.min(i,c.x),o=Math.min(o,c.y),a=Math.max(a,c.x),s=Math.max(s,c.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var c=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/c,r.getHeight()/c),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==yIe&&(r=HM+qe.Util._capitalize(n),qe.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(P3,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(k3,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;Fi.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!cu.Konva.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(c){for(i=[],o=c.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}const u=this.getStage();return n.nodeType!==bIe&&u&&l(u.getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(js),this._clearSelfAndDescendantCache(za)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;var n=t.getPointerPosition();if(!n)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new qe.Transform,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){const{x:n,y:r,...i}=this._clearTransform();this.attrs.x=n,this.attrs.y=r,this._clearCache(js);var o=this._getAbsoluteTransform().copy();return o.invert(),o.translate(t.x,t.y),t={x:this.attrs.x+o.getTranslation().x,y:this.attrs.y+o.getTranslation().y},this._setTransform(i),this.setPosition({x:t.x,y:t.y}),this._clearCache(js),this._clearSelfAndDescendantCache(za),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return qe.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return qe.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&qe.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(fv,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=qe.Util.isObject(i)&&!qe.Util._isPlainObject(i)&&!qe.Util._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),qe.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t==null?void 0:t.callback;i&&delete t.callback,qe.Util._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():cu.Konva.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(r&&!this.isDragging()){var i=!1;Fi.DD._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Fi.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&Fi.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return qe.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return qe.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Ne.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),cu.Konva[r]||(qe.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=cu.Konva[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Vw.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Vw.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const c=r===this;if(u){o.save();var d=this.getAbsoluteTransform(r),f=d.getMatrix();o.transform(f[0],f[1],f[2],f[3],f[4],f[5]),o.beginPath();let _;if(l)_=l.call(this,o,this);else{var h=this.clipX(),p=this.clipY();o.rect(h,p,a,s)}o.clip.apply(o,_),f=d.copy().invert().getMatrix(),o.transform(f[0],f[1],f[2],f[3],f[4],f[5])}var g=!c&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";g&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(_){_[t](n,r)}),g&&o.restore(),u&&o.restore()}getClientRect(t={}){var n,r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},c=this;(n=this.children)===null||n===void 0||n.forEach(function(g){if(g.visible()){var _=g.getClientRect({relativeTo:c,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(o===void 0?(o=_.x,a=_.y,s=_.x+_.width,l=_.y+_.height):(o=Math.min(o,_.x),a=Math.min(a,_.y),s=Math.max(s,_.x+_.width),l=Math.max(l,_.y+_.height)))}});for(var d=this.find("Shape"),f=!1,h=0;hZ.indexOf("pointer")>=0?"pointer":Z.indexOf("touch")>=0?"touch":"mouse",U=Z=>{const V=B(Z);if(V==="pointer")return i.Konva.pointerEventsEnabled&&O.pointer;if(V==="touch")return O.touch;if(V==="mouse")return O.mouse};function j(Z={}){return(Z.clipFunc||Z.clipWidth||Z.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),Z}const q="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class Y extends r.Container{constructor(V){super(j(V)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{j(this.attrs)}),this._checkVisibility()}_validateAdd(V){const K=V.getType()==="Layer",ee=V.getType()==="FastLayer";K||ee||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const V=this.visible()?"":"none";this.content.style.display=V}setContainer(V){if(typeof V===c){if(V.charAt(0)==="."){var K=V.slice(1);V=document.getElementsByClassName(K)[0]}else{var ee;V.charAt(0)!=="#"?ee=V:ee=V.slice(1),V=document.getElementById(ee)}if(!V)throw"Can not find container in document with id "+ee}return this._setAttr("container",V),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),V.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var V=this.children,K=V.length,ee;for(ee=0;ee-1&&e.stages.splice(K,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const V=this._pointerPositions[0]||this._changedPointerPositions[0];return V?{x:V.x,y:V.y}:(t.Util.warn(q),null)}_getPointerById(V){return this._pointerPositions.find(K=>K.id===V)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(V){V=V||{},V.x=V.x||0,V.y=V.y||0,V.width=V.width||this.width(),V.height=V.height||this.height();var K=new o.SceneCanvas({width:V.width,height:V.height,pixelRatio:V.pixelRatio||1}),ee=K.getContext()._context,re=this.children;return(V.x||V.y)&&ee.translate(-1*V.x,-1*V.y),re.forEach(function(fe){if(fe.isVisible()){var Se=fe._toKonvaCanvas(V);ee.drawImage(Se._canvas,V.x,V.y,Se.getWidth()/Se.getPixelRatio(),Se.getHeight()/Se.getPixelRatio())}}),K}getIntersection(V){if(!V)return null;var K=this.children,ee=K.length,re=ee-1,fe;for(fe=re;fe>=0;fe--){const Se=K[fe].getIntersection(V);if(Se)return Se}return null}_resizeDOM(){var V=this.width(),K=this.height();this.content&&(this.content.style.width=V+d,this.content.style.height=K+d),this.bufferCanvas.setSize(V,K),this.bufferHitCanvas.setSize(V,K),this.children.forEach(ee=>{ee.setSize({width:V,height:K}),ee.draw()})}add(V,...K){if(arguments.length>1){for(var ee=0;ee$&&t.Util.warn("The stage has "+re+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),V.setSize({width:this.width(),height:this.height()}),V.draw(),i.Konva.isBrowser&&this.content.appendChild(V.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(V){return l.hasPointerCapture(V,this)}setPointerCapture(V){l.setPointerCapture(V,this)}releaseCapture(V){l.releaseCapture(V,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&L.forEach(([V,K])=>{this.content.addEventListener(V,ee=>{this[K](ee)},{passive:!1})})}_pointerenter(V){this.setPointersPositions(V);const K=U(V.type);K&&this._fire(K.pointerenter,{evt:V,target:this,currentTarget:this})}_pointerover(V){this.setPointersPositions(V);const K=U(V.type);K&&this._fire(K.pointerover,{evt:V,target:this,currentTarget:this})}_getTargetShape(V){let K=this[V+"targetShape"];return K&&!K.getStage()&&(K=null),K}_pointerleave(V){const K=U(V.type),ee=B(V.type);if(K){this.setPointersPositions(V);var re=this._getTargetShape(ee),fe=!a.DD.isDragging||i.Konva.hitOnDragEnabled;re&&fe?(re._fireAndBubble(K.pointerout,{evt:V}),re._fireAndBubble(K.pointerleave,{evt:V}),this._fire(K.pointerleave,{evt:V,target:this,currentTarget:this}),this[ee+"targetShape"]=null):fe&&(this._fire(K.pointerleave,{evt:V,target:this,currentTarget:this}),this._fire(K.pointerout,{evt:V,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(V){const K=U(V.type),ee=B(V.type);if(K){this.setPointersPositions(V);var re=!1;this._changedPointerPositions.forEach(fe=>{var Se=this.getIntersection(fe);if(a.DD.justDragged=!1,i.Konva["_"+ee+"ListenClick"]=!0,!Se||!Se.isListening())return;i.Konva.capturePointerEventsEnabled&&Se.setPointerCapture(fe.id),this[ee+"ClickStartShape"]=Se,Se._fireAndBubble(K.pointerdown,{evt:V,pointerId:fe.id}),re=!0;const Me=V.type.indexOf("touch")>=0;Se.preventDefault()&&V.cancelable&&Me&&V.preventDefault()}),re||this._fire(K.pointerdown,{evt:V,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(V){const K=U(V.type),ee=B(V.type);if(!K)return;a.DD.isDragging&&a.DD.node.preventDefault()&&V.cancelable&&V.preventDefault(),this.setPointersPositions(V);var re=!a.DD.isDragging||i.Konva.hitOnDragEnabled;if(!re)return;var fe={};let Se=!1;var Me=this._getTargetShape(ee);this._changedPointerPositions.forEach(De=>{const Ee=l.getCapturedShape(De.id)||this.getIntersection(De),tt=De.id,ot={evt:V,pointerId:tt};var we=Me!==Ee;if(we&&Me&&(Me._fireAndBubble(K.pointerout,{...ot},Ee),Me._fireAndBubble(K.pointerleave,{...ot},Ee)),Ee){if(fe[Ee._id])return;fe[Ee._id]=!0}Ee&&Ee.isListening()?(Se=!0,we&&(Ee._fireAndBubble(K.pointerover,{...ot},Me),Ee._fireAndBubble(K.pointerenter,{...ot},Me),this[ee+"targetShape"]=Ee),Ee._fireAndBubble(K.pointermove,{...ot})):Me&&(this._fire(K.pointerover,{evt:V,target:this,currentTarget:this,pointerId:tt}),this[ee+"targetShape"]=null)}),Se||this._fire(K.pointermove,{evt:V,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(V){const K=U(V.type),ee=B(V.type);if(!K)return;this.setPointersPositions(V);const re=this[ee+"ClickStartShape"],fe=this[ee+"ClickEndShape"];var Se={};let Me=!1;this._changedPointerPositions.forEach(De=>{const Ee=l.getCapturedShape(De.id)||this.getIntersection(De);if(Ee){if(Ee.releaseCapture(De.id),Se[Ee._id])return;Se[Ee._id]=!0}const tt=De.id,ot={evt:V,pointerId:tt};let we=!1;i.Konva["_"+ee+"InDblClickWindow"]?(we=!0,clearTimeout(this[ee+"DblTimeout"])):a.DD.justDragged||(i.Konva["_"+ee+"InDblClickWindow"]=!0,clearTimeout(this[ee+"DblTimeout"])),this[ee+"DblTimeout"]=setTimeout(function(){i.Konva["_"+ee+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),Ee&&Ee.isListening()?(Me=!0,this[ee+"ClickEndShape"]=Ee,Ee._fireAndBubble(K.pointerup,{...ot}),i.Konva["_"+ee+"ListenClick"]&&re&&re===Ee&&(Ee._fireAndBubble(K.pointerclick,{...ot}),we&&fe&&fe===Ee&&Ee._fireAndBubble(K.pointerdblclick,{...ot}))):(this[ee+"ClickEndShape"]=null,i.Konva["_"+ee+"ListenClick"]&&this._fire(K.pointerclick,{evt:V,target:this,currentTarget:this,pointerId:tt}),we&&this._fire(K.pointerdblclick,{evt:V,target:this,currentTarget:this,pointerId:tt}))}),Me||this._fire(K.pointerup,{evt:V,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+ee+"ListenClick"]=!1,V.cancelable&&ee!=="touch"&&V.preventDefault()}_contextmenu(V){this.setPointersPositions(V);var K=this.getIntersection(this.getPointerPosition());K&&K.isListening()?K._fireAndBubble(N,{evt:V}):this._fire(N,{evt:V,target:this,currentTarget:this})}_wheel(V){this.setPointersPositions(V);var K=this.getIntersection(this.getPointerPosition());K&&K.isListening()?K._fireAndBubble(D,{evt:V}):this._fire(D,{evt:V,target:this,currentTarget:this})}_pointercancel(V){this.setPointersPositions(V);const K=l.getCapturedShape(V.pointerId)||this.getIntersection(this.getPointerPosition());K&&K._fireAndBubble(S,l.createEvent(V)),l.releaseCapture(V.pointerId)}_lostpointercapture(V){l.releaseCapture(V.pointerId)}setPointersPositions(V){var K=this._getContentPosition(),ee=null,re=null;V=V||window.event,V.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(V.touches,fe=>{this._pointerPositions.push({id:fe.identifier,x:(fe.clientX-K.left)/K.scaleX,y:(fe.clientY-K.top)/K.scaleY})}),Array.prototype.forEach.call(V.changedTouches||V.touches,fe=>{this._changedPointerPositions.push({id:fe.identifier,x:(fe.clientX-K.left)/K.scaleX,y:(fe.clientY-K.top)/K.scaleY})})):(ee=(V.clientX-K.left)/K.scaleX,re=(V.clientY-K.top)/K.scaleY,this.pointerPos={x:ee,y:re},this._pointerPositions=[{x:ee,y:re,id:t.Util._getFirstPointerId(V)}],this._changedPointerPositions=[{x:ee,y:re,id:t.Util._getFirstPointerId(V)}])}_setPointerPosition(V){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(V)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var V=this.content.getBoundingClientRect();return{top:V.top,left:V.left,scaleX:V.width/this.content.clientWidth||1,scaleY:V.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var V=this.container();if(!V)throw"Stage has no container. A container is required.";V.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),V.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(V){V.batchDraw()}),this}}e.Stage=Y,Y.prototype.nodeType=u,(0,s._registerNode)(Y),n.Factory.addGetterSetter(Y,"container")})(KU);var Um={},On={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=Ge,n=nn,r=je,i=Kt,o=Te,a=Ge,s=yi;var l="hasShadow",u="shadowRGBA",c="patternImage",d="linearGradient",f="radialGradient";let h;function p(){return h||(h=n.Util.createCanvasElement().getContext("2d"),h)}e.shapes={};function g(P){const E=this.attrs.fillRule;E?P.fill(E):P.fill()}function _(P){P.stroke()}function b(P){P.fill()}function y(P){P.stroke()}function m(){this._clearCache(l)}function v(){this._clearCache(u)}function S(){this._clearCache(c)}function w(){this._clearCache(d)}function C(){this._clearCache(f)}class x extends i.Node{constructor(E){super(E);let I;for(;I=n.Util.getRandomColor(),!(I&&!(I in e.shapes)););this.colorKey=I,e.shapes[I]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(l,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(c,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var E=p();const I=E.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(I&&I.setTransform){const N=new n.Transform;N.translate(this.fillPatternX(),this.fillPatternY()),N.rotate(t.Konva.getAngle(this.fillPatternRotation())),N.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),N.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const M=N.getMatrix(),T=typeof DOMMatrix>"u"?{a:M[0],b:M[1],c:M[2],d:M[3],e:M[4],f:M[5]}:new DOMMatrix(M);I.setTransform(T)}return I}}_getLinearGradient(){return this._getCache(d,this.__getLinearGradient)}__getLinearGradient(){var E=this.fillLinearGradientColorStops();if(E){for(var I=p(),N=this.fillLinearGradientStartPoint(),M=this.fillLinearGradientEndPoint(),T=I.createLinearGradient(N.x,N.y,M.x,M.y),A=0;Athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const E=this.hitStrokeWidth();return E==="auto"?this.hasStroke():this.strokeEnabled()&&!!E}intersects(E){var I=this.getStage();if(!I)return!1;const N=I.bufferHitCanvas;return N.getContext().clear(),this.drawHit(N,void 0,!0),N.context.getImageData(Math.round(E.x),Math.round(E.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(E){var I;if(!this.getStage()||!((I=this.attrs.perfectDrawEnabled)!==null&&I!==void 0?I:!0))return!1;const M=E||this.hasFill(),T=this.hasStroke(),A=this.getAbsoluteOpacity()!==1;if(M&&T&&A)return!0;const R=this.hasShadow(),D=this.shadowForStrokeEnabled();return!!(M&&T&&R&&D)}setStrokeHitEnabled(E){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),E?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var E=this.size();return{x:this._centroid?-E.width/2:0,y:this._centroid?-E.height/2:0,width:E.width,height:E.height}}getClientRect(E={}){const I=E.skipTransform,N=E.relativeTo,M=this.getSelfRect(),A=!E.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,R=M.width+A,D=M.height+A,$=!E.skipShadow&&this.hasShadow(),L=$?this.shadowOffsetX():0,O=$?this.shadowOffsetY():0,B=R+Math.abs(L),U=D+Math.abs(O),j=$&&this.shadowBlur()||0,q=B+j*2,Y=U+j*2,Z={width:q,height:Y,x:-(A/2+j)+Math.min(L,0)+M.x,y:-(A/2+j)+Math.min(O,0)+M.y};return I?Z:this._transformedRect(Z,N)}drawScene(E,I){var N=this.getLayer(),M=E||N.getCanvas(),T=M.getContext(),A=this._getCanvasCache(),R=this.getSceneFunc(),D=this.hasShadow(),$,L,O,B=M.isCache,U=I===this;if(!this.isVisible()&&!U)return this;if(A){T.save();var j=this.getAbsoluteTransform(I).getMatrix();return T.transform(j[0],j[1],j[2],j[3],j[4],j[5]),this._drawCachedSceneCanvas(T),T.restore(),this}if(!R)return this;if(T.save(),this._useBufferCanvas()&&!B){$=this.getStage(),L=$.bufferCanvas,O=L.getContext(),O.clear(),O.save(),O._applyLineJoin(this);var q=this.getAbsoluteTransform(I).getMatrix();O.transform(q[0],q[1],q[2],q[3],q[4],q[5]),R.call(this,O,this),O.restore();var Y=L.pixelRatio;D&&T._applyShadow(this),T._applyOpacity(this),T._applyGlobalCompositeOperation(this),T.drawImage(L._canvas,0,0,L.width/Y,L.height/Y)}else{if(T._applyLineJoin(this),!U){var q=this.getAbsoluteTransform(I).getMatrix();T.transform(q[0],q[1],q[2],q[3],q[4],q[5]),T._applyOpacity(this),T._applyGlobalCompositeOperation(this)}D&&T._applyShadow(this),R.call(this,T,this)}return T.restore(),this}drawHit(E,I,N=!1){if(!this.shouldDrawHit(I,N))return this;var M=this.getLayer(),T=E||M.hitCanvas,A=T&&T.getContext(),R=this.hitFunc()||this.sceneFunc(),D=this._getCanvasCache(),$=D&&D.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),$){A.save();var L=this.getAbsoluteTransform(I).getMatrix();return A.transform(L[0],L[1],L[2],L[3],L[4],L[5]),this._drawCachedHitCanvas(A),A.restore(),this}if(!R)return this;if(A.save(),A._applyLineJoin(this),!(this===I)){var B=this.getAbsoluteTransform(I).getMatrix();A.transform(B[0],B[1],B[2],B[3],B[4],B[5])}return R.call(this,A,this),A.restore(),this}drawHitFromCache(E=0){var I=this._getCanvasCache(),N=this._getCachedSceneCanvas(),M=I.hit,T=M.getContext(),A=M.getWidth(),R=M.getHeight(),D,$,L,O,B,U;T.clear(),T.drawImage(N._canvas,0,0,A,R);try{for(D=T.getImageData(0,0,A,R),$=D.data,L=$.length,O=n.Util._hexToRgb(this.colorKey),B=0;BE?($[B]=O.r,$[B+1]=O.g,$[B+2]=O.b,$[B+3]=255):$[B+3]=0;T.putImageData(D,0,0)}catch(j){n.Util.error("Unable to draw hit graph from cached scene canvas. "+j.message)}return this}hasPointerCapture(E){return s.hasPointerCapture(E,this)}setPointerCapture(E){s.setPointerCapture(E,this)}releaseCapture(E){s.releaseCapture(E,this)}}e.Shape=x,x.prototype._fillFunc=g,x.prototype._strokeFunc=_,x.prototype._fillFuncHit=b,x.prototype._strokeFuncHit=y,x.prototype._centroid=!1,x.prototype.nodeType="Shape",(0,a._registerNode)(x),x.prototype.eventListeners={},x.prototype.on.call(x.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",m),x.prototype.on.call(x.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",v),x.prototype.on.call(x.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",S),x.prototype.on.call(x.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",w),x.prototype.on.call(x.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",C),r.Factory.addGetterSetter(x,"stroke",void 0,(0,o.getStringOrGradientValidator)()),r.Factory.addGetterSetter(x,"strokeWidth",2,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(x,"hitStrokeWidth","auto",(0,o.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(x,"strokeHitEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(x,"perfectDrawEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(x,"shadowForStrokeEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(x,"lineJoin"),r.Factory.addGetterSetter(x,"lineCap"),r.Factory.addGetterSetter(x,"sceneFunc"),r.Factory.addGetterSetter(x,"hitFunc"),r.Factory.addGetterSetter(x,"dash"),r.Factory.addGetterSetter(x,"dashOffset",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"shadowColor",void 0,(0,o.getStringValidator)()),r.Factory.addGetterSetter(x,"shadowBlur",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"shadowOpacity",1,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(x,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(x,"shadowOffsetX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"shadowOffsetY",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillPatternImage"),r.Factory.addGetterSetter(x,"fill",void 0,(0,o.getStringOrGradientValidator)()),r.Factory.addGetterSetter(x,"fillPatternX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillPatternY",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(x,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(x,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(x,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(x,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(x,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(x,"fillEnabled",!0),r.Factory.addGetterSetter(x,"strokeEnabled",!0),r.Factory.addGetterSetter(x,"shadowEnabled",!0),r.Factory.addGetterSetter(x,"dashEnabled",!0),r.Factory.addGetterSetter(x,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(x,"fillPriority","color"),r.Factory.addComponentsGetterSetter(x,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(x,"fillPatternOffsetX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillPatternOffsetY",0,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(x,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(x,"fillPatternScaleX",1,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillPatternScaleY",1,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(x,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(x,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(x,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(x,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(x,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(x,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(x,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(x,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(x,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(x,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(x,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(x,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(x,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(x,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(x,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(x,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(x,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(x,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(x,"fillPatternRotation",0),r.Factory.addGetterSetter(x,"fillRule",void 0,(0,o.getStringValidator)()),r.Factory.backCompat(x,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(On);Object.defineProperty(Um,"__esModule",{value:!0});Um.Layer=void 0;const La=nn,jw=gc,Bc=Kt,cA=je,KM=Mo,TIe=Te,AIe=On,PIe=Ge;var kIe="#",IIe="beforeDraw",MIe="draw",YU=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],RIe=YU.length;class Bf extends jw.Container{constructor(t){super(t),this.canvas=new KM.SceneCanvas,this.hitCanvas=new KM.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(IIe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),jw.Container.prototype.drawScene.call(this,i,n),this._fire(MIe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),jw.Container.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){La.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return La.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return La.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Um.Layer=Bf;Bf.prototype.nodeType="Layer";(0,PIe._registerNode)(Bf);cA.Factory.addGetterSetter(Bf,"imageSmoothingEnabled",!0);cA.Factory.addGetterSetter(Bf,"clearBeforeDraw",!0);cA.Factory.addGetterSetter(Bf,"hitGraphEnabled",!0,(0,TIe.getBooleanValidator)());var RS={};Object.defineProperty(RS,"__esModule",{value:!0});RS.FastLayer=void 0;const OIe=nn,$Ie=Um,NIe=Ge;class dA extends $Ie.Layer{constructor(t){super(t),this.listening(!1),OIe.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}RS.FastLayer=dA;dA.prototype.nodeType="FastLayer";(0,NIe._registerNode)(dA);var zf={};Object.defineProperty(zf,"__esModule",{value:!0});zf.Group=void 0;const DIe=nn,LIe=gc,FIe=Ge;class fA extends LIe.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&DIe.Util.throw("You may only add groups and shapes to groups.")}}zf.Group=fA;fA.prototype.nodeType="Group";(0,FIe._registerNode)(fA);var Vf={};Object.defineProperty(Vf,"__esModule",{value:!0});Vf.Animation=void 0;const Uw=Ge,XM=nn,Gw=function(){return Uw.glob.performance&&Uw.glob.performance.now?function(){return Uw.glob.performance.now()}:function(){return new Date().getTime()}}();class oa{constructor(t,n){this.id=oa.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Gw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){let n=[];return t&&(n=Array.isArray(t)?t:[t]),this.layers=n,this}getLayers(){return this.layers}addLayer(t){const n=this.layers,r=n.length;for(let i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=s,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=l,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var p=this.getTimer()-this._startTime;this.state===s?this.setTime(p):this.state===l&&this.setTime(this.duration-p)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class f{constructor(p){var g=this,_=p.node,b=_._id,y,m=p.easing||e.Easings.Linear,v=!!p.yoyo,S;typeof p.duration>"u"?y=.3:p.duration===0?y=.001:y=p.duration,this.node=_,this._id=u++;var w=_.getLayer()||(_ instanceof i.Konva.Stage?_.getLayers():null);w||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){g.tween.onEnterFrame()},w),this.tween=new d(S,function(C){g._tweenFunc(C)},m,0,1,y*1e3,v),this._addListeners(),f.attrs[b]||(f.attrs[b]={}),f.attrs[b][this._id]||(f.attrs[b][this._id]={}),f.tweens[b]||(f.tweens[b]={});for(S in p)o[S]===void 0&&this._addAttr(S,p[S]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,g){var _=this.node,b=_._id,y,m,v,S,w,C,x,P;if(v=f.tweens[b][p],v&&delete f.attrs[b][v][p],y=_.getAttr(p),t.Util._isArray(g))if(m=[],w=Math.max(g.length,y.length),p==="points"&&g.length!==y.length&&(g.length>y.length?(x=y,y=t.Util._prepareArrayForTween(y,g,_.closed())):(C=g,g=t.Util._prepareArrayForTween(g,y,_.closed()))),p.indexOf("fill")===0)for(S=0;S{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var p=this.node,g=f.attrs[p._id][this._id];g.points&&g.points.trueEnd&&p.setAttr("points",g.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var p=this.node,g=f.attrs[p._id][this._id];g.points&&g.points.trueStart&&p.points(g.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var p=this.node._id,g=this._id,_=f.tweens[p],b;this.pause();for(b in _)delete f.tweens[p][b];delete f.attrs[p][g]}}e.Tween=f,f.attrs={},f.tweens={},r.Node.prototype.to=function(h){var p=h.onFinish;h.node=this,h.onFinish=function(){this.destroy(),p&&p()};var g=new f(h);g.play()},e.Easings={BackEaseIn(h,p,g,_){var b=1.70158;return g*(h/=_)*h*((b+1)*h-b)+p},BackEaseOut(h,p,g,_){var b=1.70158;return g*((h=h/_-1)*h*((b+1)*h+b)+1)+p},BackEaseInOut(h,p,g,_){var b=1.70158;return(h/=_/2)<1?g/2*(h*h*(((b*=1.525)+1)*h-b))+p:g/2*((h-=2)*h*(((b*=1.525)+1)*h+b)+2)+p},ElasticEaseIn(h,p,g,_,b,y){var m=0;return h===0?p:(h/=_)===1?p+g:(y||(y=_*.3),!b||b0?t:n),c=a*n,d=s*(s>0?t:n),f=l*(l>0?n:t);return{x:u,y:r?-1*f:d,width:c-u,height:f-d}}}OS.Arc=As;As.prototype._centroid=!0;As.prototype.className="Arc";As.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,zIe._registerNode)(As);$S.Factory.addGetterSetter(As,"innerRadius",0,(0,NS.getNumberValidator)());$S.Factory.addGetterSetter(As,"outerRadius",0,(0,NS.getNumberValidator)());$S.Factory.addGetterSetter(As,"angle",0,(0,NS.getNumberValidator)());$S.Factory.addGetterSetter(As,"clockwise",!1,(0,NS.getBooleanValidator)());var DS={},Gm={};Object.defineProperty(Gm,"__esModule",{value:!0});Gm.Line=void 0;const LS=je,VIe=On,JU=Te,jIe=Ge;function I3(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),c=a*l/(s+l),d=n-u*(i-e),f=r-u*(o-t),h=n+c*(i-e),p=r+c*(o-t);return[d,f,h,p]}function YM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);u{let u,c,d;u=l/2,c=0;for(let h=0;h<20;h++)d=u*e.tValues[20][h]+u,c+=e.cValues[20][h]*r(a,s,d);return u*c};e.getCubicArcLength=t;const n=(a,s,l)=>{l===void 0&&(l=1);const u=a[0]-2*a[1]+a[2],c=s[0]-2*s[1]+s[2],d=2*a[1]-2*a[0],f=2*s[1]-2*s[0],h=4*(u*u+c*c),p=4*(u*d+c*f),g=d*d+f*f;if(h===0)return l*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(s[2]-s[0],2));const _=p/(2*h),b=g/h,y=l+_,m=b-_*_,v=y*y+m>0?Math.sqrt(y*y+m):0,S=_*_+m>0?Math.sqrt(_*_+m):0,w=_+Math.sqrt(_*_+m)!==0?m*Math.log(Math.abs((y+v)/(_+S))):0;return Math.sqrt(h)/2*(y*v-_*S+w)};e.getQuadraticArcLength=n;function r(a,s,l){const u=i(1,l,a),c=i(1,l,s),d=u*u+c*c;return Math.sqrt(d)}const i=(a,s,l)=>{const u=l.length-1;let c,d;if(u===0)return 0;if(a===0){d=0;for(let f=0;f<=u;f++)d+=e.binomialCoefficients[u][f]*Math.pow(1-s,u-f)*Math.pow(s,f)*l[f];return d}else{c=new Array(u);for(let f=0;f{let u=1,c=a/s,d=(a-l(c))/s,f=0;for(;u>.001;){const h=l(c+d),p=Math.abs(a-h)/s;if(p500)break}return c};e.t2length=o})(eG);Object.defineProperty(jf,"__esModule",{value:!0});jf.Path=void 0;const UIe=je,GIe=On,HIe=Ge,zc=eG;class An extends GIe.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=An.parsePathData(this.data()),this.pathLength=An.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;ic?u:c,_=u>c?1:u/c,b=u>c?c/u:1;t.translate(s,l),t.rotate(h),t.scale(_,b),t.arc(0,0,g,d,d+f,1-p),t.scale(1/_,1/b),t.rotate(-h),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var c=u.points[4],d=u.points[5],f=u.points[4]+d,h=Math.PI/180;if(Math.abs(c-f)f;p-=h){const g=An.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],p,0);t.push(g.x,g.y)}else for(let p=c+h;pn[i].pathLength;)t-=n[i].pathLength,++i;if(i===o)return r=n[i-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[i].points.slice(0,2),{x:r[0],y:r[1]};var a=n[i],s=a.points;switch(a.command){case"L":return An.getPointOnLine(t,a.start.x,a.start.y,s[0],s[1]);case"C":return An.getPointOnCubicBezier((0,zc.t2length)(t,An.getPathLength(n),g=>(0,zc.getCubicArcLength)([a.start.x,s[0],s[2],s[4]],[a.start.y,s[1],s[3],s[5]],g)),a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return An.getPointOnQuadraticBezier((0,zc.t2length)(t,An.getPathLength(n),g=>(0,zc.getQuadraticArcLength)([a.start.x,s[0],s[2]],[a.start.y,s[1],s[3]],g)),a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":var l=s[0],u=s[1],c=s[2],d=s[3],f=s[4],h=s[5],p=s[6];return f+=h*t/a.pathLength,An.getPointOnEllipticalArc(l,u,c,d,f,p)}return null}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(p[0]);){var y="",m=[],v=l,S=u,w,C,x,P,E,I,N,M,T,A;switch(h){case"l":l+=p.shift(),u+=p.shift(),y="L",m.push(l,u);break;case"L":l=p.shift(),u=p.shift(),m.push(l,u);break;case"m":var R=p.shift(),D=p.shift();if(l+=R,u+=D,y="M",a.length>2&&a[a.length-1].command==="z"){for(var $=a.length-2;$>=0;$--)if(a[$].command==="M"){l=a[$].points[0]+R,u=a[$].points[1]+D;break}}m.push(l,u),h="l";break;case"M":l=p.shift(),u=p.shift(),y="M",m.push(l,u),h="L";break;case"h":l+=p.shift(),y="L",m.push(l,u);break;case"H":l=p.shift(),y="L",m.push(l,u);break;case"v":u+=p.shift(),y="L",m.push(l,u);break;case"V":u=p.shift(),y="L",m.push(l,u);break;case"C":m.push(p.shift(),p.shift(),p.shift(),p.shift()),l=p.shift(),u=p.shift(),m.push(l,u);break;case"c":m.push(l+p.shift(),u+p.shift(),l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="C",m.push(l,u);break;case"S":C=l,x=u,w=a[a.length-1],w.command==="C"&&(C=l+(l-w.points[2]),x=u+(u-w.points[3])),m.push(C,x,p.shift(),p.shift()),l=p.shift(),u=p.shift(),y="C",m.push(l,u);break;case"s":C=l,x=u,w=a[a.length-1],w.command==="C"&&(C=l+(l-w.points[2]),x=u+(u-w.points[3])),m.push(C,x,l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="C",m.push(l,u);break;case"Q":m.push(p.shift(),p.shift()),l=p.shift(),u=p.shift(),m.push(l,u);break;case"q":m.push(l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="Q",m.push(l,u);break;case"T":C=l,x=u,w=a[a.length-1],w.command==="Q"&&(C=l+(l-w.points[0]),x=u+(u-w.points[1])),l=p.shift(),u=p.shift(),y="Q",m.push(C,x,l,u);break;case"t":C=l,x=u,w=a[a.length-1],w.command==="Q"&&(C=l+(l-w.points[0]),x=u+(u-w.points[1])),l+=p.shift(),u+=p.shift(),y="Q",m.push(C,x,l,u);break;case"A":P=p.shift(),E=p.shift(),I=p.shift(),N=p.shift(),M=p.shift(),T=l,A=u,l=p.shift(),u=p.shift(),y="A",m=this.convertEndpointToCenterParameterization(T,A,l,u,N,M,P,E,I);break;case"a":P=p.shift(),E=p.shift(),I=p.shift(),N=p.shift(),M=p.shift(),T=l,A=u,l+=p.shift(),u+=p.shift(),y="A",m=this.convertEndpointToCenterParameterization(T,A,l,u,N,M,P,E,I);break}a.push({command:y||h,points:m,start:{x:v,y:S},pathLength:this.calcLength(v,S,y||h,m)})}(h==="z"||h==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=An;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":return(0,zc.getCubicArcLength)([t,i[0],i[2],i[4]],[n,i[1],i[3],i[5]],1);case"Q":return(0,zc.getQuadraticArcLength)([t,i[0],i[2]],[n,i[1],i[3]],1);case"A":o=0;var c=i[4],d=i[5],f=i[4]+d,h=Math.PI/180;if(Math.abs(c-f)f;l-=h)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=c+h;l1&&(s*=Math.sqrt(h),l*=Math.sqrt(h));var p=Math.sqrt((s*s*(l*l)-s*s*(f*f)-l*l*(d*d))/(s*s*(f*f)+l*l*(d*d)));o===a&&(p*=-1),isNaN(p)&&(p=0);var g=p*s*f/l,_=p*-l*d/s,b=(t+r)/2+Math.cos(c)*g-Math.sin(c)*_,y=(n+i)/2+Math.sin(c)*g+Math.cos(c)*_,m=function(E){return Math.sqrt(E[0]*E[0]+E[1]*E[1])},v=function(E,I){return(E[0]*I[0]+E[1]*I[1])/(m(E)*m(I))},S=function(E,I){return(E[0]*I[1]=1&&(P=0),a===0&&P>0&&(P=P-2*Math.PI),a===1&&P<0&&(P=P+2*Math.PI),[b,y,s,l,w,P,c,a]}}jf.Path=An;An.prototype.className="Path";An.prototype._attrsAffectingSize=["data"];(0,HIe._registerNode)(An);UIe.Factory.addGetterSetter(An,"data");Object.defineProperty(DS,"__esModule",{value:!0});DS.Arrow=void 0;const FS=je,qIe=Gm,tG=Te,WIe=Ge,ZM=jf;class yc extends qIe.Line{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const f=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],h=ZM.Path.calcLength(i[i.length-4],i[i.length-3],"C",f),p=ZM.Path.getPointOnQuadraticBezier(Math.min(1,1-a/h),f[0],f[1],f[2],f[3],f[4],f[5]);l=r[s-2]-p.x,u=r[s-1]-p.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var c=(Math.atan2(u,l)+n)%n,d=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(c),t.moveTo(0,0),t.lineTo(-a,d/2),t.lineTo(-a,-d/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,d/2),t.lineTo(-a,-d/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}DS.Arrow=yc;yc.prototype.className="Arrow";(0,WIe._registerNode)(yc);FS.Factory.addGetterSetter(yc,"pointerLength",10,(0,tG.getNumberValidator)());FS.Factory.addGetterSetter(yc,"pointerWidth",10,(0,tG.getNumberValidator)());FS.Factory.addGetterSetter(yc,"pointerAtBeginning",!1);FS.Factory.addGetterSetter(yc,"pointerAtEnding",!0);var BS={};Object.defineProperty(BS,"__esModule",{value:!0});BS.Circle=void 0;const KIe=je,XIe=On,QIe=Te,YIe=Ge;class Uf extends XIe.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}BS.Circle=Uf;Uf.prototype._centroid=!0;Uf.prototype.className="Circle";Uf.prototype._attrsAffectingSize=["radius"];(0,YIe._registerNode)(Uf);KIe.Factory.addGetterSetter(Uf,"radius",0,(0,QIe.getNumberValidator)());var zS={};Object.defineProperty(zS,"__esModule",{value:!0});zS.Ellipse=void 0;const hA=je,ZIe=On,nG=Te,JIe=Ge;class Yl extends ZIe.Shape{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}zS.Ellipse=Yl;Yl.prototype.className="Ellipse";Yl.prototype._centroid=!0;Yl.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,JIe._registerNode)(Yl);hA.Factory.addComponentsGetterSetter(Yl,"radius",["x","y"]);hA.Factory.addGetterSetter(Yl,"radiusX",0,(0,nG.getNumberValidator)());hA.Factory.addGetterSetter(Yl,"radiusY",0,(0,nG.getNumberValidator)());var VS={};Object.defineProperty(VS,"__esModule",{value:!0});VS.Image=void 0;const Hw=nn,vc=je,e8e=On,t8e=Ge,Hm=Te;let Ia=class rG extends e8e.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),o=this.attrs.image;let a;if(o){const s=this.attrs.cropWidth,l=this.attrs.cropHeight;s&&l?a=[o,this.cropX(),this.cropY(),s,l,0,0,n,r]:a=[o,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?Hw.Util.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),o&&(i&&t.clip(),t.drawImage.apply(t,a))}_hitFunc(t){var n=this.width(),r=this.height(),i=this.cornerRadius();t.beginPath(),i?Hw.Util.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=Hw.Util.createImageElement();i.onload=function(){var o=new rG({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};VS.Image=Ia;Ia.prototype.className="Image";(0,t8e._registerNode)(Ia);vc.Factory.addGetterSetter(Ia,"cornerRadius",0,(0,Hm.getNumberOrArrayOfNumbersValidator)(4));vc.Factory.addGetterSetter(Ia,"image");vc.Factory.addComponentsGetterSetter(Ia,"crop",["x","y","width","height"]);vc.Factory.addGetterSetter(Ia,"cropX",0,(0,Hm.getNumberValidator)());vc.Factory.addGetterSetter(Ia,"cropY",0,(0,Hm.getNumberValidator)());vc.Factory.addGetterSetter(Ia,"cropWidth",0,(0,Hm.getNumberValidator)());vc.Factory.addGetterSetter(Ia,"cropHeight",0,(0,Hm.getNumberValidator)());var Ef={};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.Tag=Ef.Label=void 0;const jS=je,n8e=On,r8e=zf,pA=Te,iG=Ge;var oG=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],i8e="Change.konva",o8e="none",M3="up",R3="right",O3="down",$3="left",a8e=oG.length;class gA extends r8e.Group{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}GS.RegularPolygon=_c;_c.prototype.className="RegularPolygon";_c.prototype._centroid=!0;_c.prototype._attrsAffectingSize=["radius"];(0,h8e._registerNode)(_c);aG.Factory.addGetterSetter(_c,"radius",0,(0,sG.getNumberValidator)());aG.Factory.addGetterSetter(_c,"sides",0,(0,sG.getNumberValidator)());var HS={};Object.defineProperty(HS,"__esModule",{value:!0});HS.Ring=void 0;const lG=je,p8e=On,uG=Te,g8e=Ge;var JM=Math.PI*2;class Sc extends p8e.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,JM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),JM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}HS.Ring=Sc;Sc.prototype.className="Ring";Sc.prototype._centroid=!0;Sc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,g8e._registerNode)(Sc);lG.Factory.addGetterSetter(Sc,"innerRadius",0,(0,uG.getNumberValidator)());lG.Factory.addGetterSetter(Sc,"outerRadius",0,(0,uG.getNumberValidator)());var qS={};Object.defineProperty(qS,"__esModule",{value:!0});qS.Sprite=void 0;const xc=je,m8e=On,y8e=Vf,cG=Te,v8e=Ge;class Ma extends m8e.Shape{constructor(t){super(t),this._updated=!0,this.anim=new y8e.Animation(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],c=o[i+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,c),t.closePath(),t.fillStrokeShape(this)),d)if(a){var f=a[n],h=r*2;t.drawImage(d,s,l,u,c,f[h+0],f[h+1],u,c)}else t.drawImage(d,s,l,u,c,0,0,u,c)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],c=r*2;t.rect(u[c+0],u[c+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var my;function Ww(){return my||(my=N3.Util.createCanvasElement().getContext(E8e),my)}function D8e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function L8e(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function F8e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hn extends S8e.Shape{constructor(t){super(F8e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<$8e;n++)this.on(gG[n]+C8e,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,s=this.verticalAlign(),l=this.direction(),u=0,c=this.align(),d=this.getWidth(),f=this.letterSpacing(),h=this.fill(),p=this.textDecoration(),g=p.indexOf("underline")!==-1,_=p.indexOf("line-through")!==-1,b;l=l===fG?t.direction:l;var y=0,y=a/2,m=0,v=0;for(l===nR&&t.setAttr("direction",l),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",tR),t.setAttr("textAlign",hG),s===tR?u=(this.getHeight()-r*a-i*2)/2:s===k8e&&(u=this.getHeight()-r*a-i*2),t.translate(i,u+i),b=0;b1&&(y+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=N3.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(T8e,n),this}getWidth(){var t=this.attrs.width===Vc||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Vc||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return N3.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Ww(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+gy+this.fontVariant()+gy+(this.fontSize()+I8e)+N8e(this.fontFamily())}_addTextLine(t){this.align()===Ch&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Ww().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Vc&&o!==void 0,l=a!==Vc&&a!==void 0,u=this.padding(),c=o-u*2,d=a-u*2,f=0,h=this.wrap(),p=h!==rR,g=h!==O8e&&p,_=this.ellipsis();this.textArr=[],Ww().font=this._getContextFont();for(var b=_?this._getTextWidth(qw):0,y=0,m=t.length;yc)for(;v.length>0;){for(var w=0,C=v.length,x="",P=0;w>>1,I=v.slice(0,E+1),N=this._getTextWidth(I)+b;N<=c?(w=E+1,x=I,P=N):C=E}if(x){if(g){var M,T=v[x.length],A=T===gy||T===eR;A&&P<=c?M=x.length:M=Math.max(x.lastIndexOf(gy),x.lastIndexOf(eR))+1,M>0&&(w=M,x=x.slice(0,w),P=this._getTextWidth(x))}x=x.trimRight(),this._addTextLine(x),r=Math.max(r,P),f+=i;var R=this._shouldHandleEllipsis(f);if(R){this._tryToAddEllipsisToLastLine();break}if(v=v.slice(w),v=v.trimLeft(),v.length>0&&(S=this._getTextWidth(v),S<=c)){this._addTextLine(v),f+=i,r=Math.max(r,S);break}}else break}else this._addTextLine(v),f+=i,r=Math.max(r,S),this._shouldHandleEllipsis(f)&&yd)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Vc&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==rR;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Vc&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+qw)n?null:Eh.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=Eh.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),o=this.glyphInfo;n==="underline"&&t.beginPath();for(var a=0;a=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;ie+`.${_G}`).join(" "),aR="nodesRect",q8e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],W8e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const K8e="ontouchstart"in go.Konva._global;function X8e(e,t,n){if(e==="rotater")return n;t+=_t.Util.degToRad(W8e[e]||0);var r=(_t.Util.radToDeg(t)%360+360)%360;return _t.Util._inRange(r,315+22.5,360)||_t.Util._inRange(r,0,22.5)?"ns-resize":_t.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":_t.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":_t.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":_t.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":_t.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":_t.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":_t.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(_t.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var lb=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],sR=1e8;function Q8e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function SG(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:i}}function Y8e(e,t){const n=Q8e(e);return SG(e,t,n)}function Z8e(e,t,n){let r=t;for(let i=0;ii.isAncestorOf(this)?(_t.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=n,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const o=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=i._attrsAffectingSize.map(s=>s+"Change."+this._getEventNamespace()).join(" ");i.on(a,o),i.on(q8e.map(s=>s+`.${this._getEventNamespace()}`).join(" "),o),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,o),this._proxyDrag(i)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(aR),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(aR,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(go.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),c={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return SG(c,-go.Konva.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-sR,y:-sR,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const c=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var d=[{x:c.x,y:c.y},{x:c.x+c.width,y:c.y},{x:c.x+c.width,y:c.y+c.height},{x:c.x,y:c.y+c.height}],f=u.getAbsoluteTransform();d.forEach(function(h){var p=f.point(h);n.push(p)})});const r=new _t.Transform;r.rotate(-go.Konva.getAngle(this.rotation()));var i=1/0,o=1/0,a=-1/0,s=-1/0;n.forEach(function(u){var c=r.point(u);i===void 0&&(i=a=c.x,o=s=c.y),i=Math.min(i,c.x),o=Math.min(o,c.y),a=Math.max(a,c.x),s=Math.max(s,c.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:go.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),lb.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){var n=new U8e.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:K8e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=go.Konva.getAngle(this.rotation()),o=this.rotateAnchorCursor(),a=X8e(t,i,o);n.getStage().content&&(n.getStage().content.style.cursor=a),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new j8e.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(n,r){var i=r.getParent(),o=i.padding();n.beginPath(),n.rect(-o,-o,r.width()+o*2,r.height()+o*2),n.moveTo(r.width()/2,-o),i.rotateEnabled()&&n.lineTo(r.width()/2,-i.rotateAnchorOffset()*_t.Util._sign(r.height())-o),n.fillStrokeShape(r)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const c=o.getAbsolutePosition();if(!(u.x===c.x&&u.y===c.y)){if(this._movingAnchorName==="rotater"){var d=this._getNodeRect();n=o.x()-d.width/2,r=-o.y()+d.height/2;let M=Math.atan2(-r,n)+Math.PI/2;d.height<0&&(M-=Math.PI);var f=go.Konva.getAngle(this.rotation());const T=f+M,A=go.Konva.getAngle(this.rotationSnapTolerance()),D=Z8e(this.rotationSnaps(),T,A)-d.rotation,$=Y8e(d,D);this._fitNodesInto($,t);return}var h=this.shiftBehavior(),p;h==="inverted"?p=this.keepRatio()&&!t.shiftKey:h==="none"?p=this.keepRatio():p=this.keepRatio()||t.shiftKey;var m=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(p){var g=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(g.x-o.x(),2)+Math.pow(g.y-o.y(),2));var _=this.findOne(".top-left").x()>g.x?-1:1,b=this.findOne(".top-left").y()>g.y?-1:1;n=i*this.cos*_,r=i*this.sin*b,this.findOne(".top-left").x(g.x-n),this.findOne(".top-left").y(g.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(p){var g=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-g.x,2)+Math.pow(g.y-o.y(),2));var _=this.findOne(".top-right").x()g.y?-1:1;n=i*this.cos*_,r=i*this.sin*b,this.findOne(".top-right").x(g.x+n),this.findOne(".top-right").y(g.y-r)}var y=o.position();this.findOne(".top-left").y(y.y),this.findOne(".bottom-right").x(y.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(p){var g=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(g.x-o.x(),2)+Math.pow(o.y()-g.y,2));var _=g.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(_t.Util._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(_t.Util._inRange(t.height,-this.padding()*2-i,i)){this.update();return}var o=new _t.Transform;if(o.rotate(go.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const f=o.point({x:-this.padding()*2,y:0});t.x+=f.x,t.y+=f.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const f=o.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const f=o.point({x:0,y:-this.padding()*2});t.x+=f.x,t.y+=f.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const f=o.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const f=this.boundBoxFunc()(r,t);f?t=f:_t.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const a=1e7,s=new _t.Transform;s.translate(r.x,r.y),s.rotate(r.rotation),s.scale(r.width/a,r.height/a);const l=new _t.Transform,u=t.width/a,c=t.height/a;this.flipEnabled()===!1?(l.translate(t.x,t.y),l.rotate(t.rotation),l.translate(t.width<0?t.width:0,t.height<0?t.height:0),l.scale(Math.abs(u),Math.abs(c))):(l.translate(t.x,t.y),l.rotate(t.rotation),l.scale(u,c));const d=l.multiply(s.invert());this._nodes.forEach(f=>{var h;const p=f.getParent().getAbsoluteTransform(),g=f.getTransform().copy();g.translate(f.offsetX(),f.offsetY());const _=new _t.Transform;_.multiply(p.copy().invert()).multiply(d).multiply(p).multiply(g);const b=_.decompose();f.setAttrs(b),this._fire("transform",{evt:n,target:f}),f._fire("transform",{evt:n,target:f}),(h=f.getLayer())===null||h===void 0||h.batchDraw()}),this.rotation(_t.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(_t.Util._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();const u=this.find("._anchor");u.forEach(d=>{d.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*_t.Util._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const c=this.anchorStyleFunc();c&&u.forEach(d=>{c(d)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),oR.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return iR.Node.prototype.toObject.call(this)}clone(t){var n=iR.Node.prototype.clone.call(this,t);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}XS.Transformer=lt;function J8e(e){return e instanceof Array||_t.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){lb.indexOf(t)===-1&&_t.Util.warn("Unknown anchor name: "+t+". Available names are: "+lb.join(", "))}),e||[]}lt.prototype.className="Transformer";(0,G8e._registerNode)(lt);yt.Factory.addGetterSetter(lt,"enabledAnchors",lb,J8e);yt.Factory.addGetterSetter(lt,"flipEnabled",!0,(0,eu.getBooleanValidator)());yt.Factory.addGetterSetter(lt,"resizeEnabled",!0);yt.Factory.addGetterSetter(lt,"anchorSize",10,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"rotateEnabled",!0);yt.Factory.addGetterSetter(lt,"rotationSnaps",[]);yt.Factory.addGetterSetter(lt,"rotateAnchorOffset",50,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"rotateAnchorCursor","crosshair");yt.Factory.addGetterSetter(lt,"rotationSnapTolerance",5,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderEnabled",!0);yt.Factory.addGetterSetter(lt,"anchorStroke","rgb(0, 161, 255)");yt.Factory.addGetterSetter(lt,"anchorStrokeWidth",1,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"anchorFill","white");yt.Factory.addGetterSetter(lt,"anchorCornerRadius",0,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderStroke","rgb(0, 161, 255)");yt.Factory.addGetterSetter(lt,"borderStrokeWidth",1,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderDash");yt.Factory.addGetterSetter(lt,"keepRatio",!0);yt.Factory.addGetterSetter(lt,"shiftBehavior","default");yt.Factory.addGetterSetter(lt,"centeredScaling",!1);yt.Factory.addGetterSetter(lt,"ignoreStroke",!1);yt.Factory.addGetterSetter(lt,"padding",0,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"node");yt.Factory.addGetterSetter(lt,"nodes");yt.Factory.addGetterSetter(lt,"boundBoxFunc");yt.Factory.addGetterSetter(lt,"anchorDragBoundFunc");yt.Factory.addGetterSetter(lt,"anchorStyleFunc");yt.Factory.addGetterSetter(lt,"shouldOverdrawWholeArea",!1);yt.Factory.addGetterSetter(lt,"useSingleNodeRotation",!0);yt.Factory.backCompat(lt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var QS={};Object.defineProperty(QS,"__esModule",{value:!0});QS.Wedge=void 0;const YS=je,e9e=On,t9e=Ge,xG=Te,n9e=Ge;class Ps extends e9e.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,t9e.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}QS.Wedge=Ps;Ps.prototype.className="Wedge";Ps.prototype._centroid=!0;Ps.prototype._attrsAffectingSize=["radius"];(0,n9e._registerNode)(Ps);YS.Factory.addGetterSetter(Ps,"radius",0,(0,xG.getNumberValidator)());YS.Factory.addGetterSetter(Ps,"angle",0,(0,xG.getNumberValidator)());YS.Factory.addGetterSetter(Ps,"clockwise",!1);YS.Factory.backCompat(Ps,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var ZS={};Object.defineProperty(ZS,"__esModule",{value:!0});ZS.Blur=void 0;const lR=je,r9e=Kt,i9e=Te;function uR(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var o9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],a9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function s9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,c,d,f,h,p,g,_,b,y,m,v,S,w,C,x,P,E,I,N,M=t+t+1,T=r-1,A=i-1,R=t+1,D=R*(R+1)/2,$=new uR,L=null,O=$,B=null,U=null,j=o9e[t],q=a9e[t];for(s=1;s>q,I!==0?(I=255/I,n[c]=(f*j>>q)*I,n[c+1]=(h*j>>q)*I,n[c+2]=(p*j>>q)*I):n[c]=n[c+1]=n[c+2]=0,f-=_,h-=b,p-=y,g-=m,_-=B.r,b-=B.g,y-=B.b,m-=B.a,l=d+((l=o+t+1)>q,I>0?(I=255/I,n[l]=(f*j>>q)*I,n[l+1]=(h*j>>q)*I,n[l+2]=(p*j>>q)*I):n[l]=n[l+1]=n[l+2]=0,f-=_,h-=b,p-=y,g-=m,_-=B.r,b-=B.g,y-=B.b,m-=B.a,l=o+((l=a+R)0&&s9e(t,n)};ZS.Blur=l9e;lR.Factory.addGetterSetter(r9e.Node,"blurRadius",0,(0,i9e.getNumberValidator)(),lR.Factory.afterSetFilter);var JS={};Object.defineProperty(JS,"__esModule",{value:!0});JS.Brighten=void 0;const cR=je,u9e=Kt,c9e=Te,d9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};e2.Contrast=p9e;dR.Factory.addGetterSetter(f9e.Node,"contrast",0,(0,h9e.getNumberValidator)(),dR.Factory.afterSetFilter);var t2={};Object.defineProperty(t2,"__esModule",{value:!0});t2.Emboss=void 0;const Nl=je,n2=Kt,g9e=nn,wG=Te,m9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,c=l*4,d=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:g9e.Util.error("Unknown emboss direction: "+r)}do{var f=(d-1)*c,h=o;d+h<1&&(h=0),d+h>u&&(h=0);var p=(d-1+h)*l*4,g=l;do{var _=f+(g-1)*4,b=a;g+b<1&&(b=0),g+b>l&&(b=0);var y=p+(g-1+b)*4,m=s[_]-s[y],v=s[_+1]-s[y+1],S=s[_+2]-s[y+2],w=m,C=w>0?w:-w,x=v>0?v:-v,P=S>0?S:-S;if(x>C&&(w=v),P>C&&(w=S),w*=t,i){var E=s[_]+w,I=s[_+1]+w,N=s[_+2]+w;s[_]=E>255?255:E<0?0:E,s[_+1]=I>255?255:I<0?0:I,s[_+2]=N>255?255:N<0?0:N}else{var M=n-w;M<0?M=0:M>255&&(M=255),s[_]=s[_+1]=s[_+2]=M}}while(--g)}while(--d)};t2.Emboss=m9e;Nl.Factory.addGetterSetter(n2.Node,"embossStrength",.5,(0,wG.getNumberValidator)(),Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(n2.Node,"embossWhiteLevel",.5,(0,wG.getNumberValidator)(),Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(n2.Node,"embossDirection","top-left",null,Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(n2.Node,"embossBlend",!1,null,Nl.Factory.afterSetFilter);var r2={};Object.defineProperty(r2,"__esModule",{value:!0});r2.Enhance=void 0;const fR=je,y9e=Kt,v9e=Te;function Qw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const b9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],c=u,d,f,h=this.enhance();if(h!==0){for(f=0;fi&&(i=o),l=t[f+1],ls&&(s=l),d=t[f+2],dc&&(c=d);i===r&&(i=255,r=0),s===a&&(s=255,a=0),c===u&&(c=255,u=0);var p,g,_,b,y,m,v,S,w;for(h>0?(g=i+h*(255-i),_=r-h*(r-0),y=s+h*(255-s),m=a-h*(a-0),S=c+h*(255-c),w=u-h*(u-0)):(p=(i+r)*.5,g=i+h*(i-p),_=r+h*(r-p),b=(s+a)*.5,y=s+h*(s-b),m=a+h*(a-b),v=(c+u)*.5,S=c+h*(c-v),w=u+h*(u-v)),f=0;fb?_:b;var y=a,m=o,v,S,w=360/m*Math.PI/180,C,x;for(S=0;Sm?y:m;var v=a,S=o,w,C,x=n.polarRotation||0,P,E;for(c=0;ct&&(v=m,S=0,w=-1),i=0;i=0&&h=0&&p=0&&h=0&&p=255*4?255:0}return a}function $9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&h=0&&p=n))for(o=g;o<_;o+=1)o>=r||(a=(n*o+i)*4,s+=v[a+0],l+=v[a+1],u+=v[a+2],c+=v[a+3],m+=1);for(s=s/m,l=l/m,u=u/m,c=c/m,i=h;i=n))for(o=g;o<_;o+=1)o>=r||(a=(n*o+i)*4,v[a+0]=s,v[a+1]=l,v[a+2]=u,v[a+3]=c)}};d2.Pixelate=j9e;mR.Factory.addGetterSetter(z9e.Node,"pixelSize",8,(0,V9e.getNumberValidator)(),mR.Factory.afterSetFilter);var f2={};Object.defineProperty(f2,"__esModule",{value:!0});f2.Posterize=void 0;const yR=je,U9e=Kt,G9e=Te,H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});cb.Factory.addGetterSetter(xA.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});cb.Factory.addGetterSetter(xA.Node,"blue",0,q9e.RGBComponent,cb.Factory.afterSetFilter);var p2={};Object.defineProperty(p2,"__esModule",{value:!0});p2.RGBA=void 0;const Gg=je,g2=Kt,K9e=Te,X9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Gg.Factory.addGetterSetter(g2.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Gg.Factory.addGetterSetter(g2.Node,"blue",0,K9e.RGBComponent,Gg.Factory.afterSetFilter);Gg.Factory.addGetterSetter(g2.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});var m2={};Object.defineProperty(m2,"__esModule",{value:!0});m2.Sepia=void 0;const Q9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),c>127&&(c=255-c),d>127&&(d=255-d),t[l]=u,t[l+1]=c,t[l+2]=d}while(--s)}while(--o)};y2.Solarize=Y9e;var v2={};Object.defineProperty(v2,"__esModule",{value:!0});v2.Threshold=void 0;const vR=je,Z9e=Kt,J9e=Te,eMe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i{const{width:r,height:i}=t,o=document.createElement("div"),a=new Ah.Stage({container:o,width:r,height:i}),s=new Ah.Layer,l=new Ah.Layer;return s.add(new Ah.Rect({...t,fill:n?"black":"white"})),e.forEach(u=>l.add(new Ah.Line({points:u.points,stroke:n?"white":"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),a.add(s),a.add(l),o.remove(),a},zMe=async(e,t,n)=>new Promise((r,i)=>{const o=document.createElement("canvas");o.width=t,o.height=n;const a=o.getContext("2d"),s=new Image;if(!a){o.remove(),i("Unable to get context");return}s.onload=function(){a.drawImage(s,0,0),o.remove(),r(a.getImageData(0,0,t,n))},s.src=e}),SR=async(e,t)=>{const n=e.toDataURL(t);return await zMe(n,t.width,t.height)},wA=async(e,t,n,r,i)=>{const o=se("canvas"),a=ES(),s=$6e();if(!a||!s){o.error("Unable to find canvas / stage");return}const l={...t,...n},u=a.clone();u.scale({x:1,y:1});const c=u.getAbsolutePosition(),d={x:l.x+c.x,y:l.y+c.y,width:l.width,height:l.height},f=await ab(u,d),h=await SR(u,d),p=await BMe(r?e.objects.filter(wL):[],l,i),g=await ab(p,l),_=await SR(p,l);return{baseBlob:f,baseImageData:h,maskBlob:g,maskImageData:_}},VMe=()=>{pe({actionCreator:A6e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n(),o=await wA(i.canvas.layerState,i.canvas.boundingBoxCoordinates,i.canvas.boundingBoxDimensions,i.canvas.isMaskEnabled,i.canvas.shouldPreserveMaskedArea);if(!o)return;const{maskBlob:a}=o;if(!a){r.error("Problem getting mask layer blob"),t(it({title:X("toast.problemSavingMask"),description:X("toast.problemSavingMaskDesc"),status:"error"}));return}const{autoAddBoardId:s}=i.gallery;t(ce.endpoints.uploadImage.initiate({file:new File([a],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!1,board_id:s==="none"?void 0:s,crop_visible:!0,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.maskSavedAssets")}}}))}})},jMe=()=>{pe({actionCreator:R6e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n(),{id:o}=e.payload,a=await wA(i.canvas.layerState,i.canvas.boundingBoxCoordinates,i.canvas.boundingBoxDimensions,i.canvas.isMaskEnabled,i.canvas.shouldPreserveMaskedArea);if(!a)return;const{maskBlob:s}=a;if(!s){r.error("Problem getting mask layer blob"),t(it({title:X("toast.problemImportingMask"),description:X("toast.problemImportingMaskDesc"),status:"error"}));return}const{autoAddBoardId:l}=i.gallery,u=await t(ce.endpoints.uploadImage.initiate({file:new File([s],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!1,board_id:l==="none"?void 0:l,crop_visible:!1,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.maskSentControlnetAssets")}}})).unwrap(),{image_name:c}=u;t(Hl({id:o,controlImage:c}))}})},UMe=async()=>{const e=ES();if(!e)return;const t=e.clone();return t.scale({x:1,y:1}),ab(t,t.getClientRect())},GMe=()=>{pe({actionCreator:I6e,effect:async(e,{dispatch:t})=>{const n=J_.get().child({namespace:"canvasCopiedToClipboardListener"}),r=await UMe();if(!r){n.error("Problem getting base layer blob"),t(it({title:X("toast.problemMergingCanvas"),description:X("toast.problemMergingCanvasDesc"),status:"error"}));return}const i=ES();if(!i){n.error("Problem getting canvas base layer"),t(it({title:X("toast.problemMergingCanvas"),description:X("toast.problemMergingCanvasDesc"),status:"error"}));return}const o=i.getClientRect({relativeTo:i.getParent()??void 0}),a=await t(ce.endpoints.uploadImage.initiate({file:new File([r],"mergedCanvas.png",{type:"image/png"}),image_category:"general",is_intermediate:!0,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.canvasMerged")}}})).unwrap(),{image_name:s}=a;t(Mle({kind:"image",layer:"base",imageName:s,...o}))}})},HMe=()=>{pe({actionCreator:T6e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n();let o;try{o=await TS(i)}catch(s){r.error(String(s)),t(it({title:X("toast.problemSavingCanvas"),description:X("toast.problemSavingCanvasDesc"),status:"error"}));return}const{autoAddBoardId:a}=i.gallery;t(ce.endpoints.uploadImage.initiate({file:new File([o],"savedCanvas.png",{type:"image/png"}),image_category:"general",is_intermediate:!1,board_id:a==="none"?void 0:a,crop_visible:!0,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.canvasSavedGallery")}}}))}})},qMe=(e,t,n)=>{if(!(Fie.match(e)||S6.match(e)||Hl.match(e)||Bie.match(e)||x6.match(e)))return!1;const{id:i}=e.payload,o=di(n.controlAdapters,i),a=di(t.controlAdapters,i);if(!o||!gi(o)||!a||!gi(a)||x6.match(e)&&o.shouldAutoConfig===!0)return!1;const{controlImage:s,processorType:l,shouldAutoConfig:u}=a;return S6.match(e)&&!u?!1:l!=="none"&&!!s},WMe=()=>{pe({predicate:qMe,effect:async(e,{dispatch:t,cancelActiveListeners:n,delay:r})=>{const i=se("session"),{id:o}=e.payload;n(),i.trace("ControlNet auto-process triggered"),await r(300),t(IE({id:o}))}})},TG=e=>(e==null?void 0:e.type)==="image_output",KMe=()=>{pe({actionCreator:IE,effect:async(e,{dispatch:t,getState:n,take:r})=>{var u;const i=se("session"),{id:o}=e.payload,a=di(n().controlAdapters,o);if(!(a!=null&&a.controlImage)||!gi(a)){i.error("Unable to process ControlNet image");return}if(a.processorType==="none"||a.processorNode.type==="none")return;const s=a.processorNode.id,l={prepend:!0,batch:{graph:{nodes:{[a.processorNode.id]:{...a.processorNode,is_intermediate:!0,use_cache:!1,image:{image_name:a.controlImage}}}},runs:1}};try{const c=t(un.endpoints.enqueueBatch.initiate(l,{fixedCacheKey:"enqueueBatch"})),d=await c.unwrap();c.reset(),i.debug({enqueueResult:pt(d)},X("queue.graphQueued"));const[f]=await r(h=>TE.match(h)&&h.payload.data.queue_batch_id===d.batch.batch_id&&h.payload.data.source_node_id===s);if(TG(f.payload.data.result)){const{image_name:h}=f.payload.data.result.image,[{payload:p}]=await r(_=>ce.endpoints.getImageDTO.matchFulfilled(_)&&_.payload.image_name===h),g=p;i.debug({controlNetId:e.payload,processedControlImage:g},"ControlNet image processed"),t(RE({id:o,processedControlImage:g.image_name}))}}catch(c){if(i.error({enqueueBatchArg:pt(l)},X("queue.graphFailedToQueue")),c instanceof Object&&"data"in c&&"status"in c&&c.status===403){const d=((u=c.data)==null?void 0:u.detail)||"Unknown Error";t(it({title:X("queue.graphFailedToQueue"),status:"error",description:d,duration:15e3})),t(Vie()),t(Hl({id:o,controlImage:null}));return}t(it({title:X("queue.graphFailedToQueue"),status:"error"}))}}})},CA=ge("app/enqueueRequested");ge("app/batchEnqueued");const XMe=e=>{const t=window.open("");t&&e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},xR=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=i=>t(r.result),r.onerror=i=>n(r.error),r.onabort=i=>n(new Error("Read aborted")),r.readAsDataURL(e)}),QMe=e=>{let t=!0,n=!1;const r=e.length;let i=3;for(i;i{const t=e.length;let n=0;for(n;n{const{isPartiallyTransparent:n,isFullyTransparent:r}=QMe(e.data),i=YMe(t.data);return n?r?"txt2img":"outpaint":i?"inpaint":"img2img"},_e="positive_conditioning",Ce="negative_conditioning",ue="denoise_latents",Kc="denoise_latents_hrf",xe="latents_to_image",tl="latents_to_image_hrf_hr",_u="latents_to_image_hrf_lr",Ph="image_to_latents_hrf",Us="resize_hrf",Zh="esrgan_hrf",Wu="linear_ui_output",xl="nsfw_checker",Nu="invisible_watermark",ve="noise",kh="noise_hrf",Ro="main_model_loader",b2="onnx_model_loader",fi="vae_loader",AG="lora_loader",ct="clip_skip",Bt="image_to_latents",aa="resize_image",Ku="img2img_resize",le="canvas_output",It="inpaint_image",JMe="scaled_inpaint_image",Gn="inpaint_image_resize_up",or="inpaint_image_resize_down",at="inpaint_infill",ts="inpaint_infill_resize_down",eRe="inpaint_final_image",Pt="inpaint_create_mask",tRe="inpaint_mask",$e="canvas_coherence_denoise_latents",rt="canvas_coherence_noise",Dl="canvas_coherence_noise_increment",ln="canvas_coherence_mask_edge",et="canvas_coherence_inpaint_create_mask",Hd="tomask",gr="mask_blur",rr="mask_combine",kt="mask_resize_up",vr="mask_resize_down",nRe="img_paste",Ih="control_net_collect",vy="ip_adapter_collect",Mh="t2i_adapter_collect",vi="core_metadata",Jh="esrgan",rRe="scale_image",mr="sdxl_model_loader",ae="sdxl_denoise_latents",fu="sdxl_refiner_model_loader",by="sdxl_refiner_positive_conditioning",_y="sdxl_refiner_negative_conditioning",Wo="sdxl_refiner_denoise_latents",zi="refiner_inpaint_create_mask",In="seamless",Co="refiner_seamless",iRe=[le,xe,tl,xl,Nu,Jh,Zh,Us,_u,Ku,It,JMe,Gn,or,at,ts,eRe,Pt,tRe,nRe,rRe],PG="text_to_image_graph",D3="image_to_image_graph",kG="canvas_text_to_image_graph",L3="canvas_image_to_image_graph",_2="canvas_inpaint_graph",S2="canvas_outpaint_graph",EA="sdxl_text_to_image_graph",db="sxdl_image_to_image_graph",x2="sdxl_canvas_text_to_image_graph",Hg="sdxl_canvas_image_to_image_graph",Ll="sdxl_canvas_inpaint_graph",Fl="sdxl_canvas_outpaint_graph",ks=(e,t,n)=>{e.nodes[vi]={id:vi,type:"core_metadata",...t},e.edges.push({source:{node_id:vi,field:"metadata"},destination:{node_id:n,field:"metadata"}})},Lo=(e,t)=>{const n=e.nodes[vi];n&&Object.assign(n,t)},Rh=(e,t)=>{const n=e.nodes[vi];n&&delete n[t]},Oh=e=>!!e.nodes[vi],oRe=(e,t)=>{e.edges=e.edges.filter(n=>n.source.node_id!==vi),e.edges.push({source:{node_id:vi,field:"metadata"},destination:{node_id:t,field:"metadata"}})},no=(e,t,n)=>{const r=Iie(e.controlAdapters).filter(o=>{var a,s;return((a=o.model)==null?void 0:a.base_model)===((s=e.generation.model)==null?void 0:s.base_model)}),i=[];if(r.length){const o={id:Ih,type:"collect",is_intermediate:!0};t.nodes[Ih]=o,t.edges.push({source:{node_id:Ih,field:"collection"},destination:{node_id:n,field:"control"}}),$e in t.nodes&&t.edges.push({source:{node_id:Ih,field:"collection"},destination:{node_id:$e,field:"control"}}),r.forEach(a=>{if(!a.model)return;const{id:s,controlImage:l,processedControlImage:u,beginStepPct:c,endStepPct:d,controlMode:f,resizeMode:h,model:p,processorType:g,weight:_}=a,b={id:`control_net_${s}`,type:"controlnet",is_intermediate:!0,begin_step_percent:c,end_step_percent:d,control_mode:f,resize_mode:h,control_model:p,control_weight:_};if(u&&g!=="none")b.image={image_name:u};else if(l)b.image={image_name:l};else return;t.nodes[b.id]=b,i.push($f(b,["id","type","is_intermediate"])),t.edges.push({source:{node_id:b.id,field:"control"},destination:{node_id:Ih,field:"item"}})}),Lo(t,{controlnets:i})}},ro=(e,t,n)=>{const r=Rie(e.controlAdapters).filter(i=>{var o,a;return((o=i.model)==null?void 0:o.base_model)===((a=e.generation.model)==null?void 0:a.base_model)});if(r.length){const i={id:vy,type:"collect",is_intermediate:!0};t.nodes[vy]=i,t.edges.push({source:{node_id:vy,field:"collection"},destination:{node_id:n,field:"ip_adapter"}}),$e in t.nodes&&t.edges.push({source:{node_id:vy,field:"collection"},destination:{node_id:$e,field:"ip_adapter"}});const o=[];r.forEach(a=>{if(!a.model)return;const{id:s,weight:l,model:u,beginStepPct:c,endStepPct:d}=a,f={id:`ip_adapter_${s}`,type:"ip_adapter",is_intermediate:!0,weight:l,ip_adapter_model:u,begin_step_percent:c,end_step_percent:d};if(a.controlImage)f.image={image_name:a.controlImage};else return;t.nodes[f.id]=f,o.push($f(f,["id","type","is_intermediate"])),t.edges.push({source:{node_id:f.id,field:"ip_adapter"},destination:{node_id:i.id,field:"item"}})}),Lo(t,{ipAdapters:o})}},Gf=(e,t,n,r=Ro)=>{const{loras:i}=e.lora,o=r_(i);if(o===0)return;t.edges=t.edges.filter(u=>!(u.source.node_id===r&&["unet"].includes(u.source.field))),t.edges=t.edges.filter(u=>!(u.source.node_id===ct&&["clip"].includes(u.source.field)));let a="",s=0;const l=[];ps(i,u=>{const{model_name:c,base_model:d,weight:f}=u,h=`${AG}_${c.replace(".","_")}`,p={type:"lora_loader",id:h,is_intermediate:!0,lora:{model_name:c,base_model:d},weight:f};l.push({lora:{model_name:c,base_model:d},weight:f}),t.nodes[h]=p,s===0?(t.edges.push({source:{node_id:r,field:"unet"},destination:{node_id:h,field:"unet"}}),t.edges.push({source:{node_id:ct,field:"clip"},destination:{node_id:h,field:"clip"}})):(t.edges.push({source:{node_id:a,field:"unet"},destination:{node_id:h,field:"unet"}}),t.edges.push({source:{node_id:a,field:"clip"},destination:{node_id:h,field:"clip"}})),s===o-1&&(t.edges.push({source:{node_id:h,field:"unet"},destination:{node_id:n,field:"unet"}}),t.id&&[_2,S2].includes(t.id)&&t.edges.push({source:{node_id:h,field:"unet"},destination:{node_id:$e,field:"unet"}}),t.edges.push({source:{node_id:h,field:"clip"},destination:{node_id:_e,field:"clip"}}),t.edges.push({source:{node_id:h,field:"clip"},destination:{node_id:Ce,field:"clip"}})),a=h,s+=1}),Lo(t,{loras:l})},io=(e,t,n=xe)=>{const r=t.nodes[n];if(!r)return;r.is_intermediate=!0,r.use_cache=!0;const i={id:xl,type:"img_nsfw",is_intermediate:!0};t.nodes[xl]=i,t.edges.push({source:{node_id:n,field:"image"},destination:{node_id:xl,field:"image"}})},aRe=["txt2img","img2img","unifiedCanvas","nodes","modelManager","queue"],TA=qn(e=>e,({ui:e})=>_E(e.activeTab)?e.activeTab:"txt2img"),DUe=qn(e=>e,({ui:e,config:t})=>{const r=aRe.filter(i=>!t.disabledTabs.includes(i)).indexOf(e.activeTab);return r===-1?0:r}),LUe=qn(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:SE}}),oo=(e,t)=>{const r=TA(e)==="unifiedCanvas"?!e.canvas.shouldAutoSave:!1,{autoAddBoardId:i}=e.gallery,o={id:Wu,type:"linear_ui_output",is_intermediate:r,use_cache:!1,board:i==="none"?void 0:{board_id:i}};t.nodes[Wu]=o;const a={node_id:Wu,field:"image"};Nu in t.nodes?t.edges.push({source:{node_id:Nu,field:"image"},destination:a}):xl in t.nodes?t.edges.push({source:{node_id:xl,field:"image"},destination:a}):le in t.nodes?t.edges.push({source:{node_id:le,field:"image"},destination:a}):tl in t.nodes?t.edges.push({source:{node_id:tl,field:"image"},destination:a}):xe in t.nodes&&t.edges.push({source:{node_id:xe,field:"image"},destination:a})},ao=(e,t,n)=>{const{seamlessXAxis:r,seamlessYAxis:i}=e.generation;t.nodes[In]={id:In,type:"seamless",seamless_x:r,seamless_y:i},r&&Lo(t,{seamless_x:r}),i&&Lo(t,{seamless_y:i});let o=ue;(t.id===EA||t.id===db||t.id===x2||t.id===Hg||t.id===Ll||t.id===Fl)&&(o=ae),t.edges=t.edges.filter(a=>!(a.source.node_id===n&&["unet"].includes(a.source.field))&&!(a.source.node_id===n&&["vae"].includes(a.source.field))),t.edges.push({source:{node_id:n,field:"unet"},destination:{node_id:In,field:"unet"}},{source:{node_id:n,field:"vae"},destination:{node_id:In,field:"vae"}},{source:{node_id:In,field:"unet"},destination:{node_id:o,field:"unet"}}),(t.id==_2||t.id===S2||t.id===Ll||t.id===Fl)&&t.edges.push({source:{node_id:In,field:"unet"},destination:{node_id:$e,field:"unet"}})},so=(e,t,n)=>{const r=$ie(e.controlAdapters).filter(i=>{var o,a;return((o=i.model)==null?void 0:o.base_model)===((a=e.generation.model)==null?void 0:a.base_model)});if(r.length){const i={id:Mh,type:"collect",is_intermediate:!0};t.nodes[Mh]=i,t.edges.push({source:{node_id:Mh,field:"collection"},destination:{node_id:n,field:"t2i_adapter"}}),$e in t.nodes&&t.edges.push({source:{node_id:Mh,field:"collection"},destination:{node_id:$e,field:"t2i_adapter"}});const o=[];r.forEach(a=>{if(!a.model)return;const{id:s,controlImage:l,processedControlImage:u,beginStepPct:c,endStepPct:d,resizeMode:f,model:h,processorType:p,weight:g}=a,_={id:`t2i_adapter_${s}`,type:"t2i_adapter",is_intermediate:!0,begin_step_percent:c,end_step_percent:d,resize_mode:f,t2i_adapter_model:h,weight:g};if(u&&p!=="none")_.image={image_name:u};else if(l)_.image={image_name:l};else return;t.nodes[_.id]=_,o.push($f(_,["id","type","is_intermediate"])),t.edges.push({source:{node_id:_.id,field:"t2i_adapter"},destination:{node_id:Mh,field:"item"}})}),Lo(t,{t2iAdapters:o})}},lo=(e,t,n=Ro)=>{const{vae:r,canvasCoherenceMode:i}=e.generation,{boundingBoxScaleMethod:o}=e.canvas,{shouldUseSDXLRefiner:a}=e.sdxl,s=["auto","manual"].includes(o),l=!r;l||(t.nodes[fi]={type:"vae_loader",id:fi,is_intermediate:!0,vae_model:r});const u=n==b2;(t.id===PG||t.id===D3||t.id===EA||t.id===db)&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:xe,field:"vae"}}),(t.id===kG||t.id===L3||t.id===x2||t.id==Hg)&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:s?xe:le,field:"vae"}}),(t.id===D3||t.id===db||t.id===L3||t.id===Hg)&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Bt,field:"vae"}}),(t.id===_2||t.id===S2||t.id===Ll||t.id===Fl)&&(t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:It,field:"vae"}},{source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Pt,field:"vae"}},{source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:xe,field:"vae"}}),i!=="unmasked"&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:et,field:"vae"}})),a&&(t.id===Ll||t.id===Fl)&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:zi,field:"vae"}}),r&&Lo(t,{vae:r})},uo=(e,t,n=xe)=>{const i=TA(e)==="unifiedCanvas"?!e.canvas.shouldAutoSave:!1,o=t.nodes[n],a=t.nodes[xl];if(!o)return;const s={id:Nu,type:"img_watermark",is_intermediate:i};t.nodes[Nu]=s,o.is_intermediate=!0,o.use_cache=!0,a?(a.is_intermediate=!0,t.edges.push({source:{node_id:xl,field:"image"},destination:{node_id:Nu,field:"image"}})):t.edges.push({source:{node_id:n,field:"image"},destination:{node_id:Nu,field:"image"}})},sRe=(e,t)=>{const n=se("nodes"),{positivePrompt:r,negativePrompt:i,model:o,cfgScale:a,scheduler:s,seed:l,steps:u,img2imgStrength:c,vaePrecision:d,clipSkip:f,shouldUseCpuNoise:h,seamlessXAxis:p,seamlessYAxis:g}=e.generation,{width:_,height:b}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:y,boundingBoxScaleMethod:m}=e.canvas,v=d==="fp32",S=!0,w=["auto","manual"].includes(m);if(!o)throw n.error("No model found in state"),new Error("No model found in state");let C=Ro;const x=h,P={id:L3,nodes:{[C]:{type:"main_model_loader",id:C,is_intermediate:S,model:o},[ct]:{type:"clip_skip",id:ct,is_intermediate:S,skipped_layers:f},[_e]:{type:"compel",id:_e,is_intermediate:S,prompt:r},[Ce]:{type:"compel",id:Ce,is_intermediate:S,prompt:i},[ve]:{type:"noise",id:ve,is_intermediate:S,use_cpu:x,seed:l,width:w?y.width:_,height:w?y.height:b},[Bt]:{type:"i2l",id:Bt,is_intermediate:S},[ue]:{type:"denoise_latents",id:ue,is_intermediate:S,cfg_scale:a,scheduler:s,steps:u,denoising_start:1-c,denoising_end:1},[le]:{type:"l2i",id:le,is_intermediate:S}},edges:[{source:{node_id:C,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:C,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:Bt,field:"latents"},destination:{node_id:ue,field:"latents"}}]};return w?(P.nodes[Ku]={id:Ku,type:"img_resize",is_intermediate:S,image:t,width:y.width,height:y.height},P.nodes[xe]={id:xe,type:"l2i",is_intermediate:S,fp32:v},P.nodes[le]={id:le,type:"img_resize",is_intermediate:S,width:_,height:b},P.edges.push({source:{node_id:Ku,field:"image"},destination:{node_id:Bt,field:"image"}},{source:{node_id:ue,field:"latents"},destination:{node_id:xe,field:"latents"}},{source:{node_id:xe,field:"image"},destination:{node_id:le,field:"image"}})):(P.nodes[le]={type:"l2i",id:le,is_intermediate:S,fp32:v},P.nodes[Bt].image=t,P.edges.push({source:{node_id:ue,field:"latents"},destination:{node_id:le,field:"latents"}})),ks(P,{generation_mode:"img2img",cfg_scale:a,width:w?y.width:_,height:w?y.height:b,positive_prompt:r,negative_prompt:i,model:o,seed:l,steps:u,rand_device:x?"cpu":"cuda",scheduler:s,clip_skip:f,strength:c,init_image:t.image_name},le),(p||g)&&(ao(e,P,C),C=In),Gf(e,P,ue),lo(e,P,C),no(e,P,ue),ro(e,P,ue),so(e,P,ue),e.system.shouldUseNSFWChecker&&io(e,P,le),e.system.shouldUseWatermarker&&uo(e,P,le),oo(e,P),P},lRe=(e,t,n)=>{const r=se("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,img2imgStrength:c,seed:d,vaePrecision:f,shouldUseCpuNoise:h,maskBlur:p,maskBlurMethod:g,canvasCoherenceMode:_,canvasCoherenceSteps:b,canvasCoherenceStrength:y,clipSkip:m,seamlessXAxis:v,seamlessYAxis:S}=e.generation;if(!a)throw r.error("No Image found in state"),new Error("No Image found in state");const{width:w,height:C}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:x,boundingBoxScaleMethod:P}=e.canvas,E=!0,I=f==="fp32",N=["auto","manual"].includes(P);let M=Ro;const T=h,A={id:_2,nodes:{[M]:{type:"main_model_loader",id:M,is_intermediate:E,model:a},[ct]:{type:"clip_skip",id:ct,is_intermediate:E,skipped_layers:m},[_e]:{type:"compel",id:_e,is_intermediate:E,prompt:i},[Ce]:{type:"compel",id:Ce,is_intermediate:E,prompt:o},[gr]:{type:"img_blur",id:gr,is_intermediate:E,radius:p,blur_type:g},[It]:{type:"i2l",id:It,is_intermediate:E,fp32:I},[ve]:{type:"noise",id:ve,use_cpu:T,seed:d,is_intermediate:E},[Pt]:{type:"create_denoise_mask",id:Pt,is_intermediate:E,fp32:I},[ue]:{type:"denoise_latents",id:ue,is_intermediate:E,steps:u,cfg_scale:s,scheduler:l,denoising_start:1-c,denoising_end:1},[rt]:{type:"noise",id:rt,use_cpu:T,seed:d+1,is_intermediate:E},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:E},[$e]:{type:"denoise_latents",id:$e,is_intermediate:E,steps:b,cfg_scale:s,scheduler:l,denoising_start:1-y,denoising_end:1},[xe]:{type:"l2i",id:xe,is_intermediate:E,fp32:I},[le]:{type:"color_correct",id:le,is_intermediate:E,reference:t}},edges:[{source:{node_id:M,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:M,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:It,field:"latents"},destination:{node_id:ue,field:"latents"}},{source:{node_id:gr,field:"image"},destination:{node_id:Pt,field:"mask"}},{source:{node_id:Pt,field:"denoise_mask"},destination:{node_id:ue,field:"denoise_mask"}},{source:{node_id:M,field:"unet"},destination:{node_id:$e,field:"unet"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:$e,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:$e,field:"negative_conditioning"}},{source:{node_id:rt,field:"noise"},destination:{node_id:$e,field:"noise"}},{source:{node_id:ue,field:"latents"},destination:{node_id:$e,field:"latents"}},{source:{node_id:$e,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(N){const R=x.width,D=x.height;A.nodes[Gn]={type:"img_resize",id:Gn,is_intermediate:E,width:R,height:D,image:t},A.nodes[kt]={type:"img_resize",id:kt,is_intermediate:E,width:R,height:D,image:n},A.nodes[or]={type:"img_resize",id:or,is_intermediate:E,width:w,height:C},A.nodes[vr]={type:"img_resize",id:vr,is_intermediate:E,width:w,height:C},A.nodes[ve].width=R,A.nodes[ve].height=D,A.nodes[rt].width=R,A.nodes[rt].height=D,A.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:It,field:"image"}},{source:{node_id:kt,field:"image"},destination:{node_id:gr,field:"image"}},{source:{node_id:Gn,field:"image"},destination:{node_id:Pt,field:"image"}},{source:{node_id:xe,field:"image"},destination:{node_id:or,field:"image"}},{source:{node_id:or,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:le,field:"mask"}})}else A.nodes[ve].width=w,A.nodes[ve].height=C,A.nodes[rt].width=w,A.nodes[rt].height=C,A.nodes[It]={...A.nodes[It],image:t},A.nodes[gr]={...A.nodes[gr],image:n},A.nodes[Pt]={...A.nodes[Pt],image:t},A.edges.push({source:{node_id:xe,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:le,field:"mask"}});return _!=="unmasked"&&(A.nodes[et]={type:"create_denoise_mask",id:et,is_intermediate:E,fp32:I},N?A.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:et,field:"image"}}):A.nodes[et]={...A.nodes[et],image:t},_==="mask"&&(N?A.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:et,field:"mask"}}):A.nodes[et]={...A.nodes[et],mask:n}),_==="edge"&&(A.nodes[ln]={type:"mask_edge",id:ln,is_intermediate:E,edge_blur:p,edge_size:p*2,low_threshold:100,high_threshold:200},N?A.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:ln,field:"image"}}):A.nodes[ln]={...A.nodes[ln],image:n},A.edges.push({source:{node_id:ln,field:"image"},destination:{node_id:et,field:"mask"}})),A.edges.push({source:{node_id:et,field:"denoise_mask"},destination:{node_id:$e,field:"denoise_mask"}})),(v||S)&&(ao(e,A,M),M=In),lo(e,A,M),Gf(e,A,ue,M),no(e,A,ue),ro(e,A,ue),so(e,A,ue),e.system.shouldUseNSFWChecker&&io(e,A,le),e.system.shouldUseWatermarker&&uo(e,A,le),oo(e,A),A},uRe=(e,t,n)=>{const r=se("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,img2imgStrength:c,seed:d,vaePrecision:f,shouldUseCpuNoise:h,maskBlur:p,canvasCoherenceMode:g,canvasCoherenceSteps:_,canvasCoherenceStrength:b,infillTileSize:y,infillPatchmatchDownscaleSize:m,infillMethod:v,clipSkip:S,seamlessXAxis:w,seamlessYAxis:C}=e.generation;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:x,height:P}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:E,boundingBoxScaleMethod:I}=e.canvas,N=f==="fp32",M=!0,T=["auto","manual"].includes(I);let A=Ro;const R=h,D={id:S2,nodes:{[A]:{type:"main_model_loader",id:A,is_intermediate:M,model:a},[ct]:{type:"clip_skip",id:ct,is_intermediate:M,skipped_layers:S},[_e]:{type:"compel",id:_e,is_intermediate:M,prompt:i},[Ce]:{type:"compel",id:Ce,is_intermediate:M,prompt:o},[Hd]:{type:"tomask",id:Hd,is_intermediate:M,image:t},[rr]:{type:"mask_combine",id:rr,is_intermediate:M,mask2:n},[It]:{type:"i2l",id:It,is_intermediate:M,fp32:N},[ve]:{type:"noise",id:ve,use_cpu:R,seed:d,is_intermediate:M},[Pt]:{type:"create_denoise_mask",id:Pt,is_intermediate:M,fp32:N},[ue]:{type:"denoise_latents",id:ue,is_intermediate:M,steps:u,cfg_scale:s,scheduler:l,denoising_start:1-c,denoising_end:1},[rt]:{type:"noise",id:rt,use_cpu:R,seed:d+1,is_intermediate:M},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:M},[$e]:{type:"denoise_latents",id:$e,is_intermediate:M,steps:_,cfg_scale:s,scheduler:l,denoising_start:1-b,denoising_end:1},[xe]:{type:"l2i",id:xe,is_intermediate:M,fp32:N},[le]:{type:"color_correct",id:le,is_intermediate:M}},edges:[{source:{node_id:A,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:A,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:at,field:"image"},destination:{node_id:It,field:"image"}},{source:{node_id:Hd,field:"image"},destination:{node_id:rr,field:"mask1"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:It,field:"latents"},destination:{node_id:ue,field:"latents"}},{source:{node_id:T?kt:rr,field:"image"},destination:{node_id:Pt,field:"mask"}},{source:{node_id:Pt,field:"denoise_mask"},destination:{node_id:ue,field:"denoise_mask"}},{source:{node_id:A,field:"unet"},destination:{node_id:$e,field:"unet"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:$e,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:$e,field:"negative_conditioning"}},{source:{node_id:rt,field:"noise"},destination:{node_id:$e,field:"noise"}},{source:{node_id:ue,field:"latents"},destination:{node_id:$e,field:"latents"}},{source:{node_id:at,field:"image"},destination:{node_id:Pt,field:"image"}},{source:{node_id:$e,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(v==="patchmatch"&&(D.nodes[at]={type:"infill_patchmatch",id:at,is_intermediate:M,downscale:m}),v==="lama"&&(D.nodes[at]={type:"infill_lama",id:at,is_intermediate:M}),v==="cv2"&&(D.nodes[at]={type:"infill_cv2",id:at,is_intermediate:M}),v==="tile"&&(D.nodes[at]={type:"infill_tile",id:at,is_intermediate:M,tile_size:y}),T){const $=E.width,L=E.height;D.nodes[Gn]={type:"img_resize",id:Gn,is_intermediate:M,width:$,height:L,image:t},D.nodes[kt]={type:"img_resize",id:kt,is_intermediate:M,width:$,height:L},D.nodes[or]={type:"img_resize",id:or,is_intermediate:M,width:x,height:P},D.nodes[ts]={type:"img_resize",id:ts,is_intermediate:M,width:x,height:P},D.nodes[vr]={type:"img_resize",id:vr,is_intermediate:M,width:x,height:P},D.nodes[ve].width=$,D.nodes[ve].height=L,D.nodes[rt].width=$,D.nodes[rt].height=L,D.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:at,field:"image"}},{source:{node_id:rr,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:xe,field:"image"},destination:{node_id:or,field:"image"}},{source:{node_id:kt,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:at,field:"image"},destination:{node_id:ts,field:"image"}},{source:{node_id:ts,field:"image"},destination:{node_id:le,field:"reference"}},{source:{node_id:or,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:le,field:"mask"}})}else D.nodes[at]={...D.nodes[at],image:t},D.nodes[ve].width=x,D.nodes[ve].height=P,D.nodes[rt].width=x,D.nodes[rt].height=P,D.nodes[It]={...D.nodes[It],image:t},D.edges.push({source:{node_id:at,field:"image"},destination:{node_id:le,field:"reference"}},{source:{node_id:xe,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:rr,field:"image"},destination:{node_id:le,field:"mask"}});return g!=="unmasked"&&(D.nodes[et]={type:"create_denoise_mask",id:et,is_intermediate:M,fp32:N},D.edges.push({source:{node_id:at,field:"image"},destination:{node_id:et,field:"image"}}),g==="mask"&&(T?D.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:et,field:"mask"}}):D.edges.push({source:{node_id:rr,field:"image"},destination:{node_id:et,field:"mask"}})),g==="edge"&&(D.nodes[ln]={type:"mask_edge",id:ln,is_intermediate:M,edge_blur:p,edge_size:p*2,low_threshold:100,high_threshold:200},T?D.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:ln,field:"image"}}):D.edges.push({source:{node_id:rr,field:"image"},destination:{node_id:ln,field:"image"}}),D.edges.push({source:{node_id:ln,field:"image"},destination:{node_id:et,field:"mask"}})),D.edges.push({source:{node_id:et,field:"denoise_mask"},destination:{node_id:$e,field:"denoise_mask"}})),(w||C)&&(ao(e,D,A),A=In),lo(e,D,A),Gf(e,D,ue,A),no(e,D,ue),ro(e,D,ue),so(e,D,ue),e.system.shouldUseNSFWChecker&&io(e,D,le),e.system.shouldUseWatermarker&&uo(e,D,le),oo(e,D),D},Hf=(e,t,n,r=mr)=>{const{loras:i}=e.lora,o=r_(i);if(o===0)return;const a=[],s=r;let l=r;[In,zi].includes(r)&&(l=mr),t.edges=t.edges.filter(d=>!(d.source.node_id===s&&["unet"].includes(d.source.field))&&!(d.source.node_id===l&&["clip"].includes(d.source.field))&&!(d.source.node_id===l&&["clip2"].includes(d.source.field)));let u="",c=0;ps(i,d=>{const{model_name:f,base_model:h,weight:p}=d,g=`${AG}_${f.replace(".","_")}`,_={type:"sdxl_lora_loader",id:g,is_intermediate:!0,lora:{model_name:f,base_model:h},weight:p};a.push(qF.parse({lora:{model_name:f,base_model:h},weight:p})),t.nodes[g]=_,c===0?(t.edges.push({source:{node_id:s,field:"unet"},destination:{node_id:g,field:"unet"}}),t.edges.push({source:{node_id:l,field:"clip"},destination:{node_id:g,field:"clip"}}),t.edges.push({source:{node_id:l,field:"clip2"},destination:{node_id:g,field:"clip2"}})):(t.edges.push({source:{node_id:u,field:"unet"},destination:{node_id:g,field:"unet"}}),t.edges.push({source:{node_id:u,field:"clip"},destination:{node_id:g,field:"clip"}}),t.edges.push({source:{node_id:u,field:"clip2"},destination:{node_id:g,field:"clip2"}})),c===o-1&&(t.edges.push({source:{node_id:g,field:"unet"},destination:{node_id:n,field:"unet"}}),t.id&&[Ll,Fl].includes(t.id)&&t.edges.push({source:{node_id:g,field:"unet"},destination:{node_id:$e,field:"unet"}}),t.edges.push({source:{node_id:g,field:"clip"},destination:{node_id:_e,field:"clip"}}),t.edges.push({source:{node_id:g,field:"clip"},destination:{node_id:Ce,field:"clip"}}),t.edges.push({source:{node_id:g,field:"clip2"},destination:{node_id:_e,field:"clip2"}}),t.edges.push({source:{node_id:g,field:"clip2"},destination:{node_id:Ce,field:"clip2"}})),u=g,c+=1}),Lo(t,{loras:a})},wc=(e,t)=>{const{positivePrompt:n,negativePrompt:r}=e.generation,{positiveStylePrompt:i,negativeStylePrompt:o,shouldConcatSDXLStylePrompt:a}=e.sdxl,s=a||t?[n,i].join(" "):i,l=a||t?[r,o].join(" "):o;return{joinedPositiveStylePrompt:s,joinedNegativeStylePrompt:l}},qf=(e,t,n,r,i,o)=>{const{refinerModel:a,refinerPositiveAestheticScore:s,refinerNegativeAestheticScore:l,refinerSteps:u,refinerScheduler:c,refinerCFGScale:d,refinerStart:f}=e.sdxl,{seamlessXAxis:h,seamlessYAxis:p,vaePrecision:g}=e.generation,{boundingBoxScaleMethod:_}=e.canvas,b=g==="fp32",y=["auto","manual"].includes(_);if(!a)return;Lo(t,{refiner_model:a,refiner_positive_aesthetic_score:s,refiner_negative_aesthetic_score:l,refiner_cfg_scale:d,refiner_scheduler:c,refiner_start:f,refiner_steps:u});const m=r||mr,{joinedPositiveStylePrompt:v,joinedNegativeStylePrompt:S}=wc(e,!0);t.edges=t.edges.filter(w=>!(w.source.node_id===n&&["latents"].includes(w.source.field))),t.edges=t.edges.filter(w=>!(w.source.node_id===m&&["vae"].includes(w.source.field))),t.nodes[fu]={type:"sdxl_refiner_model_loader",id:fu,model:a},t.nodes[by]={type:"sdxl_refiner_compel_prompt",id:by,style:v,aesthetic_score:s},t.nodes[_y]={type:"sdxl_refiner_compel_prompt",id:_y,style:S,aesthetic_score:l},t.nodes[Wo]={type:"denoise_latents",id:Wo,cfg_scale:d,steps:u,scheduler:c,denoising_start:f,denoising_end:1},h||p?(t.nodes[Co]={id:Co,type:"seamless",seamless_x:h,seamless_y:p},t.edges.push({source:{node_id:fu,field:"unet"},destination:{node_id:Co,field:"unet"}},{source:{node_id:fu,field:"vae"},destination:{node_id:Co,field:"vae"}},{source:{node_id:Co,field:"unet"},destination:{node_id:Wo,field:"unet"}})):t.edges.push({source:{node_id:fu,field:"unet"},destination:{node_id:Wo,field:"unet"}}),t.edges.push({source:{node_id:fu,field:"clip2"},destination:{node_id:by,field:"clip2"}},{source:{node_id:fu,field:"clip2"},destination:{node_id:_y,field:"clip2"}},{source:{node_id:by,field:"conditioning"},destination:{node_id:Wo,field:"positive_conditioning"}},{source:{node_id:_y,field:"conditioning"},destination:{node_id:Wo,field:"negative_conditioning"}},{source:{node_id:n,field:"latents"},destination:{node_id:Wo,field:"latents"}}),(t.id===Ll||t.id===Fl)&&(t.nodes[zi]={type:"create_denoise_mask",id:zi,is_intermediate:!0,fp32:b},y?t.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:zi,field:"image"}}):t.nodes[zi]={...t.nodes[zi],image:i},t.id===Ll&&(y?t.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:zi,field:"mask"}}):t.nodes[zi]={...t.nodes[zi],mask:o}),t.id===Fl&&t.edges.push({source:{node_id:y?kt:rr,field:"image"},destination:{node_id:zi,field:"mask"}}),t.edges.push({source:{node_id:zi,field:"denoise_mask"},destination:{node_id:Wo,field:"denoise_mask"}})),t.id===x2||t.id===Hg?t.edges.push({source:{node_id:Wo,field:"latents"},destination:{node_id:y?xe:le,field:"latents"}}):t.edges.push({source:{node_id:Wo,field:"latents"},destination:{node_id:xe,field:"latents"}})},cRe=(e,t)=>{const n=se("nodes"),{positivePrompt:r,negativePrompt:i,model:o,cfgScale:a,scheduler:s,seed:l,steps:u,vaePrecision:c,shouldUseCpuNoise:d,seamlessXAxis:f,seamlessYAxis:h}=e.generation,{shouldUseSDXLRefiner:p,refinerStart:g,sdxlImg2ImgDenoisingStrength:_}=e.sdxl,{width:b,height:y}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:m,boundingBoxScaleMethod:v}=e.canvas,S=c==="fp32",w=!0,C=["auto","manual"].includes(v);if(!o)throw n.error("No model found in state"),new Error("No model found in state");let x=mr;const P=d,{joinedPositiveStylePrompt:E,joinedNegativeStylePrompt:I}=wc(e),N={id:Hg,nodes:{[x]:{type:"sdxl_model_loader",id:x,model:o},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:r,style:E},[Ce]:{type:"sdxl_compel_prompt",id:Ce,prompt:i,style:I},[ve]:{type:"noise",id:ve,is_intermediate:w,use_cpu:P,seed:l,width:C?m.width:b,height:C?m.height:y},[Bt]:{type:"i2l",id:Bt,is_intermediate:w,fp32:S},[ae]:{type:"denoise_latents",id:ae,is_intermediate:w,cfg_scale:a,scheduler:s,steps:u,denoising_start:p?Math.min(g,1-_):1-_,denoising_end:p?g:1}},edges:[{source:{node_id:x,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:x,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:x,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:Ce,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:Bt,field:"latents"},destination:{node_id:ae,field:"latents"}}]};return C?(N.nodes[Ku]={id:Ku,type:"img_resize",is_intermediate:w,image:t,width:m.width,height:m.height},N.nodes[xe]={id:xe,type:"l2i",is_intermediate:w,fp32:S},N.nodes[le]={id:le,type:"img_resize",is_intermediate:w,width:b,height:y},N.edges.push({source:{node_id:Ku,field:"image"},destination:{node_id:Bt,field:"image"}},{source:{node_id:ae,field:"latents"},destination:{node_id:xe,field:"latents"}},{source:{node_id:xe,field:"image"},destination:{node_id:le,field:"image"}})):(N.nodes[le]={type:"l2i",id:le,is_intermediate:w,fp32:S},N.nodes[Bt].image=t,N.edges.push({source:{node_id:ae,field:"latents"},destination:{node_id:le,field:"latents"}})),ks(N,{generation_mode:"img2img",cfg_scale:a,width:C?m.width:b,height:C?m.height:y,positive_prompt:r,negative_prompt:i,model:o,seed:l,steps:u,rand_device:P?"cpu":"cuda",scheduler:s,strength:_,init_image:t.image_name},le),(f||h)&&(ao(e,N,x),x=In),p&&(qf(e,N,ae,x),(f||h)&&(x=Co)),lo(e,N,x),Hf(e,N,ae,x),no(e,N,ae),ro(e,N,ae),so(e,N,ae),e.system.shouldUseNSFWChecker&&io(e,N,le),e.system.shouldUseWatermarker&&uo(e,N,le),oo(e,N),N},dRe=(e,t,n)=>{const r=se("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,seed:c,vaePrecision:d,shouldUseCpuNoise:f,maskBlur:h,maskBlurMethod:p,canvasCoherenceMode:g,canvasCoherenceSteps:_,canvasCoherenceStrength:b,seamlessXAxis:y,seamlessYAxis:m}=e.generation,{sdxlImg2ImgDenoisingStrength:v,shouldUseSDXLRefiner:S,refinerStart:w}=e.sdxl;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:C,height:x}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:P,boundingBoxScaleMethod:E}=e.canvas,I=d==="fp32",N=!0,M=["auto","manual"].includes(E);let T=mr;const A=f,{joinedPositiveStylePrompt:R,joinedNegativeStylePrompt:D}=wc(e),$={id:Ll,nodes:{[T]:{type:"sdxl_model_loader",id:T,model:a},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:i,style:R},[Ce]:{type:"sdxl_compel_prompt",id:Ce,prompt:o,style:D},[gr]:{type:"img_blur",id:gr,is_intermediate:N,radius:h,blur_type:p},[It]:{type:"i2l",id:It,is_intermediate:N,fp32:I},[ve]:{type:"noise",id:ve,use_cpu:A,seed:c,is_intermediate:N},[Pt]:{type:"create_denoise_mask",id:Pt,is_intermediate:N,fp32:I},[ae]:{type:"denoise_latents",id:ae,is_intermediate:N,steps:u,cfg_scale:s,scheduler:l,denoising_start:S?Math.min(w,1-v):1-v,denoising_end:S?w:1},[rt]:{type:"noise",id:rt,use_cpu:A,seed:c+1,is_intermediate:N},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:N},[$e]:{type:"denoise_latents",id:$e,is_intermediate:N,steps:_,cfg_scale:s,scheduler:l,denoising_start:1-b,denoising_end:1},[xe]:{type:"l2i",id:xe,is_intermediate:N,fp32:I},[le]:{type:"color_correct",id:le,is_intermediate:N,reference:t}},edges:[{source:{node_id:T,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:T,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:T,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:T,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:T,field:"clip2"},destination:{node_id:Ce,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:It,field:"latents"},destination:{node_id:ae,field:"latents"}},{source:{node_id:gr,field:"image"},destination:{node_id:Pt,field:"mask"}},{source:{node_id:Pt,field:"denoise_mask"},destination:{node_id:ae,field:"denoise_mask"}},{source:{node_id:T,field:"unet"},destination:{node_id:$e,field:"unet"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:$e,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:$e,field:"negative_conditioning"}},{source:{node_id:rt,field:"noise"},destination:{node_id:$e,field:"noise"}},{source:{node_id:ae,field:"latents"},destination:{node_id:$e,field:"latents"}},{source:{node_id:$e,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(M){const L=P.width,O=P.height;$.nodes[Gn]={type:"img_resize",id:Gn,is_intermediate:N,width:L,height:O,image:t},$.nodes[kt]={type:"img_resize",id:kt,is_intermediate:N,width:L,height:O,image:n},$.nodes[or]={type:"img_resize",id:or,is_intermediate:N,width:C,height:x},$.nodes[vr]={type:"img_resize",id:vr,is_intermediate:N,width:C,height:x},$.nodes[ve].width=L,$.nodes[ve].height=O,$.nodes[rt].width=L,$.nodes[rt].height=O,$.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:It,field:"image"}},{source:{node_id:kt,field:"image"},destination:{node_id:gr,field:"image"}},{source:{node_id:Gn,field:"image"},destination:{node_id:Pt,field:"image"}},{source:{node_id:xe,field:"image"},destination:{node_id:or,field:"image"}},{source:{node_id:or,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:le,field:"mask"}})}else $.nodes[ve].width=C,$.nodes[ve].height=x,$.nodes[rt].width=C,$.nodes[rt].height=x,$.nodes[It]={...$.nodes[It],image:t},$.nodes[gr]={...$.nodes[gr],image:n},$.nodes[Pt]={...$.nodes[Pt],image:t},$.edges.push({source:{node_id:xe,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:le,field:"mask"}});return g!=="unmasked"&&($.nodes[et]={type:"create_denoise_mask",id:et,is_intermediate:N,fp32:I},M?$.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:et,field:"image"}}):$.nodes[et]={...$.nodes[et],image:t},g==="mask"&&(M?$.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:et,field:"mask"}}):$.nodes[et]={...$.nodes[et],mask:n}),g==="edge"&&($.nodes[ln]={type:"mask_edge",id:ln,is_intermediate:N,edge_blur:h,edge_size:h*2,low_threshold:100,high_threshold:200},M?$.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:ln,field:"image"}}):$.nodes[ln]={...$.nodes[ln],image:n},$.edges.push({source:{node_id:ln,field:"image"},destination:{node_id:et,field:"mask"}})),$.edges.push({source:{node_id:et,field:"denoise_mask"},destination:{node_id:$e,field:"denoise_mask"}})),(y||m)&&(ao(e,$,T),T=In),S&&(qf(e,$,$e,T,t,n),(y||m)&&(T=Co)),lo(e,$,T),Hf(e,$,ae,T),no(e,$,ae),ro(e,$,ae),so(e,$,ae),e.system.shouldUseNSFWChecker&&io(e,$,le),e.system.shouldUseWatermarker&&uo(e,$,le),oo(e,$),$},fRe=(e,t,n)=>{const r=se("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,seed:c,vaePrecision:d,shouldUseCpuNoise:f,maskBlur:h,canvasCoherenceMode:p,canvasCoherenceSteps:g,canvasCoherenceStrength:_,infillTileSize:b,infillPatchmatchDownscaleSize:y,infillMethod:m,seamlessXAxis:v,seamlessYAxis:S}=e.generation,{sdxlImg2ImgDenoisingStrength:w,shouldUseSDXLRefiner:C,refinerStart:x}=e.sdxl;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:P,height:E}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:I,boundingBoxScaleMethod:N}=e.canvas,M=d==="fp32",T=!0,A=["auto","manual"].includes(N);let R=mr;const D=f,{joinedPositiveStylePrompt:$,joinedNegativeStylePrompt:L}=wc(e),O={id:Fl,nodes:{[mr]:{type:"sdxl_model_loader",id:mr,model:a},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:i,style:$},[Ce]:{type:"sdxl_compel_prompt",id:Ce,prompt:o,style:L},[Hd]:{type:"tomask",id:Hd,is_intermediate:T,image:t},[rr]:{type:"mask_combine",id:rr,is_intermediate:T,mask2:n},[It]:{type:"i2l",id:It,is_intermediate:T,fp32:M},[ve]:{type:"noise",id:ve,use_cpu:D,seed:c,is_intermediate:T},[Pt]:{type:"create_denoise_mask",id:Pt,is_intermediate:T,fp32:M},[ae]:{type:"denoise_latents",id:ae,is_intermediate:T,steps:u,cfg_scale:s,scheduler:l,denoising_start:C?Math.min(x,1-w):1-w,denoising_end:C?x:1},[rt]:{type:"noise",id:rt,use_cpu:D,seed:c+1,is_intermediate:T},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:T},[$e]:{type:"denoise_latents",id:$e,is_intermediate:T,steps:g,cfg_scale:s,scheduler:l,denoising_start:1-_,denoising_end:1},[xe]:{type:"l2i",id:xe,is_intermediate:T,fp32:M},[le]:{type:"color_correct",id:le,is_intermediate:T}},edges:[{source:{node_id:mr,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:mr,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:mr,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:mr,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:mr,field:"clip2"},destination:{node_id:Ce,field:"clip2"}},{source:{node_id:at,field:"image"},destination:{node_id:It,field:"image"}},{source:{node_id:Hd,field:"image"},destination:{node_id:rr,field:"mask1"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:It,field:"latents"},destination:{node_id:ae,field:"latents"}},{source:{node_id:A?kt:rr,field:"image"},destination:{node_id:Pt,field:"mask"}},{source:{node_id:Pt,field:"denoise_mask"},destination:{node_id:ae,field:"denoise_mask"}},{source:{node_id:R,field:"unet"},destination:{node_id:$e,field:"unet"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:$e,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:$e,field:"negative_conditioning"}},{source:{node_id:rt,field:"noise"},destination:{node_id:$e,field:"noise"}},{source:{node_id:ae,field:"latents"},destination:{node_id:$e,field:"latents"}},{source:{node_id:at,field:"image"},destination:{node_id:Pt,field:"image"}},{source:{node_id:$e,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(m==="patchmatch"&&(O.nodes[at]={type:"infill_patchmatch",id:at,is_intermediate:T,downscale:y}),m==="lama"&&(O.nodes[at]={type:"infill_lama",id:at,is_intermediate:T}),m==="cv2"&&(O.nodes[at]={type:"infill_cv2",id:at,is_intermediate:T}),m==="tile"&&(O.nodes[at]={type:"infill_tile",id:at,is_intermediate:T,tile_size:b}),A){const B=I.width,U=I.height;O.nodes[Gn]={type:"img_resize",id:Gn,is_intermediate:T,width:B,height:U,image:t},O.nodes[kt]={type:"img_resize",id:kt,is_intermediate:T,width:B,height:U},O.nodes[or]={type:"img_resize",id:or,is_intermediate:T,width:P,height:E},O.nodes[ts]={type:"img_resize",id:ts,is_intermediate:T,width:P,height:E},O.nodes[vr]={type:"img_resize",id:vr,is_intermediate:T,width:P,height:E},O.nodes[ve].width=B,O.nodes[ve].height=U,O.nodes[rt].width=B,O.nodes[rt].height=U,O.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:at,field:"image"}},{source:{node_id:rr,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:xe,field:"image"},destination:{node_id:or,field:"image"}},{source:{node_id:kt,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:at,field:"image"},destination:{node_id:ts,field:"image"}},{source:{node_id:ts,field:"image"},destination:{node_id:le,field:"reference"}},{source:{node_id:or,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:le,field:"mask"}})}else O.nodes[at]={...O.nodes[at],image:t},O.nodes[ve].width=P,O.nodes[ve].height=E,O.nodes[rt].width=P,O.nodes[rt].height=E,O.nodes[It]={...O.nodes[It],image:t},O.edges.push({source:{node_id:at,field:"image"},destination:{node_id:le,field:"reference"}},{source:{node_id:xe,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:rr,field:"image"},destination:{node_id:le,field:"mask"}});return p!=="unmasked"&&(O.nodes[et]={type:"create_denoise_mask",id:et,is_intermediate:T,fp32:M},O.edges.push({source:{node_id:at,field:"image"},destination:{node_id:et,field:"image"}}),p==="mask"&&(A?O.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:et,field:"mask"}}):O.edges.push({source:{node_id:rr,field:"image"},destination:{node_id:et,field:"mask"}})),p==="edge"&&(O.nodes[ln]={type:"mask_edge",id:ln,is_intermediate:T,edge_blur:h,edge_size:h*2,low_threshold:100,high_threshold:200},A?O.edges.push({source:{node_id:kt,field:"image"},destination:{node_id:ln,field:"image"}}):O.edges.push({source:{node_id:rr,field:"image"},destination:{node_id:ln,field:"image"}}),O.edges.push({source:{node_id:ln,field:"image"},destination:{node_id:et,field:"mask"}})),O.edges.push({source:{node_id:et,field:"denoise_mask"},destination:{node_id:$e,field:"denoise_mask"}})),(v||S)&&(ao(e,O,R),R=In),C&&(qf(e,O,$e,R,t),(v||S)&&(R=Co)),lo(e,O,R),Hf(e,O,ae,R),no(e,O,ae),ro(e,O,ae),so(e,O,ae),e.system.shouldUseNSFWChecker&&io(e,O,le),e.system.shouldUseWatermarker&&uo(e,O,le),oo(e,O),O},hRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,vaePrecision:u,shouldUseCpuNoise:c,seamlessXAxis:d,seamlessYAxis:f}=e.generation,{width:h,height:p}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:g,boundingBoxScaleMethod:_}=e.canvas,b=u==="fp32",y=!0,m=["auto","manual"].includes(_),{shouldUseSDXLRefiner:v,refinerStart:S}=e.sdxl;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const w=c,C=i.model_type==="onnx";let x=C?b2:mr;const P=C?"onnx_model_loader":"sdxl_model_loader",E=C?{type:"t2l_onnx",id:ae,is_intermediate:y,cfg_scale:o,scheduler:a,steps:l}:{type:"denoise_latents",id:ae,is_intermediate:y,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:v?S:1},{joinedPositiveStylePrompt:I,joinedNegativeStylePrompt:N}=wc(e),M={id:x2,nodes:{[x]:{type:P,id:x,is_intermediate:y,model:i},[_e]:{type:C?"prompt_onnx":"sdxl_compel_prompt",id:_e,is_intermediate:y,prompt:n,style:I},[Ce]:{type:C?"prompt_onnx":"sdxl_compel_prompt",id:Ce,is_intermediate:y,prompt:r,style:N},[ve]:{type:"noise",id:ve,is_intermediate:y,seed:s,width:m?g.width:h,height:m?g.height:p,use_cpu:w},[E.id]:E},edges:[{source:{node_id:x,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:x,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:x,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:Ce,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}}]};return m?(M.nodes[xe]={id:xe,type:C?"l2i_onnx":"l2i",is_intermediate:y,fp32:b},M.nodes[le]={id:le,type:"img_resize",is_intermediate:y,width:h,height:p},M.edges.push({source:{node_id:ae,field:"latents"},destination:{node_id:xe,field:"latents"}},{source:{node_id:xe,field:"image"},destination:{node_id:le,field:"image"}})):(M.nodes[le]={type:C?"l2i_onnx":"l2i",id:le,is_intermediate:y,fp32:b},M.edges.push({source:{node_id:ae,field:"latents"},destination:{node_id:le,field:"latents"}})),ks(M,{generation_mode:"txt2img",cfg_scale:o,width:m?g.width:h,height:m?g.height:p,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:w?"cpu":"cuda",scheduler:a},le),(d||f)&&(ao(e,M,x),x=In),v&&(qf(e,M,ae,x),(d||f)&&(x=Co)),Hf(e,M,ae,x),lo(e,M,x),no(e,M,ae),ro(e,M,ae),so(e,M,ae),e.system.shouldUseNSFWChecker&&io(e,M,le),e.system.shouldUseWatermarker&&uo(e,M,le),oo(e,M),M},pRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,vaePrecision:u,clipSkip:c,shouldUseCpuNoise:d,seamlessXAxis:f,seamlessYAxis:h}=e.generation,{width:p,height:g}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:_,boundingBoxScaleMethod:b}=e.canvas,y=u==="fp32",m=!0,v=["auto","manual"].includes(b);if(!i)throw t.error("No model found in state"),new Error("No model found in state");const S=d,w=i.model_type==="onnx";let C=w?b2:Ro;const x=w?"onnx_model_loader":"main_model_loader",P=w?{type:"t2l_onnx",id:ue,is_intermediate:m,cfg_scale:o,scheduler:a,steps:l}:{type:"denoise_latents",id:ue,is_intermediate:m,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:1},E={id:kG,nodes:{[C]:{type:x,id:C,is_intermediate:m,model:i},[ct]:{type:"clip_skip",id:ct,is_intermediate:m,skipped_layers:c},[_e]:{type:w?"prompt_onnx":"compel",id:_e,is_intermediate:m,prompt:n},[Ce]:{type:w?"prompt_onnx":"compel",id:Ce,is_intermediate:m,prompt:r},[ve]:{type:"noise",id:ve,is_intermediate:m,seed:s,width:v?_.width:p,height:v?_.height:g,use_cpu:S},[P.id]:P},edges:[{source:{node_id:C,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:C,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}}]};return v?(E.nodes[xe]={id:xe,type:w?"l2i_onnx":"l2i",is_intermediate:m,fp32:y},E.nodes[le]={id:le,type:"img_resize",is_intermediate:m,width:p,height:g},E.edges.push({source:{node_id:ue,field:"latents"},destination:{node_id:xe,field:"latents"}},{source:{node_id:xe,field:"image"},destination:{node_id:le,field:"image"}})):(E.nodes[le]={type:w?"l2i_onnx":"l2i",id:le,is_intermediate:m,fp32:y},E.edges.push({source:{node_id:ue,field:"latents"},destination:{node_id:le,field:"latents"}})),ks(E,{generation_mode:"txt2img",cfg_scale:o,width:v?_.width:p,height:v?_.height:g,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:S?"cpu":"cuda",scheduler:a,clip_skip:c},le),(f||h)&&(ao(e,E,C),C=In),lo(e,E,C),Gf(e,E,ue,C),no(e,E,ue),ro(e,E,ue),so(e,E,ue),e.system.shouldUseNSFWChecker&&io(e,E,le),e.system.shouldUseWatermarker&&uo(e,E,le),oo(e,E),E},gRe=(e,t,n,r)=>{let i;if(t==="txt2img")e.generation.model&&e.generation.model.base_model==="sdxl"?i=hRe(e):i=pRe(e);else if(t==="img2img"){if(!n)throw new Error("Missing canvas init image");e.generation.model&&e.generation.model.base_model==="sdxl"?i=cRe(e,n):i=sRe(e,n)}else if(t==="inpaint"){if(!n||!r)throw new Error("Missing canvas init and mask images");e.generation.model&&e.generation.model.base_model==="sdxl"?i=dRe(e,n,r):i=lRe(e,n,r)}else{if(!n)throw new Error("Missing canvas init image");e.generation.model&&e.generation.model.base_model==="sdxl"?i=fRe(e,n,r):i=uRe(e,n,r)}return i},Yw=({count:e,start:t,min:n=Hie,max:r=hp})=>{const i=t??Ire(n,r),o=[];for(let a=i;a{const{iterations:r,model:i,shouldRandomizeSeed:o,seed:a}=e.generation,{shouldConcatSDXLStylePrompt:s,positiveStylePrompt:l}=e.sdxl,{prompts:u,seedBehaviour:c}=e.dynamicPrompts,d=[];if(u.length===1){const h=Yw({count:r,start:o?void 0:a}),p=[];t.nodes[ve]&&p.push({node_path:ve,field_name:"seed",items:h}),Oh(t)&&(Rh(t,"seed"),p.push({node_path:vi,field_name:"seed",items:h})),t.nodes[rt]&&p.push({node_path:rt,field_name:"seed",items:h.map(g=>(g+1)%hp)}),d.push(p)}else{const h=[],p=[];if(c==="PER_PROMPT"){const _=Yw({count:u.length*r,start:o?void 0:a});t.nodes[ve]&&h.push({node_path:ve,field_name:"seed",items:_}),Oh(t)&&(Rh(t,"seed"),h.push({node_path:vi,field_name:"seed",items:_})),t.nodes[rt]&&h.push({node_path:rt,field_name:"seed",items:_.map(b=>(b+1)%hp)})}else{const _=Yw({count:r,start:o?void 0:a});t.nodes[ve]&&p.push({node_path:ve,field_name:"seed",items:_}),Oh(t)&&(Rh(t,"seed"),p.push({node_path:vi,field_name:"seed",items:_})),t.nodes[rt]&&p.push({node_path:rt,field_name:"seed",items:_.map(b=>(b+1)%hp)}),d.push(p)}const g=c==="PER_PROMPT"?Dre(r).flatMap(()=>u):u;if(t.nodes[_e]&&h.push({node_path:_e,field_name:"prompt",items:g}),Oh(t)&&(Rh(t,"positive_prompt"),h.push({node_path:vi,field_name:"positive_prompt",items:g})),s&&(i==null?void 0:i.base_model)==="sdxl"){const _=g.map(b=>[b,l].join(" "));t.nodes[_e]&&h.push({node_path:_e,field_name:"style",items:_}),Oh(t)&&(Rh(t,"positive_style_prompt"),h.push({node_path:vi,field_name:"positive_style_prompt",items:g}))}d.push(h)}return{prepend:n,batch:{graph:t,runs:1,data:d}}},mRe=()=>{pe({predicate:e=>CA.match(e)&&e.payload.tabName==="unifiedCanvas",effect:async(e,{getState:t,dispatch:n})=>{const r=se("queue"),{prepend:i}=e.payload,o=t(),{layerState:a,boundingBoxCoordinates:s,boundingBoxDimensions:l,isMaskEnabled:u,shouldPreserveMaskedArea:c}=o.canvas,d=await wA(a,s,l,u,c);if(!d){r.error("Unable to create canvas data");return}const{baseBlob:f,baseImageData:h,maskBlob:p,maskImageData:g}=d,_=ZMe(h,g);if(o.system.enableImageDebugging){const S=await xR(f),w=await xR(p);XMe([{base64:w,caption:"mask b64"},{base64:S,caption:"image b64"}])}r.debug(`Generation mode: ${_}`);let b,y;["img2img","inpaint","outpaint"].includes(_)&&(b=await n(ce.endpoints.uploadImage.initiate({file:new File([f],"canvasInitImage.png",{type:"image/png"}),image_category:"general",is_intermediate:!0})).unwrap()),["inpaint","outpaint"].includes(_)&&(y=await n(ce.endpoints.uploadImage.initiate({file:new File([p],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!0})).unwrap());const m=gRe(o,_,b,y);r.debug({graph:pt(m)},"Canvas graph built"),n(Yz(m));const v=IG(o,m,i);try{const S=n(un.endpoints.enqueueBatch.initiate(v,{fixedCacheKey:"enqueueBatch"})),w=await S.unwrap();S.reset();const C=w.batch.batch_id;o.canvas.layerState.stagingArea.boundingBox||n(Rle({boundingBox:{...o.canvas.boundingBoxCoordinates,...o.canvas.boundingBoxDimensions}})),n(Ole(C))}catch{}}})},yRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,initialImage:u,img2imgStrength:c,shouldFitToWidthHeight:d,width:f,height:h,clipSkip:p,shouldUseCpuNoise:g,vaePrecision:_,seamlessXAxis:b,seamlessYAxis:y}=e.generation;if(!u)throw t.error("No initial image found in state"),new Error("No initial image found in state");if(!i)throw t.error("No model found in state"),new Error("No model found in state");const m=_==="fp32",v=!0;let S=Ro;const w=g,C={id:D3,nodes:{[S]:{type:"main_model_loader",id:S,model:i,is_intermediate:v},[ct]:{type:"clip_skip",id:ct,skipped_layers:p,is_intermediate:v},[_e]:{type:"compel",id:_e,prompt:n,is_intermediate:v},[Ce]:{type:"compel",id:Ce,prompt:r,is_intermediate:v},[ve]:{type:"noise",id:ve,use_cpu:w,seed:s,is_intermediate:v},[xe]:{type:"l2i",id:xe,fp32:m,is_intermediate:v},[ue]:{type:"denoise_latents",id:ue,cfg_scale:o,scheduler:a,steps:l,denoising_start:1-c,denoising_end:1,is_intermediate:v},[Bt]:{type:"i2l",id:Bt,fp32:m,is_intermediate:v}},edges:[{source:{node_id:S,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:S,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:Bt,field:"latents"},destination:{node_id:ue,field:"latents"}},{source:{node_id:ue,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(d&&(u.width!==f||u.height!==h)){const x={id:aa,type:"img_resize",image:{image_name:u.imageName},is_intermediate:!0,width:f,height:h};C.nodes[aa]=x,C.edges.push({source:{node_id:aa,field:"image"},destination:{node_id:Bt,field:"image"}}),C.edges.push({source:{node_id:aa,field:"width"},destination:{node_id:ve,field:"width"}}),C.edges.push({source:{node_id:aa,field:"height"},destination:{node_id:ve,field:"height"}})}else C.nodes[Bt].image={image_name:u.imageName},C.edges.push({source:{node_id:Bt,field:"width"},destination:{node_id:ve,field:"width"}}),C.edges.push({source:{node_id:Bt,field:"height"},destination:{node_id:ve,field:"height"}});return ks(C,{generation_mode:"img2img",cfg_scale:o,height:h,width:f,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:w?"cpu":"cuda",scheduler:a,clip_skip:p,strength:c,init_image:u.imageName},xe),(b||y)&&(ao(e,C,S),S=In),lo(e,C,S),Gf(e,C,ue,S),no(e,C,ue),ro(e,C,ue),so(e,C,ue),e.system.shouldUseNSFWChecker&&io(e,C),e.system.shouldUseWatermarker&&uo(e,C),oo(e,C),C},vRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,initialImage:u,shouldFitToWidthHeight:c,width:d,height:f,shouldUseCpuNoise:h,vaePrecision:p,seamlessXAxis:g,seamlessYAxis:_}=e.generation,{positiveStylePrompt:b,negativeStylePrompt:y,shouldUseSDXLRefiner:m,refinerStart:v,sdxlImg2ImgDenoisingStrength:S}=e.sdxl;if(!u)throw t.error("No initial image found in state"),new Error("No initial image found in state");if(!i)throw t.error("No model found in state"),new Error("No model found in state");const w=p==="fp32",C=!0;let x=mr;const P=h,{joinedPositiveStylePrompt:E,joinedNegativeStylePrompt:I}=wc(e),N={id:db,nodes:{[x]:{type:"sdxl_model_loader",id:x,model:i,is_intermediate:C},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:n,style:E,is_intermediate:C},[Ce]:{type:"sdxl_compel_prompt",id:Ce,prompt:r,style:I,is_intermediate:C},[ve]:{type:"noise",id:ve,use_cpu:P,seed:s,is_intermediate:C},[xe]:{type:"l2i",id:xe,fp32:w,is_intermediate:C},[ae]:{type:"denoise_latents",id:ae,cfg_scale:o,scheduler:a,steps:l,denoising_start:m?Math.min(v,1-S):1-S,denoising_end:m?v:1,is_intermediate:C},[Bt]:{type:"i2l",id:Bt,fp32:w,is_intermediate:C}},edges:[{source:{node_id:x,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:x,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:x,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:Ce,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:Bt,field:"latents"},destination:{node_id:ae,field:"latents"}},{source:{node_id:ae,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(c&&(u.width!==d||u.height!==f)){const M={id:aa,type:"img_resize",image:{image_name:u.imageName},is_intermediate:!0,width:d,height:f};N.nodes[aa]=M,N.edges.push({source:{node_id:aa,field:"image"},destination:{node_id:Bt,field:"image"}}),N.edges.push({source:{node_id:aa,field:"width"},destination:{node_id:ve,field:"width"}}),N.edges.push({source:{node_id:aa,field:"height"},destination:{node_id:ve,field:"height"}})}else N.nodes[Bt].image={image_name:u.imageName},N.edges.push({source:{node_id:Bt,field:"width"},destination:{node_id:ve,field:"width"}}),N.edges.push({source:{node_id:Bt,field:"height"},destination:{node_id:ve,field:"height"}});return ks(N,{generation_mode:"sdxl_img2img",cfg_scale:o,height:f,width:d,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:P?"cpu":"cuda",scheduler:a,strength:S,init_image:u.imageName,positive_style_prompt:b,negative_style_prompt:y},xe),(g||_)&&(ao(e,N,x),x=In),m&&(qf(e,N,ae),(g||_)&&(x=Co)),lo(e,N,x),Hf(e,N,ae,x),no(e,N,ae),ro(e,N,ae),so(e,N,ae),e.system.shouldUseNSFWChecker&&io(e,N),e.system.shouldUseWatermarker&&uo(e,N),oo(e,N),N},bRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,width:u,height:c,shouldUseCpuNoise:d,vaePrecision:f,seamlessXAxis:h,seamlessYAxis:p}=e.generation,{positiveStylePrompt:g,negativeStylePrompt:_,shouldUseSDXLRefiner:b,refinerStart:y}=e.sdxl,m=d;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const v=f==="fp32",S=!0,{joinedPositiveStylePrompt:w,joinedNegativeStylePrompt:C}=wc(e);let x=mr;const P={id:EA,nodes:{[x]:{type:"sdxl_model_loader",id:x,model:i,is_intermediate:S},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:n,style:w,is_intermediate:S},[Ce]:{type:"sdxl_compel_prompt",id:Ce,prompt:r,style:C,is_intermediate:S},[ve]:{type:"noise",id:ve,seed:s,width:u,height:c,use_cpu:m,is_intermediate:S},[ae]:{type:"denoise_latents",id:ae,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:b?y:1,is_intermediate:S},[xe]:{type:"l2i",id:xe,fp32:v,is_intermediate:S}},edges:[{source:{node_id:x,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:x,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:x,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:Ce,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:ae,field:"latents"},destination:{node_id:xe,field:"latents"}}]};return ks(P,{generation_mode:"sdxl_txt2img",cfg_scale:o,height:c,width:u,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:m?"cpu":"cuda",scheduler:a,positive_style_prompt:g,negative_style_prompt:_},xe),(h||p)&&(ao(e,P,x),x=In),b&&(qf(e,P,ae),(h||p)&&(x=Co)),lo(e,P,x),Hf(e,P,ae,x),no(e,P,ae),ro(e,P,ae),so(e,P,ae),e.system.shouldUseNSFWChecker&&io(e,P),e.system.shouldUseWatermarker&&uo(e,P),oo(e,P),P};function _Re(e){const t=["vae","control","ip_adapter","metadata","unet","positive_conditioning","negative_conditioning"],n=[];e.edges.forEach(r=>{r.destination.node_id===ue&&t.includes(r.destination.field)&&n.push({source:{node_id:r.source.node_id,field:r.source.field},destination:{node_id:Kc,field:r.destination.field}})}),e.edges=e.edges.concat(n)}function SRe(e,t,n){const r=t/n;let i;e=="sdxl"?i=1024:i=512;const o=Math.floor(i*.5),a=i*i;let s,l;r>1?(l=Math.max(o,Math.sqrt(a/r)),s=l*r):(s=Math.max(o,Math.sqrt(a*r)),l=s/r),s=Math.min(t,s),l=Math.min(n,l);const u=Rr(Math.floor(s),8),c=Rr(Math.floor(l),8);return{newWidth:u,newHeight:c}}const xRe=(e,t)=>{var _;if(!e.generation.hrfEnabled||e.config.disabledSDFeatures.includes("hrf")||((_=e.generation.model)==null?void 0:_.model_type)==="onnx")return;const n=se("txt2img"),{vae:r,hrfStrength:i,hrfEnabled:o,hrfMethod:a}=e.generation,s=!r,l=e.generation.width,u=e.generation.height,c=e.generation.model?e.generation.model.base_model:"sd1",{newWidth:d,newHeight:f}=SRe(c,l,u),h=t.nodes[ue],p=t.nodes[ve],g=t.nodes[xe];if(!h){n.error("originalDenoiseLatentsNode is undefined");return}if(!p){n.error("originalNoiseNode is undefined");return}if(!g){n.error("originalLatentsToImageNode is undefined");return}if(p&&(p.width=d,p.height=f),t.nodes[_u]={type:"l2i",id:_u,fp32:g==null?void 0:g.fp32,is_intermediate:!0},t.edges.push({source:{node_id:ue,field:"latents"},destination:{node_id:_u,field:"latents"}},{source:{node_id:s?Ro:fi,field:"vae"},destination:{node_id:_u,field:"vae"}}),t.nodes[Us]={id:Us,type:"img_resize",is_intermediate:!0,width:l,height:u},a=="ESRGAN"){let b="RealESRGAN_x2plus.pth";l*u/(d*f)>2&&(b="RealESRGAN_x4plus.pth"),t.nodes[Zh]={id:Zh,type:"esrgan",model_name:b,is_intermediate:!0},t.edges.push({source:{node_id:_u,field:"image"},destination:{node_id:Zh,field:"image"}},{source:{node_id:Zh,field:"image"},destination:{node_id:Us,field:"image"}})}else t.edges.push({source:{node_id:_u,field:"image"},destination:{node_id:Us,field:"image"}});t.nodes[kh]={type:"noise",id:kh,seed:p==null?void 0:p.seed,use_cpu:p==null?void 0:p.use_cpu,is_intermediate:!0},t.edges.push({source:{node_id:Us,field:"height"},destination:{node_id:kh,field:"height"}},{source:{node_id:Us,field:"width"},destination:{node_id:kh,field:"width"}}),t.nodes[Ph]={type:"i2l",id:Ph,is_intermediate:!0},t.edges.push({source:{node_id:s?Ro:fi,field:"vae"},destination:{node_id:Ph,field:"vae"}},{source:{node_id:Us,field:"image"},destination:{node_id:Ph,field:"image"}}),t.nodes[Kc]={type:"denoise_latents",id:Kc,is_intermediate:!0,cfg_scale:h==null?void 0:h.cfg_scale,scheduler:h==null?void 0:h.scheduler,steps:h==null?void 0:h.steps,denoising_start:1-e.generation.hrfStrength,denoising_end:1},t.edges.push({source:{node_id:Ph,field:"latents"},destination:{node_id:Kc,field:"latents"}},{source:{node_id:kh,field:"noise"},destination:{node_id:Kc,field:"noise"}}),_Re(t),t.nodes[tl]={type:"l2i",id:tl,fp32:g==null?void 0:g.fp32,is_intermediate:!0},t.edges.push({source:{node_id:s?Ro:fi,field:"vae"},destination:{node_id:tl,field:"vae"}},{source:{node_id:Kc,field:"latents"},destination:{node_id:tl,field:"latents"}}),Lo(t,{hrf_strength:i,hrf_enabled:o,hrf_method:a}),oRe(t,tl)},wRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,steps:s,width:l,height:u,clipSkip:c,shouldUseCpuNoise:d,vaePrecision:f,seamlessXAxis:h,seamlessYAxis:p,seed:g}=e.generation,_=d;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const b=f==="fp32",y=!0,m=i.model_type==="onnx";let v=m?b2:Ro;const S=m?"onnx_model_loader":"main_model_loader",w=m?{type:"t2l_onnx",id:ue,is_intermediate:y,cfg_scale:o,scheduler:a,steps:s}:{type:"denoise_latents",id:ue,is_intermediate:y,cfg_scale:o,scheduler:a,steps:s,denoising_start:0,denoising_end:1},C={id:PG,nodes:{[v]:{type:S,id:v,is_intermediate:y,model:i},[ct]:{type:"clip_skip",id:ct,skipped_layers:c,is_intermediate:y},[_e]:{type:m?"prompt_onnx":"compel",id:_e,prompt:n,is_intermediate:y},[Ce]:{type:m?"prompt_onnx":"compel",id:Ce,prompt:r,is_intermediate:y},[ve]:{type:"noise",id:ve,seed:g,width:l,height:u,use_cpu:_,is_intermediate:y},[w.id]:w,[xe]:{type:m?"l2i_onnx":"l2i",id:xe,fp32:b,is_intermediate:y}},edges:[{source:{node_id:v,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:v,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:Ce,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:Ce,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:ue,field:"latents"},destination:{node_id:xe,field:"latents"}}]};return ks(C,{generation_mode:"txt2img",cfg_scale:o,height:u,width:l,positive_prompt:n,negative_prompt:r,model:i,seed:g,steps:s,rand_device:_?"cpu":"cuda",scheduler:a,clip_skip:c},xe),(h||p)&&(ao(e,C,v),v=In),lo(e,C,v),Gf(e,C,ue,v),no(e,C,ue),ro(e,C,ue),so(e,C,ue),e.generation.hrfEnabled&&!m&&xRe(e,C),e.system.shouldUseNSFWChecker&&io(e,C),e.system.shouldUseWatermarker&&uo(e,C),oo(e,C),C},CRe=()=>{pe({predicate:e=>CA.match(e)&&(e.payload.tabName==="txt2img"||e.payload.tabName==="img2img"),effect:async(e,{getState:t,dispatch:n})=>{const r=t(),i=r.generation.model,{prepend:o}=e.payload;let a;i&&i.base_model==="sdxl"?e.payload.tabName==="txt2img"?a=bRe(r):a=vRe(r):e.payload.tabName==="txt2img"?a=wRe(r):a=yRe(r);const s=IG(r,a,o);n(un.endpoints.enqueueBatch.initiate(s,{fixedCacheKey:"enqueueBatch"})).reset()}})},ERe=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function TRe(e){return e.length===1?e[0].toString():e.reduce((t,n)=>{if(typeof n=="number")return t+"["+n.toString()+"]";if(n.includes('"'))return t+'["'+ARe(n)+'"]';if(!ERe.test(n))return t+'["'+n+'"]';const r=t.length===0?"":".";return t+r+n},"")}function ARe(e){return e.replace(/"/g,'\\"')}function PRe(e){return e.length!==0}const kRe=99,MG="; ",RG=", or ",AA="Validation error",OG=": ";class $G extends Error{constructor(n,r=[]){super(n);Q2(this,"details");Q2(this,"name");this.details=r,this.name="ZodValidationError"}toString(){return this.message}}function PA(e){const{issue:t,issueSeparator:n,unionSeparator:r,includePath:i}=e;if(t.code==="invalid_union")return t.unionErrors.reduce((o,a)=>{const s=a.issues.map(l=>PA({issue:l,issueSeparator:n,unionSeparator:r,includePath:i})).join(n);return o.includes(s)||o.push(s),o},[]).join(r);if(i&&PRe(t.path)){if(t.path.length===1){const o=t.path[0];if(typeof o=="number")return`${t.message} at index ${o}`}return`${t.message} at "${TRe(t.path)}"`}return t.message}function NG(e,t,n){return t!==null?e.length>0?[t,e].join(n):t:e.length>0?e:AA}function FUe(e,t={}){const{issueSeparator:n=MG,unionSeparator:r=RG,prefixSeparator:i=OG,prefix:o=AA,includePath:a=!0}=t,s=PA({issue:e,issueSeparator:n,unionSeparator:r,includePath:a}),l=NG(s,o,i);return new $G(l,[e])}function wR(e,t={}){const{maxIssuesInMessage:n=kRe,issueSeparator:r=MG,unionSeparator:i=RG,prefixSeparator:o=OG,prefix:a=AA,includePath:s=!0}=t,l=e.errors.slice(0,n).map(c=>PA({issue:c,issueSeparator:r,unionSeparator:i,includePath:s})).join(r),u=NG(l,a,o);return new $G(u,e.errors)}const IRe=e=>{const{workflow:t,nodes:n,edges:r}=e,i={...t,nodes:[],edges:[]};return n.filter(o=>["invocation","notes"].includes(o.type??"__UNKNOWN_NODE_TYPE__")).forEach(o=>{const a=XF.safeParse(o);if(!a.success){const{message:s}=wR(a.error,{prefix:de.t("nodes.unableToParseNode")});se("nodes").warn({node:pt(o)},s);return}i.nodes.push(a.data)}),r.forEach(o=>{const a=QF.safeParse(o);if(!a.success){const{message:s}=wR(a.error,{prefix:de.t("nodes.unableToParseEdge")});se("nodes").warn({edge:pt(o)},s);return}i.edges.push(a.data)}),i},MRe=e=>{if(e.type==="ColorField"&&e.value){const t=Ye(e.value),{r:n,g:r,b:i,a:o}=e.value,a=Math.max(0,Math.min(o*255,255));return Object.assign(t,{r:n,g:r,b:i,a}),t}return e.value},RRe=e=>{const{nodes:t,edges:n}=e,i=t.filter(on).reduce((l,u)=>{const{id:c,data:d}=u,{type:f,inputs:h,isIntermediate:p,embedWorkflow:g}=d,_=tg(h,(y,m,v)=>{const S=MRe(m);return y[v]=S,y},{});_.use_cache=u.data.useCache;const b={type:f,id:c,..._,is_intermediate:p};return g&&Object.assign(b,{workflow:IRe(e)}),Object.assign(l,{[c]:b}),l},{}),a=n.filter(l=>l.type!=="collapsed").reduce((l,u)=>{const{source:c,target:d,sourceHandle:f,targetHandle:h}=u;return l.push({source:{node_id:c,field:f},destination:{node_id:d,field:h}}),l},[]);return a.forEach(l=>{const u=i[l.destination.node_id],c=l.destination.field;i[l.destination.node_id]=$f(u,c)}),{id:yl(),nodes:i,edges:a}},ORe=()=>{pe({predicate:e=>CA.match(e)&&e.payload.tabName==="nodes",effect:async(e,{getState:t,dispatch:n})=>{const r=t(),o={batch:{graph:RRe(r.nodes),runs:r.generation.iterations},prepend:e.payload.prepend};n(un.endpoints.enqueueBatch.initiate(o,{fixedCacheKey:"enqueueBatch"})).reset()}})},$Re=()=>{pe({matcher:ce.endpoints.addImageToBoard.matchFulfilled,effect:e=>{const t=se("images"),{board_id:n,imageDTO:r}=e.meta.arg.originalArgs;t.debug({board_id:n,imageDTO:r},"Image added to board")}})},NRe=()=>{pe({matcher:ce.endpoints.addImageToBoard.matchRejected,effect:e=>{const t=se("images"),{board_id:n,imageDTO:r}=e.meta.arg.originalArgs;t.debug({board_id:n,imageDTO:r},"Problem adding image to board")}})},kA=ge("deleteImageModal/imageDeletionConfirmed"),BUe=qn(e=>e,e=>e.gallery.selection[e.gallery.selection.length-1],Vm),DG=qn([e=>e],e=>{const{selectedBoardId:t,galleryView:n}=e.gallery;return{board_id:t,categories:n==="images"?Fn:Pr,offset:0,limit:Kle,is_intermediate:!1}},Vm),DRe=()=>{pe({actionCreator:kA,effect:async(e,{dispatch:t,getState:n,condition:r})=>{var f;const{imageDTOs:i,imagesUsage:o}=e.payload;if(i.length!==1||o.length!==1)return;const a=i[0],s=o[0];if(!a||!s)return;t(XE(!1));const l=n(),u=(f=l.gallery.selection[l.gallery.selection.length-1])==null?void 0:f.image_name;if(a&&(a==null?void 0:a.image_name)===u){const{image_name:h}=a,p=DG(l),{data:g}=ce.endpoints.listImages.select(p)(l),_=g?Lt.getSelectors().selectAll(g):[],b=_.findIndex(S=>S.image_name===h),y=_.filter(S=>S.image_name!==h),m=al(b,0,y.length-1),v=y[m];t(pa(v||null))}s.isCanvasImage&&t(KE()),i.forEach(h=>{var p;((p=n().generation.initialImage)==null?void 0:p.imageName)===h.image_name&&t(DE()),ps(Aa(n().controlAdapters),g=>{(g.controlImage===h.image_name||gi(g)&&g.processedControlImage===h.image_name)&&(t(Hl({id:g.id,controlImage:null})),t(RE({id:g.id,processedControlImage:null})))}),n().nodes.nodes.forEach(g=>{on(g)&&ps(g.data.inputs,_=>{var b;_.type==="ImageField"&&((b=_.value)==null?void 0:b.image_name)===h.image_name&&t(aS({nodeId:g.data.id,fieldName:_.name,value:void 0}))})})});const{requestId:c}=t(ce.endpoints.deleteImage.initiate(a));await r(h=>ce.endpoints.deleteImage.matchFulfilled(h)&&h.meta.requestId===c,3e4)&&t(Do.util.invalidateTags([{type:"Board",id:a.board_id??"none"}]))}})},LRe=()=>{pe({actionCreator:kA,effect:async(e,{dispatch:t,getState:n})=>{const{imageDTOs:r,imagesUsage:i}=e.payload;if(!(r.length<=1||i.length<=1))try{await t(ce.endpoints.deleteImages.initiate({imageDTOs:r})).unwrap();const o=n(),a=DG(o),{data:s}=ce.endpoints.listImages.select(a)(o),l=s?Lt.getSelectors().selectAll(s)[0]:void 0;t(pa(l||null)),t(XE(!1)),i.some(u=>u.isCanvasImage)&&t(KE()),r.forEach(u=>{var c;((c=n().generation.initialImage)==null?void 0:c.imageName)===u.image_name&&t(DE()),ps(Aa(n().controlAdapters),d=>{(d.controlImage===u.image_name||gi(d)&&d.processedControlImage===u.image_name)&&(t(Hl({id:d.id,controlImage:null})),t(RE({id:d.id,processedControlImage:null})))}),n().nodes.nodes.forEach(d=>{on(d)&&ps(d.data.inputs,f=>{var h;f.type==="ImageField"&&((h=f.value)==null?void 0:h.image_name)===u.image_name&&t(aS({nodeId:d.data.id,fieldName:f.name,value:void 0}))})})})}catch{}}})},FRe=()=>{pe({matcher:ce.endpoints.deleteImage.matchPending,effect:()=>{}})},BRe=()=>{pe({matcher:ce.endpoints.deleteImage.matchFulfilled,effect:e=>{se("images").debug({imageDTO:e.meta.arg.originalArgs},"Image deleted")}})},zRe=()=>{pe({matcher:ce.endpoints.deleteImage.matchRejected,effect:e=>{se("images").debug({imageDTO:e.meta.arg.originalArgs},"Unable to delete image")}})},LG=ge("dnd/dndDropped"),VRe=()=>{pe({actionCreator:LG,effect:async(e,{dispatch:t})=>{const n=se("dnd"),{activeData:r,overData:i}=e.payload;if(r.payloadType==="IMAGE_DTO"?n.debug({activeData:r,overData:i},"Image dropped"):r.payloadType==="IMAGE_DTOS"?n.debug({activeData:r,overData:i},`Images (${r.payload.imageDTOs.length}) dropped`):r.payloadType==="NODE_FIELD"?n.debug({activeData:pt(r),overData:pt(i)},"Node field dropped"):n.debug({activeData:r,overData:i},"Unknown payload dropped"),i.actionType==="ADD_FIELD_TO_LINEAR"&&r.payloadType==="NODE_FIELD"){const{nodeId:o,field:a}=r.payload;t(dve({nodeId:o,fieldName:a.name}))}if(i.actionType==="SET_CURRENT_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(pa(r.payload.imageDTO));return}if(i.actionType==="SET_INITIAL_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(c_(r.payload.imageDTO));return}if(i.actionType==="SET_CONTROL_ADAPTER_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{id:o}=i.context;t(Hl({id:o,controlImage:r.payload.imageDTO.image_name})),t(OE({id:o,isEnabled:!0}));return}if(i.actionType==="SET_CANVAS_INITIAL_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(lF(r.payload.imageDTO));return}if(i.actionType==="SET_NODES_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{fieldName:o,nodeId:a}=i.context;t(aS({nodeId:a,fieldName:o,value:r.payload.imageDTO}));return}if(i.actionType==="ADD_TO_BOARD"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{imageDTO:o}=r.payload,{boardId:a}=i.context;t(ce.endpoints.addImageToBoard.initiate({imageDTO:o,board_id:a}));return}if(i.actionType==="REMOVE_FROM_BOARD"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{imageDTO:o}=r.payload;t(ce.endpoints.removeImageFromBoard.initiate({imageDTO:o}));return}if(i.actionType==="ADD_TO_BOARD"&&r.payloadType==="IMAGE_DTOS"&&r.payload.imageDTOs){const{imageDTOs:o}=r.payload,{boardId:a}=i.context;t(ce.endpoints.addImagesToBoard.initiate({imageDTOs:o,board_id:a}));return}if(i.actionType==="REMOVE_FROM_BOARD"&&r.payloadType==="IMAGE_DTOS"&&r.payload.imageDTOs){const{imageDTOs:o}=r.payload;t(ce.endpoints.removeImagesFromBoard.initiate({imageDTOs:o}));return}}})},jRe=()=>{pe({matcher:ce.endpoints.removeImageFromBoard.matchFulfilled,effect:e=>{const t=se("images"),n=e.meta.arg.originalArgs;t.debug({imageDTO:n},"Image removed from board")}})},URe=()=>{pe({matcher:ce.endpoints.removeImageFromBoard.matchRejected,effect:e=>{const t=se("images"),n=e.meta.arg.originalArgs;t.debug({imageDTO:n},"Problem removing image from board")}})},GRe=()=>{pe({actionCreator:Ble,effect:async(e,{dispatch:t,getState:n})=>{const r=e.payload,i=n(),{shouldConfirmOnDelete:o}=i.system,a=w6e(n()),s=a.some(l=>l.isCanvasImage)||a.some(l=>l.isInitialImage)||a.some(l=>l.isControlImage)||a.some(l=>l.isNodesImage);if(o||s){t(XE(!0));return}t(kA({imageDTOs:r,imagesUsage:a}))}})},HRe=()=>{pe({matcher:ce.endpoints.uploadImage.matchFulfilled,effect:(e,{dispatch:t,getState:n})=>{const r=se("images"),i=e.payload,o=n(),{autoAddBoardId:a}=o.gallery;r.debug({imageDTO:i},"Image uploaded");const{postUploadAction:s}=e.meta.arg.originalArgs;if(e.payload.is_intermediate&&!s)return;const l={title:X("toast.imageUploaded"),status:"success"};if((s==null?void 0:s.type)==="TOAST"){const{toastOptions:u}=s;if(!a||a==="none")t(it({...l,...u}));else{t(ce.endpoints.addImageToBoard.initiate({board_id:a,imageDTO:i}));const{data:c}=Qe.endpoints.listAllBoards.select()(o),d=c==null?void 0:c.find(h=>h.board_id===a),f=d?`${X("toast.addedToBoard")} ${d.board_name}`:`${X("toast.addedToBoard")} ${a}`;t(it({...l,description:f}))}return}if((s==null?void 0:s.type)==="SET_CANVAS_INITIAL_IMAGE"){t(lF(i)),t(it({...l,description:X("toast.setAsCanvasInitialImage")}));return}if((s==null?void 0:s.type)==="SET_CONTROL_ADAPTER_IMAGE"){const{id:u}=s;t(OE({id:u,isEnabled:!0})),t(Hl({id:u,controlImage:i.image_name})),t(it({...l,description:X("toast.setControlImage")}));return}if((s==null?void 0:s.type)==="SET_INITIAL_IMAGE"){t(c_(i)),t(it({...l,description:X("toast.setInitialImage")}));return}if((s==null?void 0:s.type)==="SET_NODES_IMAGE"){const{nodeId:u,fieldName:c}=s;t(aS({nodeId:u,fieldName:c,value:i})),t(it({...l,description:`${X("toast.setNodeField")} ${c}`}));return}}})},qRe=()=>{pe({matcher:ce.endpoints.uploadImage.matchRejected,effect:(e,{dispatch:t})=>{const n=se("images"),r={arg:{...$f(e.meta.arg.originalArgs,["file","postUploadAction"]),file:""}};n.error({...r},"Image upload failed"),t(it({title:X("toast.imageUploadFailed"),description:e.error.message,status:"error"}))}})},WRe=()=>{pe({matcher:ce.endpoints.starImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{updated_image_names:r}=e.payload,i=n(),{selection:o}=i.gallery,a=[];o.forEach(s=>{r.includes(s.image_name)?a.push({...s,starred:!0}):a.push(s)}),t(JF(a))}})},KRe=()=>{pe({matcher:ce.endpoints.unstarImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{updated_image_names:r}=e.payload,i=n(),{selection:o}=i.gallery,a=[];o.forEach(s=>{r.includes(s.image_name)?a.push({...s,starred:!1}):a.push(s)}),t(JF(a))}})},XRe=ge("generation/initialImageSelected"),QRe=ge("generation/modelSelected"),YRe=()=>{pe({actionCreator:XRe,effect:(e,{dispatch:t})=>{if(!e.payload){t(it(vs({title:X("toast.imageNotLoadedDesc"),status:"error"})));return}t(c_(e.payload)),t(it(vs(X("toast.sentToImageToImage"))))}})},ZRe=()=>{pe({actionCreator:QRe,effect:(e,{getState:t,dispatch:n})=>{var l,u;const r=se("models"),i=t(),o=Sm.safeParse(e.payload);if(!o.success){r.error({error:o.error.format()},"Failed to parse main model");return}const a=o.data,{base_model:s}=a;if(((l=i.generation.model)==null?void 0:l.base_model)!==s){let c=0;ps(i.lora.loras,(f,h)=>{f.base_model!==s&&(n(tB(h)),c+=1)});const{vae:d}=i.generation;d&&d.base_model!==s&&(n(xL(null)),c+=1),Aa(i.controlAdapters).forEach(f=>{var h;((h=f.model)==null?void 0:h.base_model)!==s&&(n(OE({id:f.id,isEnabled:!1})),c+=1)}),c>0&&n(it(vs({title:X("toast.baseModelChangedCleared",{count:c}),status:"warning"})))}((u=i.generation.model)==null?void 0:u.base_model)!==a.base_model&&i.ui.shouldAutoChangeDimensions&&(["sdxl","sdxl-refiner"].includes(a.base_model)?(n(E6(1024)),n(T6(1024)),n(Z6({width:1024,height:1024}))):(n(E6(512)),n(T6(512)),n(Z6({width:512,height:512})))),n(sl(a))}})},qg=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),CR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),ER=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),TR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),AR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),PR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),kR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),F3=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),JRe=({base_model:e,model_type:t,model_name:n})=>`${e}/${t}/${n}`,Bs=e=>{const t=[];return e.forEach(n=>{const r={...Ye(n),id:JRe(n)};t.push(r)}),t},Qo=Do.injectEndpoints({endpoints:e=>({getOnnxModels:e.query({query:t=>{const n={model_type:"onnx",base_models:t};return`models/?${pp.stringify(n,{arrayFormat:"none"})}`},providesTags:t=>{const n=[{type:"OnnxModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"OnnxModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return CR.setAll(CR.getInitialState(),n)}}),getMainModels:e.query({query:t=>{const n={model_type:"main",base_models:t};return`models/?${pp.stringify(n,{arrayFormat:"none"})}`},providesTags:t=>{const n=[{type:"MainModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"MainModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return qg.setAll(qg.getInitialState(),n)}}),updateMainModels:e.mutation({query:({base_model:t,model_name:n,body:r})=>({url:`models/${t}/main/${n}`,method:"PATCH",body:r}),invalidatesTags:["Model"]}),importMainModels:e.mutation({query:({body:t})=>({url:"models/import",method:"POST",body:t}),invalidatesTags:["Model"]}),addMainModels:e.mutation({query:({body:t})=>({url:"models/add",method:"POST",body:t}),invalidatesTags:["Model"]}),deleteMainModels:e.mutation({query:({base_model:t,model_name:n,model_type:r})=>({url:`models/${t}/${r}/${n}`,method:"DELETE"}),invalidatesTags:["Model"]}),convertMainModels:e.mutation({query:({base_model:t,model_name:n,convert_dest_directory:r})=>({url:`models/convert/${t}/main/${n}`,method:"PUT",params:{convert_dest_directory:r}}),invalidatesTags:["Model"]}),mergeMainModels:e.mutation({query:({base_model:t,body:n})=>({url:`models/merge/${t}`,method:"PUT",body:n}),invalidatesTags:["Model"]}),syncModels:e.mutation({query:()=>({url:"models/sync",method:"POST"}),invalidatesTags:["Model"]}),getLoRAModels:e.query({query:()=>({url:"models/",params:{model_type:"lora"}}),providesTags:t=>{const n=[{type:"LoRAModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"LoRAModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return ER.setAll(ER.getInitialState(),n)}}),updateLoRAModels:e.mutation({query:({base_model:t,model_name:n,body:r})=>({url:`models/${t}/lora/${n}`,method:"PATCH",body:r}),invalidatesTags:[{type:"LoRAModel",id:kr}]}),deleteLoRAModels:e.mutation({query:({base_model:t,model_name:n})=>({url:`models/${t}/lora/${n}`,method:"DELETE"}),invalidatesTags:[{type:"LoRAModel",id:kr}]}),getControlNetModels:e.query({query:()=>({url:"models/",params:{model_type:"controlnet"}}),providesTags:t=>{const n=[{type:"ControlNetModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"ControlNetModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return TR.setAll(TR.getInitialState(),n)}}),getIPAdapterModels:e.query({query:()=>({url:"models/",params:{model_type:"ip_adapter"}}),providesTags:t=>{const n=[{type:"IPAdapterModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"IPAdapterModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return AR.setAll(AR.getInitialState(),n)}}),getT2IAdapterModels:e.query({query:()=>({url:"models/",params:{model_type:"t2i_adapter"}}),providesTags:t=>{const n=[{type:"T2IAdapterModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"T2IAdapterModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return PR.setAll(PR.getInitialState(),n)}}),getVaeModels:e.query({query:()=>({url:"models/",params:{model_type:"vae"}}),providesTags:t=>{const n=[{type:"VaeModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"VaeModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return F3.setAll(F3.getInitialState(),n)}}),getTextualInversionModels:e.query({query:()=>({url:"models/",params:{model_type:"embedding"}}),providesTags:t=>{const n=[{type:"TextualInversionModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"TextualInversionModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return kR.setAll(kR.getInitialState(),n)}}),getModelsInFolder:e.query({query:t=>({url:`/models/search?${pp.stringify(t,{})}`})}),getCheckpointConfigs:e.query({query:()=>({url:"/models/ckpt_confs"})})})}),{useGetMainModelsQuery:zUe,useGetOnnxModelsQuery:VUe,useGetControlNetModelsQuery:jUe,useGetIPAdapterModelsQuery:UUe,useGetT2IAdapterModelsQuery:GUe,useGetLoRAModelsQuery:HUe,useGetTextualInversionModelsQuery:qUe,useGetVaeModelsQuery:WUe,useUpdateMainModelsMutation:KUe,useDeleteMainModelsMutation:XUe,useImportMainModelsMutation:QUe,useAddMainModelsMutation:YUe,useConvertMainModelsMutation:ZUe,useMergeMainModelsMutation:JUe,useDeleteLoRAModelsMutation:eGe,useUpdateLoRAModelsMutation:tGe,useSyncModelsMutation:nGe,useGetModelsInFolderQuery:rGe,useGetCheckpointConfigsQuery:iGe}=Qo,eOe=()=>{pe({predicate:e=>Qo.endpoints.getMainModels.matchFulfilled(e)&&!e.meta.arg.originalArgs.includes("sdxl-refiner"),effect:async(e,{getState:t,dispatch:n})=>{const r=se("models");r.info({models:e.payload.entities},`Main models loaded (${e.payload.ids.length})`);const i=t().generation.model,o=qg.getSelectors().selectAll(e.payload);if(o.length===0){n(sl(null));return}if(i?o.some(l=>l.model_name===i.model_name&&l.base_model===i.base_model&&l.model_type===i.model_type):!1)return;const s=Sm.safeParse(o[0]);if(!s.success){r.error({error:s.error.format()},"Failed to parse main model");return}n(sl(s.data))}}),pe({predicate:e=>Qo.endpoints.getMainModels.matchFulfilled(e)&&e.meta.arg.originalArgs.includes("sdxl-refiner"),effect:async(e,{getState:t,dispatch:n})=>{const r=se("models");r.info({models:e.payload.entities},`SDXL Refiner models loaded (${e.payload.ids.length})`);const i=t().sdxl.refinerModel,o=qg.getSelectors().selectAll(e.payload);if(o.length===0){n(_8(null)),n(gve(!1));return}if(i?o.some(l=>l.model_name===i.model_name&&l.base_model===i.base_model&&l.model_type===i.model_type):!1)return;const s=$E.safeParse(o[0]);if(!s.success){r.error({error:s.error.format()},"Failed to parse SDXL Refiner Model");return}n(_8(s.data))}}),pe({matcher:Qo.endpoints.getVaeModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{const r=se("models");r.info({models:e.payload.entities},`VAEs loaded (${e.payload.ids.length})`);const i=t().generation.vae;if(i===null||Gc(e.payload.entities,l=>(l==null?void 0:l.model_name)===(i==null?void 0:i.model_name)&&(l==null?void 0:l.base_model)===(i==null?void 0:i.base_model)))return;const a=F3.getSelectors().selectAll(e.payload)[0];if(!a){n(sl(null));return}const s=_L.safeParse(a);if(!s.success){r.error({error:s.error.format()},"Failed to parse VAE model");return}n(xL(s.data))}}),pe({matcher:Qo.endpoints.getLoRAModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{se("models").info({models:e.payload.entities},`LoRAs loaded (${e.payload.ids.length})`);const i=t().lora.loras;ps(i,(o,a)=>{Gc(e.payload.entities,l=>(l==null?void 0:l.model_name)===(o==null?void 0:o.model_name)&&(l==null?void 0:l.base_model)===(o==null?void 0:o.base_model))||n(tB(a))})}}),pe({matcher:Qo.endpoints.getControlNetModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{se("models").info({models:e.payload.entities},`ControlNet models loaded (${e.payload.ids.length})`),kie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Nx({id:i.id}))})}}),pe({matcher:Qo.endpoints.getT2IAdapterModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{se("models").info({models:e.payload.entities},`ControlNet models loaded (${e.payload.ids.length})`),Oie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Nx({id:i.id}))})}}),pe({matcher:Qo.endpoints.getIPAdapterModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{se("models").info({models:e.payload.entities},`IP Adapter models loaded (${e.payload.ids.length})`),Mie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Nx({id:i.id}))})}}),pe({matcher:Qo.endpoints.getTextualInversionModels.matchFulfilled,effect:async e=>{se("models").info({models:e.payload.entities},`Embeddings loaded (${e.payload.ids.length})`)}})},tOe=Do.injectEndpoints({endpoints:e=>({dynamicPrompts:e.query({query:t=>({url:"utilities/dynamicprompts",body:t,method:"POST"}),keepUnusedDataFor:86400})})}),nOe=si(uae,Gle,jle,Ule,CE),rOe=()=>{pe({matcher:nOe,effect:async(e,{dispatch:t,getState:n,cancelActiveListeners:r,delay:i})=>{r(),await i(1e3);const o=n();if(o.config.disabledFeatures.includes("dynamicPrompting"))return;const{positivePrompt:a}=o.generation,{maxPrompts:s}=o.dynamicPrompts;t(Ux(!0));try{const l=t(tOe.endpoints.dynamicPrompts.initiate({prompt:a,max_prompts:s})),u=await l.unwrap();l.unsubscribe(),t(Hle(u.prompts)),t(qle(u.error)),t(J6(!1)),t(Ux(!1))}catch{t(J6(!0)),t(Ux(!1))}}})},zs=e=>e.$ref.split("/").slice(-1)[0],iOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"integer",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&_a(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&_a(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},oOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"IntegerPolymorphic",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&_a(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&_a(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},aOe=({schemaObject:e,baseField:t})=>{const n=_a(e.item_default)&&Qne(e.item_default)?e.item_default:0;return{...t,type:"IntegerCollection",default:e.default??[],item_default:n}},sOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"float",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&_a(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&_a(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},lOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"FloatPolymorphic",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&_a(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&_a(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},uOe=({schemaObject:e,baseField:t})=>{const n=_a(e.item_default)?e.item_default:0;return{...t,type:"FloatCollection",default:e.default??[],item_default:n}},cOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"string",default:e.default??""};return e.minLength!==void 0&&(n.minLength=e.minLength),e.maxLength!==void 0&&(n.maxLength=e.maxLength),e.pattern!==void 0&&(n.pattern=e.pattern),n},dOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"StringPolymorphic",default:e.default??""};return e.minLength!==void 0&&(n.minLength=e.minLength),e.maxLength!==void 0&&(n.maxLength=e.maxLength),e.pattern!==void 0&&(n.pattern=e.pattern),n},fOe=({schemaObject:e,baseField:t})=>{const n=_E(e.item_default)?e.item_default:"";return{...t,type:"StringCollection",default:e.default??[],item_default:n}},hOe=({schemaObject:e,baseField:t})=>({...t,type:"boolean",default:e.default??!1}),pOe=({schemaObject:e,baseField:t})=>({...t,type:"BooleanPolymorphic",default:e.default??!1}),gOe=({schemaObject:e,baseField:t})=>{const n=e.item_default&&Xne(e.item_default)?e.item_default:!1;return{...t,type:"BooleanCollection",default:e.default??[],item_default:n}},mOe=({schemaObject:e,baseField:t})=>({...t,type:"MainModelField",default:e.default??void 0}),yOe=({schemaObject:e,baseField:t})=>({...t,type:"SDXLMainModelField",default:e.default??void 0}),vOe=({schemaObject:e,baseField:t})=>({...t,type:"SDXLRefinerModelField",default:e.default??void 0}),bOe=({schemaObject:e,baseField:t})=>({...t,type:"VaeModelField",default:e.default??void 0}),_Oe=({schemaObject:e,baseField:t})=>({...t,type:"LoRAModelField",default:e.default??void 0}),SOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlNetModelField",default:e.default??void 0}),xOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterModelField",default:e.default??void 0}),wOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterModelField",default:e.default??void 0}),COe=({schemaObject:e,baseField:t})=>({...t,type:"BoardField",default:e.default??void 0}),EOe=({schemaObject:e,baseField:t})=>({...t,type:"ImageField",default:e.default??void 0}),TOe=({schemaObject:e,baseField:t})=>({...t,type:"ImagePolymorphic",default:e.default??void 0}),AOe=({schemaObject:e,baseField:t})=>({...t,type:"ImageCollection",default:e.default??[],item_default:e.item_default??void 0}),POe=({schemaObject:e,baseField:t})=>({...t,type:"DenoiseMaskField",default:e.default??void 0}),kOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsField",default:e.default??void 0}),IOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsPolymorphic",default:e.default??void 0}),MOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsCollection",default:e.default??[],item_default:e.item_default??void 0}),ROe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningField",default:e.default??void 0}),OOe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningPolymorphic",default:e.default??void 0}),$Oe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningCollection",default:e.default??[],item_default:e.item_default??void 0}),NOe=({schemaObject:e,baseField:t})=>({...t,type:"UNetField",default:e.default??void 0}),DOe=({schemaObject:e,baseField:t})=>({...t,type:"ClipField",default:e.default??void 0}),LOe=({schemaObject:e,baseField:t})=>({...t,type:"VaeField",default:e.default??void 0}),FOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlField",default:e.default??void 0}),BOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlPolymorphic",default:e.default??void 0}),zOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlCollection",default:e.default??[],item_default:e.item_default??void 0}),VOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterField",default:e.default??void 0}),jOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterPolymorphic",default:e.default??void 0}),UOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterCollection",default:e.default??[],item_default:e.item_default??void 0}),GOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterField",default:e.default??void 0}),HOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterPolymorphic",default:e.default??void 0}),qOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterCollection",default:e.default??[],item_default:e.item_default??void 0}),WOe=({schemaObject:e,baseField:t})=>{const n=e.enum??[];return{...t,type:"enum",options:n,ui_choice_labels:e.ui_choice_labels,default:e.default??n[0]}},KOe=({baseField:e})=>({...e,type:"Collection",default:[]}),XOe=({baseField:e})=>({...e,type:"CollectionItem",default:void 0}),QOe=({baseField:e})=>({...e,type:"Any",default:void 0}),YOe=({baseField:e})=>({...e,type:"MetadataItemField",default:void 0}),ZOe=({baseField:e})=>({...e,type:"MetadataItemCollection",default:void 0}),JOe=({baseField:e})=>({...e,type:"MetadataItemPolymorphic",default:void 0}),e7e=({baseField:e})=>({...e,type:"MetadataField",default:void 0}),t7e=({baseField:e})=>({...e,type:"MetadataCollection",default:void 0}),n7e=({schemaObject:e,baseField:t})=>({...t,type:"ColorField",default:e.default??{r:127,g:127,b:127,a:255}}),r7e=({schemaObject:e,baseField:t})=>({...t,type:"ColorPolymorphic",default:e.default??{r:127,g:127,b:127,a:255}}),i7e=({schemaObject:e,baseField:t})=>({...t,type:"ColorCollection",default:e.default??[]}),o7e=({schemaObject:e,baseField:t})=>({...t,type:"Scheduler",default:e.default??"euler"}),B3=e=>{if(N0(e)){if(e.type){if(e.enum)return"enum";if(e.type){if(e.type==="number")return"float";if(e.type==="array"){const t=N0(e.items)?e.items.type:zs(e.items);return Tn(t)?void 0:hye(t)?vT[t]:void 0}else if(!Tn(e.type))return e.type}}else if(e.allOf){const t=e.allOf;if(t&&t[0]&&au(t[0]))return zs(t[0])}else if(e.anyOf){const t=e.anyOf.filter(i=>!(N0(i)&&i.type==="null"));if(t.length===1){if(au(t[0]))return zs(t[0]);if(N0(t[0]))return B3(t[0])}let n,r;if(mI(t[0])){const i=t[0].items,o=t[1];au(i)&&au(o)?(n=zs(i),r=zs(o)):D0(i)&&D0(o)&&(n=i.type,r=o.type)}else if(mI(t[1])){const i=t[0],o=t[1].items;au(i)&&au(o)?(n=zs(i),r=zs(o)):D0(i)&&D0(o)&&(n=i.type,r=o.type)}if(n===r&&gye(n))return wz[n]}}else if(au(e))return zs(e)},FG={BoardField:COe,Any:QOe,boolean:hOe,BooleanCollection:gOe,BooleanPolymorphic:pOe,ClipField:DOe,Collection:KOe,CollectionItem:XOe,ColorCollection:i7e,ColorField:n7e,ColorPolymorphic:r7e,ConditioningCollection:$Oe,ConditioningField:ROe,ConditioningPolymorphic:OOe,ControlCollection:zOe,ControlField:FOe,ControlNetModelField:SOe,ControlPolymorphic:BOe,DenoiseMaskField:POe,enum:WOe,float:sOe,FloatCollection:uOe,FloatPolymorphic:lOe,ImageCollection:AOe,ImageField:EOe,ImagePolymorphic:TOe,integer:iOe,IntegerCollection:aOe,IntegerPolymorphic:oOe,IPAdapterCollection:UOe,IPAdapterField:VOe,IPAdapterModelField:xOe,IPAdapterPolymorphic:jOe,LatentsCollection:MOe,LatentsField:kOe,LatentsPolymorphic:IOe,LoRAModelField:_Oe,MetadataItemField:YOe,MetadataItemCollection:ZOe,MetadataItemPolymorphic:JOe,MetadataField:e7e,MetadataCollection:t7e,MainModelField:mOe,Scheduler:o7e,SDXLMainModelField:yOe,SDXLRefinerModelField:vOe,string:cOe,StringCollection:fOe,StringPolymorphic:dOe,T2IAdapterCollection:qOe,T2IAdapterField:GOe,T2IAdapterModelField:wOe,T2IAdapterPolymorphic:HOe,UNetField:NOe,VaeField:LOe,VaeModelField:bOe},a7e=e=>!!(e&&e in FG),s7e=(e,t,n,r)=>{var p;const{input:i,ui_hidden:o,ui_component:a,ui_type:s,ui_order:l,ui_choice_labels:u,item_default:c}=t,d={input:Gh.includes(r)?"connection":i,ui_hidden:o,ui_component:a,ui_type:s,required:((p=e.required)==null?void 0:p.includes(n))??!1,ui_order:l,ui_choice_labels:u,item_default:c},f={name:n,title:t.title??(n?wE(n):""),description:t.description??"",fieldKind:"input",...d};if(!a7e(r))return;const h=FG[r];if(h)return h({schemaObject:t,baseField:f})},l7e=["id","type","use_cache"],u7e=["type"],c7e=["IsIntermediate"],d7e=["graph","linear_ui_output"],f7e=(e,t)=>!!(l7e.includes(t)||e==="collect"&&t==="collection"||e==="iterate"&&t==="index"),h7e=e=>!!c7e.includes(e),p7e=(e,t)=>!u7e.includes(t),g7e=e=>!d7e.includes(e.properties.type.default),m7e=(e,t=void 0,n=void 0)=>{var o;return Object.values(((o=e.components)==null?void 0:o.schemas)??{}).filter(xfe).filter(g7e).filter(a=>t?t.includes(a.properties.type.default):!0).filter(a=>n?!n.includes(a.properties.type.default):!0).reduce((a,s)=>{var S,w;const l=s.properties.type.default,u=s.title.replace("Invocation",""),c=s.tags??[],d=s.description??"",f=s.version;let h=!1;const p=tg(s.properties,(C,x,P)=>{if(f7e(l,P))return se("nodes").trace({node:l,fieldName:P,field:pt(x)},"Skipped reserved input field"),C;if(!yI(x))return se("nodes").warn({node:l,propertyName:P,property:pt(x)},"Unhandled input property"),C;const E=x.ui_type??B3(x);if(!E)return se("nodes").warn({node:l,fieldName:P,fieldType:E,field:pt(x)},"Missing input field type"),C;if(E==="WorkflowField")return h=!0,C;if(h7e(E))return se("nodes").trace({node:l,fieldName:P,fieldType:E,field:pt(x)},`Skipping reserved input field type: ${E}`),C;if(!gI(E))return se("nodes").warn({node:l,fieldName:P,fieldType:E,field:pt(x)},`Skipping unknown input field type: ${E}`),C;const I=s7e(s,x,P,E);return I?(C[P]=I,C):(se("nodes").warn({node:l,fieldName:P,fieldType:E,field:pt(x)},"Skipping input field with no template"),C)},{}),g=s.output.$ref.split("/").pop();if(!g)return se("nodes").warn({outputRefObject:pt(s.output)},"No output schema name found in ref object"),a;const _=(w=(S=e.components)==null?void 0:S.schemas)==null?void 0:w[g];if(!_)return se("nodes").warn({outputSchemaName:g},"Output schema not found"),a;if(!wfe(_))return se("nodes").error({outputSchema:pt(_)},"Invalid output schema"),a;const b=_.properties.type.default,y=tg(_.properties,(C,x,P)=>{if(!p7e(l,P))return se("nodes").trace({type:l,propertyName:P,property:pt(x)},"Skipped reserved output field"),C;if(!yI(x))return se("nodes").warn({type:l,propertyName:P,property:pt(x)},"Unhandled output property"),C;const E=x.ui_type??B3(x);return gI(E)?(C[P]={fieldKind:"output",name:P,title:x.title??(P?wE(P):""),description:x.description??"",type:E,ui_hidden:x.ui_hidden??!1,ui_type:x.ui_type,ui_order:x.ui_order},C):(se("nodes").warn({fieldName:P,fieldType:E,field:pt(x)},"Skipping unknown output field type"),C)},{}),m=s.properties.use_cache.default,v={title:u,type:l,version:f,tags:c,description:d,outputType:b,inputs:p,outputs:y,useCache:m,withWorkflow:h};return Object.assign(a,{[l]:v}),a},{})},y7e=()=>{pe({actionCreator:Ig.fulfilled,effect:(e,{dispatch:t,getState:n})=>{const r=se("system"),i=e.payload;r.debug({schemaJSON:i},"Received OpenAPI schema");const{nodesAllowlist:o,nodesDenylist:a}=n().config,s=m7e(i,o,a);r.debug({nodeTemplates:pt(s)},`Built ${r_(s)} node templates`),t($z(s))}}),pe({actionCreator:Ig.rejected,effect:e=>{se("system").error({error:pt(e.error)},"Problem retrieving OpenAPI Schema")}})},v7e=()=>{pe({actionCreator:VD,effect:(e,{dispatch:t,getState:n})=>{se("socketio").debug("Connected");const{nodes:i,config:o,system:a}=n(),{disabledTabs:s}=o;!r_(i.nodeTemplates)&&!s.includes("nodes")&&t(Ig()),a.isInitialized?t(Do.util.resetApiState()):t(Sve(!0)),t(CE(e.payload))}})},b7e=()=>{pe({actionCreator:jD,effect:(e,{dispatch:t})=>{se("socketio").debug("Disconnected"),t(UD(e.payload))}})},_7e=()=>{pe({actionCreator:KD,effect:(e,{dispatch:t})=>{se("socketio").trace(e.payload,"Generator progress"),t(PE(e.payload))}})},S7e=()=>{pe({actionCreator:qD,effect:(e,{dispatch:t})=>{se("socketio").debug(e.payload,"Session complete"),t(WD(e.payload))}})},x7e=["load_image","image"],w7e=()=>{pe({actionCreator:TE,effect:async(e,{dispatch:t,getState:n})=>{const r=se("socketio"),{data:i}=e.payload;r.debug({data:pt(i)},`Invocation complete (${e.payload.data.node.type})`);const{result:o,node:a,queue_batch_id:s,source_node_id:l}=i;if(TG(o)&&!x7e.includes(a.type)&&!iRe.includes(l)){const{image_name:u}=o.image,{canvas:c,gallery:d}=n(),f=t(ce.endpoints.getImageDTO.initiate(u,{forceRefetch:!0})),h=await f.unwrap();if(f.unsubscribe(),c.batchIds.includes(s)&&[Wu].includes(i.source_node_id)&&t(Ple(h)),!h.is_intermediate){t(ce.util.updateQueryData("listImages",{board_id:h.board_id??"none",categories:Fn},g=>{Lt.addOne(g,h)})),t(Qe.util.updateQueryData("getBoardImagesTotal",h.board_id??"none",g=>{g.total+=1})),t(ce.util.invalidateTags([{type:"Board",id:h.board_id??"none"}]));const{shouldAutoSwitch:p}=d;p&&(d.galleryView!=="images"&&t(M5("images")),h.board_id&&h.board_id!==d.selectedBoardId&&t(M1({boardId:h.board_id,selectedImageName:h.image_name})),!h.board_id&&d.selectedBoardId!=="none"&&t(M1({boardId:"none",selectedImageName:h.image_name})),t(pa(h)))}}t(AE(e.payload))}})},C7e=()=>{pe({actionCreator:HD,effect:(e,{dispatch:t})=>{se("socketio").error(e.payload,`Invocation error (${e.payload.data.node.type})`),t(i_(e.payload))}})},E7e=()=>{pe({actionCreator:tL,effect:(e,{dispatch:t})=>{se("socketio").error(e.payload,`Invocation retrieval error (${e.payload.data.graph_execution_state_id})`),t(nL(e.payload))}})},T7e=()=>{pe({actionCreator:GD,effect:(e,{dispatch:t})=>{se("socketio").debug(e.payload,`Invocation started (${e.payload.data.node.type})`),t(EE(e.payload))}})},A7e=()=>{pe({actionCreator:XD,effect:(e,{dispatch:t})=>{const n=se("socketio"),{base_model:r,model_name:i,model_type:o,submodel:a}=e.payload.data;let s=`Model load started: ${r}/${o}/${i}`;a&&(s=s.concat(`/${a}`)),n.debug(e.payload,s),t(QD(e.payload))}}),pe({actionCreator:YD,effect:(e,{dispatch:t})=>{const n=se("socketio"),{base_model:r,model_name:i,model_type:o,submodel:a}=e.payload.data;let s=`Model load complete: ${r}/${o}/${i}`;a&&(s=s.concat(`/${a}`)),n.debug(e.payload,s),t(ZD(e.payload))}})},P7e=()=>{pe({actionCreator:rL,effect:async(e,{dispatch:t})=>{const n=se("socketio"),{queue_item:r,batch_status:i,queue_status:o}=e.payload.data;n.debug(e.payload,`Queue item ${r.item_id} status updated: ${r.status}`),t(un.util.updateQueryData("listQueueItems",void 0,a=>{xu.updateOne(a,{id:r.item_id,changes:r})})),t(un.util.updateQueryData("getQueueStatus",void 0,a=>{a&&Object.assign(a.queue,o)})),t(un.util.updateQueryData("getBatchStatus",{batch_id:i.batch_id},()=>i)),t(un.util.updateQueryData("getQueueItem",r.item_id,a=>{a&&Object.assign(a,r)})),t(un.util.invalidateTags(["CurrentSessionQueueItem","NextSessionQueueItem","InvocationCacheStatus"])),t(o_(e.payload))}})},k7e=()=>{pe({actionCreator:JD,effect:(e,{dispatch:t})=>{se("socketio").error(e.payload,`Session retrieval error (${e.payload.data.graph_execution_state_id})`),t(eL(e.payload))}})},I7e=()=>{pe({actionCreator:Zre,effect:(e,{dispatch:t})=>{se("socketio").debug(e.payload,"Subscribed"),t(Jre(e.payload))}})},M7e=()=>{pe({actionCreator:eie,effect:(e,{dispatch:t})=>{se("socketio").debug(e.payload,"Unsubscribed"),t(tie(e.payload))}})},R7e=()=>{pe({actionCreator:M6e,effect:async(e,{dispatch:t,getState:n})=>{const{imageDTO:r}=e.payload;try{const i=await t(ce.endpoints.changeImageIsIntermediate.initiate({imageDTO:r,is_intermediate:!1})).unwrap(),{autoAddBoardId:o}=n().gallery;o&&o!=="none"&&await t(ce.endpoints.addImageToBoard.initiate({imageDTO:i,board_id:o})),t(it({title:X("toast.imageSaved"),status:"success"}))}catch(i){t(it({title:X("toast.imageSavingFailed"),description:i==null?void 0:i.message,status:"error"}))}}})},oGe=["sd-1","sd-2","sdxl","sdxl-refiner"],O7e=["sd-1","sd-2","sdxl"],aGe=["sdxl"],sGe=["sd-1","sd-2"],lGe=["sdxl-refiner"],$7e=()=>{pe({actionCreator:qz,effect:async(e,{getState:t,dispatch:n})=>{var i;if(e.payload==="unifiedCanvas"){const o=(i=t().generation.model)==null?void 0:i.base_model;if(o&&["sd-1","sd-2","sdxl"].includes(o))return;try{const a=n(Qo.endpoints.getMainModels.initiate(O7e)),s=await a.unwrap();if(a.unsubscribe(),!s.ids.length){n(sl(null));return}const u=qg.getSelectors().selectAll(s).filter(h=>["sd-1","sd-2","sxdl"].includes(h.base_model))[0];if(!u){n(sl(null));return}const{base_model:c,model_name:d,model_type:f}=u;n(sl({base_model:c,model_name:d,model_type:f}))}catch{n(sl(null))}}}})},N7e=({image_name:e,esrganModelName:t,autoAddBoardId:n})=>{const r={id:Jh,type:"esrgan",image:{image_name:e},model_name:t,is_intermediate:!0},i={id:Wu,type:"linear_ui_output",use_cache:!1,is_intermediate:!1,board:n==="none"?void 0:{board_id:n}},o={id:"adhoc-esrgan-graph",nodes:{[Jh]:r,[Wu]:i},edges:[{source:{node_id:Jh,field:"image"},destination:{node_id:Wu,field:"image"}}]};return ks(o,{},Jh),Lo(o,{esrgan_model:t}),o},w2=()=>oF(),C2=YL;function D7e(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function MR(e,t,n){e.loadNamespaces(t,BG(e,n))}function RR(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,BG(e,r))}function L7e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const u=t.services.backendConnector.state[`${s}|${l}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function F7e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(z3("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):L7e(e,t,n)}const B7e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,z7e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},V7e=e=>z7e[e],j7e=e=>e.replace(B7e,V7e);let V3={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:j7e};function U7e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};V3={...V3,...e}}function G7e(){return V3}let zG;function H7e(e){zG=e}function q7e(){return zG}const W7e={type:"3rdParty",init(e){U7e(e.options.react),H7e(e)}},K7e=k.createContext();class X7e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Q7e=(e,t)=>{const n=k.useRef();return k.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function VG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=k.useContext(K7e)||{},o=n||r||q7e();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new X7e),!o){z3("You will need to pass in an i18next instance by using initReactI18next");const m=(S,w)=>typeof w=="string"?w:w&&typeof w=="object"&&typeof w.defaultValue=="string"?w.defaultValue:Array.isArray(S)?S[S.length-1]:S,v=[m,{},!1];return v.t=m,v.i18n={},v.ready=!1,v}o.options.react&&o.options.react.wait!==void 0&&z3("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...G7e(),...o.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let u=e||i||o.options&&o.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(u);const c=(o.isInitialized||o.initializedStoreOnce)&&u.every(m=>F7e(m,o,a));function d(){return o.getFixedT(t.lng||null,a.nsMode==="fallback"?u:u[0],l)}const[f,h]=k.useState(d);let p=u.join();t.lng&&(p=`${t.lng}${p}`);const g=Q7e(p),_=k.useRef(!0);k.useEffect(()=>{const{bindI18n:m,bindI18nStore:v}=a;_.current=!0,!c&&!s&&(t.lng?RR(o,t.lng,u,()=>{_.current&&h(d)}):MR(o,u,()=>{_.current&&h(d)})),c&&g&&g!==p&&_.current&&h(d);function S(){_.current&&h(d)}return m&&o&&o.on(m,S),v&&o&&o.store.on(v,S),()=>{_.current=!1,m&&o&&m.split(" ").forEach(w=>o.off(w,S)),v&&o&&v.split(" ").forEach(w=>o.store.off(w,S))}},[o,p]);const b=k.useRef(!0);k.useEffect(()=>{_.current&&!b.current&&h(d),b.current=!1},[o,l]);const y=[f,o,c];if(y.t=f,y.i18n=o,y.ready=c,c||!c&&!s)return y;throw new Promise(m=>{t.lng?RR(o,t.lng,u,()=>m()):MR(o,u,()=>m())})}const Y7e=(e,t)=>{if(!e||!t)return;const{width:n,height:r}=e,i=r*4*n*4,o=r*2*n*2;return{x4:i,x2:o}},Z7e=(e,t)=>{if(!e||!t)return{x4:!0,x2:!0};const n={x4:!1,x2:!1};return e.x4<=t&&(n.x4=!0),e.x2<=t&&(n.x2=!0),n},J7e=(e,t)=>{if(!(!e||!t)&&!(e.x4&&e.x2)){if(!e.x2&&!e.x4)return"parameters.isAllowedToUpscale.tooLarge";if(!e.x4&&e.x2&&t===4)return"parameters.isAllowedToUpscale.useX2Model"}},jG=e=>qn(IA,({postprocessing:t,config:n})=>{const{esrganModelName:r}=t,{maxUpscalePixels:i}=n,o=Y7e(e,i),a=Z7e(o,i),s=r.includes("x2")?2:4,l=J7e(a,s);return{isAllowedToUpscale:s===2?a.x2:a.x4,detailTKey:l}},Vm),uGe=e=>{const{t}=VG(),n=k.useMemo(()=>jG(e),[e]),{isAllowedToUpscale:r,detailTKey:i}=C2(n);return{isAllowedToUpscale:r,detail:i?t(i):void 0}},e$e=ge("upscale/upscaleRequested"),t$e=()=>{pe({actionCreator:e$e,effect:async(e,{dispatch:t,getState:n})=>{var f;const r=se("session"),{imageDTO:i}=e.payload,{image_name:o}=i,a=n(),{isAllowedToUpscale:s,detailTKey:l}=jG(i)(a);if(!s){r.error({imageDTO:i},X(l??"parameters.isAllowedToUpscale.tooLarge")),t(it({title:X(l??"parameters.isAllowedToUpscale.tooLarge"),status:"error"}));return}const{esrganModelName:u}=a.postprocessing,{autoAddBoardId:c}=a.gallery,d={prepend:!0,batch:{graph:N7e({image_name:o,esrganModelName:u,autoAddBoardId:c}),runs:1}};try{const h=t(un.endpoints.enqueueBatch.initiate(d,{fixedCacheKey:"enqueueBatch"})),p=await h.unwrap();h.reset(),r.debug({enqueueResult:pt(p)},X("queue.graphQueued"))}catch(h){if(r.error({enqueueBatchArg:pt(d)},X("queue.graphFailedToQueue")),h instanceof Object&&"data"in h&&"status"in h&&h.status===403){const p=((f=h.data)==null?void 0:f.detail)||"Unknown Error";t(it({title:X("queue.graphFailedToQueue"),status:"error",description:p,duration:15e3}));return}t(it({title:X("queue.graphFailedToQueue"),status:"error"}))}}})},n$e=Pa(null),r$e=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,fb=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(r$e);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},OR=e=>e==="*"||e==="x"||e==="X",$R=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},i$e=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],o$e=(e,t)=>{if(OR(e)||OR(t))return 0;const[n,r]=i$e($R(e),$R(t));return n>r?1:n{for(let n=0;n{const n=fb(e),r=fb(t),i=n.pop(),o=r.pop(),a=bd(n,r);return a!==0?a:i&&o?bd(i.split("."),o.split(".")):i||o?i?-1:1:0},a$e=(e,t,n)=>{s$e(n);const r=UG(e,t);return GG[n].includes(r)},GG={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},NR=Object.keys(GG),s$e=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(NR.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${NR.join("|")}`)},pv=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(_=>pv(e,_));if(t.includes(" - ")){const[_,b]=t.split(" - ",2);return pv(e,`>=${_} <=${b}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(_=>pv(e,_));const n=t.match(/^([<>=~^]+)/),r=n?n[1]:"=";if(r!=="^"&&r!=="~")return a$e(e,t,r);const[i,o,a,,s]=fb(e),[l,u,c,,d]=fb(t),f=[i,o,a],h=[l,u??"x",c??"x"];if(d&&(!s||bd(f,h)!==0||bd(s.split("."),d.split("."))===-1))return!1;const p=h.findIndex(_=>_!=="0")+1,g=r==="~"?2:p>1?p:1;return!(bd(f.slice(0,g),h.slice(0,g))!==0||bd(f.slice(g),h.slice(g))===-1)},l$e=(e,t)=>{const n=Ye(e),{nodes:r,edges:i}=n,o=[],a=r.filter(I5),s=xE(a,"id");return r.forEach(l=>{if(!I5(l))return;const u=t[l.data.type];if(!u){o.push({message:`${de.t("nodes.node")} "${l.data.type}" ${de.t("nodes.skipped")}`,issues:[`${de.t("nodes.nodeType")}"${l.data.type}" ${de.t("nodes.doesNotExist")}`],data:l});return}if(u.version&&l.data.version&&UG(u.version,l.data.version)!==0){o.push({message:`${de.t("nodes.node")} "${l.data.type}" ${de.t("nodes.mismatchedVersion")}`,issues:[`${de.t("nodes.node")} "${l.data.type}" v${l.data.version} ${de.t("nodes.maybeIncompatible")} v${u.version}`],data:{node:l,nodeTemplate:pt(u)}});return}}),i.forEach((l,u)=>{const c=s[l.source],d=s[l.target],f=[];if(c?l.type==="default"&&!(l.sourceHandle in c.data.outputs)&&f.push(`${de.t("nodes.outputNode")} "${l.source}.${l.sourceHandle}" ${de.t("nodes.doesNotExist")}`):f.push(`${de.t("nodes.outputNode")} ${l.source} ${de.t("nodes.doesNotExist")}`),d?l.type==="default"&&!(l.targetHandle in d.data.inputs)&&f.push(`${de.t("nodes.inputField")} "${l.target}.${l.targetHandle}" ${de.t("nodes.doesNotExist")}`):f.push(`${de.t("nodes.inputNode")} ${l.target} ${de.t("nodes.doesNotExist")}`),t[(c==null?void 0:c.data.type)??"__UNKNOWN_NODE_TYPE__"]||f.push(`${de.t("nodes.sourceNode")} "${l.source}" ${de.t("nodes.missingTemplate")} "${c==null?void 0:c.data.type}"`),t[(d==null?void 0:d.data.type)??"__UNKNOWN_NODE_TYPE__"]||f.push(`${de.t("nodes.sourceNode")}"${l.target}" ${de.t("nodes.missingTemplate")} "${d==null?void 0:d.data.type}"`),f.length){delete i[u];const h=l.type==="default"?l.sourceHandle:l.source,p=l.type==="default"?l.targetHandle:l.target;o.push({message:`Edge "${h} -> ${p}" skipped`,issues:f,data:l})}}),{workflow:n,errors:o}},u$e=()=>{pe({actionCreator:v1e,effect:(e,{dispatch:t,getState:n})=>{const r=se("nodes"),i=e.payload,o=n().nodes.nodeTemplates,{workflow:a,errors:s}=l$e(i,o);t(fve(a)),s.length?(t(it(vs({title:X("toast.loadedWithWarnings"),status:"warning"}))),s.forEach(({message:l,...u})=>{r.warn(u,l)})):t(it(vs({title:X("toast.workflowLoaded"),status:"success"}))),t(qz("nodes")),requestAnimationFrame(()=>{var l;(l=n$e.get())==null||l.fitView()})}})},c$e={Any:void 0,enum:"",BoardField:void 0,boolean:!1,BooleanCollection:[],BooleanPolymorphic:!1,ClipField:void 0,Collection:[],CollectionItem:void 0,ColorCollection:[],ColorField:void 0,ColorPolymorphic:void 0,ConditioningCollection:[],ConditioningField:void 0,ConditioningPolymorphic:void 0,ControlCollection:[],ControlField:void 0,ControlNetModelField:void 0,ControlPolymorphic:void 0,DenoiseMaskField:void 0,float:0,FloatCollection:[],FloatPolymorphic:0,ImageCollection:[],ImageField:void 0,ImagePolymorphic:void 0,integer:0,IntegerCollection:[],IntegerPolymorphic:0,IPAdapterCollection:[],IPAdapterField:void 0,IPAdapterModelField:void 0,IPAdapterPolymorphic:void 0,LatentsCollection:[],LatentsField:void 0,LatentsPolymorphic:void 0,MetadataItemField:void 0,MetadataItemCollection:[],MetadataItemPolymorphic:void 0,MetadataField:void 0,MetadataCollection:[],LoRAModelField:void 0,MainModelField:void 0,ONNXModelField:void 0,Scheduler:"euler",SDXLMainModelField:void 0,SDXLRefinerModelField:void 0,string:"",StringCollection:[],StringPolymorphic:"",T2IAdapterCollection:[],T2IAdapterField:void 0,T2IAdapterModelField:void 0,T2IAdapterPolymorphic:void 0,UNetField:void 0,VaeField:void 0,VaeModelField:void 0},d$e=(e,t)=>{const n={id:e,name:t.name,type:t.type,label:"",fieldKind:"input"};return n.value=t.default??c$e[t.type],n},Zw={dragHandle:`.${xz}`},f$e=(e,t,n)=>{const r=yl();if(e==="current_image")return{...Zw,id:r,type:"current_image",position:t,data:{id:r,type:"current_image",isOpen:!0,label:"Current Image"}};if(e==="notes")return{...Zw,id:r,type:"notes",position:t,data:{id:r,isOpen:!0,label:"Notes",notes:"",type:"notes"}};if(n===void 0){console.error(`Unable to find template ${e}.`);return}const i=tg(n.inputs,(s,l,u)=>{const c=yl(),d=d$e(c,l);return s[u]=d,s},{}),o=tg(n.outputs,(s,l,u)=>{const d={id:yl(),name:u,type:l.type,fieldKind:"output"};return s[u]=d,s},{});return{...Zw,id:r,type:"invocation",position:t,data:{id:r,type:e,version:n.version,label:"",notes:"",isOpen:!0,embedWorkflow:!1,isIntermediate:e!=="save_image",inputs:i,outputs:o,useCache:n.useCache}}},h$e=()=>{const e=w2(),t=C2(r=>r.system.toastQueue),n=gPe();return k.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(vve())},[e,n,t]),null},p$e=()=>{const e=w2();return k.useCallback(n=>e(it(vs(n))),[e])},cGe=k.memo(h$e),hb=(e,t)=>!on(e)||!t?!1:e.data.version!==t.version,HG=(e,t)=>{if(!hb(e,t)||!on(e)||!t||!e.data.version)return!1;const r=Pfe.parse(t.version).major;return pv(e.data.version,`^${r}`)},qG=(e,t)=>{if(!HG(e,t)||!on(e)||!t||!e.data.version)return;const r=f$e(e.data.type,e.position,t),i=Ye(e);return i.data.version=t.version,ID(i,r),i},dGe=e=>{const t=w2(),n=p$e(),{t:r}=VG(),i=k.useMemo(()=>qn(IA,({nodes:c})=>{const d=c.nodes.find(h=>h.id===e),f=c.nodeTemplates[(d==null?void 0:d.data.type)??""];return{node:d,nodeTemplate:f}},Vm),[e]),{node:o,nodeTemplate:a}=C2(i),s=k.useMemo(()=>hb(o,a),[o,a]),l=k.useMemo(()=>HG(o,a),[o,a]),u=k.useCallback(()=>{const c=hb(o,a),d=qG(o,a);if(!d){c&&n({title:r("nodes.unableToUpdateNodes",{count:1})});return}t(Oz({nodeId:d.id,node:d}))},[t,o,a,r,n]);return{needsUpdate:s,mayUpdate:l,updateNode:u}},g$e=()=>{pe({actionCreator:b1e,effect:(e,{dispatch:t,getState:n})=>{const r=se("nodes"),i=n().nodes.nodes,o=n().nodes.nodeTemplates;let a=0;i.forEach(s=>{const l=o[s.data.type],u=hb(s,l),c=qG(s,l);if(!c){u&&a++;return}t(Oz({nodeId:c.id,node:c}))}),a&&(r.warn(`Unable to update ${a} nodes. Please report this issue.`),t(it(vs({title:X("nodes.unableToUpdateNodes",{count:a})}))))}})},WG=mN(),pe=WG.startListening;HRe();qRe();YRe();DRe();LRe();FRe();BRe();zRe();C6e();GRe();WRe();KRe();mRe();ORe();CRe();T1e();x6e();HMe();VMe();z6e();jMe();B6e();L6e();GMe();R7e();C1e();_7e();S7e();w7e();C7e();T7e();v7e();b7e();I7e();M7e();A7e();k7e();E7e();P7e();KMe();WMe();$Re();NRe();jRe();URe();E6e();y7e();u$e();g$e();VRe();ZRe();k1e();eOe();A1e();E1e();t$e();$7e();rOe();const m$e={canvas:Nle,gallery:Lfe,generation:dae,nodes:hve,postprocessing:pve,system:xve,config:Yre,ui:Ave,hotkeys:Tve,controlAdapters:jie,dynamicPrompts:Wle,deleteImageModal:zle,changeBoardModal:Lle,lora:zfe,modelmanager:Eve,sdxl:mve,queue:Cae,[Do.reducerPath]:Do.reducer},y$e=Mf(m$e),v$e=Zve(y$e),b$e=["canvas","gallery","generation","sdxl","nodes","postprocessing","system","ui","controlAdapters","dynamicPrompts","lora","modelmanager"],KG=Y$({reducer:v$e,enhancers:e=>e.concat(Jve(window.localStorage,b$e,{persistDebounce:300,serialize:d1e,unserialize:h1e,prefix:e1e})).concat(vN()),middleware:e=>e({serializableCheck:!1,immutableCheck:!1}).concat(Do.middleware).concat(Mve).prepend(WG.middleware),devTools:{actionSanitizer:_1e,stateSanitizer:x1e,trace:!0,predicate:(e,t)=>!S1e.includes(t.type)}}),IA=e=>e;BF.set(KG);const _$e=e=>{const{socket:t,storeApi:n}=e,{dispatch:r}=n;t.on("connect",()=>{se("socketio").debug("Connected"),r(VD());const o=Dn.get();t.emit("subscribe_queue",{queue_id:o})}),t.on("connect_error",i=>{i&&i.message&&i.data==="ERR_UNAUTHENTICATED"&&r(it(vs({title:i.message,status:"error",duration:1e4})))}),t.on("disconnect",()=>{r(jD())}),t.on("invocation_started",i=>{r(GD({data:i}))}),t.on("generator_progress",i=>{r(KD({data:i}))}),t.on("invocation_error",i=>{r(HD({data:i}))}),t.on("invocation_complete",i=>{r(TE({data:i}))}),t.on("graph_execution_state_complete",i=>{r(qD({data:i}))}),t.on("model_load_started",i=>{r(XD({data:i}))}),t.on("model_load_completed",i=>{r(YD({data:i}))}),t.on("session_retrieval_error",i=>{r(JD({data:i}))}),t.on("invocation_retrieval_error",i=>{r(tL({data:i}))}),t.on("queue_item_status_changed",i=>{r(rL({data:i}))})},Ca=Object.create(null);Ca.open="0";Ca.close="1";Ca.ping="2";Ca.pong="3";Ca.message="4";Ca.upgrade="5";Ca.noop="6";const gv=Object.create(null);Object.keys(Ca).forEach(e=>{gv[Ca[e]]=e});const j3={type:"error",data:"parser error"},XG=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",QG=typeof ArrayBuffer=="function",YG=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,MA=({type:e,data:t},n,r)=>XG&&t instanceof Blob?n?r(t):DR(t,r):QG&&(t instanceof ArrayBuffer||YG(t))?n?r(t):DR(new Blob([t]),r):r(Ca[e]+(t||"")),DR=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function LR(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Jw;function S$e(e,t){if(XG&&e.data instanceof Blob)return e.data.arrayBuffer().then(LR).then(t);if(QG&&(e.data instanceof ArrayBuffer||YG(e.data)))return t(LR(e.data));MA(e,!1,n=>{Jw||(Jw=new TextEncoder),t(Jw.encode(n))})}const FR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ep=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r>4,c[i++]=(a&15)<<4|s>>2,c[i++]=(s&3)<<6|l&63;return u},w$e=typeof ArrayBuffer=="function",RA=(e,t)=>{if(typeof e!="string")return{type:"message",data:ZG(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:C$e(e.substring(1),t)}:gv[n]?e.length>1?{type:gv[n],data:e.substring(1)}:{type:gv[n]}:j3},C$e=(e,t)=>{if(w$e){const n=x$e(e);return ZG(n,t)}else return{base64:!0,data:e}},ZG=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},JG=String.fromCharCode(30),E$e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{MA(o,!1,s=>{r[a]=s,++i===n&&t(r.join(JG))})})},T$e=(e,t)=>{const n=e.split(JG),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let eC;function Sy(e){return e.reduce((t,n)=>t+n.length,0)}function xy(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){s.enqueue(j3);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Sy(n)e){s.enqueue(j3);break}}}})}const eH=4;function En(e){if(e)return k$e(e)}function k$e(e){for(var t in En.prototype)e[t]=En.prototype[t];return e}En.prototype.on=En.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};En.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};En.prototype.off=En.prototype.removeListener=En.prototype.removeAllListeners=En.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function tH(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const I$e=qi.setTimeout,M$e=qi.clearTimeout;function E2(e,t){t.useNativeTimers?(e.setTimeoutFn=I$e.bind(qi),e.clearTimeoutFn=M$e.bind(qi)):(e.setTimeoutFn=qi.setTimeout.bind(qi),e.clearTimeoutFn=qi.clearTimeout.bind(qi))}const R$e=1.33;function O$e(e){return typeof e=="string"?$$e(e):Math.ceil((e.byteLength||e.size)*R$e)}function $$e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function N$e(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function D$e(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function rH(){const e=VR(+new Date);return e!==zR?(BR=0,zR=e):e+"."+VR(BR++)}for(;wy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};T$e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,E$e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=rH()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new qd(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let qd=class mv extends En{constructor(t,n){super(),E2(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=tH(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new oH(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=mv.requestsCount++,mv.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=z$e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete mv.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};qd.requestsCount=0;qd.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",jR);else if(typeof addEventListener=="function"){const e="onpagehide"in qi?"pagehide":"unload";addEventListener(e,jR,!1)}}function jR(){for(let e in qd.requests)qd.requests.hasOwnProperty(e)&&qd.requests[e].abort()}const $A=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Cy=qi.WebSocket||qi.MozWebSocket,UR=!0,U$e="arraybuffer",GR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class G$e extends OA{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=GR?{}:tH(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UR&&!GR?n?new Cy(t,n):new Cy(t):new Cy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UR&&this.ws.send(o)}catch{}i&&$A(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=rH()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!Cy}}class H$e extends OA{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=P$e(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=A$e();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:s,value:l})=>{s||(this.onPacket(l),o())}).catch(s=>{})};o();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&$A(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const q$e={websocket:G$e,webtransport:H$e,polling:j$e},W$e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,K$e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function G3(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=W$e.exec(e||""),o={},a=14;for(;a--;)o[K$e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=X$e(o,o.path),o.queryKey=Q$e(o,o.query),o}function X$e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Q$e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let aH=class Xc extends En{constructor(t,n={}){super(),this.binaryType=U$e,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=G3(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=G3(n.host).host),E2(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=D$e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=eH,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new q$e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Xc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Xc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const a=d=>{const f=new Error("probe error: "+d);f.transport=n.name,o(),this.emitReserved("upgradeError",f)};function s(){a("transport closed")}function l(){a("socket closed")}function u(d){n&&d.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Xc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Xc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,sH=Object.prototype.toString,eNe=typeof Blob=="function"||typeof Blob<"u"&&sH.call(Blob)==="[object BlobConstructor]",tNe=typeof File=="function"||typeof File<"u"&&sH.call(File)==="[object FileConstructor]";function NA(e){return Z$e&&(e instanceof ArrayBuffer||J$e(e))||eNe&&e instanceof Blob||tNe&&e instanceof File}function yv(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let a=0;a{this.io.clearTimeoutFn(o),n.apply(this,[null,...a])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((a,s)=>r?a?o(a):i(s):i(a)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ze.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ze.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ze.EVENT:case Ze.BINARY_EVENT:this.onevent(t);break;case Ze.ACK:case Ze.BINARY_ACK:this.onack(t);break;case Ze.DISCONNECT:this.ondisconnect();break;case Ze.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ze.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ze.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Wf.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Wf.prototype.reset=function(){this.attempts=0};Wf.prototype.setMin=function(e){this.ms=e};Wf.prototype.setMax=function(e){this.max=e};Wf.prototype.setJitter=function(e){this.jitter=e};class W3 extends En{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,E2(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Wf({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||lNe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new aH(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=bo(n,"open",function(){r.onopen(),t&&t()}),o=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=bo(n,"error",o);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(bo(t,"ping",this.onping.bind(this)),bo(t,"data",this.ondata.bind(this)),bo(t,"error",this.onerror.bind(this)),bo(t,"close",this.onclose.bind(this)),bo(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){$A(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new lH(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const $h={};function vv(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Y$e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=$h[i]&&o in $h[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new W3(r,t):($h[i]||($h[i]=new W3(r,t)),l=$h[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(vv,{Manager:W3,Socket:lH,io:vv,connect:vv});const qR=()=>{let e=!1,n=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`;const r={timeout:6e4,path:"/ws/socket.io",autoConnect:!1};if(["nodes","package"].includes("production")){const a=vg.get();a&&(n=a.replace(/^https?\:\/\//i,""));const s=yg.get();s&&(r.auth={token:s}),r.transports=["websocket","polling"]}const i=vv(n,r);return a=>s=>l=>{e||(_$e({storeApi:a,socket:i}),e=!0,i.connect()),s(l)}},cNe=""+new URL("logo-13003d72.png",import.meta.url).href,dNe=()=>oe.jsxs(sA,{position:"relative",width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",bg:"#151519",children:[oe.jsx(aA,{src:cNe,w:"8rem",h:"8rem"}),oe.jsx(rA,{label:"Loading",color:"grey",position:"absolute",size:"sm",width:"24px !important",height:"24px !important",right:"1.5rem",bottom:"1.5rem"})]}),fNe=k.memo(dNe);function K3(e){"@babel/helpers - typeof";return K3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K3(e)}var uH=[],hNe=uH.forEach,pNe=uH.slice;function X3(e){return hNe.call(pNe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function cH(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":K3(XMLHttpRequest))==="object"}function gNe(e){return!!e&&typeof e.then=="function"}function mNe(e){return gNe(e)?e:Promise.resolve(e)}function yNe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Q3={exports:{}},Ey={exports:{}},WR;function vNe(){return WR||(WR=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof He<"u"&&He,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s=typeof o<"u"&&o||typeof self<"u"&&self||typeof s<"u"&&s,l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(A){return A&&DataView.prototype.isPrototypeOf(A)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(A){return A&&c.indexOf(Object.prototype.toString.call(A))>-1};function f(A){if(typeof A!="string"&&(A=String(A)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(A)||A==="")throw new TypeError('Invalid character in header field name: "'+A+'"');return A.toLowerCase()}function h(A){return typeof A!="string"&&(A=String(A)),A}function p(A){var R={next:function(){var D=A.shift();return{done:D===void 0,value:D}}};return l.iterable&&(R[Symbol.iterator]=function(){return R}),R}function g(A){this.map={},A instanceof g?A.forEach(function(R,D){this.append(D,R)},this):Array.isArray(A)?A.forEach(function(R){this.append(R[0],R[1])},this):A&&Object.getOwnPropertyNames(A).forEach(function(R){this.append(R,A[R])},this)}g.prototype.append=function(A,R){A=f(A),R=h(R);var D=this.map[A];this.map[A]=D?D+", "+R:R},g.prototype.delete=function(A){delete this.map[f(A)]},g.prototype.get=function(A){return A=f(A),this.has(A)?this.map[A]:null},g.prototype.has=function(A){return this.map.hasOwnProperty(f(A))},g.prototype.set=function(A,R){this.map[f(A)]=h(R)},g.prototype.forEach=function(A,R){for(var D in this.map)this.map.hasOwnProperty(D)&&A.call(R,this.map[D],D,this)},g.prototype.keys=function(){var A=[];return this.forEach(function(R,D){A.push(D)}),p(A)},g.prototype.values=function(){var A=[];return this.forEach(function(R){A.push(R)}),p(A)},g.prototype.entries=function(){var A=[];return this.forEach(function(R,D){A.push([D,R])}),p(A)},l.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function _(A){if(A.bodyUsed)return Promise.reject(new TypeError("Already read"));A.bodyUsed=!0}function b(A){return new Promise(function(R,D){A.onload=function(){R(A.result)},A.onerror=function(){D(A.error)}})}function y(A){var R=new FileReader,D=b(R);return R.readAsArrayBuffer(A),D}function m(A){var R=new FileReader,D=b(R);return R.readAsText(A),D}function v(A){for(var R=new Uint8Array(A),D=new Array(R.length),$=0;$-1?R:A}function P(A,R){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R=R||{};var D=R.body;if(A instanceof P){if(A.bodyUsed)throw new TypeError("Already read");this.url=A.url,this.credentials=A.credentials,R.headers||(this.headers=new g(A.headers)),this.method=A.method,this.mode=A.mode,this.signal=A.signal,!D&&A._bodyInit!=null&&(D=A._bodyInit,A.bodyUsed=!0)}else this.url=String(A);if(this.credentials=R.credentials||this.credentials||"same-origin",(R.headers||!this.headers)&&(this.headers=new g(R.headers)),this.method=x(R.method||this.method||"GET"),this.mode=R.mode||this.mode||null,this.signal=R.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&D)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(D),(this.method==="GET"||this.method==="HEAD")&&(R.cache==="no-store"||R.cache==="no-cache")){var $=/([?&])_=[^&]*/;if($.test(this.url))this.url=this.url.replace($,"$1_="+new Date().getTime());else{var L=/\?/;this.url+=(L.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})};function E(A){var R=new FormData;return A.trim().split("&").forEach(function(D){if(D){var $=D.split("="),L=$.shift().replace(/\+/g," "),O=$.join("=").replace(/\+/g," ");R.append(decodeURIComponent(L),decodeURIComponent(O))}}),R}function I(A){var R=new g,D=A.replace(/\r?\n[\t ]+/g," ");return D.split("\r").map(function($){return $.indexOf(` -`)===0?$.substr(1,$.length):$}).forEach(function($){var L=$.split(":"),O=L.shift().trim();if(O){var B=L.join(":").trim();R.append(O,B)}}),R}w.call(P.prototype);function N(A,R){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R||(R={}),this.type="default",this.status=R.status===void 0?200:R.status,this.ok=this.status>=200&&this.status<300,this.statusText=R.statusText===void 0?"":""+R.statusText,this.headers=new g(R.headers),this.url=R.url||"",this._initBody(A)}w.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},N.error=function(){var A=new N(null,{status:0,statusText:""});return A.type="error",A};var M=[301,302,303,307,308];N.redirect=function(A,R){if(M.indexOf(R)===-1)throw new RangeError("Invalid status code");return new N(null,{status:R,headers:{location:A}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(R,D){this.message=R,this.name=D;var $=Error(R);this.stack=$.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function T(A,R){return new Promise(function(D,$){var L=new P(A,R);if(L.signal&&L.signal.aborted)return $(new a.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function B(){O.abort()}O.onload=function(){var j={status:O.status,statusText:O.statusText,headers:I(O.getAllResponseHeaders()||"")};j.url="responseURL"in O?O.responseURL:j.headers.get("X-Request-URL");var q="response"in O?O.response:O.responseText;setTimeout(function(){D(new N(q,j))},0)},O.onerror=function(){setTimeout(function(){$(new TypeError("Network request failed"))},0)},O.ontimeout=function(){setTimeout(function(){$(new TypeError("Network request failed"))},0)},O.onabort=function(){setTimeout(function(){$(new a.DOMException("Aborted","AbortError"))},0)};function U(j){try{return j===""&&s.location.href?s.location.href:j}catch{return j}}O.open(L.method,U(L.url),!0),L.credentials==="include"?O.withCredentials=!0:L.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&(l.blob?O.responseType="blob":l.arrayBuffer&&L.headers.get("Content-Type")&&L.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(O.responseType="arraybuffer")),R&&typeof R.headers=="object"&&!(R.headers instanceof g)?Object.getOwnPropertyNames(R.headers).forEach(function(j){O.setRequestHeader(j,h(R.headers[j]))}):L.headers.forEach(function(j,q){O.setRequestHeader(q,j)}),L.signal&&(L.signal.addEventListener("abort",B),O.onreadystatechange=function(){O.readyState===4&&L.signal.removeEventListener("abort",B)}),O.send(typeof L._bodyInit>"u"?null:L._bodyInit)})}return T.polyfill=!0,s.fetch||(s.fetch=T,s.Headers=g,s.Request=P,s.Response=N),a.Headers=g,a.Request=P,a.Response=N,a.fetch=T,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Ey,Ey.exports)),Ey.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof He<"u"&&He.fetch?n=He.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof yNe<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||vNe();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Q3,Q3.exports);var dH=Q3.exports;const fH=Bl(dH),KR=gO({__proto__:null,default:fH},[dH]);function pb(e){"@babel/helpers - typeof";return pb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pb(e)}var ls;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?ls=global.fetch:typeof window<"u"&&window.fetch?ls=window.fetch:ls=fetch);var Wg;cH()&&(typeof global<"u"&&global.XMLHttpRequest?Wg=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Wg=window.XMLHttpRequest));var gb;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?gb=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(gb=window.ActiveXObject));!ls&&KR&&!Wg&&!gb&&(ls=fH||KR);typeof ls!="function"&&(ls=void 0);var Y3=function(t,n){if(n&&pb(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},XR=function(t,n,r){var i=function(a){if(!a.ok)return r(a.statusText||"Error",{status:a.status});a.text().then(function(s){r(null,{status:a.status,data:s})}).catch(r)};typeof fetch=="function"?fetch(t,n).then(i).catch(r):ls(t,n).then(i).catch(r)},QR=!1,bNe=function(t,n,r,i){t.queryStringParams&&(n=Y3(n,t.queryStringParams));var o=X3({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=X3({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},QR?{}:a);try{XR(n,s,i)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(u){delete s[u]}),XR(n,s,i),QR=!0}catch(u){i(u)}}},_Ne=function(t,n,r,i){r&&pb(r)==="object"&&(r=Y3("",r).slice(1)),t.queryStringParams&&(n=Y3(n,t.queryStringParams));try{var o;Wg?o=new Wg:o=new gb("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},SNe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},ls&&n.indexOf("file:")!==0)return bNe(t,n,r,i);if(cH()||typeof ActiveXObject=="function")return _Ne(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Kg(e){"@babel/helpers - typeof";return Kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kg(e)}function xNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YR(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};xNe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return wNe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=X3(i,this.options||{},TNe()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=mNe(l),l.then(function(u){if(!u)return a(null,{});var c=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(c,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this,s=typeof i=="string"?[i]:i,l=typeof o=="string"?[o]:o,u=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,u,function(c,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&c&&c.message&&c.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+c.message,!0);if(c)return r(c,!1);var f,h;try{typeof d.data=="string"?f=a.options.parse(d.data,i,o):f=d.data}catch{h="failed parsing "+n+" to json"}if(h)return r(h,!1);r(null,f)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,c=[],d=[];n.forEach(function(f){var h=s.options.addPath;typeof s.options.addPath=="function"&&(h=s.options.addPath(f,r));var p=s.services.interpolator.interpolate(h,{lng:f,ns:r});s.options.request(s.options,p,l,function(g,_){u+=1,c.push(g),d.push(_),u===n.length&&typeof a=="function"&&a(c,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(d){var f=o.toResolveHierarchy(d);f.forEach(function(h){l.indexOf(h)<0&&l.push(h)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){n.allOptions.ns.forEach(function(d){i.read(c,d,"read",null,null,function(f,h){f&&a.warn("loading namespace ".concat(d," for language ").concat(c," failed"),f),!f&&h&&a.log("loaded namespace ".concat(d," for language ").concat(c),h),i.loaded("".concat(c,"|").concat(d),f,h)})})})}}}]),e}();pH.type="backend";de.use(pH).use(W7e).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const T2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Kf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function LA(e){return"nodeType"in e}function zr(e){var t,n;return e?Kf(e)?e:LA(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function FA(e){const{Document:t}=zr(e);return e instanceof t}function Wm(e){return Kf(e)?!1:e instanceof zr(e).HTMLElement}function gH(e){return e instanceof zr(e).SVGElement}function Xf(e){return e?Kf(e)?e.document:LA(e)?FA(e)?e:Wm(e)||gH(e)?e.ownerDocument:document:document:document}const Ea=T2?k.useLayoutEffect:k.useEffect;function A2(e){const t=k.useRef(e);return Ea(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{e.current=setInterval(r,i)},[]),n=k.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Xg(e,t){t===void 0&&(t=[e]);const n=k.useRef(e);return Ea(()=>{n.current!==e&&(n.current=e)},t),n}function Km(e,t){const n=k.useRef();return k.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function mb(e){const t=A2(e),n=k.useRef(null),r=k.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function yb(e){const t=k.useRef();return k.useEffect(()=>{t.current=e},[e]),t.current}let tC={};function P2(e,t){return k.useMemo(()=>{if(t)return t;const n=tC[e]==null?0:tC[e]+1;return tC[e]=n,e+"-"+n},[e,t])}function mH(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{const s=Object.entries(a);for(const[l,u]of s){const c=o[l];c!=null&&(o[l]=c+e*u)}return o},{...t})}}const Wd=mH(1),vb=mH(-1);function PNe(e){return"clientX"in e&&"clientY"in e}function BA(e){if(!e)return!1;const{KeyboardEvent:t}=zr(e.target);return t&&e instanceof t}function kNe(e){if(!e)return!1;const{TouchEvent:t}=zr(e.target);return t&&e instanceof t}function Qg(e){if(kNe(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return PNe(e)?{x:e.clientX,y:e.clientY}:null}const Yg=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Yg.Translate.toString(e),Yg.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ZR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function INe(e){return e.matches(ZR)?e:e.querySelector(ZR)}const MNe={display:"none"};function RNe(e){let{id:t,value:n}=e;return J.createElement("div",{id:t,style:MNe},n)}function ONe(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return J.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function $Ne(){const[e,t]=k.useState("");return{announce:k.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const yH=k.createContext(null);function NNe(e){const t=k.useContext(yH);k.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function DNe(){const[e]=k.useState(()=>new Set),t=k.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[k.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const LNe={draggable:` - To pick up a draggable item, press the space bar. - While dragging, use the arrow keys to move the item. - Press space again to drop the item in its new position, or press escape to cancel. - `},FNe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function BNe(e){let{announcements:t=FNe,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=LNe}=e;const{announce:o,announcement:a}=$Ne(),s=P2("DndLiveRegion"),[l,u]=k.useState(!1);if(k.useEffect(()=>{u(!0)},[]),NNe(k.useMemo(()=>({onDragStart(d){let{active:f}=d;o(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:h}=d;t.onDragMove&&o(t.onDragMove({active:f,over:h}))},onDragOver(d){let{active:f,over:h}=d;o(t.onDragOver({active:f,over:h}))},onDragEnd(d){let{active:f,over:h}=d;o(t.onDragEnd({active:f,over:h}))},onDragCancel(d){let{active:f,over:h}=d;o(t.onDragCancel({active:f,over:h}))}}),[o,t])),!l)return null;const c=J.createElement(J.Fragment,null,J.createElement(RNe,{id:r,value:i.draggable}),J.createElement(ONe,{id:s,announcement:a}));return n?mi.createPortal(c,n):c}var kn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(kn||(kn={}));function bb(){}function JR(e,t){return k.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function zNe(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(r=>r!=null),[...t])}const Fo=Object.freeze({x:0,y:0});function VNe(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function jNe(e,t){const n=Qg(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function UNe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function GNe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function HNe(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function qNe(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function WNe(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const l=WNe(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(GNe)};function XNe(e,t){const{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}const QNe=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const i=[];for(const o of t){const{id:a}=o,s=n.get(a);if(s&&XNe(r,s)){const u=HNe(s).reduce((d,f)=>d+VNe(r,f),0),c=Number((u/4).toFixed(4));i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(UNe)};function YNe(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function vH(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Fo}function ZNe(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const JNe=ZNe(1);function bH(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function eDe(e,t,n){const r=bH(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l}}const tDe={ignoreTransform:!1};function Xm(e,t){t===void 0&&(t=tDe);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:c}=zr(e).getComputedStyle(e);u&&(n=eDe(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function eO(e){return Xm(e,{ignoreTransform:!0})}function nDe(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function rDe(e,t){return t===void 0&&(t=zr(e).getComputedStyle(e)),t.position==="fixed"}function iDe(e,t){t===void 0&&(t=zr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function zA(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(FA(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Wm(i)||gH(i)||n.includes(i))return n;const o=zr(e).getComputedStyle(i);return i!==e&&iDe(i,o)&&n.push(i),rDe(i,o)?n:r(i.parentNode)}return e?r(e):n}function _H(e){const[t]=zA(e,1);return t??null}function nC(e){return!T2||!e?null:Kf(e)?e:LA(e)?FA(e)||e===Xf(e).scrollingElement?window:Wm(e)?e:null:null}function SH(e){return Kf(e)?e.scrollX:e.scrollLeft}function xH(e){return Kf(e)?e.scrollY:e.scrollTop}function Z3(e){return{x:SH(e),y:xH(e)}}var jn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(jn||(jn={}));function wH(e){return!T2||!e?!1:e===document.scrollingElement}function CH(e){const t={x:0,y:0},n=wH(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const oDe={x:.2,y:.2};function aDe(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=oDe);const{isTop:u,isBottom:c,isLeft:d,isRight:f}=CH(e),h={x:0,y:0},p={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+g.height?(h.y=jn.Backward,p.y=r*Math.abs((t.top+g.height-o)/g.height)):!c&&l>=t.bottom-g.height&&(h.y=jn.Forward,p.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!f&&s>=t.right-g.width?(h.x=jn.Forward,p.x=r*Math.abs((t.right-g.width-s)/g.width)):!d&&a<=t.left+g.width&&(h.x=jn.Backward,p.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:h,speed:p}}function sDe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function EH(e){return e.reduce((t,n)=>Wd(t,Z3(n)),Fo)}function lDe(e){return e.reduce((t,n)=>t+SH(n),0)}function uDe(e){return e.reduce((t,n)=>t+xH(n),0)}function TH(e,t){if(t===void 0&&(t=Xm),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);_H(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const cDe=[["x",["left","right"],lDe],["y",["top","bottom"],uDe]];class VA{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=zA(n),i=EH(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of cDe)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=s(r),c=i[o]-u;return this.rect[l]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ep{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function dDe(e){const{EventTarget:t}=zr(e);return e instanceof t?e:Xf(e)}function rC(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Ui;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ui||(Ui={}));function tO(e){e.preventDefault()}function fDe(e){e.stopPropagation()}var At;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(At||(At={}));const AH={start:[At.Space,At.Enter],cancel:[At.Esc],end:[At.Space,At.Enter]},hDe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case At.Right:return{...n,x:n.x+25};case At.Left:return{...n,x:n.x-25};case At.Down:return{...n,y:n.y+25};case At.Up:return{...n,y:n.y-25}}};class PH{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Ep(Xf(n)),this.windowListeners=new Ep(zr(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ui.Resize,this.handleCancel),this.windowListeners.add(Ui.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ui.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&TH(r),n(Fo)}handleKeyDown(t){if(BA(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=AH,coordinateGetter:a=hDe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,c=u?{x:u.left,y:u.top}:Fo;this.referenceCoordinates||(this.referenceCoordinates=c);const d=a(t,{active:n,context:r.current,currentCoordinates:c});if(d){const f=vb(d,c),h={x:0,y:0},{scrollableAncestors:p}=r.current;for(const g of p){const _=t.code,{isTop:b,isRight:y,isLeft:m,isBottom:v,maxScroll:S,minScroll:w}=CH(g),C=sDe(g),x={x:Math.min(_===At.Right?C.right-C.width/2:C.right,Math.max(_===At.Right?C.left:C.left+C.width/2,d.x)),y:Math.min(_===At.Down?C.bottom-C.height/2:C.bottom,Math.max(_===At.Down?C.top:C.top+C.height/2,d.y))},P=_===At.Right&&!y||_===At.Left&&!m,E=_===At.Down&&!v||_===At.Up&&!b;if(P&&x.x!==d.x){const I=g.scrollLeft+f.x,N=_===At.Right&&I<=S.x||_===At.Left&&I>=w.x;if(N&&!f.y){g.scrollTo({left:I,behavior:s});return}N?h.x=g.scrollLeft-I:h.x=_===At.Right?g.scrollLeft-S.x:g.scrollLeft-w.x,h.x&&g.scrollBy({left:-h.x,behavior:s});break}else if(E&&x.y!==d.y){const I=g.scrollTop+f.y,N=_===At.Down&&I<=S.y||_===At.Up&&I>=w.y;if(N&&!f.x){g.scrollTo({top:I,behavior:s});return}N?h.y=g.scrollTop-I:h.y=_===At.Down?g.scrollTop-S.y:g.scrollTop-w.y,h.y&&g.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Wd(vb(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}PH.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=AH,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function nO(e){return!!(e&&"distance"in e)}function rO(e){return!!(e&&"delay"in e)}class jA{constructor(t,n,r){var i;r===void 0&&(r=dDe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=Xf(a),this.documentListeners=new Ep(this.document),this.listeners=new Ep(r),this.windowListeners=new Ep(zr(a)),this.initialCoordinates=(i=Qg(o))!=null?i:Fo,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Ui.Resize,this.handleCancel),this.windowListeners.add(Ui.DragStart,tO),this.windowListeners.add(Ui.VisibilityChange,this.handleCancel),this.windowListeners.add(Ui.ContextMenu,tO),this.documentListeners.add(Ui.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(rO(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(nO(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ui.Click,fDe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ui.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(n=Qg(t))!=null?n:Fo,u=vb(i,l);if(!r&&s){if(nO(s)){if(s.tolerance!=null&&rC(u,s.tolerance))return this.handleCancel();if(rC(u,s.distance))return this.handleStart()}return rO(s)&&rC(u,s.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===At.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const pDe={move:{name:"pointermove"},end:{name:"pointerup"}};class kH extends jA{constructor(t){const{event:n}=t,r=Xf(n.target);super(t,pDe,r)}}kH.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const gDe={move:{name:"mousemove"},end:{name:"mouseup"}};var J3;(function(e){e[e.RightClick=2]="RightClick"})(J3||(J3={}));class IH extends jA{constructor(t){super(t,gDe,Xf(t.event.target))}}IH.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===J3.RightClick?!1:(r==null||r({event:n}),!0)}}];const iC={move:{name:"touchmove"},end:{name:"touchend"}};class MH extends jA{constructor(t){super(t,iC)}static setup(){return window.addEventListener(iC.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(iC.move.name,t)};function t(){}}}MH.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var Tp;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Tp||(Tp={}));var _b;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(_b||(_b={}));function mDe(e){let{acceleration:t,activator:n=Tp.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=_b.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:d,threshold:f}=e;const h=vDe({delta:d,disabled:!o}),[p,g]=ANe(),_=k.useRef({x:0,y:0}),b=k.useRef({x:0,y:0}),y=k.useMemo(()=>{switch(n){case Tp.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Tp.DraggableRect:return i}},[n,i,l]),m=k.useRef(null),v=k.useCallback(()=>{const w=m.current;if(!w)return;const C=_.current.x*b.current.x,x=_.current.y*b.current.y;w.scrollBy(C,x)},[]),S=k.useMemo(()=>s===_b.TreeOrder?[...u].reverse():u,[s,u]);k.useEffect(()=>{if(!o||!u.length||!y){g();return}for(const w of S){if((r==null?void 0:r(w))===!1)continue;const C=u.indexOf(w),x=c[C];if(!x)continue;const{direction:P,speed:E}=aDe(w,x,y,t,f);for(const I of["x","y"])h[I][P[I]]||(E[I]=0,P[I]=0);if(E.x>0||E.y>0){g(),m.current=w,p(v,a),_.current=E,b.current=P;return}}_.current={x:0,y:0},b.current={x:0,y:0},g()},[t,v,r,g,o,a,JSON.stringify(y),JSON.stringify(h),p,u,S,c,JSON.stringify(f)])}const yDe={x:{[jn.Backward]:!1,[jn.Forward]:!1},y:{[jn.Backward]:!1,[jn.Forward]:!1}};function vDe(e){let{delta:t,disabled:n}=e;const r=yb(t);return Km(i=>{if(n||!r||!i)return yDe;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[jn.Backward]:i.x[jn.Backward]||o.x===-1,[jn.Forward]:i.x[jn.Forward]||o.x===1},y:{[jn.Backward]:i.y[jn.Backward]||o.y===-1,[jn.Forward]:i.y[jn.Forward]||o.y===1}}},[n,t,r])}function bDe(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Km(i=>{var o;return t===null?null:(o=r??i)!=null?o:null},[r,t])}function _De(e,t){return k.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Zg;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Zg||(Zg={}));var e4;(function(e){e.Optimized="optimized"})(e4||(e4={}));const iO=new Map;function SDe(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=k.useState(null),{frequency:s,measure:l,strategy:u}=i,c=k.useRef(e),d=_(),f=Xg(d),h=k.useCallback(function(b){b===void 0&&(b=[]),!f.current&&a(y=>y===null?b:y.concat(b.filter(m=>!y.includes(m))))},[f]),p=k.useRef(null),g=Km(b=>{if(d&&!n)return iO;if(!b||b===iO||c.current!==e||o!=null){const y=new Map;for(let m of e){if(!m)continue;if(o&&o.length>0&&!o.includes(m.id)&&m.rect.current){y.set(m.id,m.rect.current);continue}const v=m.node.current,S=v?new VA(l(v),v):null;m.rect.current=S,S&&y.set(m.id,S)}return y}return b},[e,o,n,d,l]);return k.useEffect(()=>{c.current=e},[e]),k.useEffect(()=>{d||h()},[n,d]),k.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),k.useEffect(()=>{d||typeof s!="number"||p.current!==null||(p.current=setTimeout(()=>{h(),p.current=null},s))},[s,d,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:o!=null};function _(){switch(u){case Zg.Always:return!1;case Zg.BeforeDragging:return n;default:return!n}}}function UA(e,t){return Km(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function xDe(e,t){return UA(e,t)}function wDe(e){let{callback:t,disabled:n}=e;const r=A2(t),i=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return k.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function k2(e){let{callback:t,disabled:n}=e;const r=A2(t),i=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return k.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function CDe(e){return new VA(Xm(e),e)}function oO(e,t,n){t===void 0&&(t=CDe);const[r,i]=k.useReducer(s,null),o=wDe({callback(l){if(e)for(const u of l){const{type:c,target:d}=u;if(c==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),a=k2({callback:i});return Ea(()=>{i(),e?(a==null||a.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),o==null||o.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const c=t(e);return JSON.stringify(l)===JSON.stringify(c)?l:c}}function EDe(e){const t=UA(e);return vH(e,t)}const aO=[];function TDe(e){const t=k.useRef(e),n=Km(r=>e?r&&r!==aO&&e&&t.current&&e.parentNode===t.current.parentNode?r:zA(e):aO,[e]);return k.useEffect(()=>{t.current=e},[e]),n}function ADe(e){const[t,n]=k.useState(null),r=k.useRef(e),i=k.useCallback(o=>{const a=nC(o.target);a&&n(s=>s?(s.set(a,Z3(a)),new Map(s)):null)},[]);return k.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(l=>{const u=nC(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Z3(u)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const u=nC(l);u==null||u.removeEventListener("scroll",i)})}},[i,e]),k.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Wd(o,a),Fo):EH(e):Fo,[e,t])}function sO(e,t){t===void 0&&(t=[]);const n=k.useRef(null);return k.useEffect(()=>{n.current=null},t),k.useEffect(()=>{const r=e!==Fo;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?vb(e,n.current):Fo}function PDe(e){k.useEffect(()=>{if(!T2)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function kDe(e,t){return k.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function RH(e){return k.useMemo(()=>e?nDe(e):null,[e])}const oC=[];function IDe(e,t){t===void 0&&(t=Xm);const[n]=e,r=RH(n?zr(n):null),[i,o]=k.useReducer(s,oC),a=k2({callback:o});return e.length>0&&i===oC&&o(),Ea(()=>{e.length?e.forEach(l=>a==null?void 0:a.observe(l)):(a==null||a.disconnect(),o())},[e]),i;function s(){return e.length?e.map(l=>wH(l)?r:new VA(t(l),l)):oC}}function OH(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Wm(t)?t:e}function MDe(e){let{measure:t}=e;const[n,r]=k.useState(null),i=k.useCallback(u=>{for(const{target:c}of u)if(Wm(c)){r(d=>{const f=t(c);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),o=k2({callback:i}),a=k.useCallback(u=>{const c=OH(u);o==null||o.disconnect(),c&&(o==null||o.observe(c)),r(c?t(c):null)},[t,o]),[s,l]=mb(a);return k.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const RDe=[{sensor:kH,options:{}},{sensor:PH,options:{}}],ODe={current:{}},bv={draggable:{measure:eO},droppable:{measure:eO,strategy:Zg.WhileDragging,frequency:e4.Optimized},dragOverlay:{measure:Xm}};class Ap extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const $De={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ap,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:bv,measureDroppableContainers:bb,windowRect:null,measuringScheduled:!1},$H={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bb,draggableNodes:new Map,over:null,measureDroppableContainers:bb},Qm=k.createContext($H),NH=k.createContext($De);function NDe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ap}}}function DDe(e,t){switch(t.type){case kn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case kn.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case kn.DragEnd:case kn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case kn.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ap(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case kn.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Ap(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case kn.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Ap(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function LDe(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=k.useContext(Qm),o=yb(r),a=yb(n==null?void 0:n.id);return k.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!BA(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const c of[l.current,u.current]){if(!c)continue;const d=INe(c);if(d){d.focus();break}}})}},[r,t,i,a,o]),null}function DH(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function FDe(e){return k.useMemo(()=>({draggable:{...bv.draggable,...e==null?void 0:e.draggable},droppable:{...bv.droppable,...e==null?void 0:e.droppable},dragOverlay:{...bv.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function BDe(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=k.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Ea(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const c=n(u),d=vH(c,r);if(a||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=_H(u);f&&f.scrollBy({top:d.y,left:d.x})}},[t,a,s,r,n])}const I2=k.createContext({...Fo,scaleX:1,scaleY:1});var Xs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Xs||(Xs={}));const zDe=k.memo(function(t){var n,r,i,o;let{id:a,accessibility:s,autoScroll:l=!0,children:u,sensors:c=RDe,collisionDetection:d=KNe,measuring:f,modifiers:h,...p}=t;const g=k.useReducer(DDe,void 0,NDe),[_,b]=g,[y,m]=DNe(),[v,S]=k.useState(Xs.Uninitialized),w=v===Xs.Initialized,{draggable:{active:C,nodes:x,translate:P},droppable:{containers:E}}=_,I=C?x.get(C):null,N=k.useRef({initial:null,translated:null}),M=k.useMemo(()=>{var Xt;return C!=null?{id:C,data:(Xt=I==null?void 0:I.data)!=null?Xt:ODe,rect:N}:null},[C,I]),T=k.useRef(null),[A,R]=k.useState(null),[D,$]=k.useState(null),L=Xg(p,Object.values(p)),O=P2("DndDescribedBy",a),B=k.useMemo(()=>E.getEnabled(),[E]),U=FDe(f),{droppableRects:j,measureDroppableContainers:q,measuringScheduled:Y}=SDe(B,{dragging:w,dependencies:[P.x,P.y],config:U.droppable}),Z=bDe(x,C),V=k.useMemo(()=>D?Qg(D):null,[D]),K=nu(),ee=xDe(Z,U.draggable.measure);BDe({activeNode:C?x.get(C):null,config:K.layoutShiftCompensation,initialRect:ee,measure:U.draggable.measure});const re=oO(Z,U.draggable.measure,ee),fe=oO(Z?Z.parentElement:null),Se=k.useRef({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:x,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Me=E.getNodeFor((n=Se.current.over)==null?void 0:n.id),De=MDe({measure:U.dragOverlay.measure}),Ee=(r=De.nodeRef.current)!=null?r:Z,tt=w?(i=De.rect)!=null?i:re:null,ot=!!(De.nodeRef.current&&De.rect),we=EDe(ot?null:re),Xn=RH(Ee?zr(Ee):null),Vt=TDe(w?Me??Z:null),Ot=IDe(Vt),xt=DH(h,{transform:{x:P.x-we.x,y:P.y-we.y,scaleX:1,scaleY:1},activatorEvent:D,active:M,activeNodeRect:re,containerNodeRect:fe,draggingNodeRect:tt,over:Se.current.over,overlayNodeRect:De.rect,scrollableAncestors:Vt,scrollableAncestorRects:Ot,windowRect:Xn}),bn=V?Wd(V,P):null,Vr=ADe(Vt),co=sO(Vr),Mi=sO(Vr,[re]),ur=Wd(xt,co),Qn=tt?JNe(tt,xt):null,xr=M&&Qn?d({active:M,collisionRect:Qn,droppableRects:j,droppableContainers:B,pointerCoordinates:bn}):null,rn=qNe(xr,"id"),[$t,li]=k.useState(null),Ri=ot?xt:Wd(xt,Mi),fo=YNe(Ri,(o=$t==null?void 0:$t.rect)!=null?o:null,re),jr=k.useCallback((Xt,wt)=>{let{sensor:Yn,options:Nn}=wt;if(T.current==null)return;const cr=x.get(T.current);if(!cr)return;const wr=Xt.nativeEvent,Ur=new Yn({active:T.current,activeNode:cr,event:wr,options:Nn,context:Se,onStart(Cr){const Zn=T.current;if(Zn==null)return;const Ra=x.get(Zn);if(!Ra)return;const{onDragStart:Is}=L.current,Ms={active:{id:Zn,data:Ra.data,rect:N}};mi.unstable_batchedUpdates(()=>{Is==null||Is(Ms),S(Xs.Initializing),b({type:kn.DragStart,initialCoordinates:Cr,active:Zn}),y({type:"onDragStart",event:Ms})})},onMove(Cr){b({type:kn.DragMove,coordinates:Cr})},onEnd:Uo(kn.DragEnd),onCancel:Uo(kn.DragCancel)});mi.unstable_batchedUpdates(()=>{R(Ur),$(Xt.nativeEvent)});function Uo(Cr){return async function(){const{active:Ra,collisions:Is,over:Ms,scrollAdjustedTranslate:Cc}=Se.current;let Oa=null;if(Ra&&Cc){const{cancelDrop:Er}=L.current;Oa={activatorEvent:wr,active:Ra,collisions:Is,delta:Cc,over:Ms},Cr===kn.DragEnd&&typeof Er=="function"&&await Promise.resolve(Er(Oa))&&(Cr=kn.DragCancel)}T.current=null,mi.unstable_batchedUpdates(()=>{b({type:Cr}),S(Xs.Uninitialized),li(null),R(null),$(null);const Er=Cr===kn.DragEnd?"onDragEnd":"onDragCancel";if(Oa){const ru=L.current[Er];ru==null||ru(Oa),y({type:Er,event:Oa})}})}}},[x]),_n=k.useCallback((Xt,wt)=>(Yn,Nn)=>{const cr=Yn.nativeEvent,wr=x.get(Nn);if(T.current!==null||!wr||cr.dndKit||cr.defaultPrevented)return;const Ur={active:wr};Xt(Yn,wt.options,Ur)===!0&&(cr.dndKit={capturedBy:wt.sensor},T.current=Nn,jr(Yn,wt))},[x,jr]),ui=_De(c,_n);PDe(c),Ea(()=>{re&&v===Xs.Initializing&&S(Xs.Initialized)},[re,v]),k.useEffect(()=>{const{onDragMove:Xt}=L.current,{active:wt,activatorEvent:Yn,collisions:Nn,over:cr}=Se.current;if(!wt||!Yn)return;const wr={active:wt,activatorEvent:Yn,collisions:Nn,delta:{x:ur.x,y:ur.y},over:cr};mi.unstable_batchedUpdates(()=>{Xt==null||Xt(wr),y({type:"onDragMove",event:wr})})},[ur.x,ur.y]),k.useEffect(()=>{const{active:Xt,activatorEvent:wt,collisions:Yn,droppableContainers:Nn,scrollAdjustedTranslate:cr}=Se.current;if(!Xt||T.current==null||!wt||!cr)return;const{onDragOver:wr}=L.current,Ur=Nn.get(rn),Uo=Ur&&Ur.rect.current?{id:Ur.id,rect:Ur.rect.current,data:Ur.data,disabled:Ur.disabled}:null,Cr={active:Xt,activatorEvent:wt,collisions:Yn,delta:{x:cr.x,y:cr.y},over:Uo};mi.unstable_batchedUpdates(()=>{li(Uo),wr==null||wr(Cr),y({type:"onDragOver",event:Cr})})},[rn]),Ea(()=>{Se.current={activatorEvent:D,active:M,activeNode:Z,collisionRect:Qn,collisions:xr,droppableRects:j,draggableNodes:x,draggingNode:Ee,draggingNodeRect:tt,droppableContainers:E,over:$t,scrollableAncestors:Vt,scrollAdjustedTranslate:ur},N.current={initial:tt,translated:Qn}},[M,Z,xr,Qn,x,Ee,tt,j,E,$t,Vt,ur]),mDe({...K,delta:P,draggingRect:Qn,pointerCoordinates:bn,scrollableAncestors:Vt,scrollableAncestorRects:Ot});const tu=k.useMemo(()=>({active:M,activeNode:Z,activeNodeRect:re,activatorEvent:D,collisions:xr,containerNodeRect:fe,dragOverlay:De,draggableNodes:x,droppableContainers:E,droppableRects:j,over:$t,measureDroppableContainers:q,scrollableAncestors:Vt,scrollableAncestorRects:Ot,measuringConfiguration:U,measuringScheduled:Y,windowRect:Xn}),[M,Z,re,D,xr,fe,De,x,E,j,$t,q,Vt,Ot,U,Y,Xn]),jo=k.useMemo(()=>({activatorEvent:D,activators:ui,active:M,activeNodeRect:re,ariaDescribedById:{draggable:O},dispatch:b,draggableNodes:x,over:$t,measureDroppableContainers:q}),[D,ui,M,re,b,O,x,$t,q]);return J.createElement(yH.Provider,{value:m},J.createElement(Qm.Provider,{value:jo},J.createElement(NH.Provider,{value:tu},J.createElement(I2.Provider,{value:fo},u)),J.createElement(LDe,{disabled:(s==null?void 0:s.restoreFocus)===!1})),J.createElement(BNe,{...s,hiddenTextDescribedById:O}));function nu(){const Xt=(A==null?void 0:A.autoScrollEnabled)===!1,wt=typeof l=="object"?l.enabled===!1:l===!1,Yn=w&&!Xt&&!wt;return typeof l=="object"?{...l,enabled:Yn}:{enabled:Yn}}}),VDe=k.createContext(null),lO="button",jDe="Droppable";function fGe(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=P2(jDe),{activators:a,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:d,over:f}=k.useContext(Qm),{role:h=lO,roleDescription:p="draggable",tabIndex:g=0}=i??{},_=(l==null?void 0:l.id)===t,b=k.useContext(_?I2:VDe),[y,m]=mb(),[v,S]=mb(),w=kDe(a,t),C=Xg(n);Ea(()=>(d.set(t,{id:t,key:o,node:y,activatorNode:v,data:C}),()=>{const P=d.get(t);P&&P.key===o&&d.delete(t)}),[d,t]);const x=k.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":_&&h===lO?!0:void 0,"aria-roledescription":p,"aria-describedby":c.draggable}),[r,h,g,_,p,c.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:x,isDragging:_,listeners:r?void 0:w,node:y,over:f,setNodeRef:m,setActivatorNodeRef:S,transform:b}}function UDe(){return k.useContext(NH)}const GDe="Droppable",HDe={timeout:25};function hGe(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=P2(GDe),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=k.useContext(Qm),c=k.useRef({disabled:n}),d=k.useRef(!1),f=k.useRef(null),h=k.useRef(null),{disabled:p,updateMeasurementsFor:g,timeout:_}={...HDe,...i},b=Xg(g??r),y=k.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),h.current=null},_)},[_]),m=k2({callback:y,disabled:p||!a}),v=k.useCallback((x,P)=>{m&&(P&&(m.unobserve(P),d.current=!1),x&&m.observe(x))},[m]),[S,w]=mb(v),C=Xg(t);return k.useEffect(()=>{!m||!S.current||(m.disconnect(),d.current=!1,m.observe(S.current))},[S,m]),Ea(()=>(s({type:kn.RegisterDroppable,element:{id:r,key:o,disabled:n,node:S,rect:f,data:C}}),()=>s({type:kn.UnregisterDroppable,key:o,id:r})),[r]),k.useEffect(()=>{n!==c.current.disabled&&(s({type:kn.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,s]),{active:a,rect:f,isOver:(l==null?void 0:l.id)===r,node:S,over:l,setNodeRef:w}}function qDe(e){let{animation:t,children:n}=e;const[r,i]=k.useState(null),[o,a]=k.useState(null),s=yb(n);return!n&&!r&&s&&i(s),Ea(()=>{if(!o)return;const l=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(l==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),J.createElement(J.Fragment,null,n,r?k.cloneElement(r,{ref:a}):null)}const WDe={x:0,y:0,scaleX:1,scaleY:1};function KDe(e){let{children:t}=e;return J.createElement(Qm.Provider,{value:$H},J.createElement(I2.Provider,{value:WDe},t))}const XDe={position:"fixed",touchAction:"none"},QDe=e=>BA(e)?"transform 250ms ease":void 0,YDe=k.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:l,transform:u,transition:c=QDe}=e;if(!s)return null;const d=i?u:{...u,scaleX:1,scaleY:1},f={...XDe,width:s.width,height:s.height,top:s.top,left:s.left,transform:Yg.Transform.toString(d),transformOrigin:i&&r?jNe(r,s):void 0,transition:typeof c=="function"?c(r):c,...l};return J.createElement(n,{className:a,style:f,ref:t},o)}),ZDe=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,l]of Object.entries(o.active))l!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,l));if(o!=null&&o.dragOverlay)for(const[s,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(s,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,u]of Object.entries(i))n.node.style.setProperty(l,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},JDe=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Yg.Transform.toString(t)},{transform:Yg.Transform.toString(n)}]},eLe={duration:250,easing:"ease",keyframes:JDe,sideEffects:ZDe({styles:{active:{opacity:"0"}}})};function tLe(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return A2((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const l=s.node.current;if(!l)return;const u=OH(a);if(!u)return;const{transform:c}=zr(a).getComputedStyle(a),d=bH(c);if(!d)return;const f=typeof t=="function"?t:nLe(t);return TH(l,i.draggable.measure),f({active:{id:o,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function nLe(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...eLe,...e};return o=>{let{active:a,dragOverlay:s,transform:l,...u}=o;if(!t)return;const c={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},d={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/s.rect.height:1},f={x:l.x-c.x,y:l.y-c.y,...d},h=i({...u,active:a,dragOverlay:s,transform:{initial:l,final:f}}),[p]=h,g=h[h.length-1];if(JSON.stringify(p)===JSON.stringify(g))return;const _=r==null?void 0:r({active:a,dragOverlay:s,...u}),b=s.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{b.onfinish=()=>{_==null||_(),y()}})}}let uO=0;function rLe(e){return k.useMemo(()=>{if(e!=null)return uO++,uO},[e])}const iLe=J.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:l,zIndex:u=999}=e;const{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggableNodes:p,droppableContainers:g,dragOverlay:_,over:b,measuringConfiguration:y,scrollableAncestors:m,scrollableAncestorRects:v,windowRect:S}=UDe(),w=k.useContext(I2),C=rLe(d==null?void 0:d.id),x=DH(a,{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggingNodeRect:_.rect,over:b,overlayNodeRect:_.rect,scrollableAncestors:m,scrollableAncestorRects:v,transform:w,windowRect:S}),P=UA(f),E=tLe({config:r,draggableNodes:p,droppableContainers:g,measuringConfiguration:y}),I=P?_.setRef:void 0;return J.createElement(KDe,null,J.createElement(qDe,{animation:E},d&&C?J.createElement(YDe,{key:C,id:d.id,ref:I,as:s,activatorEvent:c,adjustScale:t,className:l,transition:o,rect:P,style:{zIndex:u,...i},transform:x},n):null))}),oLe=qn([IA,TA],({nodes:e},t)=>t==="nodes"?e.viewport.zoom:1),aLe=()=>{const e=C2(oLe);return k.useCallback(({activatorEvent:n,draggingNodeRect:r,transform:i})=>{if(r&&n){const o=Qg(n);if(!o)return i;const a=o.x-r.left,s=o.y-r.top,l=i.x+a-r.width/2,u=i.y+s-r.height/2,c=i.scaleX*e,d=i.scaleY*e;return{x:l,y:u,scaleX:c,scaleY:d}}return i},[e])},sLe=e=>{if(!e.pointerCoordinates)return[];const t=document.elementsFromPoint(e.pointerCoordinates.x,e.pointerCoordinates.y),n=e.droppableContainers.filter(r=>r.node.current?t.includes(r.node.current):!1);return QNe({...e,droppableContainers:n})};function lLe(e){return oe.jsx(zDe,{...e})}const Ty=28,cO={w:Ty,h:Ty,maxW:Ty,maxH:Ty,shadow:"dark-lg",borderRadius:"lg",opacity:.3,bg:"base.800",color:"base.50",_dark:{borderColor:"base.200",bg:"base.900",color:"base.100"}},uLe=e=>{if(!e.dragData)return null;if(e.dragData.payloadType==="NODE_FIELD"){const{field:t,fieldTemplate:n}=e.dragData.payload;return oe.jsx(ob,{sx:{position:"relative",p:2,px:3,opacity:.7,bg:"base.300",borderRadius:"base",boxShadow:"dark-lg",whiteSpace:"nowrap",fontSize:"sm"},children:oe.jsx($U,{children:t.label||n.title})})}if(e.dragData.payloadType==="IMAGE_DTO"){const{thumbnail_url:t,width:n,height:r}=e.dragData.payload.imageDTO;return oe.jsx(ob,{sx:{position:"relative",width:"full",height:"full",display:"flex",alignItems:"center",justifyContent:"center"},children:oe.jsx(aA,{sx:{...cO},objectFit:"contain",src:t,width:n,height:r})})}return e.dragData.payloadType==="IMAGE_DTOS"?oe.jsxs(sA,{sx:{position:"relative",alignItems:"center",justifyContent:"center",flexDir:"column",...cO},children:[oe.jsx(A3,{children:e.dragData.payload.imageDTOs.length}),oe.jsx(A3,{size:"sm",children:"Images"})]}):null},cLe=k.memo(uLe),dLe=e=>{const[t,n]=k.useState(null),r=se("images"),i=w2(),o=k.useCallback(d=>{r.trace({dragData:pt(d.active.data.current)},"Drag started");const f=d.active.data.current;f&&n(f)},[r]),a=k.useCallback(d=>{var h;r.trace({dragData:pt(d.active.data.current)},"Drag ended");const f=(h=d.over)==null?void 0:h.data.current;!t||!f||(i(LG({overData:f,activeData:t})),n(null))},[t,i,r]),s=JR(IH,{activationConstraint:{distance:10}}),l=JR(MH,{activationConstraint:{distance:10}}),u=zNe(s,l),c=aLe();return oe.jsxs(lLe,{onDragStart:o,onDragEnd:a,sensors:u,collisionDetection:sLe,autoScroll:!1,children:[e.children,oe.jsx(iLe,{dropAnimation:null,modifiers:[c],style:{width:"min-content",height:"min-content",cursor:"grabbing",userSelect:"none",padding:"10rem"},children:oe.jsx(CU,{children:t&&oe.jsx(xU.div,{layout:!0,initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1,transition:{duration:.1}},children:oe.jsx(cLe,{dragData:t})},"overlay-drag-image")})})]})},fLe=k.memo(dLe),dO=Pa(void 0),fO=Pa(void 0),hLe=k.lazy(()=>k$(()=>import("./App-6440ab3b.js"),["./App-6440ab3b.js","./MantineProvider-a6a1d85c.js","./App-6125620a.css"],import.meta.url)),pLe=k.lazy(()=>k$(()=>import("./ThemeLocaleProvider-9d17ef9a.js"),["./ThemeLocaleProvider-9d17ef9a.js","./MantineProvider-a6a1d85c.js","./ThemeLocaleProvider-f5f9aabf.css"],import.meta.url)),gLe=({apiUrl:e,token:t,config:n,headerComponent:r,middleware:i,projectId:o,queueId:a,selectedImage:s,customStarUi:l})=>(k.useEffect(()=>(t&&yg.set(t),e&&vg.set(e),o&&x1.set(o),a&&Dn.set(a),Wz(),i&&i.length>0?Z5(qR(),...i):Z5(qR()),()=>{vg.set(void 0),yg.set(void 0),x1.set(void 0),Dn.set(CL)}),[e,t,i,o,a]),k.useEffect(()=>(l&&dO.set(l),()=>{dO.set(void 0)}),[l]),k.useEffect(()=>(r&&fO.set(r),()=>{fO.set(void 0)}),[r]),oe.jsx(J.StrictMode,{children:oe.jsx(tle,{store:KG,children:oe.jsx(J.Suspense,{fallback:oe.jsx(fNe,{}),children:oe.jsx(pLe,{children:oe.jsx(fLe,{children:oe.jsx(hLe,{config:n,selectedImage:s})})})})})})),mLe=k.memo(gLe);aC.createRoot(document.getElementById("root")).render(oe.jsx(mLe,{}));export{G1 as $,So as A,Sme as B,ii as C,vl as D,Yo as E,dVe as F,hT as G,Ii as H,oe as I,zm as J,Mm as K,lr as L,Kl as M,N3e as N,CUe as O,Cme as P,SUe as Q,J as R,eg as S,CU as T,xU as U,h3e as V,Rm as W,rA as X,$m as Y,xUe as Z,wUe as _,SN as a,Nze as a$,k9 as a0,vbe as a1,EUe as a2,ua as a3,Bl as a4,b1 as a5,tX as a6,JV as a7,PUe as a8,v3e as a9,jze as aA,ibe as aB,ET as aC,lV as aD,abe as aE,mi as aF,nP as aG,fS as aH,w2 as aI,Zje as aJ,Cze as aK,Gze as aL,Hze as aM,_ze as aN,vze as aO,$U as aP,Gc as aQ,w6e as aR,VU as aS,Uje as aT,Sze as aU,XE as aV,kA as aW,hUe as aX,aA as aY,cNe as aZ,de as a_,ya as aa,gV as ab,dS as ac,FTe as ad,MU as ae,TUe as af,ke as ag,_Ue as ah,AUe as ai,qn as aj,IA as ak,SE as al,C2 as am,Mze as an,Tm as ao,fF as ap,FF as aq,J_ as ar,se as as,ob as at,sA as au,A3 as av,TA as aw,Vm as ax,p$e as ay,VG as az,Kb as b,QRe as b$,Uze as b0,uBe as b1,zie as b2,KE as b3,it as b4,jLe as b5,sUe as b6,qje as b7,pUe as b8,fUe as b9,X as bA,eVe as bB,iVe as bC,Eze as bD,Tze as bE,Fze as bF,M1 as bG,Pze as bH,al as bI,b0 as bJ,rVe as bK,tVe as bL,nVe as bM,vLe as bN,NLe as bO,DLe as bP,LLe as bQ,FLe as bR,uae as bS,hFe as bT,Oje as bU,$je as bV,ULe as bW,_Fe as bX,zLe as bY,lFe as bZ,qLe as b_,e1e as ba,Hje as bb,Kje as bc,bve as bd,_ve as be,iUe as bf,aUe as bg,Wje as bh,uUe as bi,Xje as bj,Gje as bk,Ize as bl,RUe as bm,pq as bn,SLe as bo,bLe as bp,_Le as bq,He as br,kze as bs,Yze as bt,Qze as bu,Aze as bv,oVe as bw,hGe as bx,fGe as by,yl as bz,JQ as c,Dze as c$,VLe as c0,pFe as c1,KLe as c2,xL as c3,BLe as c4,EFe as c5,GLe as c6,E6 as c7,HLe as c8,T6 as c9,_8 as cA,Lje as cB,Fje as cC,Bje as cD,tFe as cE,zje as cF,nFe as cG,Vje as cH,rFe as cI,jje as cJ,uVe as cK,yg as cL,D6e as cM,Bze as cN,Iu as cO,Do as cP,Dfe as cQ,ge as cR,dO as cS,Zze as cT,Jze as cU,Ble as cV,v1e as cW,qz as cX,lF as cY,bze as cZ,DG as c_,JLe as ca,cFe as cb,iFe as cc,DFe as cd,LFe as ce,eFe as cf,FFe as cg,HUe as ch,XLe as ci,ER as cj,cVe as ck,jUe as cl,QLe as cm,TR as cn,Su as co,Tie as cp,Die as cq,GUe as cr,PR as cs,Aie as ct,UUe as cu,ZLe as cv,AR as cw,Pie as cx,XRe as cy,WLe as cz,Bne as d,qVe as d$,bg as d0,JF as d1,bUe as d2,Lze as d3,$0 as d4,M5 as d5,hBe as d6,aBe as d7,ZFe as d8,JFe as d9,yVe as dA,Oze as dB,Rze as dC,_Ve as dD,wE as dE,VVe as dF,pVe as dG,NVe as dH,DVe as dI,Zoe as dJ,LVe as dK,RLe as dL,FVe as dM,aS as dN,Yoe as dO,jVe as dP,Sm as dQ,nGe as dR,vs as dS,VUe as dT,sGe as dU,zUe as dV,UVe as dW,GVe as dX,lGe as dY,HVe as dZ,aGe as d_,iBe as da,on as db,pT as dc,ps as dd,Aa as de,gi as df,rBe as dg,oFe as dh,CA as di,oBe as dj,dUe as dk,_E as dl,ije as dm,$ze as dn,rje as dp,dGe as dq,Aje as dr,wje as ds,Cje as dt,Ije as du,Eje as dv,kje as dw,Pje as dx,IRe as dy,YVe as dz,xD as e,zFe as e$,WVe as e0,_L as e1,WUe as e2,KVe as e3,Joe as e4,BVe as e5,eae as e6,zVe as e7,$Ve as e8,Tje as e9,O6e as eA,R6e as eB,PLe as eC,kLe as eD,s_ as eE,ILe as eF,Bie as eG,MLe as eH,TLe as eI,ELe as eJ,OE as eK,Nie as eL,Mie as eM,Rie as eN,kie as eO,Iie as eP,Oie as eQ,$ie as eR,wLe as eS,qUe as eT,Nje as eU,$E as eV,gve as eW,O7e as eX,LUe as eY,VFe as eZ,cae as e_,Od as ea,$f as eb,dFe as ec,jle as ed,Ule as ee,xze as ef,sVe as eg,lVe as eh,tB as ei,aVe as ej,r_ as ek,BFe as el,OFe as em,$Fe as en,NFe as eo,Gie as ep,di as eq,S6 as er,ALe as es,Kze as et,qze as eu,Wze as ev,Hl as ew,Z6 as ex,Fie as ey,x6 as ez,kN as f,xz as f$,Rr as f0,uFe as f1,xFe as f2,Hie as f3,hp as f4,CFe as f5,Dje as f6,yFe as f7,vFe as f8,bFe as f9,Yje as fA,QUe as fB,oGe as fC,rGe as fD,Qje as fE,JUe as fF,ZUe as fG,KUe as fH,tGe as fI,$Le as fJ,XUe as fK,eGe as fL,OLe as fM,sz as fN,gVe as fO,f$e as fP,ZVe as fQ,wVe as fR,CVe as fS,mye as fT,y8 as fU,zB as fV,km as fW,fVe as fX,wu as fY,eje as fZ,cUe as f_,gFe as fa,mFe as fb,lae as fc,PFe as fd,AFe as fe,MBe as ff,KFe as fg,pze as fh,RBe as fi,MFe as fj,RFe as fk,IFe as fl,DE as fm,sBe as fn,Rje as fo,uGe as fp,e$e as fq,tUe as fr,ce as fs,Qe as ft,Lt as fu,pa as fv,YLe as fw,BUe as fx,iGe as fy,YUe as fz,LN as g,lze as g$,YL as g0,Gh as g1,bVe as g2,mVe as g3,JVe as g4,tje as g5,lje as g6,hVe as g7,nje as g8,V1 as g9,FUe as gA,wR as gB,pt as gC,cve as gD,Ig as gE,Rl as gF,Sje as gG,mje as gH,_je as gI,yje as gJ,pje as gK,oje as gL,bje as gM,_z as gN,vUe as gO,gUe as gP,mUe as gQ,yUe as gR,pBe as gS,nBe as gT,cBe as gU,fBe as gV,xu as gW,GU as gX,Dq as gY,Ge as gZ,UBe as g_,Pe as ga,a$e as gb,dve as gc,q0 as gd,vVe as ge,uje as gf,aje as gg,MVe as gh,PVe as gi,AVe as gj,TVe as gk,RVe as gl,sje as gm,fje as gn,dje as go,xje as gp,n$e as gq,kVe as gr,IVe as gs,Mje as gt,hje as gu,cje as gv,gje as gw,cye as gx,hb as gy,b1e as gz,t_ as h,hze as h$,sze as h0,ABe as h1,ZBe as h2,cze as h3,$6e as h4,_Be as h5,FBe as h6,Ah as h7,NBe as h8,SBe as h9,kBe as hA,GBe as hB,jBe as hC,BBe as hD,HFe as hE,qFe as hF,yze as hG,$Ue as hH,OUe as hI,HBe as hJ,A6e as hK,YBe as hL,qBe as hM,TBe as hN,bBe as hO,ize as hP,rze as hQ,XBe as hR,WBe as hS,KBe as hT,gze as hU,tze as hV,mze as hW,mBe as hX,gBe as hY,$Be as hZ,OBe as h_,ES as ha,LBe as hb,yBe as hc,DBe as hd,vBe as he,wBe as hf,GFe as hg,UFe as hh,jFe as hi,uze as hj,Dre as hk,_a as hl,wL as hm,pae as hn,XFe as ho,QFe as hp,YFe as hq,aze as hr,EBe as hs,CBe as ht,kle as hu,oze as hv,M6e as hw,Ile as hx,wA as hy,ZMe as hz,One as i,I6e as i0,T6e as i1,P6e as i2,k6e as i3,WFe as i4,PBe as i5,DUe as i6,gPe as i7,Jje as i8,eUe as i9,Qre as ia,P1e as ib,cGe as ic,fO as id,hV as ie,AT as ig,ca as ih,n3e as ii,I3e as ij,kUe as ik,xbe as il,MUe as im,pPe as io,_6e as ip,S6e as iq,mbe as ir,Tn as j,hee as k,e_ as l,Of as m,ym as n,ri as o,Yb as p,lE as q,AN as r,pE as s,bm as t,gD as u,k as v,to as w,fn as x,Fd as y,Kn as z}; diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-wght-normal-1c3007b8.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-wght-normal-1c3007b8.woff2 deleted file mode 100644 index a61a0be57f..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-wght-normal-1c3007b8.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-wght-normal-eba94878.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-wght-normal-eba94878.woff2 deleted file mode 100644 index b655a43884..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-wght-normal-eba94878.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-wght-normal-81f77e51.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-wght-normal-81f77e51.woff2 deleted file mode 100644 index 9117b5b040..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-wght-normal-81f77e51.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-wght-normal-d92c6cbc.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-wght-normal-d92c6cbc.woff2 deleted file mode 100644 index eb38b38ea0..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-wght-normal-d92c6cbc.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-a2bfd9fe.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-a2bfd9fe.woff2 deleted file mode 100644 index 3df865d7f0..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-a2bfd9fe.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-wght-normal-88df0b5a.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-wght-normal-88df0b5a.woff2 deleted file mode 100644 index 40255432a3..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-wght-normal-88df0b5a.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-vietnamese-wght-normal-15df7612.woff2 b/invokeai/frontend/web/dist/assets/inter-vietnamese-wght-normal-15df7612.woff2 deleted file mode 100644 index ce21ca172e..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-vietnamese-wght-normal-15df7612.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/logo-13003d72.png b/invokeai/frontend/web/dist/assets/logo-13003d72.png deleted file mode 100644 index 54f8ed8a8f..0000000000 Binary files a/invokeai/frontend/web/dist/assets/logo-13003d72.png and /dev/null differ diff --git a/invokeai/frontend/web/dist/index.html b/invokeai/frontend/web/dist/index.html deleted file mode 100644 index e1ee3e4716..0000000000 --- a/invokeai/frontend/web/dist/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - InvokeAI - A Stable Diffusion Toolkit - - - - - - -
- - - diff --git a/invokeai/frontend/web/dist/locales/ar.json b/invokeai/frontend/web/dist/locales/ar.json deleted file mode 100644 index 7354b21ea0..0000000000 --- a/invokeai/frontend/web/dist/locales/ar.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "common": { - "hotkeysLabel": "مفاتيح الأختصار", - "languagePickerLabel": "منتقي اللغة", - "reportBugLabel": "بلغ عن خطأ", - "settingsLabel": "إعدادات", - "img2img": "صورة إلى صورة", - "unifiedCanvas": "لوحة موحدة", - "nodes": "عقد", - "langArabic": "العربية", - "nodesDesc": "نظام مبني على العقد لإنتاج الصور قيد التطوير حاليًا. تبقى على اتصال مع تحديثات حول هذه الميزة المذهلة.", - "postProcessing": "معالجة بعد الإصدار", - "postProcessDesc1": "Invoke AI توفر مجموعة واسعة من ميزات المعالجة بعد الإصدار. تحسين الصور واستعادة الوجوه متاحين بالفعل في واجهة الويب. يمكنك الوصول إليهم من الخيارات المتقدمة في قائمة الخيارات في علامة التبويب Text To Image و Image To Image. يمكن أيضًا معالجة الصور مباشرةً باستخدام أزرار الإجراء على الصورة فوق عرض الصورة الحالي أو في العارض.", - "postProcessDesc2": "سيتم إصدار واجهة رسومية مخصصة قريبًا لتسهيل عمليات المعالجة بعد الإصدار المتقدمة.", - "postProcessDesc3": "واجهة سطر الأوامر Invoke AI توفر ميزات أخرى عديدة بما في ذلك Embiggen.", - "training": "تدريب", - "trainingDesc1": "تدفق خاص مخصص لتدريب تضميناتك الخاصة ونقاط التحقق باستخدام العكس النصي و دريم بوث من واجهة الويب.", - "trainingDesc2": " استحضر الذكاء الصناعي يدعم بالفعل تدريب تضمينات مخصصة باستخدام العكس النصي باستخدام السكريبت الرئيسي.", - "upload": "رفع", - "close": "إغلاق", - "load": "تحميل", - "back": "الى الخلف", - "statusConnected": "متصل", - "statusDisconnected": "غير متصل", - "statusError": "خطأ", - "statusPreparing": "جاري التحضير", - "statusProcessingCanceled": "تم إلغاء المعالجة", - "statusProcessingComplete": "اكتمال المعالجة", - "statusGenerating": "جاري التوليد", - "statusGeneratingTextToImage": "جاري توليد النص إلى الصورة", - "statusGeneratingImageToImage": "جاري توليد الصورة إلى الصورة", - "statusGeneratingInpainting": "جاري توليد Inpainting", - "statusGeneratingOutpainting": "جاري توليد Outpainting", - "statusGenerationComplete": "اكتمال التوليد", - "statusIterationComplete": "اكتمال التكرار", - "statusSavingImage": "جاري حفظ الصورة", - "statusRestoringFaces": "جاري استعادة الوجوه", - "statusRestoringFacesGFPGAN": "تحسيت الوجوه (جي إف بي جان)", - "statusRestoringFacesCodeFormer": "تحسين الوجوه (كود فورمر)", - "statusUpscaling": "تحسين الحجم", - "statusUpscalingESRGAN": "تحسين الحجم (إي إس آر جان)", - "statusLoadingModel": "تحميل النموذج", - "statusModelChanged": "تغير النموذج" - }, - "gallery": { - "generations": "الأجيال", - "showGenerations": "عرض الأجيال", - "uploads": "التحميلات", - "showUploads": "عرض التحميلات", - "galleryImageSize": "حجم الصورة", - "galleryImageResetSize": "إعادة ضبط الحجم", - "gallerySettings": "إعدادات المعرض", - "maintainAspectRatio": "الحفاظ على نسبة الأبعاد", - "autoSwitchNewImages": "التبديل التلقائي إلى الصور الجديدة", - "singleColumnLayout": "تخطيط عمود واحد", - "allImagesLoaded": "تم تحميل جميع الصور", - "loadMore": "تحميل المزيد", - "noImagesInGallery": "لا توجد صور في المعرض" - }, - "hotkeys": { - "keyboardShortcuts": "مفاتيح الأزرار المختصرة", - "appHotkeys": "مفاتيح التطبيق", - "generalHotkeys": "مفاتيح عامة", - "galleryHotkeys": "مفاتيح المعرض", - "unifiedCanvasHotkeys": "مفاتيح اللوحةالموحدة ", - "invoke": { - "title": "أدعو", - "desc": "إنشاء صورة" - }, - "cancel": { - "title": "إلغاء", - "desc": "إلغاء إنشاء الصورة" - }, - "focusPrompt": { - "title": "تركيز الإشعار", - "desc": "تركيز منطقة الإدخال الإشعار" - }, - "toggleOptions": { - "title": "تبديل الخيارات", - "desc": "فتح وإغلاق لوحة الخيارات" - }, - "pinOptions": { - "title": "خيارات التثبيت", - "desc": "ثبت لوحة الخيارات" - }, - "toggleViewer": { - "title": "تبديل العارض", - "desc": "فتح وإغلاق مشاهد الصور" - }, - "toggleGallery": { - "title": "تبديل المعرض", - "desc": "فتح وإغلاق درابزين المعرض" - }, - "maximizeWorkSpace": { - "title": "تكبير مساحة العمل", - "desc": "إغلاق اللوحات وتكبير مساحة العمل" - }, - "changeTabs": { - "title": "تغيير الألسنة", - "desc": "التبديل إلى مساحة عمل أخرى" - }, - "consoleToggle": { - "title": "تبديل الطرفية", - "desc": "فتح وإغلاق الطرفية" - }, - "setPrompt": { - "title": "ضبط التشعب", - "desc": "استخدم تشعب الصورة الحالية" - }, - "setSeed": { - "title": "ضبط البذور", - "desc": "استخدم بذور الصورة الحالية" - }, - "setParameters": { - "title": "ضبط المعلمات", - "desc": "استخدم جميع المعلمات الخاصة بالصورة الحالية" - }, - "restoreFaces": { - "title": "استعادة الوجوه", - "desc": "استعادة الصورة الحالية" - }, - "upscale": { - "title": "تحسين الحجم", - "desc": "تحسين حجم الصورة الحالية" - }, - "showInfo": { - "title": "عرض المعلومات", - "desc": "عرض معلومات البيانات الخاصة بالصورة الحالية" - }, - "sendToImageToImage": { - "title": "أرسل إلى صورة إلى صورة", - "desc": "أرسل الصورة الحالية إلى صورة إلى صورة" - }, - "deleteImage": { - "title": "حذف الصورة", - "desc": "حذف الصورة الحالية" - }, - "closePanels": { - "title": "أغلق اللوحات", - "desc": "يغلق اللوحات المفتوحة" - }, - "previousImage": { - "title": "الصورة السابقة", - "desc": "عرض الصورة السابقة في الصالة" - }, - "nextImage": { - "title": "الصورة التالية", - "desc": "عرض الصورة التالية في الصالة" - }, - "toggleGalleryPin": { - "title": "تبديل تثبيت الصالة", - "desc": "يثبت ويفتح تثبيت الصالة على الواجهة الرسومية" - }, - "increaseGalleryThumbSize": { - "title": "زيادة حجم صورة الصالة", - "desc": "يزيد حجم الصور المصغرة في الصالة" - }, - "decreaseGalleryThumbSize": { - "title": "انقاص حجم صورة الصالة", - "desc": "ينقص حجم الصور المصغرة في الصالة" - }, - "selectBrush": { - "title": "تحديد الفرشاة", - "desc": "يحدد الفرشاة على اللوحة" - }, - "selectEraser": { - "title": "تحديد الممحاة", - "desc": "يحدد الممحاة على اللوحة" - }, - "decreaseBrushSize": { - "title": "تصغير حجم الفرشاة", - "desc": "يصغر حجم الفرشاة/الممحاة على اللوحة" - }, - "increaseBrushSize": { - "title": "زيادة حجم الفرشاة", - "desc": "يزيد حجم فرشة اللوحة / الممحاة" - }, - "decreaseBrushOpacity": { - "title": "تخفيض شفافية الفرشاة", - "desc": "يخفض شفافية فرشة اللوحة" - }, - "increaseBrushOpacity": { - "title": "زيادة شفافية الفرشاة", - "desc": "يزيد شفافية فرشة اللوحة" - }, - "moveTool": { - "title": "أداة التحريك", - "desc": "يتيح التحرك في اللوحة" - }, - "fillBoundingBox": { - "title": "ملء الصندوق المحدد", - "desc": "يملأ الصندوق المحدد بلون الفرشاة" - }, - "eraseBoundingBox": { - "title": "محو الصندوق المحدد", - "desc": "يمحو منطقة الصندوق المحدد" - }, - "colorPicker": { - "title": "اختيار منتقي اللون", - "desc": "يختار منتقي اللون الخاص باللوحة" - }, - "toggleSnap": { - "title": "تبديل التأكيد", - "desc": "يبديل تأكيد الشبكة" - }, - "quickToggleMove": { - "title": "تبديل سريع للتحريك", - "desc": "يبديل مؤقتا وضع التحريك" - }, - "toggleLayer": { - "title": "تبديل الطبقة", - "desc": "يبديل إختيار الطبقة القناع / الأساسية" - }, - "clearMask": { - "title": "مسح القناع", - "desc": "مسح القناع بأكمله" - }, - "hideMask": { - "title": "إخفاء الكمامة", - "desc": "إخفاء وإظهار الكمامة" - }, - "showHideBoundingBox": { - "title": "إظهار / إخفاء علبة التحديد", - "desc": "تبديل ظهور علبة التحديد" - }, - "mergeVisible": { - "title": "دمج الطبقات الظاهرة", - "desc": "دمج جميع الطبقات الظاهرة في اللوحة" - }, - "saveToGallery": { - "title": "حفظ إلى صالة الأزياء", - "desc": "حفظ اللوحة الحالية إلى صالة الأزياء" - }, - "copyToClipboard": { - "title": "نسخ إلى الحافظة", - "desc": "نسخ اللوحة الحالية إلى الحافظة" - }, - "downloadImage": { - "title": "تنزيل الصورة", - "desc": "تنزيل اللوحة الحالية" - }, - "undoStroke": { - "title": "تراجع عن الخط", - "desc": "تراجع عن خط الفرشاة" - }, - "redoStroke": { - "title": "إعادة الخط", - "desc": "إعادة خط الفرشاة" - }, - "resetView": { - "title": "إعادة تعيين العرض", - "desc": "إعادة تعيين عرض اللوحة" - }, - "previousStagingImage": { - "title": "الصورة السابقة في المرحلة التجريبية", - "desc": "الصورة السابقة في منطقة المرحلة التجريبية" - }, - "nextStagingImage": { - "title": "الصورة التالية في المرحلة التجريبية", - "desc": "الصورة التالية في منطقة المرحلة التجريبية" - }, - "acceptStagingImage": { - "title": "قبول الصورة في المرحلة التجريبية", - "desc": "قبول الصورة الحالية في منطقة المرحلة التجريبية" - } - }, - "modelManager": { - "modelManager": "مدير النموذج", - "model": "نموذج", - "allModels": "جميع النماذج", - "checkpointModels": "نقاط التحقق", - "diffusersModels": "المصادر المتعددة", - "safetensorModels": "التنسورات الآمنة", - "modelAdded": "تمت إضافة النموذج", - "modelUpdated": "تم تحديث النموذج", - "modelEntryDeleted": "تم حذف مدخل النموذج", - "cannotUseSpaces": "لا يمكن استخدام المساحات", - "addNew": "إضافة جديد", - "addNewModel": "إضافة نموذج جديد", - "addCheckpointModel": "إضافة نقطة تحقق / نموذج التنسور الآمن", - "addDiffuserModel": "إضافة مصادر متعددة", - "addManually": "إضافة يدويًا", - "manual": "يدوي", - "name": "الاسم", - "nameValidationMsg": "أدخل اسما لنموذجك", - "description": "الوصف", - "descriptionValidationMsg": "أضف وصفا لنموذجك", - "config": "تكوين", - "configValidationMsg": "مسار الملف الإعدادي لنموذجك.", - "modelLocation": "موقع النموذج", - "modelLocationValidationMsg": "موقع النموذج على الجهاز الخاص بك.", - "repo_id": "معرف المستودع", - "repoIDValidationMsg": "المستودع الإلكتروني لنموذجك", - "vaeLocation": "موقع فاي إي", - "vaeLocationValidationMsg": "موقع فاي إي على الجهاز الخاص بك.", - "vaeRepoID": "معرف مستودع فاي إي", - "vaeRepoIDValidationMsg": "المستودع الإلكتروني فاي إي", - "width": "عرض", - "widthValidationMsg": "عرض افتراضي لنموذجك.", - "height": "ارتفاع", - "heightValidationMsg": "ارتفاع افتراضي لنموذجك.", - "addModel": "أضف نموذج", - "updateModel": "تحديث النموذج", - "availableModels": "النماذج المتاحة", - "search": "بحث", - "load": "تحميل", - "active": "نشط", - "notLoaded": "غير محمل", - "cached": "مخبأ", - "checkpointFolder": "مجلد التدقيق", - "clearCheckpointFolder": "مسح مجلد التدقيق", - "findModels": "إيجاد النماذج", - "scanAgain": "فحص مرة أخرى", - "modelsFound": "النماذج الموجودة", - "selectFolder": "حدد المجلد", - "selected": "تم التحديد", - "selectAll": "حدد الكل", - "deselectAll": "إلغاء تحديد الكل", - "showExisting": "إظهار الموجود", - "addSelected": "أضف المحدد", - "modelExists": "النموذج موجود", - "selectAndAdd": "حدد وأضف النماذج المدرجة أدناه", - "noModelsFound": "لم يتم العثور على نماذج", - "delete": "حذف", - "deleteModel": "حذف النموذج", - "deleteConfig": "حذف التكوين", - "deleteMsg1": "هل أنت متأكد من رغبتك في حذف إدخال النموذج هذا من استحضر الذكاء الصناعي", - "deleteMsg2": "هذا لن يحذف ملف نقطة التحكم للنموذج من القرص الخاص بك. يمكنك إعادة إضافتهم إذا كنت ترغب في ذلك.", - "formMessageDiffusersModelLocation": "موقع النموذج للمصعد", - "formMessageDiffusersModelLocationDesc": "يرجى إدخال واحد على الأقل.", - "formMessageDiffusersVAELocation": "موقع فاي إي", - "formMessageDiffusersVAELocationDesc": "إذا لم يتم توفيره، سيبحث استحضر الذكاء الصناعي عن ملف فاي إي داخل موقع النموذج المعطى أعلاه." - }, - "parameters": { - "images": "الصور", - "steps": "الخطوات", - "cfgScale": "مقياس الإعداد الذاتي للجملة", - "width": "عرض", - "height": "ارتفاع", - "seed": "بذرة", - "randomizeSeed": "تبديل بذرة", - "shuffle": "تشغيل", - "noiseThreshold": "عتبة الضوضاء", - "perlinNoise": "ضجيج برلين", - "variations": "تباينات", - "variationAmount": "كمية التباين", - "seedWeights": "أوزان البذور", - "faceRestoration": "استعادة الوجه", - "restoreFaces": "استعادة الوجوه", - "type": "نوع", - "strength": "قوة", - "upscaling": "تصغير", - "upscale": "تصغير", - "upscaleImage": "تصغير الصورة", - "scale": "مقياس", - "otherOptions": "خيارات أخرى", - "seamlessTiling": "تجهيز بلاستيكي بدون تشققات", - "hiresOptim": "تحسين الدقة العالية", - "imageFit": "ملائمة الصورة الأولية لحجم الخرج", - "codeformerFidelity": "الوثوقية", - "scaleBeforeProcessing": "تحجيم قبل المعالجة", - "scaledWidth": "العرض المحجوب", - "scaledHeight": "الارتفاع المحجوب", - "infillMethod": "طريقة التعبئة", - "tileSize": "حجم البلاطة", - "boundingBoxHeader": "صندوق التحديد", - "seamCorrectionHeader": "تصحيح التشقق", - "infillScalingHeader": "التعبئة والتحجيم", - "img2imgStrength": "قوة صورة إلى صورة", - "toggleLoopback": "تبديل الإعادة", - "sendTo": "أرسل إلى", - "sendToImg2Img": "أرسل إلى صورة إلى صورة", - "sendToUnifiedCanvas": "أرسل إلى الخطوط الموحدة", - "copyImage": "نسخ الصورة", - "copyImageToLink": "نسخ الصورة إلى الرابط", - "downloadImage": "تحميل الصورة", - "openInViewer": "فتح في العارض", - "closeViewer": "إغلاق العارض", - "usePrompt": "استخدم المحث", - "useSeed": "استخدام البذور", - "useAll": "استخدام الكل", - "useInitImg": "استخدام الصورة الأولية", - "info": "معلومات", - "initialImage": "الصورة الأولية", - "showOptionsPanel": "إظهار لوحة الخيارات" - }, - "settings": { - "models": "موديلات", - "displayInProgress": "عرض الصور المؤرشفة", - "saveSteps": "حفظ الصور كل n خطوات", - "confirmOnDelete": "تأكيد عند الحذف", - "displayHelpIcons": "عرض أيقونات المساعدة", - "enableImageDebugging": "تمكين التصحيح عند التصوير", - "resetWebUI": "إعادة تعيين واجهة الويب", - "resetWebUIDesc1": "إعادة تعيين واجهة الويب يعيد فقط ذاكرة التخزين المؤقت للمتصفح لصورك وإعداداتك المذكورة. لا يحذف أي صور من القرص.", - "resetWebUIDesc2": "إذا لم تظهر الصور في الصالة أو إذا كان شيء آخر غير ناجح، يرجى المحاولة إعادة تعيين قبل تقديم مشكلة على جيت هب.", - "resetComplete": "تم إعادة تعيين واجهة الويب. تحديث الصفحة لإعادة التحميل." - }, - "toast": { - "tempFoldersEmptied": "تم تفريغ مجلد المؤقت", - "uploadFailed": "فشل التحميل", - "uploadFailedUnableToLoadDesc": "تعذر تحميل الملف", - "downloadImageStarted": "بدأ تنزيل الصورة", - "imageCopied": "تم نسخ الصورة", - "imageLinkCopied": "تم نسخ رابط الصورة", - "imageNotLoaded": "لم يتم تحميل أي صورة", - "imageNotLoadedDesc": "لم يتم العثور على صورة لإرسالها إلى وحدة الصورة", - "imageSavedToGallery": "تم حفظ الصورة في المعرض", - "canvasMerged": "تم دمج الخط", - "sentToImageToImage": "تم إرسال إلى صورة إلى صورة", - "sentToUnifiedCanvas": "تم إرسال إلى لوحة موحدة", - "parametersSet": "تم تعيين المعلمات", - "parametersNotSet": "لم يتم تعيين المعلمات", - "parametersNotSetDesc": "لم يتم العثور على معلمات بيانية لهذه الصورة.", - "parametersFailed": "حدث مشكلة في تحميل المعلمات", - "parametersFailedDesc": "تعذر تحميل صورة البدء.", - "seedSet": "تم تعيين البذرة", - "seedNotSet": "لم يتم تعيين البذرة", - "seedNotSetDesc": "تعذر العثور على البذرة لهذه الصورة.", - "promptSet": "تم تعيين الإشعار", - "promptNotSet": "Prompt Not Set", - "promptNotSetDesc": "تعذر العثور على الإشعار لهذه الصورة.", - "upscalingFailed": "فشل التحسين", - "faceRestoreFailed": "فشل استعادة الوجه", - "metadataLoadFailed": "فشل تحميل البيانات الوصفية", - "initialImageSet": "تم تعيين الصورة الأولية", - "initialImageNotSet": "لم يتم تعيين الصورة الأولية", - "initialImageNotSetDesc": "تعذر تحميل الصورة الأولية" - }, - "tooltip": { - "feature": { - "prompt": "هذا هو حقل التحذير. يشمل التحذير عناصر الإنتاج والمصطلحات الأسلوبية. يمكنك إضافة الأوزان (أهمية الرمز) في التحذير أيضًا، ولكن أوامر CLI والمعلمات لن تعمل.", - "gallery": "تعرض Gallery منتجات من مجلد الإخراج عندما يتم إنشاؤها. تخزن الإعدادات داخل الملفات ويتم الوصول إليها عن طريق قائمة السياق.", - "other": "ستمكن هذه الخيارات من وضع عمليات معالجة بديلة لـاستحضر الذكاء الصناعي. سيؤدي 'الزخرفة بلا جدران' إلى إنشاء أنماط تكرارية في الإخراج. 'دقة عالية' هي الإنتاج خلال خطوتين عبر صورة إلى صورة: استخدم هذا الإعداد عندما ترغب في توليد صورة أكبر وأكثر تجانبًا دون العيوب. ستستغرق الأشياء وقتًا أطول من نص إلى صورة المعتاد.", - "seed": "يؤثر قيمة البذور على الضوضاء الأولي الذي يتم تكوين الصورة منه. يمكنك استخدام البذور الخاصة بالصور السابقة. 'عتبة الضوضاء' يتم استخدامها لتخفيف العناصر الخللية في قيم CFG العالية (جرب مدى 0-10), و Perlin لإضافة ضوضاء Perlin أثناء الإنتاج: كلا منهما يعملان على إضافة التنوع إلى النتائج الخاصة بك.", - "variations": "جرب التغيير مع قيمة بين 0.1 و 1.0 لتغيير النتائج لبذور معينة. التغييرات المثيرة للاهتمام للبذور تكون بين 0.1 و 0.3.", - "upscale": "استخدم إي إس آر جان لتكبير الصورة على الفور بعد الإنتاج.", - "faceCorrection": "تصحيح الوجه باستخدام جي إف بي جان أو كود فورمر: يكتشف الخوارزمية الوجوه في الصورة وتصحح أي عيوب. قيمة عالية ستغير الصورة أكثر، مما يؤدي إلى وجوه أكثر جمالا. كود فورمر بدقة أعلى يحتفظ بالصورة الأصلية على حساب تصحيح وجه أكثر قوة.", - "imageToImage": "تحميل صورة إلى صورة أي صورة كأولية، والتي يتم استخدامها لإنشاء صورة جديدة مع التشعيب. كلما كانت القيمة أعلى، كلما تغيرت نتيجة الصورة. من الممكن أن تكون القيم بين 0.0 و 1.0، وتوصي النطاق الموصى به هو .25-.75", - "boundingBox": "مربع الحدود هو نفس الإعدادات العرض والارتفاع لنص إلى صورة أو صورة إلى صورة. فقط المنطقة في المربع سيتم معالجتها.", - "seamCorrection": "يتحكم بالتعامل مع الخطوط المرئية التي تحدث بين الصور المولدة في سطح اللوحة.", - "infillAndScaling": "إدارة أساليب التعبئة (المستخدمة على المناطق المخفية أو الممحوة في سطح اللوحة) والزيادة في الحجم (مفيدة لحجوزات الإطارات الصغيرة)." - } - }, - "unifiedCanvas": { - "layer": "طبقة", - "base": "قاعدة", - "mask": "قناع", - "maskingOptions": "خيارات القناع", - "enableMask": "مكن القناع", - "preserveMaskedArea": "الحفاظ على المنطقة المقنعة", - "clearMask": "مسح القناع", - "brush": "فرشاة", - "eraser": "ممحاة", - "fillBoundingBox": "ملئ إطار الحدود", - "eraseBoundingBox": "مسح إطار الحدود", - "colorPicker": "اختيار اللون", - "brushOptions": "خيارات الفرشاة", - "brushSize": "الحجم", - "move": "تحريك", - "resetView": "إعادة تعيين العرض", - "mergeVisible": "دمج الظاهر", - "saveToGallery": "حفظ إلى المعرض", - "copyToClipboard": "نسخ إلى الحافظة", - "downloadAsImage": "تنزيل على شكل صورة", - "undo": "تراجع", - "redo": "إعادة", - "clearCanvas": "مسح سبيكة الكاملة", - "canvasSettings": "إعدادات سبيكة الكاملة", - "showIntermediates": "إظهار الوسطاء", - "showGrid": "إظهار الشبكة", - "snapToGrid": "الالتفاف إلى الشبكة", - "darkenOutsideSelection": "تعمية خارج التحديد", - "autoSaveToGallery": "حفظ تلقائي إلى المعرض", - "saveBoxRegionOnly": "حفظ منطقة الصندوق فقط", - "limitStrokesToBox": "تحديد عدد الخطوط إلى الصندوق", - "showCanvasDebugInfo": "إظهار معلومات تصحيح سبيكة الكاملة", - "clearCanvasHistory": "مسح تاريخ سبيكة الكاملة", - "clearHistory": "مسح التاريخ", - "clearCanvasHistoryMessage": "مسح تاريخ اللوحة تترك اللوحة الحالية عائمة، ولكن تمسح بشكل غير قابل للتراجع تاريخ التراجع والإعادة.", - "clearCanvasHistoryConfirm": "هل أنت متأكد من رغبتك في مسح تاريخ اللوحة؟", - "emptyTempImageFolder": "إفراغ مجلد الصور المؤقتة", - "emptyFolder": "إفراغ المجلد", - "emptyTempImagesFolderMessage": "إفراغ مجلد الصور المؤقتة يؤدي أيضًا إلى إعادة تعيين اللوحة الموحدة بشكل كامل. وهذا يشمل كل تاريخ التراجع / الإعادة والصور في منطقة التخزين وطبقة الأساس لللوحة.", - "emptyTempImagesFolderConfirm": "هل أنت متأكد من رغبتك في إفراغ مجلد الصور المؤقتة؟", - "activeLayer": "الطبقة النشطة", - "canvasScale": "مقياس اللوحة", - "boundingBox": "صندوق الحدود", - "scaledBoundingBox": "صندوق الحدود المكبر", - "boundingBoxPosition": "موضع صندوق الحدود", - "canvasDimensions": "أبعاد اللوحة", - "canvasPosition": "موضع اللوحة", - "cursorPosition": "موضع المؤشر", - "previous": "السابق", - "next": "التالي", - "accept": "قبول", - "showHide": "إظهار/إخفاء", - "discardAll": "تجاهل الكل", - "betaClear": "مسح", - "betaDarkenOutside": "ظل الخارج", - "betaLimitToBox": "تحديد إلى الصندوق", - "betaPreserveMasked": "المحافظة على المخفية" - } -} diff --git a/invokeai/frontend/web/dist/locales/de.json b/invokeai/frontend/web/dist/locales/de.json deleted file mode 100644 index ee5b4f10d3..0000000000 --- a/invokeai/frontend/web/dist/locales/de.json +++ /dev/null @@ -1,973 +0,0 @@ -{ - "common": { - "languagePickerLabel": "Sprachauswahl", - "reportBugLabel": "Fehler melden", - "settingsLabel": "Einstellungen", - "img2img": "Bild zu Bild", - "nodes": "Knoten Editor", - "langGerman": "Deutsch", - "nodesDesc": "Ein knotenbasiertes System, für die Erzeugung von Bildern, ist derzeit in der Entwicklung. Bleiben Sie gespannt auf Updates zu dieser fantastischen Funktion.", - "postProcessing": "Nachbearbeitung", - "postProcessDesc1": "InvokeAI bietet eine breite Palette von Nachbearbeitungsfunktionen. Bildhochskalierung und Gesichtsrekonstruktion sind bereits in der WebUI verfügbar. Sie können sie über das Menü Erweiterte Optionen der Reiter Text in Bild und Bild in Bild aufrufen. Sie können Bilder auch direkt bearbeiten, indem Sie die Schaltflächen für Bildaktionen oberhalb der aktuellen Bildanzeige oder im Viewer verwenden.", - "postProcessDesc2": "Eine spezielle Benutzeroberfläche wird in Kürze veröffentlicht, um erweiterte Nachbearbeitungs-Workflows zu erleichtern.", - "postProcessDesc3": "Die InvokeAI Kommandozeilen-Schnittstelle bietet verschiedene andere Funktionen, darunter Embiggen.", - "training": "trainieren", - "trainingDesc1": "Ein spezieller Arbeitsablauf zum Trainieren Ihrer eigenen Embeddings und Checkpoints mit Textual Inversion und Dreambooth über die Weboberfläche.", - "trainingDesc2": "InvokeAI unterstützt bereits das Training von benutzerdefinierten Embeddings mit Textual Inversion unter Verwendung des Hauptskripts.", - "upload": "Hochladen", - "close": "Schließen", - "load": "Laden", - "statusConnected": "Verbunden", - "statusDisconnected": "Getrennt", - "statusError": "Fehler", - "statusPreparing": "Vorbereiten", - "statusProcessingCanceled": "Verarbeitung abgebrochen", - "statusProcessingComplete": "Verarbeitung komplett", - "statusGenerating": "Generieren", - "statusGeneratingTextToImage": "Erzeugen von Text zu Bild", - "statusGeneratingImageToImage": "Erzeugen von Bild zu Bild", - "statusGeneratingInpainting": "Erzeuge Inpainting", - "statusGeneratingOutpainting": "Erzeuge Outpainting", - "statusGenerationComplete": "Generierung abgeschlossen", - "statusIterationComplete": "Iteration abgeschlossen", - "statusSavingImage": "Speichere Bild", - "statusRestoringFaces": "Gesichter restaurieren", - "statusRestoringFacesGFPGAN": "Gesichter restaurieren (GFPGAN)", - "statusRestoringFacesCodeFormer": "Gesichter restaurieren (CodeFormer)", - "statusUpscaling": "Hochskalierung", - "statusUpscalingESRGAN": "Hochskalierung (ESRGAN)", - "statusLoadingModel": "Laden des Modells", - "statusModelChanged": "Modell Geändert", - "cancel": "Abbrechen", - "accept": "Annehmen", - "back": "Zurück", - "langEnglish": "Englisch", - "langDutch": "Niederländisch", - "langFrench": "Französisch", - "langItalian": "Italienisch", - "langPortuguese": "Portugiesisch", - "langRussian": "Russisch", - "langUkranian": "Ukrainisch", - "hotkeysLabel": "Tastenkombinationen", - "githubLabel": "Github", - "discordLabel": "Discord", - "txt2img": "Text zu Bild", - "postprocessing": "Nachbearbeitung", - "langPolish": "Polnisch", - "langJapanese": "Japanisch", - "langArabic": "Arabisch", - "langKorean": "Koreanisch", - "langHebrew": "Hebräisch", - "langSpanish": "Spanisch", - "t2iAdapter": "T2I Adapter", - "communityLabel": "Gemeinschaft", - "dontAskMeAgain": "Frag mich nicht nochmal", - "loadingInvokeAI": "Lade Invoke AI", - "statusMergedModels": "Modelle zusammengeführt", - "areYouSure": "Bist du dir sicher?", - "statusConvertingModel": "Model konvertieren", - "on": "An", - "nodeEditor": "Knoten Editor", - "statusMergingModels": "Modelle zusammenführen", - "langSimplifiedChinese": "Vereinfachtes Chinesisch", - "ipAdapter": "IP Adapter", - "controlAdapter": "Control Adapter", - "auto": "Automatisch", - "controlNet": "ControlNet", - "imageFailedToLoad": "Kann Bild nicht laden", - "statusModelConverted": "Model konvertiert", - "modelManager": "Model Manager", - "lightMode": "Heller Modus", - "generate": "Erstellen", - "learnMore": "Mehr lernen", - "darkMode": "Dunkler Modus", - "loading": "Lade", - "random": "Zufall", - "batch": "Stapel-Manager", - "advanced": "Erweitert", - "langBrPortuguese": "Portugiesisch (Brasilien)", - "unifiedCanvas": "Einheitliche Leinwand", - "openInNewTab": "In einem neuem Tab öffnen", - "statusProcessing": "wird bearbeitet", - "linear": "Linear", - "imagePrompt": "Bild Prompt" - }, - "gallery": { - "generations": "Erzeugungen", - "showGenerations": "Zeige Erzeugnisse", - "uploads": "Uploads", - "showUploads": "Zeige Uploads", - "galleryImageSize": "Bildgröße", - "galleryImageResetSize": "Größe zurücksetzen", - "gallerySettings": "Galerie-Einstellungen", - "maintainAspectRatio": "Seitenverhältnis beibehalten", - "autoSwitchNewImages": "Automatisch zu neuen Bildern wechseln", - "singleColumnLayout": "Einspaltiges Layout", - "allImagesLoaded": "Alle Bilder geladen", - "loadMore": "Mehr laden", - "noImagesInGallery": "Keine Bilder in der Galerie", - "loading": "Lade", - "preparingDownload": "bereite Download vor", - "preparingDownloadFailed": "Problem beim Download vorbereiten", - "deleteImage": "Lösche Bild", - "images": "Bilder", - "copy": "Kopieren", - "download": "Runterladen", - "setCurrentImage": "Setze aktuelle Bild", - "featuresWillReset": "Wenn Sie dieses Bild löschen, werden diese Funktionen sofort zurückgesetzt.", - "deleteImageBin": "Gelöschte Bilder werden an den Papierkorb Ihres Betriebssystems gesendet.", - "unableToLoad": "Galerie kann nicht geladen werden", - "downloadSelection": "Auswahl herunterladen", - "currentlyInUse": "Dieses Bild wird derzeit in den folgenden Funktionen verwendet:", - "deleteImagePermanent": "Gelöschte Bilder können nicht wiederhergestellt werden.", - "autoAssignBoardOnClick": "Board per Klick automatisch zuweisen" - }, - "hotkeys": { - "keyboardShortcuts": "Tastenkürzel", - "appHotkeys": "App-Tastenkombinationen", - "generalHotkeys": "Allgemeine Tastenkürzel", - "galleryHotkeys": "Galerie Tastenkürzel", - "unifiedCanvasHotkeys": "Unified Canvas Tastenkürzel", - "invoke": { - "desc": "Ein Bild erzeugen", - "title": "Invoke" - }, - "cancel": { - "title": "Abbrechen", - "desc": "Bilderzeugung abbrechen" - }, - "focusPrompt": { - "title": "Fokussiere Prompt", - "desc": "Fokussieren des Eingabefeldes für den Prompt" - }, - "toggleOptions": { - "title": "Optionen umschalten", - "desc": "Öffnen und Schließen des Optionsfeldes" - }, - "pinOptions": { - "title": "Optionen anheften", - "desc": "Anheften des Optionsfeldes" - }, - "toggleViewer": { - "title": "Bildbetrachter umschalten", - "desc": "Bildbetrachter öffnen und schließen" - }, - "toggleGallery": { - "title": "Galerie umschalten", - "desc": "Öffnen und Schließen des Galerie-Schubfachs" - }, - "maximizeWorkSpace": { - "title": "Arbeitsbereich maximieren", - "desc": "Schließen Sie die Panels und maximieren Sie den Arbeitsbereich" - }, - "changeTabs": { - "title": "Tabs wechseln", - "desc": "Zu einem anderen Arbeitsbereich wechseln" - }, - "consoleToggle": { - "title": "Konsole Umschalten", - "desc": "Konsole öffnen und schließen" - }, - "setPrompt": { - "title": "Prompt setzen", - "desc": "Verwende den Prompt des aktuellen Bildes" - }, - "setSeed": { - "title": "Seed setzen", - "desc": "Verwende den Seed des aktuellen Bildes" - }, - "setParameters": { - "title": "Parameter setzen", - "desc": "Alle Parameter des aktuellen Bildes verwenden" - }, - "restoreFaces": { - "title": "Gesicht restaurieren", - "desc": "Das aktuelle Bild restaurieren" - }, - "upscale": { - "title": "Hochskalieren", - "desc": "Das aktuelle Bild hochskalieren" - }, - "showInfo": { - "title": "Info anzeigen", - "desc": "Metadaten des aktuellen Bildes anzeigen" - }, - "sendToImageToImage": { - "title": "An Bild zu Bild senden", - "desc": "Aktuelles Bild an Bild zu Bild senden" - }, - "deleteImage": { - "title": "Bild löschen", - "desc": "Aktuelles Bild löschen" - }, - "closePanels": { - "title": "Panels schließen", - "desc": "Schließt offene Panels" - }, - "previousImage": { - "title": "Vorheriges Bild", - "desc": "Vorheriges Bild in der Galerie anzeigen" - }, - "nextImage": { - "title": "Nächstes Bild", - "desc": "Nächstes Bild in Galerie anzeigen" - }, - "toggleGalleryPin": { - "title": "Galerie anheften umschalten", - "desc": "Heftet die Galerie an die Benutzeroberfläche bzw. löst die sie" - }, - "increaseGalleryThumbSize": { - "title": "Größe der Galeriebilder erhöhen", - "desc": "Vergrößert die Galerie-Miniaturansichten" - }, - "decreaseGalleryThumbSize": { - "title": "Größe der Galeriebilder verringern", - "desc": "Verringert die Größe der Galerie-Miniaturansichten" - }, - "selectBrush": { - "title": "Pinsel auswählen", - "desc": "Wählt den Leinwandpinsel aus" - }, - "selectEraser": { - "title": "Radiergummi auswählen", - "desc": "Wählt den Radiergummi für die Leinwand aus" - }, - "decreaseBrushSize": { - "title": "Pinselgröße verkleinern", - "desc": "Verringert die Größe des Pinsels/Radiergummis" - }, - "increaseBrushSize": { - "title": "Pinselgröße erhöhen", - "desc": "Erhöht die Größe des Pinsels/Radiergummis" - }, - "decreaseBrushOpacity": { - "title": "Deckkraft des Pinsels vermindern", - "desc": "Verringert die Deckkraft des Pinsels" - }, - "increaseBrushOpacity": { - "title": "Deckkraft des Pinsels erhöhen", - "desc": "Erhöht die Deckkraft des Pinsels" - }, - "moveTool": { - "title": "Verschieben Werkzeug", - "desc": "Ermöglicht die Navigation auf der Leinwand" - }, - "fillBoundingBox": { - "title": "Begrenzungsrahmen füllen", - "desc": "Füllt den Begrenzungsrahmen mit Pinselfarbe" - }, - "eraseBoundingBox": { - "title": "Begrenzungsrahmen löschen", - "desc": "Löscht den Bereich des Begrenzungsrahmens" - }, - "colorPicker": { - "title": "Farbpipette", - "desc": "Farben aus dem Bild aufnehmen" - }, - "toggleSnap": { - "title": "Einrasten umschalten", - "desc": "Schaltet Einrasten am Raster ein und aus" - }, - "quickToggleMove": { - "title": "Schnell Verschiebemodus", - "desc": "Schaltet vorübergehend den Verschiebemodus um" - }, - "toggleLayer": { - "title": "Ebene umschalten", - "desc": "Schaltet die Auswahl von Maske/Basisebene um" - }, - "clearMask": { - "title": "Lösche Maske", - "desc": "Die gesamte Maske löschen" - }, - "hideMask": { - "title": "Maske ausblenden", - "desc": "Maske aus- und einblenden" - }, - "showHideBoundingBox": { - "title": "Begrenzungsrahmen ein-/ausblenden", - "desc": "Sichtbarkeit des Begrenzungsrahmens ein- und ausschalten" - }, - "mergeVisible": { - "title": "Sichtbares Zusammenführen", - "desc": "Alle sichtbaren Ebenen der Leinwand zusammenführen" - }, - "saveToGallery": { - "title": "In Galerie speichern", - "desc": "Aktuelle Leinwand in Galerie speichern" - }, - "copyToClipboard": { - "title": "In die Zwischenablage kopieren", - "desc": "Aktuelle Leinwand in die Zwischenablage kopieren" - }, - "downloadImage": { - "title": "Bild herunterladen", - "desc": "Aktuelle Leinwand herunterladen" - }, - "undoStroke": { - "title": "Pinselstrich rückgängig machen", - "desc": "Einen Pinselstrich rückgängig machen" - }, - "redoStroke": { - "title": "Pinselstrich wiederherstellen", - "desc": "Einen Pinselstrich wiederherstellen" - }, - "resetView": { - "title": "Ansicht zurücksetzen", - "desc": "Leinwandansicht zurücksetzen" - }, - "previousStagingImage": { - "title": "Vorheriges Staging-Bild", - "desc": "Bild des vorherigen Staging-Bereichs" - }, - "nextStagingImage": { - "title": "Nächstes Staging-Bild", - "desc": "Bild des nächsten Staging-Bereichs" - }, - "acceptStagingImage": { - "title": "Staging-Bild akzeptieren", - "desc": "Akzeptieren Sie das aktuelle Bild des Staging-Bereichs" - }, - "nodesHotkeys": "Knoten Tastenkürzel", - "addNodes": { - "title": "Knotenpunkt hinzufügen", - "desc": "Öffnet das Menü zum Hinzufügen von Knoten" - } - }, - "modelManager": { - "modelAdded": "Model hinzugefügt", - "modelUpdated": "Model aktualisiert", - "modelEntryDeleted": "Modelleintrag gelöscht", - "cannotUseSpaces": "Leerzeichen können nicht verwendet werden", - "addNew": "Neue hinzufügen", - "addNewModel": "Neues Model hinzufügen", - "addManually": "Manuell hinzufügen", - "nameValidationMsg": "Geben Sie einen Namen für Ihr Model ein", - "description": "Beschreibung", - "descriptionValidationMsg": "Fügen Sie eine Beschreibung für Ihr Model hinzu", - "config": "Konfiguration", - "configValidationMsg": "Pfad zur Konfigurationsdatei Ihres Models.", - "modelLocation": "Ort des Models", - "modelLocationValidationMsg": "Pfad zum Speicherort Ihres Models", - "vaeLocation": "VAE Ort", - "vaeLocationValidationMsg": "Pfad zum Speicherort Ihres VAE.", - "width": "Breite", - "widthValidationMsg": "Standardbreite Ihres Models.", - "height": "Höhe", - "heightValidationMsg": "Standardbhöhe Ihres Models.", - "addModel": "Model hinzufügen", - "updateModel": "Model aktualisieren", - "availableModels": "Verfügbare Models", - "search": "Suche", - "load": "Laden", - "active": "Aktiv", - "notLoaded": "nicht geladen", - "cached": "zwischengespeichert", - "checkpointFolder": "Checkpoint-Ordner", - "clearCheckpointFolder": "Checkpoint-Ordner löschen", - "findModels": "Models finden", - "scanAgain": "Erneut scannen", - "modelsFound": "Models gefunden", - "selectFolder": "Ordner auswählen", - "selected": "Ausgewählt", - "selectAll": "Alles auswählen", - "deselectAll": "Alle abwählen", - "showExisting": "Vorhandene anzeigen", - "addSelected": "Auswahl hinzufügen", - "modelExists": "Model existiert", - "selectAndAdd": "Unten aufgeführte Models auswählen und hinzufügen", - "noModelsFound": "Keine Models gefunden", - "delete": "Löschen", - "deleteModel": "Model löschen", - "deleteConfig": "Konfiguration löschen", - "deleteMsg1": "Möchten Sie diesen Model-Eintrag wirklich aus InvokeAI löschen?", - "deleteMsg2": "Dadurch WIRD das Modell von der Festplatte gelöscht WENN es im InvokeAI Root Ordner liegt. Wenn es in einem anderem Ordner liegt wird das Modell NICHT von der Festplatte gelöscht.", - "customConfig": "Benutzerdefinierte Konfiguration", - "invokeRoot": "InvokeAI Ordner", - "formMessageDiffusersVAELocationDesc": "Falls nicht angegeben, sucht InvokeAI nach der VAE-Datei innerhalb des oben angegebenen Modell Speicherortes.", - "checkpointModels": "Kontrollpunkte", - "convert": "Umwandeln", - "addCheckpointModel": "Kontrollpunkt / SafeTensors Modell hinzufügen", - "allModels": "Alle Modelle", - "alpha": "Alpha", - "addDifference": "Unterschied hinzufügen", - "convertToDiffusersHelpText2": "Bei diesem Vorgang wird Ihr Eintrag im Modell-Manager durch die Diffusor-Version desselben Modells ersetzt.", - "convertToDiffusersHelpText5": "Bitte stellen Sie sicher, dass Sie über genügend Speicherplatz verfügen. Die Modelle sind in der Regel zwischen 2 GB und 7 GB groß.", - "convertToDiffusersHelpText3": "Ihre Kontrollpunktdatei auf der Festplatte wird NICHT gelöscht oder in irgendeiner Weise verändert. Sie können Ihren Kontrollpunkt dem Modell-Manager wieder hinzufügen, wenn Sie dies wünschen.", - "convertToDiffusersHelpText4": "Dies ist ein einmaliger Vorgang. Er kann je nach den Spezifikationen Ihres Computers etwa 30-60 Sekunden dauern.", - "convertToDiffusersHelpText6": "Möchten Sie dieses Modell konvertieren?", - "custom": "Benutzerdefiniert", - "modelConverted": "Modell umgewandelt", - "inverseSigmoid": "Inverses Sigmoid", - "invokeAIFolder": "Invoke AI Ordner", - "formMessageDiffusersModelLocationDesc": "Bitte geben Sie mindestens einen an.", - "customSaveLocation": "Benutzerdefinierter Speicherort", - "formMessageDiffusersVAELocation": "VAE Speicherort", - "mergedModelCustomSaveLocation": "Benutzerdefinierter Pfad", - "modelMergeHeaderHelp2": "Nur Diffusers sind für die Zusammenführung verfügbar. Wenn Sie ein Kontrollpunktmodell zusammenführen möchten, konvertieren Sie es bitte zuerst in Diffusers.", - "manual": "Manuell", - "modelManager": "Modell Manager", - "modelMergeAlphaHelp": "Alpha steuert die Überblendungsstärke für die Modelle. Niedrigere Alphawerte führen zu einem geringeren Einfluss des zweiten Modells.", - "modelMergeHeaderHelp1": "Sie können bis zu drei verschiedene Modelle miteinander kombinieren, um eine Mischung zu erstellen, die Ihren Bedürfnissen entspricht.", - "ignoreMismatch": "Unstimmigkeiten zwischen ausgewählten Modellen ignorieren", - "model": "Modell", - "convertToDiffusersSaveLocation": "Speicherort", - "pathToCustomConfig": "Pfad zur benutzerdefinierten Konfiguration", - "v1": "v1", - "modelMergeInterpAddDifferenceHelp": "In diesem Modus wird zunächst Modell 3 von Modell 2 subtrahiert. Die resultierende Version wird mit Modell 1 mit dem oben eingestellten Alphasatz gemischt.", - "modelTwo": "Modell 2", - "modelOne": "Modell 1", - "v2_base": "v2 (512px)", - "scanForModels": "Nach Modellen suchen", - "name": "Name", - "safetensorModels": "SafeTensors", - "pickModelType": "Modell Typ auswählen", - "sameFolder": "Gleicher Ordner", - "modelThree": "Modell 3", - "v2_768": "v2 (768px)", - "none": "Nix", - "repoIDValidationMsg": "Online Repo Ihres Modells", - "vaeRepoIDValidationMsg": "Online Repo Ihrer VAE", - "importModels": "Importiere Modelle", - "merge": "Zusammenführen", - "addDiffuserModel": "Diffusers hinzufügen", - "advanced": "Erweitert", - "closeAdvanced": "Schließe Erweitert", - "convertingModelBegin": "Konvertiere Modell. Bitte warten.", - "customConfigFileLocation": "Benutzerdefinierte Konfiguration Datei Speicherort", - "baseModel": "Basis Modell", - "convertToDiffusers": "Konvertiere zu Diffusers", - "diffusersModels": "Diffusers", - "noCustomLocationProvided": "Kein benutzerdefinierter Standort angegeben", - "onnxModels": "Onnx", - "vaeRepoID": "VAE-Repo-ID", - "weightedSum": "Gewichtete Summe", - "syncModelsDesc": "Wenn Ihre Modelle nicht mit dem Backend synchronisiert sind, können Sie sie mit dieser Option aktualisieren. Dies ist im Allgemeinen praktisch, wenn Sie Ihre models.yaml-Datei manuell aktualisieren oder Modelle zum InvokeAI-Stammordner hinzufügen, nachdem die Anwendung gestartet wurde.", - "vae": "VAE", - "noModels": "Keine Modelle gefunden", - "statusConverting": "Konvertieren", - "sigmoid": "Sigmoid", - "predictionType": "Vorhersagetyp (für Stable Diffusion 2.x-Modelle und gelegentliche Stable Diffusion 1.x-Modelle)", - "selectModel": "Wählen Sie Modell aus", - "repo_id": "Repo-ID", - "modelSyncFailed": "Modellsynchronisierung fehlgeschlagen", - "quickAdd": "Schnell hinzufügen", - "simpleModelDesc": "Geben Sie einen Pfad zu einem lokalen Diffusers-Modell, einem lokalen Checkpoint-/Safetensors-Modell, einer HuggingFace-Repo-ID oder einer Checkpoint-/Diffusers-Modell-URL an.", - "modelDeleted": "Modell gelöscht", - "inpainting": "v1 Ausmalen", - "modelUpdateFailed": "Modellaktualisierung fehlgeschlagen", - "useCustomConfig": "Benutzerdefinierte Konfiguration verwenden", - "settings": "Einstellungen", - "modelConversionFailed": "Modellkonvertierung fehlgeschlagen", - "syncModels": "Modelle synchronisieren", - "mergedModelSaveLocation": "Speicherort", - "modelType": "Modelltyp", - "modelsMerged": "Modelle zusammengeführt", - "modelsMergeFailed": "Modellzusammenführung fehlgeschlagen", - "convertToDiffusersHelpText1": "Dieses Modell wird in das 🧨 Diffusers-Format konvertiert.", - "modelsSynced": "Modelle synchronisiert", - "vaePrecision": "VAE-Präzision", - "mergeModels": "Modelle zusammenführen", - "interpolationType": "Interpolationstyp", - "oliveModels": "Olives", - "variant": "Variante", - "loraModels": "LoRAs", - "modelDeleteFailed": "Modell konnte nicht gelöscht werden", - "mergedModelName": "Zusammengeführter Modellname" - }, - "parameters": { - "images": "Bilder", - "steps": "Schritte", - "cfgScale": "CFG-Skala", - "width": "Breite", - "height": "Höhe", - "randomizeSeed": "Zufälliger Seed", - "shuffle": "Mischen", - "noiseThreshold": "Rausch-Schwellenwert", - "perlinNoise": "Perlin-Rauschen", - "variations": "Variationen", - "variationAmount": "Höhe der Abweichung", - "seedWeights": "Seed-Gewichte", - "faceRestoration": "Gesichtsrestaurierung", - "restoreFaces": "Gesichter wiederherstellen", - "type": "Art", - "strength": "Stärke", - "upscaling": "Hochskalierung", - "upscale": "Hochskalieren (Shift + U)", - "upscaleImage": "Bild hochskalieren", - "scale": "Maßstab", - "otherOptions": "Andere Optionen", - "seamlessTiling": "Nahtlose Kacheln", - "hiresOptim": "High-Res-Optimierung", - "imageFit": "Ausgangsbild an Ausgabegröße anpassen", - "codeformerFidelity": "Glaubwürdigkeit", - "scaleBeforeProcessing": "Skalieren vor der Verarbeitung", - "scaledWidth": "Skaliert W", - "scaledHeight": "Skaliert H", - "infillMethod": "Infill-Methode", - "tileSize": "Kachelgröße", - "boundingBoxHeader": "Begrenzungsrahmen", - "seamCorrectionHeader": "Nahtkorrektur", - "infillScalingHeader": "Infill und Skalierung", - "img2imgStrength": "Bild-zu-Bild-Stärke", - "toggleLoopback": "Loopback umschalten", - "sendTo": "Senden an", - "sendToImg2Img": "Senden an Bild zu Bild", - "sendToUnifiedCanvas": "Senden an Unified Canvas", - "copyImageToLink": "Bild-Link kopieren", - "downloadImage": "Bild herunterladen", - "openInViewer": "Im Viewer öffnen", - "closeViewer": "Viewer schließen", - "usePrompt": "Prompt verwenden", - "useSeed": "Seed verwenden", - "useAll": "Alle verwenden", - "useInitImg": "Ausgangsbild verwenden", - "initialImage": "Ursprüngliches Bild", - "showOptionsPanel": "Optionsleiste zeigen", - "cancel": { - "setType": "Abbruchart festlegen", - "immediate": "Sofort abbrechen", - "schedule": "Abbrechen nach der aktuellen Iteration", - "isScheduled": "Abbrechen" - }, - "copyImage": "Bild kopieren", - "denoisingStrength": "Stärke der Entrauschung", - "symmetry": "Symmetrie", - "imageToImage": "Bild zu Bild", - "info": "Information", - "general": "Allgemein", - "hiresStrength": "High Res Stärke", - "hidePreview": "Verstecke Vorschau", - "showPreview": "Zeige Vorschau" - }, - "settings": { - "displayInProgress": "Bilder in Bearbeitung anzeigen", - "saveSteps": "Speichern der Bilder alle n Schritte", - "confirmOnDelete": "Bestätigen beim Löschen", - "displayHelpIcons": "Hilfesymbole anzeigen", - "enableImageDebugging": "Bild-Debugging aktivieren", - "resetWebUI": "Web-Oberfläche zurücksetzen", - "resetWebUIDesc1": "Das Zurücksetzen der Web-Oberfläche setzt nur den lokalen Cache des Browsers mit Ihren Bildern und gespeicherten Einstellungen zurück. Es werden keine Bilder von der Festplatte gelöscht.", - "resetWebUIDesc2": "Wenn die Bilder nicht in der Galerie angezeigt werden oder etwas anderes nicht funktioniert, versuchen Sie bitte, die Einstellungen zurückzusetzen, bevor Sie einen Fehler auf GitHub melden.", - "resetComplete": "Die Web-Oberfläche wurde zurückgesetzt.", - "models": "Modelle", - "useSlidersForAll": "Schieberegler für alle Optionen verwenden" - }, - "toast": { - "tempFoldersEmptied": "Temp-Ordner geleert", - "uploadFailed": "Hochladen fehlgeschlagen", - "uploadFailedUnableToLoadDesc": "Datei kann nicht geladen werden", - "downloadImageStarted": "Bild wird heruntergeladen", - "imageCopied": "Bild kopiert", - "imageLinkCopied": "Bildlink kopiert", - "imageNotLoaded": "Kein Bild geladen", - "imageNotLoadedDesc": "Konnte kein Bild finden", - "imageSavedToGallery": "Bild in die Galerie gespeichert", - "canvasMerged": "Leinwand zusammengeführt", - "sentToImageToImage": "Gesendet an Bild zu Bild", - "sentToUnifiedCanvas": "Gesendet an Unified Canvas", - "parametersSet": "Parameter festlegen", - "parametersNotSet": "Parameter nicht festgelegt", - "parametersNotSetDesc": "Keine Metadaten für dieses Bild gefunden.", - "parametersFailed": "Problem beim Laden der Parameter", - "parametersFailedDesc": "Ausgangsbild kann nicht geladen werden.", - "seedSet": "Seed festlegen", - "seedNotSet": "Saatgut nicht festgelegt", - "seedNotSetDesc": "Für dieses Bild wurde kein Seed gefunden.", - "promptSet": "Prompt festgelegt", - "promptNotSet": "Prompt nicht festgelegt", - "promptNotSetDesc": "Für dieses Bild wurde kein Prompt gefunden.", - "upscalingFailed": "Hochskalierung fehlgeschlagen", - "faceRestoreFailed": "Gesichtswiederherstellung fehlgeschlagen", - "metadataLoadFailed": "Metadaten konnten nicht geladen werden", - "initialImageSet": "Ausgangsbild festgelegt", - "initialImageNotSet": "Ausgangsbild nicht festgelegt", - "initialImageNotSetDesc": "Ausgangsbild konnte nicht geladen werden" - }, - "tooltip": { - "feature": { - "prompt": "Dies ist das Prompt-Feld. Ein Prompt enthält Generierungsobjekte und stilistische Begriffe. Sie können auch Gewichtungen (Token-Bedeutung) dem Prompt hinzufügen, aber CLI-Befehle und Parameter funktionieren nicht.", - "gallery": "Die Galerie zeigt erzeugte Bilder aus dem Ausgabeordner an, sobald sie erstellt wurden. Die Einstellungen werden in den Dateien gespeichert und können über das Kontextmenü aufgerufen werden.", - "other": "Mit diesen Optionen werden alternative Verarbeitungsmodi für InvokeAI aktiviert. 'Nahtlose Kachelung' erzeugt sich wiederholende Muster in der Ausgabe. 'Hohe Auflösungen' werden in zwei Schritten mit img2img erzeugt: Verwenden Sie diese Einstellung, wenn Sie ein größeres und kohärenteres Bild ohne Artefakte wünschen. Es dauert länger als das normale txt2img.", - "seed": "Der Seed-Wert beeinflusst das Ausgangsrauschen, aus dem das Bild erstellt wird. Sie können die bereits vorhandenen Seeds von früheren Bildern verwenden. 'Der Rauschschwellenwert' wird verwendet, um Artefakte bei hohen CFG-Werten abzuschwächen (versuchen Sie es im Bereich 0-10), und Perlin, um während der Erzeugung Perlin-Rauschen hinzuzufügen: Beide dienen dazu, Ihre Ergebnisse zu variieren.", - "variations": "Versuchen Sie eine Variation mit einem Wert zwischen 0,1 und 1,0, um das Ergebnis für ein bestimmtes Seed zu ändern. Interessante Variationen des Seeds liegen zwischen 0,1 und 0,3.", - "upscale": "Verwenden Sie ESRGAN, um das Bild unmittelbar nach der Erzeugung zu vergrößern.", - "faceCorrection": "Gesichtskorrektur mit GFPGAN oder Codeformer: Der Algorithmus erkennt Gesichter im Bild und korrigiert alle Fehler. Ein hoher Wert verändert das Bild stärker, was zu attraktiveren Gesichtern führt. Codeformer mit einer höheren Genauigkeit bewahrt das Originalbild auf Kosten einer stärkeren Gesichtskorrektur.", - "imageToImage": "Bild zu Bild lädt ein beliebiges Bild als Ausgangsbild, aus dem dann zusammen mit dem Prompt ein neues Bild erzeugt wird. Je höher der Wert ist, desto stärker wird das Ergebnisbild verändert. Werte von 0,0 bis 1,0 sind möglich, der empfohlene Bereich ist .25-.75", - "boundingBox": "Der Begrenzungsrahmen ist derselbe wie die Einstellungen für Breite und Höhe bei Text zu Bild oder Bild zu Bild. Es wird nur der Bereich innerhalb des Rahmens verarbeitet.", - "seamCorrection": "Steuert die Behandlung von sichtbaren Übergängen, die zwischen den erzeugten Bildern auf der Leinwand auftreten.", - "infillAndScaling": "Verwalten Sie Infill-Methoden (für maskierte oder gelöschte Bereiche der Leinwand) und Skalierung (nützlich für kleine Begrenzungsrahmengrößen)." - } - }, - "unifiedCanvas": { - "layer": "Ebene", - "base": "Basis", - "mask": "Maske", - "maskingOptions": "Maskierungsoptionen", - "enableMask": "Maske aktivieren", - "preserveMaskedArea": "Maskierten Bereich bewahren", - "clearMask": "Maske löschen", - "brush": "Pinsel", - "eraser": "Radierer", - "fillBoundingBox": "Begrenzungsrahmen füllen", - "eraseBoundingBox": "Begrenzungsrahmen löschen", - "colorPicker": "Farbpipette", - "brushOptions": "Pinseloptionen", - "brushSize": "Größe", - "move": "Bewegen", - "resetView": "Ansicht zurücksetzen", - "mergeVisible": "Sichtbare Zusammenführen", - "saveToGallery": "In Galerie speichern", - "copyToClipboard": "In Zwischenablage kopieren", - "downloadAsImage": "Als Bild herunterladen", - "undo": "Rückgängig", - "redo": "Wiederherstellen", - "clearCanvas": "Leinwand löschen", - "canvasSettings": "Leinwand-Einstellungen", - "showIntermediates": "Zwischenprodukte anzeigen", - "showGrid": "Gitternetz anzeigen", - "snapToGrid": "Am Gitternetz einrasten", - "darkenOutsideSelection": "Außerhalb der Auswahl verdunkeln", - "autoSaveToGallery": "Automatisch in Galerie speichern", - "saveBoxRegionOnly": "Nur Auswahlbox speichern", - "limitStrokesToBox": "Striche auf Box beschränken", - "showCanvasDebugInfo": "Zusätzliche Informationen zur Leinwand anzeigen", - "clearCanvasHistory": "Leinwand-Verlauf löschen", - "clearHistory": "Verlauf löschen", - "clearCanvasHistoryMessage": "Wenn Sie den Verlauf der Leinwand löschen, bleibt die aktuelle Leinwand intakt, aber der Verlauf der Rückgängig- und Wiederherstellung wird unwiderruflich gelöscht.", - "clearCanvasHistoryConfirm": "Sind Sie sicher, dass Sie den Verlauf der Leinwand löschen möchten?", - "emptyTempImageFolder": "Temp-Image Ordner leeren", - "emptyFolder": "Leerer Ordner", - "emptyTempImagesFolderMessage": "Wenn Sie den Ordner für temporäre Bilder leeren, wird auch der Unified Canvas vollständig zurückgesetzt. Dies umfasst den gesamten Verlauf der Rückgängig-/Wiederherstellungsvorgänge, die Bilder im Bereitstellungsbereich und die Leinwand-Basisebene.", - "emptyTempImagesFolderConfirm": "Sind Sie sicher, dass Sie den temporären Ordner leeren wollen?", - "activeLayer": "Aktive Ebene", - "canvasScale": "Leinwand Maßstab", - "boundingBox": "Begrenzungsrahmen", - "scaledBoundingBox": "Skalierter Begrenzungsrahmen", - "boundingBoxPosition": "Begrenzungsrahmen Position", - "canvasDimensions": "Maße der Leinwand", - "canvasPosition": "Leinwandposition", - "cursorPosition": "Position des Cursors", - "previous": "Vorherige", - "next": "Nächste", - "accept": "Akzeptieren", - "showHide": "Einblenden/Ausblenden", - "discardAll": "Alles verwerfen", - "betaClear": "Löschen", - "betaDarkenOutside": "Außen abdunkeln", - "betaLimitToBox": "Begrenzung auf das Feld", - "betaPreserveMasked": "Maskiertes bewahren", - "antialiasing": "Kantenglättung", - "showResultsOn": "Zeige Ergebnisse (An)", - "showResultsOff": "Zeige Ergebnisse (Aus)" - }, - "accessibility": { - "modelSelect": "Model Auswahl", - "uploadImage": "Bild hochladen", - "previousImage": "Voriges Bild", - "useThisParameter": "Benutze diesen Parameter", - "copyMetadataJson": "Kopiere Metadaten JSON", - "zoomIn": "Vergrößern", - "rotateClockwise": "Im Uhrzeigersinn drehen", - "flipHorizontally": "Horizontal drehen", - "flipVertically": "Vertikal drehen", - "modifyConfig": "Optionen einstellen", - "toggleAutoscroll": "Auroscroll ein/ausschalten", - "toggleLogViewer": "Log Betrachter ein/ausschalten", - "showOptionsPanel": "Zeige Optionen", - "reset": "Zurücksetzten", - "nextImage": "Nächstes Bild", - "zoomOut": "Verkleinern", - "rotateCounterClockwise": "Gegen den Uhrzeigersinn verdrehen", - "showGalleryPanel": "Galeriefenster anzeigen", - "exitViewer": "Betrachten beenden", - "menu": "Menü", - "loadMore": "Mehr laden", - "invokeProgressBar": "Invoke Fortschrittsanzeige" - }, - "boards": { - "autoAddBoard": "Automatisches Hinzufügen zum Ordner", - "topMessage": "Dieser Ordner enthält Bilder die in den folgenden Funktionen verwendet werden:", - "move": "Bewegen", - "menuItemAutoAdd": "Automatisches Hinzufügen zu diesem Ordner", - "myBoard": "Meine Ordner", - "searchBoard": "Ordner durchsuchen...", - "noMatching": "Keine passenden Ordner", - "selectBoard": "Ordner aussuchen", - "cancel": "Abbrechen", - "addBoard": "Ordner hinzufügen", - "uncategorized": "Nicht kategorisiert", - "downloadBoard": "Ordner runterladen", - "changeBoard": "Ordner wechseln", - "loading": "Laden...", - "clearSearch": "Suche leeren", - "bottomMessage": "Durch das Löschen dieses Ordners und seiner Bilder werden alle Funktionen zurückgesetzt, die sie derzeit verwenden." - }, - "controlnet": { - "showAdvanced": "Zeige Erweitert", - "contentShuffleDescription": "Mischt den Inhalt von einem Bild", - "addT2IAdapter": "$t(common.t2iAdapter) hinzufügen", - "importImageFromCanvas": "Importieren Bild von Zeichenfläche", - "lineartDescription": "Konvertiere Bild zu Lineart", - "importMaskFromCanvas": "Importiere Maske von Zeichenfläche", - "hed": "HED", - "hideAdvanced": "Verstecke Erweitert", - "contentShuffle": "Inhalt mischen", - "controlNetEnabledT2IDisabled": "$t(common.controlNet) ist aktiv, $t(common.t2iAdapter) ist deaktiviert", - "ipAdapterModel": "Adapter Modell", - "beginEndStepPercent": "Start / Ende Step Prozent", - "duplicate": "Kopieren", - "f": "F", - "h": "H", - "depthMidasDescription": "Tiefenmap erstellen mit Midas", - "controlnet": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.controlNet))", - "t2iEnabledControlNetDisabled": "$t(common.t2iAdapter) ist aktiv, $t(common.controlNet) ist deaktiviert", - "weight": "Breite", - "selectModel": "Wähle ein Modell", - "depthMidas": "Tiefe (Midas)", - "w": "W", - "addControlNet": "$t(common.controlNet) hinzufügen", - "none": "Kein", - "incompatibleBaseModel": "Inkompatibles Basismodell:", - "enableControlnet": "Aktiviere ControlNet", - "detectResolution": "Auflösung erkennen", - "controlNetT2IMutexDesc": "$t(common.controlNet) und $t(common.t2iAdapter) zur gleichen Zeit wird nicht unterstützt.", - "ip_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.ipAdapter))", - "fill": "Füllen", - "addIPAdapter": "$t(common.ipAdapter) hinzufügen", - "colorMapDescription": "Erstelle eine Farbkarte von diesem Bild", - "t2i_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.t2iAdapter))", - "imageResolution": "Bild Auflösung", - "depthZoe": "Tiefe (Zoe)", - "colorMap": "Farbe", - "lowThreshold": "Niedrige Schwelle", - "highThreshold": "Hohe Schwelle", - "toggleControlNet": "Schalten ControlNet um", - "delete": "Löschen", - "controlAdapter_one": "Control Adapter", - "controlAdapter_other": "Control Adapters", - "colorMapTileSize": "Tile Größe", - "depthZoeDescription": "Tiefenmap erstellen mit Zoe", - "setControlImageDimensions": "Setze Control Bild Auflösung auf Breite/Höhe", - "handAndFace": "Hand und Gesicht", - "enableIPAdapter": "Aktiviere IP Adapter", - "resize": "Größe ändern", - "resetControlImage": "Zurücksetzen vom Referenz Bild", - "balanced": "Ausgewogen", - "prompt": "Prompt", - "resizeMode": "Größenänderungsmodus", - "processor": "Prozessor", - "saveControlImage": "Speichere Referenz Bild", - "safe": "Speichern", - "ipAdapterImageFallback": "Kein IP Adapter Bild ausgewählt", - "resetIPAdapterImage": "Zurücksetzen vom IP Adapter Bild", - "pidi": "PIDI", - "normalBae": "Normales BAE", - "mlsdDescription": "Minimalistischer Liniensegmentdetektor", - "openPoseDescription": "Schätzung der menschlichen Pose mit Openpose", - "control": "Kontrolle", - "coarse": "Coarse", - "crop": "Zuschneiden", - "pidiDescription": "PIDI-Bildverarbeitung", - "mediapipeFace": "Mediapipe Gesichter", - "mlsd": "M-LSD", - "controlMode": "Steuermodus", - "cannyDescription": "Canny Ecken Erkennung", - "lineart": "Lineart", - "lineartAnimeDescription": "Lineart-Verarbeitung im Anime-Stil", - "minConfidence": "Minimales Vertrauen", - "megaControl": "Mega-Kontrolle", - "autoConfigure": "Prozessor automatisch konfigurieren", - "normalBaeDescription": "Normale BAE-Verarbeitung", - "noneDescription": "Es wurde keine Verarbeitung angewendet", - "openPose": "Openpose", - "lineartAnime": "Lineart Anime", - "mediapipeFaceDescription": "Gesichtserkennung mit Mediapipe", - "canny": "Canny", - "hedDescription": "Ganzheitlich verschachtelte Kantenerkennung", - "scribble": "Scribble", - "maxFaces": "Maximal Anzahl Gesichter" - }, - "queue": { - "status": "Status", - "cancelTooltip": "Aktuellen Aufgabe abbrechen", - "queueEmpty": "Warteschlange leer", - "in_progress": "In Arbeit", - "queueFront": "An den Anfang der Warteschlange tun", - "completed": "Fertig", - "queueBack": "In die Warteschlange", - "clearFailed": "Probleme beim leeren der Warteschlange", - "clearSucceeded": "Warteschlange geleert", - "pause": "Pause", - "cancelSucceeded": "Auftrag abgebrochen", - "queue": "Warteschlange", - "batch": "Stapel", - "pending": "Ausstehend", - "clear": "Leeren", - "prune": "Leeren", - "total": "Gesamt", - "canceled": "Abgebrochen", - "clearTooltip": "Abbrechen und alle Aufträge leeren", - "current": "Aktuell", - "failed": "Fehler", - "cancelItem": "Abbruch Auftrag", - "next": "Nächste", - "cancel": "Abbruch", - "session": "Sitzung", - "queueTotal": "{{total}} Gesamt", - "resume": "Wieder aufnehmen", - "item": "Auftrag", - "notReady": "Warteschlange noch nicht bereit", - "batchValues": "Stapel Werte", - "queueCountPrediction": "{{predicted}} zur Warteschlange hinzufügen", - "queuedCount": "{{pending}} wartenden Elemente", - "clearQueueAlertDialog": "Die Warteschlange leeren, stoppt den aktuellen Prozess und leert die Warteschlange komplett.", - "completedIn": "Fertig in", - "cancelBatchSucceeded": "Stapel abgebrochen", - "cancelBatch": "Stapel stoppen", - "enqueueing": "Stapel in der Warteschlange", - "queueMaxExceeded": "Maximum von {{max_queue_size}} Elementen erreicht, würde {{skip}} Elemente überspringen", - "cancelBatchFailed": "Problem beim Abbruch vom Stapel", - "clearQueueAlertDialog2": "bist du sicher die Warteschlange zu leeren?", - "pruneSucceeded": "{{item_count}} abgeschlossene Elemente aus der Warteschlange entfernt", - "pauseSucceeded": "Prozessor angehalten", - "cancelFailed": "Problem beim Stornieren des Auftrags", - "pauseFailed": "Problem beim Anhalten des Prozessors", - "front": "Vorne", - "pruneTooltip": "Bereinigen Sie {{item_count}} abgeschlossene Aufträge", - "resumeFailed": "Problem beim wieder aufnehmen von Prozessor", - "pruneFailed": "Problem beim leeren der Warteschlange", - "pauseTooltip": "Pause von Prozessor", - "back": "Hinten", - "resumeSucceeded": "Prozessor wieder aufgenommen", - "resumeTooltip": "Prozessor wieder aufnehmen" - }, - "metadata": { - "negativePrompt": "Negativ Beschreibung", - "metadata": "Meta-Data", - "strength": "Bild zu Bild stärke", - "imageDetails": "Bild Details", - "model": "Modell", - "noImageDetails": "Keine Bild Details gefunden", - "cfgScale": "CFG-Skala", - "fit": "Bild zu Bild passen", - "height": "Höhe", - "noMetaData": "Keine Meta-Data gefunden", - "width": "Breite", - "createdBy": "Erstellt von", - "steps": "Schritte", - "seamless": "Nahtlos", - "positivePrompt": "Positiver Prompt", - "generationMode": "Generierungsmodus", - "Threshold": "Noise Schwelle", - "seed": "Samen", - "perlin": "Perlin Noise", - "hiresFix": "Optimierung für hohe Auflösungen", - "initImage": "Erstes Bild", - "variations": "Samengewichtspaare", - "vae": "VAE", - "workflow": "Arbeitsablauf", - "scheduler": "Scheduler", - "noRecallParameters": "Es wurden keine Parameter zum Abrufen gefunden" - }, - "popovers": { - "noiseUseCPU": { - "heading": "Nutze Prozessor rauschen" - }, - "paramModel": { - "heading": "Modell" - }, - "paramIterations": { - "heading": "Iterationen" - }, - "paramCFGScale": { - "heading": "CFG-Skala" - }, - "paramSteps": { - "heading": "Schritte" - }, - "lora": { - "heading": "LoRA Gewichte" - }, - "infillMethod": { - "heading": "Füllmethode" - }, - "paramVAE": { - "heading": "VAE" - } - }, - "ui": { - "lockRatio": "Verhältnis sperren", - "hideProgressImages": "Verstecke Prozess Bild", - "showProgressImages": "Zeige Prozess Bild" - }, - "invocationCache": { - "disable": "Deaktivieren", - "misses": "Cache Nötig", - "hits": "Cache Treffer", - "enable": "Aktivieren", - "clear": "Leeren", - "maxCacheSize": "Maximale Cache Größe", - "cacheSize": "Cache Größe" - }, - "embedding": { - "noMatchingEmbedding": "Keine passenden Embeddings", - "addEmbedding": "Embedding hinzufügen", - "incompatibleModel": "Inkompatibles Basismodell:" - }, - "nodes": { - "booleanPolymorphicDescription": "Eine Sammlung boolescher Werte.", - "colorFieldDescription": "Eine RGBA-Farbe.", - "conditioningCollection": "Konditionierungssammlung", - "addNode": "Knoten hinzufügen", - "conditioningCollectionDescription": "Konditionierung kann zwischen Knoten weitergegeben werden.", - "colorPolymorphic": "Farbpolymorph", - "colorCodeEdgesHelp": "Farbkodieren Sie Kanten entsprechend ihren verbundenen Feldern", - "animatedEdges": "Animierte Kanten", - "booleanCollectionDescription": "Eine Sammlung boolescher Werte.", - "colorField": "Farbe", - "collectionItem": "Objekt in Sammlung", - "animatedEdgesHelp": "Animieren Sie ausgewählte Kanten und Kanten, die mit ausgewählten Knoten verbunden sind", - "cannotDuplicateConnection": "Es können keine doppelten Verbindungen erstellt werden", - "booleanPolymorphic": "Boolesche Polymorphie", - "colorPolymorphicDescription": "Eine Sammlung von Farben.", - "clipFieldDescription": "Tokenizer- und text_encoder-Untermodelle.", - "clipField": "Clip", - "colorCollection": "Eine Sammlung von Farben.", - "boolean": "Boolesche Werte", - "currentImage": "Aktuelles Bild", - "booleanDescription": "Boolesche Werte sind wahr oder falsch.", - "collection": "Sammlung", - "cannotConnectInputToInput": "Eingang kann nicht mit Eingang verbunden werden", - "conditioningField": "Konditionierung", - "cannotConnectOutputToOutput": "Ausgang kann nicht mit Ausgang verbunden werden", - "booleanCollection": "Boolesche Werte Sammlung", - "cannotConnectToSelf": "Es kann keine Verbindung zu sich selbst hergestellt werden", - "colorCodeEdges": "Farbkodierte Kanten", - "addNodeToolTip": "Knoten hinzufügen (Umschalt+A, Leertaste)" - }, - "hrf": { - "enableHrf": "Aktivieren Sie die Korrektur für hohe Auflösungen", - "upscaleMethod": "Vergrößerungsmethoden", - "enableHrfTooltip": "Generieren Sie mit einer niedrigeren Anfangsauflösung, skalieren Sie auf die Basisauflösung hoch und führen Sie dann Image-to-Image aus.", - "metadata": { - "strength": "Hochauflösender Fix Stärke", - "enabled": "Hochauflösender Fix aktiviert", - "method": "Hochauflösender Fix Methode" - }, - "hrf": "Hochauflösender Fix", - "hrfStrength": "Hochauflösende Fix Stärke", - "strengthTooltip": "Niedrigere Werte führen zu weniger Details, wodurch potenzielle Artefakte reduziert werden können." - }, - "models": { - "noMatchingModels": "Keine passenden Modelle", - "loading": "lade", - "noMatchingLoRAs": "Keine passenden LoRAs", - "noLoRAsAvailable": "Keine LoRAs verfügbar", - "noModelsAvailable": "Keine Modelle verfügbar", - "selectModel": "Wählen ein Modell aus", - "noRefinerModelsInstalled": "Keine SDXL Refiner-Modelle installiert", - "noLoRAsInstalled": "Keine LoRAs installiert", - "selectLoRA": "Wählen ein LoRA aus" - } -} diff --git a/invokeai/frontend/web/dist/locales/en.json b/invokeai/frontend/web/dist/locales/en.json deleted file mode 100644 index e3dd84bf5c..0000000000 --- a/invokeai/frontend/web/dist/locales/en.json +++ /dev/null @@ -1,1558 +0,0 @@ -{ - "accessibility": { - "copyMetadataJson": "Copy metadata JSON", - "exitViewer": "Exit Viewer", - "flipHorizontally": "Flip Horizontally", - "flipVertically": "Flip Vertically", - "invokeProgressBar": "Invoke progress bar", - "menu": "Menu", - "mode": "Mode", - "modelSelect": "Model Select", - "modifyConfig": "Modify Config", - "nextImage": "Next Image", - "previousImage": "Previous Image", - "reset": "Reset", - "rotateClockwise": "Rotate Clockwise", - "rotateCounterClockwise": "Rotate Counter-Clockwise", - "showGalleryPanel": "Show Gallery Panel", - "showOptionsPanel": "Show Side Panel", - "toggleAutoscroll": "Toggle autoscroll", - "toggleLogViewer": "Toggle Log Viewer", - "uploadImage": "Upload Image", - "useThisParameter": "Use this parameter", - "zoomIn": "Zoom In", - "zoomOut": "Zoom Out", - "loadMore": "Load More" - }, - "boards": { - "addBoard": "Add Board", - "autoAddBoard": "Auto-Add Board", - "bottomMessage": "Deleting this board and its images will reset any features currently using them.", - "cancel": "Cancel", - "changeBoard": "Change Board", - "clearSearch": "Clear Search", - "deleteBoard": "Delete Board", - "deleteBoardAndImages": "Delete Board and Images", - "deleteBoardOnly": "Delete Board Only", - "deletedBoardsCannotbeRestored": "Deleted boards cannot be restored", - "loading": "Loading...", - "menuItemAutoAdd": "Auto-add to this Board", - "move": "Move", - "myBoard": "My Board", - "noMatching": "No matching Boards", - "searchBoard": "Search Boards...", - "selectBoard": "Select a Board", - "topMessage": "This board contains images used in the following features:", - "uncategorized": "Uncategorized", - "downloadBoard": "Download Board" - }, - "common": { - "accept": "Accept", - "advanced": "Advanced", - "areYouSure": "Are you sure?", - "auto": "Auto", - "back": "Back", - "batch": "Batch Manager", - "cancel": "Cancel", - "close": "Close", - "on": "On", - "checkpoint": "Checkpoint", - "communityLabel": "Community", - "controlNet": "ControlNet", - "controlAdapter": "Control Adapter", - "data": "Data", - "details": "Details", - "ipAdapter": "IP Adapter", - "t2iAdapter": "T2I Adapter", - "darkMode": "Dark Mode", - "discordLabel": "Discord", - "dontAskMeAgain": "Don't ask me again", - "generate": "Generate", - "githubLabel": "Github", - "hotkeysLabel": "Hotkeys", - "imagePrompt": "Image Prompt", - "imageFailedToLoad": "Unable to Load Image", - "img2img": "Image To Image", - "inpaint": "inpaint", - "langArabic": "العربية", - "langBrPortuguese": "Português do Brasil", - "langDutch": "Nederlands", - "langEnglish": "English", - "langFrench": "Français", - "langGerman": "German", - "langHebrew": "Hebrew", - "langItalian": "Italiano", - "langJapanese": "日本語", - "langKorean": "한국어", - "langPolish": "Polski", - "langPortuguese": "Português", - "langRussian": "Русский", - "langSimplifiedChinese": "简体中文", - "langSpanish": "Español", - "languagePickerLabel": "Language", - "langUkranian": "Украї́нська", - "lightMode": "Light Mode", - "linear": "Linear", - "load": "Load", - "loading": "Loading", - "loadingInvokeAI": "Loading Invoke AI", - "learnMore": "Learn More", - "modelManager": "Model Manager", - "nodeEditor": "Node Editor", - "nodes": "Workflow Editor", - "nodesDesc": "A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature.", - "openInNewTab": "Open in New Tab", - "outpaint": "outpaint", - "outputs": "Outputs", - "postProcessDesc1": "Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer.", - "postProcessDesc2": "A dedicated UI will be released soon to facilitate more advanced post processing workflows.", - "postProcessDesc3": "The Invoke AI Command Line Interface offers various other features including Embiggen.", - "postprocessing": "Post Processing", - "postProcessing": "Post Processing", - "random": "Random", - "reportBugLabel": "Report Bug", - "safetensors": "Safetensors", - "settingsLabel": "Settings", - "simple": "Simple", - "statusConnected": "Connected", - "statusConvertingModel": "Converting Model", - "statusDisconnected": "Disconnected", - "statusError": "Error", - "statusGenerating": "Generating", - "statusGeneratingImageToImage": "Generating Image To Image", - "statusGeneratingInpainting": "Generating Inpainting", - "statusGeneratingOutpainting": "Generating Outpainting", - "statusGeneratingTextToImage": "Generating Text To Image", - "statusGenerationComplete": "Generation Complete", - "statusIterationComplete": "Iteration Complete", - "statusLoadingModel": "Loading Model", - "statusMergedModels": "Models Merged", - "statusMergingModels": "Merging Models", - "statusModelChanged": "Model Changed", - "statusModelConverted": "Model Converted", - "statusPreparing": "Preparing", - "statusProcessing": "Processing", - "statusProcessingCanceled": "Processing Canceled", - "statusProcessingComplete": "Processing Complete", - "statusRestoringFaces": "Restoring Faces", - "statusRestoringFacesCodeFormer": "Restoring Faces (CodeFormer)", - "statusRestoringFacesGFPGAN": "Restoring Faces (GFPGAN)", - "statusSavingImage": "Saving Image", - "statusUpscaling": "Upscaling", - "statusUpscalingESRGAN": "Upscaling (ESRGAN)", - "template": "Template", - "training": "Training", - "trainingDesc1": "A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface.", - "trainingDesc2": "InvokeAI already supports training custom embeddourings using Textual Inversion using the main script.", - "txt2img": "Text To Image", - "unifiedCanvas": "Unified Canvas", - "upload": "Upload" - }, - "controlnet": { - "controlAdapter_one": "Control Adapter", - "controlAdapter_other": "Control Adapters", - "controlnet": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.controlNet))", - "ip_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.ipAdapter))", - "t2i_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.t2iAdapter))", - "addControlNet": "Add $t(common.controlNet)", - "addIPAdapter": "Add $t(common.ipAdapter)", - "addT2IAdapter": "Add $t(common.t2iAdapter)", - "controlNetEnabledT2IDisabled": "$t(common.controlNet) enabled, $t(common.t2iAdapter)s disabled", - "t2iEnabledControlNetDisabled": "$t(common.t2iAdapter) enabled, $t(common.controlNet)s disabled", - "controlNetT2IMutexDesc": "$t(common.controlNet) and $t(common.t2iAdapter) at same time is currently unsupported.", - "amult": "a_mult", - "autoConfigure": "Auto configure processor", - "balanced": "Balanced", - "beginEndStepPercent": "Begin / End Step Percentage", - "bgth": "bg_th", - "canny": "Canny", - "cannyDescription": "Canny edge detection", - "colorMap": "Color", - "colorMapDescription": "Generates a color map from the image", - "coarse": "Coarse", - "contentShuffle": "Content Shuffle", - "contentShuffleDescription": "Shuffles the content in an image", - "control": "Control", - "controlMode": "Control Mode", - "crop": "Crop", - "delete": "Delete", - "depthMidas": "Depth (Midas)", - "depthMidasDescription": "Depth map generation using Midas", - "depthZoe": "Depth (Zoe)", - "depthZoeDescription": "Depth map generation using Zoe", - "detectResolution": "Detect Resolution", - "duplicate": "Duplicate", - "enableControlnet": "Enable ControlNet", - "f": "F", - "fill": "Fill", - "h": "H", - "handAndFace": "Hand and Face", - "hed": "HED", - "hedDescription": "Holistically-Nested Edge Detection", - "hideAdvanced": "Hide Advanced", - "highThreshold": "High Threshold", - "imageResolution": "Image Resolution", - "colorMapTileSize": "Tile Size", - "importImageFromCanvas": "Import Image From Canvas", - "importMaskFromCanvas": "Import Mask From Canvas", - "incompatibleBaseModel": "Incompatible base model:", - "lineart": "Lineart", - "lineartAnime": "Lineart Anime", - "lineartAnimeDescription": "Anime-style lineart processing", - "lineartDescription": "Converts image to lineart", - "lowThreshold": "Low Threshold", - "maxFaces": "Max Faces", - "mediapipeFace": "Mediapipe Face", - "mediapipeFaceDescription": "Face detection using Mediapipe", - "megaControl": "Mega Control", - "minConfidence": "Min Confidence", - "mlsd": "M-LSD", - "mlsdDescription": "Minimalist Line Segment Detector", - "none": "None", - "noneDescription": "No processing applied", - "normalBae": "Normal BAE", - "normalBaeDescription": "Normal BAE processing", - "openPose": "Openpose", - "openPoseDescription": "Human pose estimation using Openpose", - "pidi": "PIDI", - "pidiDescription": "PIDI image processing", - "processor": "Processor", - "prompt": "Prompt", - "resetControlImage": "Reset Control Image", - "resize": "Resize", - "resizeMode": "Resize Mode", - "safe": "Safe", - "saveControlImage": "Save Control Image", - "scribble": "scribble", - "selectModel": "Select a model", - "setControlImageDimensions": "Set Control Image Dimensions To W/H", - "showAdvanced": "Show Advanced", - "toggleControlNet": "Toggle this ControlNet", - "unstarImage": "Unstar Image", - "w": "W", - "weight": "Weight", - "enableIPAdapter": "Enable IP Adapter", - "ipAdapterModel": "Adapter Model", - "resetIPAdapterImage": "Reset IP Adapter Image", - "ipAdapterImageFallback": "No IP Adapter Image Selected" - }, - "hrf": { - "hrf": "High Resolution Fix", - "enableHrf": "Enable High Resolution Fix", - "enableHrfTooltip": "Generate with a lower initial resolution, upscale to the base resolution, then run Image-to-Image.", - "upscaleMethod": "Upscale Method", - "hrfStrength": "High Resolution Fix Strength", - "strengthTooltip": "Lower values result in fewer details, which may reduce potential artifacts.", - "metadata": { - "enabled": "High Resolution Fix Enabled", - "strength": "High Resolution Fix Strength", - "method": "High Resolution Fix Method" - } - }, - "embedding": { - "addEmbedding": "Add Embedding", - "incompatibleModel": "Incompatible base model:", - "noMatchingEmbedding": "No matching Embeddings" - }, - "queue": { - "queue": "Queue", - "queueFront": "Add to Front of Queue", - "queueBack": "Add to Queue", - "queueCountPrediction": "Add {{predicted}} to Queue", - "queueMaxExceeded": "Max of {{max_queue_size}} exceeded, would skip {{skip}}", - "queuedCount": "{{pending}} Pending", - "queueTotal": "{{total}} Total", - "queueEmpty": "Queue Empty", - "enqueueing": "Queueing Batch", - "resume": "Resume", - "resumeTooltip": "Resume Processor", - "resumeSucceeded": "Processor Resumed", - "resumeFailed": "Problem Resuming Processor", - "pause": "Pause", - "pauseTooltip": "Pause Processor", - "pauseSucceeded": "Processor Paused", - "pauseFailed": "Problem Pausing Processor", - "cancel": "Cancel", - "cancelTooltip": "Cancel Current Item", - "cancelSucceeded": "Item Canceled", - "cancelFailed": "Problem Canceling Item", - "prune": "Prune", - "pruneTooltip": "Prune {{item_count}} Completed Items", - "pruneSucceeded": "Pruned {{item_count}} Completed Items from Queue", - "pruneFailed": "Problem Pruning Queue", - "clear": "Clear", - "clearTooltip": "Cancel and Clear All Items", - "clearSucceeded": "Queue Cleared", - "clearFailed": "Problem Clearing Queue", - "cancelBatch": "Cancel Batch", - "cancelItem": "Cancel Item", - "cancelBatchSucceeded": "Batch Canceled", - "cancelBatchFailed": "Problem Canceling Batch", - "clearQueueAlertDialog": "Clearing the queue immediately cancels any processing items and clears the queue entirely.", - "clearQueueAlertDialog2": "Are you sure you want to clear the queue?", - "current": "Current", - "next": "Next", - "status": "Status", - "total": "Total", - "time": "Time", - "pending": "Pending", - "in_progress": "In Progress", - "completed": "Completed", - "failed": "Failed", - "canceled": "Canceled", - "completedIn": "Completed in", - "batch": "Batch", - "batchFieldValues": "Batch Field Values", - "item": "Item", - "session": "Session", - "batchValues": "Batch Values", - "notReady": "Unable to Queue", - "batchQueued": "Batch Queued", - "batchQueuedDesc_one": "Added {{count}} sessions to {{direction}} of queue", - "batchQueuedDesc_other": "Added {{count}} sessions to {{direction}} of queue", - "front": "front", - "back": "back", - "batchFailedToQueue": "Failed to Queue Batch", - "graphQueued": "Graph queued", - "graphFailedToQueue": "Failed to queue graph" - }, - "invocationCache": { - "invocationCache": "Invocation Cache", - "cacheSize": "Cache Size", - "maxCacheSize": "Max Cache Size", - "hits": "Cache Hits", - "misses": "Cache Misses", - "clear": "Clear", - "clearSucceeded": "Invocation Cache Cleared", - "clearFailed": "Problem Clearing Invocation Cache", - "enable": "Enable", - "enableSucceeded": "Invocation Cache Enabled", - "enableFailed": "Problem Enabling Invocation Cache", - "disable": "Disable", - "disableSucceeded": "Invocation Cache Disabled", - "disableFailed": "Problem Disabling Invocation Cache" - }, - "gallery": { - "allImagesLoaded": "All Images Loaded", - "assets": "Assets", - "autoAssignBoardOnClick": "Auto-Assign Board on Click", - "autoSwitchNewImages": "Auto-Switch to New Images", - "copy": "Copy", - "currentlyInUse": "This image is currently in use in the following features:", - "deleteImage": "Delete Image", - "deleteImageBin": "Deleted images will be sent to your operating system's Bin.", - "deleteImagePermanent": "Deleted images cannot be restored.", - "download": "Download", - "featuresWillReset": "If you delete this image, those features will immediately be reset.", - "galleryImageResetSize": "Reset Size", - "galleryImageSize": "Image Size", - "gallerySettings": "Gallery Settings", - "generations": "Generations", - "images": "Images", - "loading": "Loading", - "loadMore": "Load More", - "maintainAspectRatio": "Maintain Aspect Ratio", - "noImageSelected": "No Image Selected", - "noImagesInGallery": "No Images to Display", - "setCurrentImage": "Set as Current Image", - "showGenerations": "Show Generations", - "showUploads": "Show Uploads", - "singleColumnLayout": "Single Column Layout", - "unableToLoad": "Unable to load Gallery", - "uploads": "Uploads", - "downloadSelection": "Download Selection", - "preparingDownload": "Preparing Download", - "preparingDownloadFailed": "Problem Preparing Download" - }, - "hotkeys": { - "acceptStagingImage": { - "desc": "Accept Current Staging Area Image", - "title": "Accept Staging Image" - }, - "addNodes": { - "desc": "Opens the add node menu", - "title": "Add Nodes" - }, - "appHotkeys": "App Hotkeys", - "cancel": { - "desc": "Cancel image generation", - "title": "Cancel" - }, - "changeTabs": { - "desc": "Switch to another workspace", - "title": "Change Tabs" - }, - "clearMask": { - "desc": "Clear the entire mask", - "title": "Clear Mask" - }, - "closePanels": { - "desc": "Closes open panels", - "title": "Close Panels" - }, - "colorPicker": { - "desc": "Selects the canvas color picker", - "title": "Select Color Picker" - }, - "consoleToggle": { - "desc": "Open and close console", - "title": "Console Toggle" - }, - "copyToClipboard": { - "desc": "Copy current canvas to clipboard", - "title": "Copy to Clipboard" - }, - "decreaseBrushOpacity": { - "desc": "Decreases the opacity of the canvas brush", - "title": "Decrease Brush Opacity" - }, - "decreaseBrushSize": { - "desc": "Decreases the size of the canvas brush/eraser", - "title": "Decrease Brush Size" - }, - "decreaseGalleryThumbSize": { - "desc": "Decreases gallery thumbnails size", - "title": "Decrease Gallery Image Size" - }, - "deleteImage": { - "desc": "Delete the current image", - "title": "Delete Image" - }, - "downloadImage": { - "desc": "Download current canvas", - "title": "Download Image" - }, - "eraseBoundingBox": { - "desc": "Erases the bounding box area", - "title": "Erase Bounding Box" - }, - "fillBoundingBox": { - "desc": "Fills the bounding box with brush color", - "title": "Fill Bounding Box" - }, - "focusPrompt": { - "desc": "Focus the prompt input area", - "title": "Focus Prompt" - }, - "galleryHotkeys": "Gallery Hotkeys", - "generalHotkeys": "General Hotkeys", - "hideMask": { - "desc": "Hide and unhide mask", - "title": "Hide Mask" - }, - "increaseBrushOpacity": { - "desc": "Increases the opacity of the canvas brush", - "title": "Increase Brush Opacity" - }, - "increaseBrushSize": { - "desc": "Increases the size of the canvas brush/eraser", - "title": "Increase Brush Size" - }, - "increaseGalleryThumbSize": { - "desc": "Increases gallery thumbnails size", - "title": "Increase Gallery Image Size" - }, - "invoke": { - "desc": "Generate an image", - "title": "Invoke" - }, - "keyboardShortcuts": "Keyboard Shortcuts", - "maximizeWorkSpace": { - "desc": "Close panels and maximize work area", - "title": "Maximize Workspace" - }, - "mergeVisible": { - "desc": "Merge all visible layers of canvas", - "title": "Merge Visible" - }, - "moveTool": { - "desc": "Allows canvas navigation", - "title": "Move Tool" - }, - "nextImage": { - "desc": "Display the next image in gallery", - "title": "Next Image" - }, - "nextStagingImage": { - "desc": "Next Staging Area Image", - "title": "Next Staging Image" - }, - "nodesHotkeys": "Nodes Hotkeys", - "pinOptions": { - "desc": "Pin the options panel", - "title": "Pin Options" - }, - "previousImage": { - "desc": "Display the previous image in gallery", - "title": "Previous Image" - }, - "previousStagingImage": { - "desc": "Previous Staging Area Image", - "title": "Previous Staging Image" - }, - "quickToggleMove": { - "desc": "Temporarily toggles Move mode", - "title": "Quick Toggle Move" - }, - "redoStroke": { - "desc": "Redo a brush stroke", - "title": "Redo Stroke" - }, - "resetView": { - "desc": "Reset Canvas View", - "title": "Reset View" - }, - "restoreFaces": { - "desc": "Restore the current image", - "title": "Restore Faces" - }, - "saveToGallery": { - "desc": "Save current canvas to gallery", - "title": "Save To Gallery" - }, - "selectBrush": { - "desc": "Selects the canvas brush", - "title": "Select Brush" - }, - "selectEraser": { - "desc": "Selects the canvas eraser", - "title": "Select Eraser" - }, - "sendToImageToImage": { - "desc": "Send current image to Image to Image", - "title": "Send To Image To Image" - }, - "setParameters": { - "desc": "Use all parameters of the current image", - "title": "Set Parameters" - }, - "setPrompt": { - "desc": "Use the prompt of the current image", - "title": "Set Prompt" - }, - "setSeed": { - "desc": "Use the seed of the current image", - "title": "Set Seed" - }, - "showHideBoundingBox": { - "desc": "Toggle visibility of bounding box", - "title": "Show/Hide Bounding Box" - }, - "showInfo": { - "desc": "Show metadata info of the current image", - "title": "Show Info" - }, - "toggleGallery": { - "desc": "Open and close the gallery drawer", - "title": "Toggle Gallery" - }, - "toggleGalleryPin": { - "desc": "Pins and unpins the gallery to the UI", - "title": "Toggle Gallery Pin" - }, - "toggleLayer": { - "desc": "Toggles mask/base layer selection", - "title": "Toggle Layer" - }, - "toggleOptions": { - "desc": "Open and close the options panel", - "title": "Toggle Options" - }, - "toggleSnap": { - "desc": "Toggles Snap to Grid", - "title": "Toggle Snap" - }, - "toggleViewer": { - "desc": "Open and close Image Viewer", - "title": "Toggle Viewer" - }, - "undoStroke": { - "desc": "Undo a brush stroke", - "title": "Undo Stroke" - }, - "unifiedCanvasHotkeys": "Unified Canvas Hotkeys", - "upscale": { - "desc": "Upscale the current image", - "title": "Upscale" - } - }, - "metadata": { - "cfgScale": "CFG scale", - "createdBy": "Created By", - "fit": "Image to image fit", - "generationMode": "Generation Mode", - "height": "Height", - "hiresFix": "High Resolution Optimization", - "imageDetails": "Image Details", - "initImage": "Initial image", - "metadata": "Metadata", - "model": "Model", - "negativePrompt": "Negative Prompt", - "noImageDetails": "No image details found", - "noMetaData": "No metadata found", - "noRecallParameters": "No parameters to recall found", - "perlin": "Perlin Noise", - "positivePrompt": "Positive Prompt", - "recallParameters": "Recall Parameters", - "scheduler": "Scheduler", - "seamless": "Seamless", - "seed": "Seed", - "steps": "Steps", - "strength": "Image to image strength", - "Threshold": "Noise Threshold", - "variations": "Seed-weight pairs", - "vae": "VAE", - "width": "Width", - "workflow": "Workflow" - }, - "modelManager": { - "active": "active", - "addCheckpointModel": "Add Checkpoint / Safetensor Model", - "addDifference": "Add Difference", - "addDiffuserModel": "Add Diffusers", - "addManually": "Add Manually", - "addModel": "Add Model", - "addNew": "Add New", - "addNewModel": "Add New Model", - "addSelected": "Add Selected", - "advanced": "Advanced", - "allModels": "All Models", - "alpha": "Alpha", - "availableModels": "Available Models", - "baseModel": "Base Model", - "cached": "cached", - "cannotUseSpaces": "Cannot Use Spaces", - "checkpointFolder": "Checkpoint Folder", - "checkpointModels": "Checkpoints", - "checkpointOrSafetensors": "$t(common.checkpoint) / $t(common.safetensors)", - "clearCheckpointFolder": "Clear Checkpoint Folder", - "closeAdvanced": "Close Advanced", - "config": "Config", - "configValidationMsg": "Path to the config file of your model.", - "convert": "Convert", - "convertingModelBegin": "Converting Model. Please wait.", - "convertToDiffusers": "Convert To Diffusers", - "convertToDiffusersHelpText1": "This model will be converted to the 🧨 Diffusers format.", - "convertToDiffusersHelpText2": "This process will replace your Model Manager entry with the Diffusers version of the same model.", - "convertToDiffusersHelpText3": "Your checkpoint file on disk WILL be deleted if it is in InvokeAI root folder. If it is in a custom location, then it WILL NOT be deleted.", - "convertToDiffusersHelpText4": "This is a one time process only. It might take around 30s-60s depending on the specifications of your computer.", - "convertToDiffusersHelpText5": "Please make sure you have enough disk space. Models generally vary between 2GB-7GB in size.", - "convertToDiffusersHelpText6": "Do you wish to convert this model?", - "convertToDiffusersSaveLocation": "Save Location", - "custom": "Custom", - "customConfig": "Custom Config", - "customConfigFileLocation": "Custom Config File Location", - "customSaveLocation": "Custom Save Location", - "delete": "Delete", - "deleteConfig": "Delete Config", - "deleteModel": "Delete Model", - "deleteMsg1": "Are you sure you want to delete this model from InvokeAI?", - "deleteMsg2": "This WILL delete the model from disk if it is in the InvokeAI root folder. If you are using a custom location, then the model WILL NOT be deleted from disk.", - "description": "Description", - "descriptionValidationMsg": "Add a description for your model", - "deselectAll": "Deselect All", - "diffusersModels": "Diffusers", - "findModels": "Find Models", - "formMessageDiffusersModelLocation": "Diffusers Model Location", - "formMessageDiffusersModelLocationDesc": "Please enter at least one.", - "formMessageDiffusersVAELocation": "VAE Location", - "formMessageDiffusersVAELocationDesc": "If not provided, InvokeAI will look for the VAE file inside the model location given above.", - "height": "Height", - "heightValidationMsg": "Default height of your model.", - "ignoreMismatch": "Ignore Mismatches Between Selected Models", - "importModels": "Import Models", - "inpainting": "v1 Inpainting", - "interpolationType": "Interpolation Type", - "inverseSigmoid": "Inverse Sigmoid", - "invokeAIFolder": "Invoke AI Folder", - "invokeRoot": "InvokeAI folder", - "load": "Load", - "loraModels": "LoRAs", - "manual": "Manual", - "merge": "Merge", - "mergedModelCustomSaveLocation": "Custom Path", - "mergedModelName": "Merged Model Name", - "mergedModelSaveLocation": "Save Location", - "mergeModels": "Merge Models", - "model": "Model", - "modelAdded": "Model Added", - "modelConversionFailed": "Model Conversion Failed", - "modelConverted": "Model Converted", - "modelDeleted": "Model Deleted", - "modelDeleteFailed": "Failed to delete model", - "modelEntryDeleted": "Model Entry Deleted", - "modelExists": "Model Exists", - "modelLocation": "Model Location", - "modelLocationValidationMsg": "Provide the path to a local folder where your Diffusers Model is stored", - "modelManager": "Model Manager", - "modelMergeAlphaHelp": "Alpha controls blend strength for the models. Lower alpha values lead to lower influence of the second model.", - "modelMergeHeaderHelp1": "You can merge up to three different models to create a blend that suits your needs.", - "modelMergeHeaderHelp2": "Only Diffusers are available for merging. If you want to merge a checkpoint model, please convert it to Diffusers first.", - "modelMergeInterpAddDifferenceHelp": "In this mode, Model 3 is first subtracted from Model 2. The resulting version is blended with Model 1 with the alpha rate set above.", - "modelOne": "Model 1", - "modelsFound": "Models Found", - "modelsMerged": "Models Merged", - "modelsMergeFailed": "Model Merge Failed", - "modelsSynced": "Models Synced", - "modelSyncFailed": "Model Sync Failed", - "modelThree": "Model 3", - "modelTwo": "Model 2", - "modelType": "Model Type", - "modelUpdated": "Model Updated", - "modelUpdateFailed": "Model Update Failed", - "name": "Name", - "nameValidationMsg": "Enter a name for your model", - "noCustomLocationProvided": "No Custom Location Provided", - "noModels": "No Models Found", - "noModelSelected": "No Model Selected", - "noModelsFound": "No Models Found", - "none": "none", - "notLoaded": "not loaded", - "oliveModels": "Olives", - "onnxModels": "Onnx", - "pathToCustomConfig": "Path To Custom Config", - "pickModelType": "Pick Model Type", - "predictionType": "Prediction Type (for Stable Diffusion 2.x Models and occasional Stable Diffusion 1.x Models)", - "quickAdd": "Quick Add", - "repo_id": "Repo ID", - "repoIDValidationMsg": "Online repository of your model", - "safetensorModels": "SafeTensors", - "sameFolder": "Same folder", - "scanAgain": "Scan Again", - "scanForModels": "Scan For Models", - "search": "Search", - "selectAll": "Select All", - "selectAndAdd": "Select and Add Models Listed Below", - "selected": "Selected", - "selectFolder": "Select Folder", - "selectModel": "Select Model", - "settings": "Settings", - "showExisting": "Show Existing", - "sigmoid": "Sigmoid", - "simpleModelDesc": "Provide a path to a local Diffusers model, local checkpoint / safetensors model a HuggingFace Repo ID, or a checkpoint/diffusers model URL.", - "statusConverting": "Converting", - "syncModels": "Sync Models", - "syncModelsDesc": "If your models are out of sync with the backend, you can refresh them up using this option. This is generally handy in cases where you manually update your models.yaml file or add models to the InvokeAI root folder after the application has booted.", - "updateModel": "Update Model", - "useCustomConfig": "Use Custom Config", - "v1": "v1", - "v2_768": "v2 (768px)", - "v2_base": "v2 (512px)", - "vae": "VAE", - "vaeLocation": "VAE Location", - "vaeLocationValidationMsg": "Path to where your VAE is located.", - "vaePrecision": "VAE Precision", - "vaeRepoID": "VAE Repo ID", - "vaeRepoIDValidationMsg": "Online repository of your VAE", - "variant": "Variant", - "weightedSum": "Weighted Sum", - "width": "Width", - "widthValidationMsg": "Default width of your model." - }, - "models": { - "addLora": "Add LoRA", - "esrganModel": "ESRGAN Model", - "loading": "loading", - "noLoRAsAvailable": "No LoRAs available", - "noMatchingLoRAs": "No matching LoRAs", - "noMatchingModels": "No matching Models", - "noModelsAvailable": "No models available", - "selectLoRA": "Select a LoRA", - "selectModel": "Select a Model", - "noLoRAsInstalled": "No LoRAs installed", - "noRefinerModelsInstalled": "No SDXL Refiner models installed" - }, - "nodes": { - "addNode": "Add Node", - "addNodeToolTip": "Add Node (Shift+A, Space)", - "animatedEdges": "Animated Edges", - "animatedEdgesHelp": "Animate selected edges and edges connected to selected nodes", - "boardField": "Board", - "boardFieldDescription": "A gallery board", - "boolean": "Booleans", - "booleanCollection": "Boolean Collection", - "booleanCollectionDescription": "A collection of booleans.", - "booleanDescription": "Booleans are true or false.", - "booleanPolymorphic": "Boolean Polymorphic", - "booleanPolymorphicDescription": "A collection of booleans.", - "cannotConnectInputToInput": "Cannot connect input to input", - "cannotConnectOutputToOutput": "Cannot connect output to output", - "cannotConnectToSelf": "Cannot connect to self", - "cannotDuplicateConnection": "Cannot create duplicate connections", - "clipField": "Clip", - "clipFieldDescription": "Tokenizer and text_encoder submodels.", - "collection": "Collection", - "collectionDescription": "TODO", - "collectionItem": "Collection Item", - "collectionItemDescription": "TODO", - "colorCodeEdges": "Color-Code Edges", - "colorCodeEdgesHelp": "Color-code edges according to their connected fields", - "colorCollection": "A collection of colors.", - "colorCollectionDescription": "TODO", - "colorField": "Color", - "colorFieldDescription": "A RGBA color.", - "colorPolymorphic": "Color Polymorphic", - "colorPolymorphicDescription": "A collection of colors.", - "conditioningCollection": "Conditioning Collection", - "conditioningCollectionDescription": "Conditioning may be passed between nodes.", - "conditioningField": "Conditioning", - "conditioningFieldDescription": "Conditioning may be passed between nodes.", - "conditioningPolymorphic": "Conditioning Polymorphic", - "conditioningPolymorphicDescription": "Conditioning may be passed between nodes.", - "connectionWouldCreateCycle": "Connection would create a cycle", - "controlCollection": "Control Collection", - "controlCollectionDescription": "Control info passed between nodes.", - "controlField": "Control", - "controlFieldDescription": "Control info passed between nodes.", - "currentImage": "Current Image", - "currentImageDescription": "Displays the current image in the Node Editor", - "denoiseMaskField": "Denoise Mask", - "denoiseMaskFieldDescription": "Denoise Mask may be passed between nodes", - "doesNotExist": "does not exist", - "downloadWorkflow": "Download Workflow JSON", - "edge": "Edge", - "enum": "Enum", - "enumDescription": "Enums are values that may be one of a number of options.", - "executionStateCompleted": "Completed", - "executionStateError": "Error", - "executionStateInProgress": "In Progress", - "fieldTypesMustMatch": "Field types must match", - "fitViewportNodes": "Fit View", - "float": "Float", - "floatCollection": "Float Collection", - "floatCollectionDescription": "A collection of floats.", - "floatDescription": "Floats are numbers with a decimal point.", - "floatPolymorphic": "Float Polymorphic", - "floatPolymorphicDescription": "A collection of floats.", - "fullyContainNodes": "Fully Contain Nodes to Select", - "fullyContainNodesHelp": "Nodes must be fully inside the selection box to be selected", - "hideGraphNodes": "Hide Graph Overlay", - "hideLegendNodes": "Hide Field Type Legend", - "hideMinimapnodes": "Hide MiniMap", - "imageCollection": "Image Collection", - "imageCollectionDescription": "A collection of images.", - "imageField": "Image", - "imageFieldDescription": "Images may be passed between nodes.", - "imagePolymorphic": "Image Polymorphic", - "imagePolymorphicDescription": "A collection of images.", - "inputField": "Input Field", - "inputFields": "Input Fields", - "inputMayOnlyHaveOneConnection": "Input may only have one connection", - "inputNode": "Input Node", - "integer": "Integer", - "integerCollection": "Integer Collection", - "integerCollectionDescription": "A collection of integers.", - "integerDescription": "Integers are whole numbers, without a decimal point.", - "integerPolymorphic": "Integer Polymorphic", - "integerPolymorphicDescription": "A collection of integers.", - "invalidOutputSchema": "Invalid output schema", - "ipAdapter": "IP-Adapter", - "ipAdapterCollection": "IP-Adapters Collection", - "ipAdapterCollectionDescription": "A collection of IP-Adapters.", - "ipAdapterDescription": "An Image Prompt Adapter (IP-Adapter).", - "ipAdapterModel": "IP-Adapter Model", - "ipAdapterModelDescription": "IP-Adapter Model Field", - "ipAdapterPolymorphic": "IP-Adapter Polymorphic", - "ipAdapterPolymorphicDescription": "A collection of IP-Adapters.", - "latentsCollection": "Latents Collection", - "latentsCollectionDescription": "Latents may be passed between nodes.", - "latentsField": "Latents", - "latentsFieldDescription": "Latents may be passed between nodes.", - "latentsPolymorphic": "Latents Polymorphic", - "latentsPolymorphicDescription": "Latents may be passed between nodes.", - "loadingNodes": "Loading Nodes...", - "loadWorkflow": "Load Workflow", - "noWorkflow": "No Workflow", - "loRAModelField": "LoRA", - "loRAModelFieldDescription": "TODO", - "mainModelField": "Model", - "mainModelFieldDescription": "TODO", - "maybeIncompatible": "May be Incompatible With Installed", - "mismatchedVersion": "Has Mismatched Version", - "missingCanvaInitImage": "Missing canvas init image", - "missingCanvaInitMaskImages": "Missing canvas init and mask images", - "missingTemplate": "Missing Template", - "noConnectionData": "No connection data", - "noConnectionInProgress": "No connection in progress", - "node": "Node", - "nodeOutputs": "Node Outputs", - "nodeSearch": "Search for nodes", - "nodeTemplate": "Node Template", - "nodeType": "Node Type", - "noFieldsLinearview": "No fields added to Linear View", - "noFieldType": "No field type", - "noImageFoundState": "No initial image found in state", - "noMatchingNodes": "No matching nodes", - "noNodeSelected": "No node selected", - "nodeOpacity": "Node Opacity", - "noOutputRecorded": "No outputs recorded", - "noOutputSchemaName": "No output schema name found in ref object", - "notes": "Notes", - "notesDescription": "Add notes about your workflow", - "oNNXModelField": "ONNX Model", - "oNNXModelFieldDescription": "ONNX model field.", - "outputField": "Output Field", - "outputFields": "Output Fields", - "outputNode": "Output node", - "outputSchemaNotFound": "Output schema not found", - "pickOne": "Pick One", - "problemReadingMetadata": "Problem reading metadata from image", - "problemReadingWorkflow": "Problem reading workflow from image", - "problemSettingTitle": "Problem Setting Title", - "reloadNodeTemplates": "Reload Node Templates", - "removeLinearView": "Remove from Linear View", - "resetWorkflow": "Reset Workflow", - "resetWorkflowDesc": "Are you sure you want to reset this workflow?", - "resetWorkflowDesc2": "Resetting the workflow will clear all nodes, edges and workflow details.", - "scheduler": "Scheduler", - "schedulerDescription": "TODO", - "sDXLMainModelField": "SDXL Model", - "sDXLMainModelFieldDescription": "SDXL model field.", - "sDXLRefinerModelField": "Refiner Model", - "sDXLRefinerModelFieldDescription": "TODO", - "showGraphNodes": "Show Graph Overlay", - "showLegendNodes": "Show Field Type Legend", - "showMinimapnodes": "Show MiniMap", - "skipped": "Skipped", - "skippedReservedInput": "Skipped reserved input field", - "skippedReservedOutput": "Skipped reserved output field", - "skippingInputNoTemplate": "Skipping input field with no template", - "skippingReservedFieldType": "Skipping reserved field type", - "skippingUnknownInputType": "Skipping unknown input field type", - "skippingUnknownOutputType": "Skipping unknown output field type", - "snapToGrid": "Snap to Grid", - "snapToGridHelp": "Snap nodes to grid when moved", - "sourceNode": "Source node", - "string": "String", - "stringCollection": "String Collection", - "stringCollectionDescription": "A collection of strings.", - "stringDescription": "Strings are text.", - "stringPolymorphic": "String Polymorphic", - "stringPolymorphicDescription": "A collection of strings.", - "unableToLoadWorkflow": "Unable to Validate Workflow", - "unableToParseEdge": "Unable to parse edge", - "unableToParseNode": "Unable to parse node", - "unableToValidateWorkflow": "Unable to Validate Workflow", - "uNetField": "UNet", - "uNetFieldDescription": "UNet submodel.", - "unhandledInputProperty": "Unhandled input property", - "unhandledOutputProperty": "Unhandled output property", - "unknownField": "Unknown Field", - "unknownNode": "Unknown Node", - "unknownTemplate": "Unknown Template", - "unkownInvocation": "Unknown Invocation type", - "updateNode": "Update Node", - "updateAllNodes": "Update All Nodes", - "updateApp": "Update App", - "unableToUpdateNodes_one": "Unable to update {{count}} node", - "unableToUpdateNodes_other": "Unable to update {{count}} nodes", - "vaeField": "Vae", - "vaeFieldDescription": "Vae submodel.", - "vaeModelField": "VAE", - "vaeModelFieldDescription": "TODO", - "validateConnections": "Validate Connections and Graph", - "validateConnectionsHelp": "Prevent invalid connections from being made, and invalid graphs from being invoked", - "version": "Version", - "versionUnknown": " Version Unknown", - "workflow": "Workflow", - "workflowAuthor": "Author", - "workflowContact": "Contact", - "workflowDescription": "Short Description", - "workflowName": "Name", - "workflowNotes": "Notes", - "workflowSettings": "Workflow Editor Settings", - "workflowTags": "Tags", - "workflowValidation": "Workflow Validation Error", - "workflowVersion": "Version", - "zoomInNodes": "Zoom In", - "zoomOutNodes": "Zoom Out" - }, - "parameters": { - "aspectRatio": "Aspect Ratio", - "aspectRatioFree": "Free", - "boundingBoxHeader": "Bounding Box", - "boundingBoxHeight": "Bounding Box Height", - "boundingBoxWidth": "Bounding Box Width", - "cancel": { - "cancel": "Cancel", - "immediate": "Cancel immediately", - "isScheduled": "Canceling", - "schedule": "Cancel after current iteration", - "setType": "Set cancel type" - }, - "cfgScale": "CFG Scale", - "clipSkip": "CLIP Skip", - "clipSkipWithLayerCount": "CLIP Skip {{layerCount}}", - "closeViewer": "Close Viewer", - "codeformerFidelity": "Fidelity", - "coherenceMode": "Mode", - "coherencePassHeader": "Coherence Pass", - "coherenceSteps": "Steps", - "coherenceStrength": "Strength", - "compositingSettingsHeader": "Compositing Settings", - "controlNetControlMode": "Control Mode", - "copyImage": "Copy Image", - "copyImageToLink": "Copy Image To Link", - "denoisingStrength": "Denoising Strength", - "downloadImage": "Download Image", - "enableNoiseSettings": "Enable Noise Settings", - "faceRestoration": "Face Restoration", - "general": "General", - "height": "Height", - "hidePreview": "Hide Preview", - "hiresOptim": "High Res Optimization", - "hiresStrength": "High Res Strength", - "hSymmetryStep": "H Symmetry Step", - "imageFit": "Fit Initial Image To Output Size", - "images": "Images", - "imageToImage": "Image to Image", - "img2imgStrength": "Image To Image Strength", - "infillMethod": "Infill Method", - "infillScalingHeader": "Infill and Scaling", - "info": "Info", - "initialImage": "Initial Image", - "invoke": { - "addingImagesTo": "Adding images to", - "invoke": "Invoke", - "missingFieldTemplate": "Missing field template", - "missingInputForField": "{{nodeLabel}} -> {{fieldLabel}} missing input", - "missingNodeTemplate": "Missing node template", - "noControlImageForControlAdapter": "Control Adapter #{{number}} has no control image", - "noInitialImageSelected": "No initial image selected", - "noModelForControlAdapter": "Control Adapter #{{number}} has no model selected.", - "incompatibleBaseModelForControlAdapter": "Control Adapter #{{number}} model is invalid with main model.", - "noModelSelected": "No model selected", - "noPrompts": "No prompts generated", - "noNodesInGraph": "No nodes in graph", - "readyToInvoke": "Ready to Invoke", - "systemBusy": "System busy", - "systemDisconnected": "System disconnected", - "unableToInvoke": "Unable to Invoke" - }, - "maskAdjustmentsHeader": "Mask Adjustments", - "maskBlur": "Blur", - "maskBlurMethod": "Blur Method", - "maskEdge": "Mask Edge", - "negativePromptPlaceholder": "Negative Prompt", - "noiseSettings": "Noise", - "noiseThreshold": "Noise Threshold", - "openInViewer": "Open In Viewer", - "otherOptions": "Other Options", - "patchmatchDownScaleSize": "Downscale", - "perlinNoise": "Perlin Noise", - "positivePromptPlaceholder": "Positive Prompt", - "randomizeSeed": "Randomize Seed", - "manualSeed": "Manual Seed", - "randomSeed": "Random Seed", - "restoreFaces": "Restore Faces", - "iterations": "Iterations", - "iterationsWithCount_one": "{{count}} Iteration", - "iterationsWithCount_other": "{{count}} Iterations", - "scale": "Scale", - "scaleBeforeProcessing": "Scale Before Processing", - "scaledHeight": "Scaled H", - "scaledWidth": "Scaled W", - "scheduler": "Scheduler", - "seamCorrectionHeader": "Seam Correction", - "seamHighThreshold": "High", - "seamlessTiling": "Seamless Tiling", - "seamlessXAxis": "X Axis", - "seamlessYAxis": "Y Axis", - "seamlessX": "Seamless X", - "seamlessY": "Seamless Y", - "seamlessX&Y": "Seamless X & Y", - "seamLowThreshold": "Low", - "seed": "Seed", - "seedWeights": "Seed Weights", - "imageActions": "Image Actions", - "sendTo": "Send to", - "sendToImg2Img": "Send to Image to Image", - "sendToUnifiedCanvas": "Send To Unified Canvas", - "showOptionsPanel": "Show Side Panel (O or T)", - "showPreview": "Show Preview", - "shuffle": "Shuffle Seed", - "steps": "Steps", - "strength": "Strength", - "symmetry": "Symmetry", - "tileSize": "Tile Size", - "toggleLoopback": "Toggle Loopback", - "type": "Type", - "upscale": "Upscale (Shift + U)", - "upscaleImage": "Upscale Image", - "upscaling": "Upscaling", - "unmasked": "Unmasked", - "useAll": "Use All", - "useCpuNoise": "Use CPU Noise", - "cpuNoise": "CPU Noise", - "gpuNoise": "GPU Noise", - "useInitImg": "Use Initial Image", - "usePrompt": "Use Prompt", - "useSeed": "Use Seed", - "variationAmount": "Variation Amount", - "variations": "Variations", - "vSymmetryStep": "V Symmetry Step", - "width": "Width", - "isAllowedToUpscale": { - "useX2Model": "Image is too large to upscale with x4 model, use x2 model", - "tooLarge": "Image is too large to upscale, select smaller image" - } - }, - "dynamicPrompts": { - "combinatorial": "Combinatorial Generation", - "dynamicPrompts": "Dynamic Prompts", - "enableDynamicPrompts": "Enable Dynamic Prompts", - "maxPrompts": "Max Prompts", - "promptsPreview": "Prompts Preview", - "promptsWithCount_one": "{{count}} Prompt", - "promptsWithCount_other": "{{count}} Prompts", - "seedBehaviour": { - "label": "Seed Behaviour", - "perIterationLabel": "Seed per Iteration", - "perIterationDesc": "Use a different seed for each iteration", - "perPromptLabel": "Seed per Image", - "perPromptDesc": "Use a different seed for each image" - } - }, - "sdxl": { - "cfgScale": "CFG Scale", - "concatPromptStyle": "Concatenate Prompt & Style", - "denoisingStrength": "Denoising Strength", - "loading": "Loading...", - "negAestheticScore": "Negative Aesthetic Score", - "negStylePrompt": "Negative Style Prompt", - "noModelsAvailable": "No models available", - "posAestheticScore": "Positive Aesthetic Score", - "posStylePrompt": "Positive Style Prompt", - "refiner": "Refiner", - "refinermodel": "Refiner Model", - "refinerStart": "Refiner Start", - "scheduler": "Scheduler", - "selectAModel": "Select a model", - "steps": "Steps", - "useRefiner": "Use Refiner" - }, - "settings": { - "alternateCanvasLayout": "Alternate Canvas Layout", - "antialiasProgressImages": "Antialias Progress Images", - "autoChangeDimensions": "Update W/H To Model Defaults On Change", - "beta": "Beta", - "confirmOnDelete": "Confirm On Delete", - "consoleLogLevel": "Log Level", - "developer": "Developer", - "displayHelpIcons": "Display Help Icons", - "displayInProgress": "Display Progress Images", - "enableImageDebugging": "Enable Image Debugging", - "enableInformationalPopovers": "Enable Informational Popovers", - "enableInvisibleWatermark": "Enable Invisible Watermark", - "enableNodesEditor": "Enable Nodes Editor", - "enableNSFWChecker": "Enable NSFW Checker", - "experimental": "Experimental", - "favoriteSchedulers": "Favorite Schedulers", - "favoriteSchedulersPlaceholder": "No schedulers favorited", - "general": "General", - "generation": "Generation", - "models": "Models", - "resetComplete": "Web UI has been reset.", - "resetWebUI": "Reset Web UI", - "resetWebUIDesc1": "Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk.", - "resetWebUIDesc2": "If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub.", - "saveSteps": "Save images every n steps", - "shouldLogToConsole": "Console Logging", - "showAdvancedOptions": "Show Advanced Options", - "showProgressInViewer": "Show Progress Images in Viewer", - "ui": "User Interface", - "useSlidersForAll": "Use Sliders For All Options", - "clearIntermediatesDisabled": "Queue must be empty to clear intermediates", - "clearIntermediatesDesc1": "Clearing intermediates will reset your Canvas and ControlNet state.", - "clearIntermediatesDesc2": "Intermediate images are byproducts of generation, different from the result images in the gallery. Clearing intermediates will free disk space.", - "clearIntermediatesDesc3": "Your gallery images will not be deleted.", - "clearIntermediates": "Clear Intermediates", - "clearIntermediatesWithCount_one": "Clear {{count}} Intermediate", - "clearIntermediatesWithCount_other": "Clear {{count}} Intermediates", - "intermediatesCleared_one": "Cleared {{count}} Intermediate", - "intermediatesCleared_other": "Cleared {{count}} Intermediates", - "intermediatesClearedFailed": "Problem Clearing Intermediates" - }, - "toast": { - "addedToBoard": "Added to board", - "baseModelChangedCleared_one": "Base model changed, cleared or disabled {{count}} incompatible submodel", - "baseModelChangedCleared_other": "Base model changed, cleared or disabled {{count}} incompatible submodels", - "canceled": "Processing Canceled", - "canvasCopiedClipboard": "Canvas Copied to Clipboard", - "canvasDownloaded": "Canvas Downloaded", - "canvasMerged": "Canvas Merged", - "canvasSavedGallery": "Canvas Saved to Gallery", - "canvasSentControlnetAssets": "Canvas Sent to ControlNet & Assets", - "connected": "Connected to Server", - "disconnected": "Disconnected from Server", - "downloadImageStarted": "Image Download Started", - "faceRestoreFailed": "Face Restoration Failed", - "imageCopied": "Image Copied", - "imageLinkCopied": "Image Link Copied", - "imageNotLoaded": "No Image Loaded", - "imageNotLoadedDesc": "Could not find image", - "imageSaved": "Image Saved", - "imageSavedToGallery": "Image Saved to Gallery", - "imageSavingFailed": "Image Saving Failed", - "imageUploaded": "Image Uploaded", - "imageUploadFailed": "Image Upload Failed", - "initialImageNotSet": "Initial Image Not Set", - "initialImageNotSetDesc": "Could not load initial image", - "initialImageSet": "Initial Image Set", - "loadedWithWarnings": "Workflow Loaded with Warnings", - "maskSavedAssets": "Mask Saved to Assets", - "maskSentControlnetAssets": "Mask Sent to ControlNet & Assets", - "metadataLoadFailed": "Failed to load metadata", - "modelAdded": "Model Added: {{modelName}}", - "modelAddedSimple": "Model Added", - "modelAddFailed": "Model Add Failed", - "nodesBrokenConnections": "Cannot load. Some connections are broken.", - "nodesCleared": "Nodes Cleared", - "nodesCorruptedGraph": "Cannot load. Graph seems to be corrupted.", - "nodesLoaded": "Nodes Loaded", - "nodesLoadedFailed": "Failed To Load Nodes", - "nodesNotValidGraph": "Not a valid InvokeAI Node Graph", - "nodesNotValidJSON": "Not a valid JSON", - "nodesSaved": "Nodes Saved", - "nodesUnrecognizedTypes": "Cannot load. Graph has unrecognized types", - "parameterNotSet": "Parameter not set", - "parameterSet": "Parameter set", - "parametersFailed": "Problem loading parameters", - "parametersFailedDesc": "Unable to load init image.", - "parametersNotSet": "Parameters Not Set", - "parametersNotSetDesc": "No metadata found for this image.", - "parametersSet": "Parameters Set", - "problemCopyingCanvas": "Problem Copying Canvas", - "problemCopyingCanvasDesc": "Unable to export base layer", - "problemCopyingImage": "Unable to Copy Image", - "problemCopyingImageLink": "Unable to Copy Image Link", - "problemDownloadingCanvas": "Problem Downloading Canvas", - "problemDownloadingCanvasDesc": "Unable to export base layer", - "problemImportingMask": "Problem Importing Mask", - "problemImportingMaskDesc": "Unable to export mask", - "problemMergingCanvas": "Problem Merging Canvas", - "problemMergingCanvasDesc": "Unable to export base layer", - "problemSavingCanvas": "Problem Saving Canvas", - "problemSavingCanvasDesc": "Unable to export base layer", - "problemSavingMask": "Problem Saving Mask", - "problemSavingMaskDesc": "Unable to export mask", - "promptNotSet": "Prompt Not Set", - "promptNotSetDesc": "Could not find prompt for this image.", - "promptSet": "Prompt Set", - "seedNotSet": "Seed Not Set", - "seedNotSetDesc": "Could not find seed for this image.", - "seedSet": "Seed Set", - "sentToImageToImage": "Sent To Image To Image", - "sentToUnifiedCanvas": "Sent to Unified Canvas", - "serverError": "Server Error", - "setAsCanvasInitialImage": "Set as canvas initial image", - "setCanvasInitialImage": "Set canvas initial image", - "setControlImage": "Set as control image", - "setIPAdapterImage": "Set as IP Adapter Image", - "setInitialImage": "Set as initial image", - "setNodeField": "Set as node field", - "tempFoldersEmptied": "Temp Folder Emptied", - "uploadFailed": "Upload failed", - "uploadFailedInvalidUploadDesc": "Must be single PNG or JPEG image", - "uploadFailedUnableToLoadDesc": "Unable to load file", - "upscalingFailed": "Upscaling Failed", - "workflowLoaded": "Workflow Loaded" - }, - "tooltip": { - "feature": { - "boundingBox": "The bounding box is the same as the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.", - "faceCorrection": "Face correction with GFPGAN or Codeformer: the algorithm detects faces in the image and corrects any defects. High value will change the image more, resulting in more attractive faces. Codeformer with a higher fidelity preserves the original image at the expense of stronger face correction.", - "gallery": "Gallery displays generations from the outputs folder as they're created. Settings are stored within files and accesed by context menu.", - "imageToImage": "Image to Image loads any image as initial, which is then used to generate a new one along with the prompt. The higher the value, the more the result image will change. Values from 0.0 to 1.0 are possible, the recommended range is .25-.75", - "infillAndScaling": "Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).", - "other": "These options will enable alternative processing modes for Invoke. 'Seamless tiling' will create repeating patterns in the output. 'High resolution' is generation in two steps with img2img: use this setting when you want a larger and more coherent image without artifacts. It will take longer than usual txt2img.", - "prompt": "This is the prompt field. Prompt includes generation objects and stylistic terms. You can add weight (token importance) in the prompt as well, but CLI commands and parameters will not work.", - "seamCorrection": "Controls the handling of visible seams that occur between generated images on the canvas.", - "seed": "Seed value affects the initial noise from which the image is formed. You can use the already existing seeds from previous images. 'Noise Threshold' is used to mitigate artifacts at high CFG values (try the 0-10 range), and Perlin to add Perlin noise during generation: both serve to add variation to your outputs.", - "upscale": "Use ESRGAN to enlarge the image immediately after generation.", - "variations": "Try a variation with a value between 0.1 and 1.0 to change the result for a given seed. Interesting variations of the seed are between 0.1 and 0.3." - } - }, - "popovers": { - "clipSkip": { - "heading": "CLIP Skip", - "paragraphs": [ - "Choose how many layers of the CLIP model to skip.", - "Some models work better with certain CLIP Skip settings.", - "A higher value typically results in a less detailed image." - ] - }, - "paramNegativeConditioning": { - "heading": "Negative Prompt", - "paragraphs": [ - "The generation process avoids the concepts in the negative prompt. Use this to exclude qualities or objects from the output.", - "Supports Compel syntax and embeddings." - ] - }, - "paramPositiveConditioning": { - "heading": "Positive Prompt", - "paragraphs": [ - "Guides the generation process. You may use any words or phrases.", - "Compel and Dynamic Prompts syntaxes and embeddings." - ] - }, - "paramScheduler": { - "heading": "Scheduler", - "paragraphs": [ - "Scheduler defines how to iteratively add noise to an image or how to update a sample based on a model's output." - ] - }, - "compositingBlur": { - "heading": "Blur", - "paragraphs": [ - "The blur radius of the mask." - ] - }, - "compositingBlurMethod": { - "heading": "Blur Method", - "paragraphs": [ - "The method of blur applied to the masked area." - ] - }, - "compositingCoherencePass": { - "heading": "Coherence Pass", - "paragraphs": [ - "A second round of denoising helps to composite the Inpainted/Outpainted image." - ] - }, - "compositingCoherenceMode": { - "heading": "Mode", - "paragraphs": [ - "The mode of the Coherence Pass." - ] - }, - "compositingCoherenceSteps": { - "heading": "Steps", - "paragraphs": [ - "Number of denoising steps used in the Coherence Pass.", - "Same as the main Steps parameter." - ] - }, - "compositingStrength": { - "heading": "Strength", - "paragraphs": [ - "Denoising strength for the Coherence Pass.", - "Same as the Image to Image Denoising Strength parameter." - ] - }, - "compositingMaskAdjustments": { - "heading": "Mask Adjustments", - "paragraphs": [ - "Adjust the mask." - ] - }, - "controlNetBeginEnd": { - "heading": "Begin / End Step Percentage", - "paragraphs": [ - "Which steps of the denoising process will have the ControlNet applied.", - "ControlNets applied at the beginning of the process guide composition, and ControlNets applied at the end guide details." - ] - }, - "controlNetControlMode": { - "heading": "Control Mode", - "paragraphs": [ - "Lends more weight to either the prompt or ControlNet." - ] - }, - "controlNetResizeMode": { - "heading": "Resize Mode", - "paragraphs": [ - "How the ControlNet image will be fit to the image output size." - ] - }, - "controlNet": { - "heading": "ControlNet", - "paragraphs": [ - "ControlNets provide guidance to the generation process, helping create images with controlled composition, structure, or style, depending on the model selected." - ] - }, - "controlNetWeight": { - "heading": "Weight", - "paragraphs": [ - "How strongly the ControlNet will impact the generated image." - ] - }, - "dynamicPrompts": { - "heading": "Dynamic Prompts", - "paragraphs": [ - "Dynamic Prompts parses a single prompt into many.", - "The basic syntax is \"a {red|green|blue} ball\". This will produce three prompts: \"a red ball\", \"a green ball\" and \"a blue ball\".", - "You can use the syntax as many times as you like in a single prompt, but be sure to keep the number of prompts generated in check with the Max Prompts setting." - ] - }, - "dynamicPromptsMaxPrompts": { - "heading": "Max Prompts", - "paragraphs": [ - "Limits the number of prompts that can be generated by Dynamic Prompts." - ] - }, - "dynamicPromptsSeedBehaviour": { - "heading": "Seed Behaviour", - "paragraphs": [ - "Controls how the seed is used when generating prompts.", - "Per Iteration will use a unique seed for each iteration. Use this to explore prompt variations on a single seed.", - "For example, if you have 5 prompts, each image will use the same seed.", - "Per Image will use a unique seed for each image. This provides more variation." - ] - }, - "infillMethod": { - "heading": "Infill Method", - "paragraphs": [ - "Method to infill the selected area." - ] - }, - "lora": { - "heading": "LoRA Weight", - "paragraphs": [ - "Higher LoRA weight will lead to larger impacts on the final image." - ] - }, - "noiseUseCPU": { - "heading": "Use CPU Noise", - "paragraphs": [ - "Controls whether noise is generated on the CPU or GPU.", - "With CPU Noise enabled, a particular seed will produce the same image on any machine.", - "There is no performance impact to enabling CPU Noise." - ] - }, - "paramCFGScale": { - "heading": "CFG Scale", - "paragraphs": [ - "Controls how much your prompt influences the generation process." - ] - }, - "paramDenoisingStrength": { - "heading": "Denoising Strength", - "paragraphs": [ - "How much noise is added to the input image.", - "0 will result in an identical image, while 1 will result in a completely new image." - ] - }, - "paramIterations": { - "heading": "Iterations", - "paragraphs": [ - "The number of images to generate.", - "If Dynamic Prompts is enabled, each of the prompts will be generated this many times." - ] - }, - "paramModel": { - "heading": "Model", - "paragraphs": [ - "Model used for the denoising steps.", - "Different models are typically trained to specialize in producing particular aesthetic results and content." - ] - }, - "paramRatio": { - "heading": "Aspect Ratio", - "paragraphs": [ - "The aspect ratio of the dimensions of the image generated.", - "An image size (in number of pixels) equivalent to 512x512 is recommended for SD1.5 models and a size equivalent to 1024x1024 is recommended for SDXL models." - ] - }, - "paramSeed": { - "heading": "Seed", - "paragraphs": [ - "Controls the starting noise used for generation.", - "Disable “Random Seed” to produce identical results with the same generation settings." - ] - }, - "paramSteps": { - "heading": "Steps", - "paragraphs": [ - "Number of steps that will be performed in each generation.", - "Higher step counts will typically create better images but will require more generation time." - ] - }, - "paramVAE": { - "heading": "VAE", - "paragraphs": [ - "Model used for translating AI output into the final image." - ] - }, - "paramVAEPrecision": { - "heading": "VAE Precision", - "paragraphs": [ - "The precision used during VAE encoding and decoding. FP16/half precision is more efficient, at the expense of minor image variations." - ] - }, - "scaleBeforeProcessing": { - "heading": "Scale Before Processing", - "paragraphs": [ - "Scales the selected area to the size best suited for the model before the image generation process." - ] - } - }, - "ui": { - "hideProgressImages": "Hide Progress Images", - "lockRatio": "Lock Ratio", - "showProgressImages": "Show Progress Images", - "swapSizes": "Swap Sizes" - }, - "unifiedCanvas": { - "accept": "Accept", - "activeLayer": "Active Layer", - "antialiasing": "Antialiasing", - "autoSaveToGallery": "Auto Save to Gallery", - "base": "Base", - "betaClear": "Clear", - "betaDarkenOutside": "Darken Outside", - "betaLimitToBox": "Limit To Box", - "betaPreserveMasked": "Preserve Masked", - "boundingBox": "Bounding Box", - "boundingBoxPosition": "Bounding Box Position", - "brush": "Brush", - "brushOptions": "Brush Options", - "brushSize": "Size", - "canvasDimensions": "Canvas Dimensions", - "canvasPosition": "Canvas Position", - "canvasScale": "Canvas Scale", - "canvasSettings": "Canvas Settings", - "clearCanvas": "Clear Canvas", - "clearCanvasHistory": "Clear Canvas History", - "clearCanvasHistoryConfirm": "Are you sure you want to clear the canvas history?", - "clearCanvasHistoryMessage": "Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history.", - "clearHistory": "Clear History", - "clearMask": "Clear Mask", - "colorPicker": "Color Picker", - "copyToClipboard": "Copy to Clipboard", - "cursorPosition": "Cursor Position", - "darkenOutsideSelection": "Darken Outside Selection", - "discardAll": "Discard All", - "downloadAsImage": "Download As Image", - "emptyFolder": "Empty Folder", - "emptyTempImageFolder": "Empty Temp Image Folder", - "emptyTempImagesFolderConfirm": "Are you sure you want to empty the temp folder?", - "emptyTempImagesFolderMessage": "Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer.", - "enableMask": "Enable Mask", - "eraseBoundingBox": "Erase Bounding Box", - "eraser": "Eraser", - "fillBoundingBox": "Fill Bounding Box", - "layer": "Layer", - "limitStrokesToBox": "Limit Strokes to Box", - "mask": "Mask", - "maskingOptions": "Masking Options", - "mergeVisible": "Merge Visible", - "move": "Move", - "next": "Next", - "preserveMaskedArea": "Preserve Masked Area", - "previous": "Previous", - "redo": "Redo", - "resetView": "Reset View", - "saveBoxRegionOnly": "Save Box Region Only", - "saveToGallery": "Save To Gallery", - "scaledBoundingBox": "Scaled Bounding Box", - "showCanvasDebugInfo": "Show Additional Canvas Info", - "showGrid": "Show Grid", - "showHide": "Show/Hide", - "showResultsOn": "Show Results (On)", - "showResultsOff": "Show Results (Off)", - "showIntermediates": "Show Intermediates", - "snapToGrid": "Snap to Grid", - "undo": "Undo" - } -} diff --git a/invokeai/frontend/web/dist/locales/es.json b/invokeai/frontend/web/dist/locales/es.json deleted file mode 100644 index 8ff4c53165..0000000000 --- a/invokeai/frontend/web/dist/locales/es.json +++ /dev/null @@ -1,737 +0,0 @@ -{ - "common": { - "hotkeysLabel": "Atajos de teclado", - "languagePickerLabel": "Selector de idioma", - "reportBugLabel": "Reportar errores", - "settingsLabel": "Ajustes", - "img2img": "Imagen a Imagen", - "unifiedCanvas": "Lienzo Unificado", - "nodes": "Editor del flujo de trabajo", - "langSpanish": "Español", - "nodesDesc": "Un sistema de generación de imágenes basado en nodos, actualmente se encuentra en desarrollo. Mantente pendiente a nuestras actualizaciones acerca de esta fabulosa funcionalidad.", - "postProcessing": "Post-procesamiento", - "postProcessDesc1": "Invoke AI ofrece una gran variedad de funciones de post-procesamiento, El aumento de tamaño y Restauración de Rostros ya se encuentran disponibles en la interfaz web, puedes acceder desde el menú de Opciones Avanzadas en las pestañas de Texto a Imagen y de Imagen a Imagen. También puedes acceder a estas funciones directamente mediante el botón de acciones en el menú superior de la imagen actual o en el visualizador.", - "postProcessDesc2": "Una interfaz de usuario dedicada se lanzará pronto para facilitar flujos de trabajo de postprocesamiento más avanzado.", - "postProcessDesc3": "La Interfaz de Línea de Comandos de Invoke AI ofrece muchas otras características, incluyendo -Embiggen-.", - "training": "Entrenamiento", - "trainingDesc1": "Un flujo de trabajo dedicado para el entrenamiento de sus propios -embeddings- y puntos de control utilizando Inversión Textual y Dreambooth desde la interfaz web.", - "trainingDesc2": "InvokeAI ya admite el entrenamiento de incrustaciones personalizadas mediante la inversión textual mediante el script principal.", - "upload": "Subir imagen", - "close": "Cerrar", - "load": "Cargar", - "statusConnected": "Conectado", - "statusDisconnected": "Desconectado", - "statusError": "Error", - "statusPreparing": "Preparando", - "statusProcessingCanceled": "Procesamiento Cancelado", - "statusProcessingComplete": "Procesamiento Completo", - "statusGenerating": "Generando", - "statusGeneratingTextToImage": "Generando Texto a Imagen", - "statusGeneratingImageToImage": "Generando Imagen a Imagen", - "statusGeneratingInpainting": "Generando pintura interior", - "statusGeneratingOutpainting": "Generando pintura exterior", - "statusGenerationComplete": "Generación Completa", - "statusIterationComplete": "Iteración Completa", - "statusSavingImage": "Guardando Imagen", - "statusRestoringFaces": "Restaurando Rostros", - "statusRestoringFacesGFPGAN": "Restaurando Rostros (GFPGAN)", - "statusRestoringFacesCodeFormer": "Restaurando Rostros (CodeFormer)", - "statusUpscaling": "Aumentando Tamaño", - "statusUpscalingESRGAN": "Restaurando Rostros(ESRGAN)", - "statusLoadingModel": "Cargando Modelo", - "statusModelChanged": "Modelo cambiado", - "statusMergedModels": "Modelos combinados", - "githubLabel": "Github", - "discordLabel": "Discord", - "langEnglish": "Inglés", - "langDutch": "Holandés", - "langFrench": "Francés", - "langGerman": "Alemán", - "langItalian": "Italiano", - "langArabic": "Árabe", - "langJapanese": "Japones", - "langPolish": "Polaco", - "langBrPortuguese": "Portugués brasileño", - "langRussian": "Ruso", - "langSimplifiedChinese": "Chino simplificado", - "langUkranian": "Ucraniano", - "back": "Atrás", - "statusConvertingModel": "Convertir el modelo", - "statusModelConverted": "Modelo adaptado", - "statusMergingModels": "Fusionar modelos", - "langPortuguese": "Portugués", - "langKorean": "Coreano", - "langHebrew": "Hebreo", - "loading": "Cargando", - "loadingInvokeAI": "Cargando invocar a la IA", - "postprocessing": "Tratamiento posterior", - "txt2img": "De texto a imagen", - "accept": "Aceptar", - "cancel": "Cancelar", - "linear": "Lineal", - "random": "Aleatorio", - "generate": "Generar", - "openInNewTab": "Abrir en una nueva pestaña", - "dontAskMeAgain": "No me preguntes de nuevo", - "areYouSure": "¿Estas seguro?", - "imagePrompt": "Indicación de imagen", - "batch": "Administrador de lotes", - "darkMode": "Modo oscuro", - "lightMode": "Modo claro", - "modelManager": "Administrador de modelos", - "communityLabel": "Comunidad" - }, - "gallery": { - "generations": "Generaciones", - "showGenerations": "Mostrar Generaciones", - "uploads": "Subidas de archivos", - "showUploads": "Mostar Subidas", - "galleryImageSize": "Tamaño de la imagen", - "galleryImageResetSize": "Restablecer tamaño de la imagen", - "gallerySettings": "Ajustes de la galería", - "maintainAspectRatio": "Mantener relación de aspecto", - "autoSwitchNewImages": "Auto seleccionar Imágenes nuevas", - "singleColumnLayout": "Diseño de una columna", - "allImagesLoaded": "Todas las imágenes cargadas", - "loadMore": "Cargar más", - "noImagesInGallery": "No hay imágenes para mostrar", - "deleteImage": "Eliminar Imagen", - "deleteImageBin": "Las imágenes eliminadas se enviarán a la papelera de tu sistema operativo.", - "deleteImagePermanent": "Las imágenes eliminadas no se pueden restaurar.", - "images": "Imágenes", - "assets": "Activos", - "autoAssignBoardOnClick": "Asignación automática de tableros al hacer clic" - }, - "hotkeys": { - "keyboardShortcuts": "Atajos de teclado", - "appHotkeys": "Atajos de applicación", - "generalHotkeys": "Atajos generales", - "galleryHotkeys": "Atajos de galería", - "unifiedCanvasHotkeys": "Atajos de lienzo unificado", - "invoke": { - "title": "Invocar", - "desc": "Generar una imagen" - }, - "cancel": { - "title": "Cancelar", - "desc": "Cancelar el proceso de generación de imagen" - }, - "focusPrompt": { - "title": "Mover foco a Entrada de texto", - "desc": "Mover foco hacia el campo de texto de la Entrada" - }, - "toggleOptions": { - "title": "Alternar opciones", - "desc": "Mostar y ocultar el panel de opciones" - }, - "pinOptions": { - "title": "Fijar opciones", - "desc": "Fijar el panel de opciones" - }, - "toggleViewer": { - "title": "Alternar visor", - "desc": "Mostar y ocultar el visor de imágenes" - }, - "toggleGallery": { - "title": "Alternar galería", - "desc": "Mostar y ocultar la galería de imágenes" - }, - "maximizeWorkSpace": { - "title": "Maximizar espacio de trabajo", - "desc": "Cerrar otros páneles y maximizar el espacio de trabajo" - }, - "changeTabs": { - "title": "Cambiar", - "desc": "Cambiar entre áreas de trabajo" - }, - "consoleToggle": { - "title": "Alternar consola", - "desc": "Mostar y ocultar la consola" - }, - "setPrompt": { - "title": "Establecer Entrada", - "desc": "Usar el texto de entrada de la imagen actual" - }, - "setSeed": { - "title": "Establecer semilla", - "desc": "Usar la semilla de la imagen actual" - }, - "setParameters": { - "title": "Establecer parámetros", - "desc": "Usar todos los parámetros de la imagen actual" - }, - "restoreFaces": { - "title": "Restaurar rostros", - "desc": "Restaurar rostros en la imagen actual" - }, - "upscale": { - "title": "Aumentar resolución", - "desc": "Aumentar la resolución de la imagen actual" - }, - "showInfo": { - "title": "Mostrar información", - "desc": "Mostar metadatos de la imagen actual" - }, - "sendToImageToImage": { - "title": "Enviar hacia Imagen a Imagen", - "desc": "Enviar imagen actual hacia Imagen a Imagen" - }, - "deleteImage": { - "title": "Eliminar imagen", - "desc": "Eliminar imagen actual" - }, - "closePanels": { - "title": "Cerrar páneles", - "desc": "Cerrar los páneles abiertos" - }, - "previousImage": { - "title": "Imagen anterior", - "desc": "Muetra la imagen anterior en la galería" - }, - "nextImage": { - "title": "Imagen siguiente", - "desc": "Muetra la imagen siguiente en la galería" - }, - "toggleGalleryPin": { - "title": "Alternar fijado de galería", - "desc": "Fijar o desfijar la galería en la interfaz" - }, - "increaseGalleryThumbSize": { - "title": "Aumentar imagen en galería", - "desc": "Aumenta el tamaño de las miniaturas de la galería" - }, - "decreaseGalleryThumbSize": { - "title": "Reducir imagen en galería", - "desc": "Reduce el tamaño de las miniaturas de la galería" - }, - "selectBrush": { - "title": "Seleccionar pincel", - "desc": "Selecciona el pincel en el lienzo" - }, - "selectEraser": { - "title": "Seleccionar borrador", - "desc": "Selecciona el borrador en el lienzo" - }, - "decreaseBrushSize": { - "title": "Disminuir tamaño de herramienta", - "desc": "Disminuye el tamaño del pincel/borrador en el lienzo" - }, - "increaseBrushSize": { - "title": "Aumentar tamaño del pincel", - "desc": "Aumenta el tamaño del pincel en el lienzo" - }, - "decreaseBrushOpacity": { - "title": "Disminuir opacidad del pincel", - "desc": "Disminuye la opacidad del pincel en el lienzo" - }, - "increaseBrushOpacity": { - "title": "Aumentar opacidad del pincel", - "desc": "Aumenta la opacidad del pincel en el lienzo" - }, - "moveTool": { - "title": "Herramienta de movimiento", - "desc": "Permite navegar por el lienzo" - }, - "fillBoundingBox": { - "title": "Rellenar Caja contenedora", - "desc": "Rellena la caja contenedora con el color seleccionado" - }, - "eraseBoundingBox": { - "title": "Borrar Caja contenedora", - "desc": "Borra el contenido dentro de la caja contenedora" - }, - "colorPicker": { - "title": "Selector de color", - "desc": "Selecciona un color del lienzo" - }, - "toggleSnap": { - "title": "Alternar ajuste de cuadrícula", - "desc": "Activa o desactiva el ajuste automático a la cuadrícula" - }, - "quickToggleMove": { - "title": "Alternar movimiento rápido", - "desc": "Activa momentáneamente la herramienta de movimiento" - }, - "toggleLayer": { - "title": "Alternar capa", - "desc": "Alterna entre las capas de máscara y base" - }, - "clearMask": { - "title": "Limpiar máscara", - "desc": "Limpia toda la máscara actual" - }, - "hideMask": { - "title": "Ocultar máscara", - "desc": "Oculta o muetre la máscara actual" - }, - "showHideBoundingBox": { - "title": "Alternar caja contenedora", - "desc": "Muestra u oculta la caja contenedora" - }, - "mergeVisible": { - "title": "Consolida capas visibles", - "desc": "Consolida todas las capas visibles en una sola" - }, - "saveToGallery": { - "title": "Guardar en galería", - "desc": "Guardar la imagen actual del lienzo en la galería" - }, - "copyToClipboard": { - "title": "Copiar al portapapeles", - "desc": "Copiar el lienzo actual al portapapeles" - }, - "downloadImage": { - "title": "Descargar imagen", - "desc": "Descargar la imagen actual del lienzo" - }, - "undoStroke": { - "title": "Deshar trazo", - "desc": "Desahacer el último trazo del pincel" - }, - "redoStroke": { - "title": "Rehacer trazo", - "desc": "Rehacer el último trazo del pincel" - }, - "resetView": { - "title": "Restablecer vista", - "desc": "Restablecer la vista del lienzo" - }, - "previousStagingImage": { - "title": "Imagen anterior", - "desc": "Imagen anterior en el área de preparación" - }, - "nextStagingImage": { - "title": "Imagen siguiente", - "desc": "Siguiente imagen en el área de preparación" - }, - "acceptStagingImage": { - "title": "Aceptar imagen", - "desc": "Aceptar la imagen actual en el área de preparación" - }, - "addNodes": { - "title": "Añadir Nodos", - "desc": "Abre el menú para añadir nodos" - }, - "nodesHotkeys": "Teclas de acceso rápido a los nodos" - }, - "modelManager": { - "modelManager": "Gestor de Modelos", - "model": "Modelo", - "modelAdded": "Modelo añadido", - "modelUpdated": "Modelo actualizado", - "modelEntryDeleted": "Endrada de Modelo eliminada", - "cannotUseSpaces": "No se pueden usar Spaces", - "addNew": "Añadir nuevo", - "addNewModel": "Añadir nuevo modelo", - "addManually": "Añadir manualmente", - "manual": "Manual", - "name": "Nombre", - "nameValidationMsg": "Introduce un nombre para tu modelo", - "description": "Descripción", - "descriptionValidationMsg": "Introduce una descripción para tu modelo", - "config": "Configurar", - "configValidationMsg": "Ruta del archivo de configuración del modelo.", - "modelLocation": "Ubicación del Modelo", - "modelLocationValidationMsg": "Ruta del archivo de modelo.", - "vaeLocation": "Ubicación VAE", - "vaeLocationValidationMsg": "Ruta del archivo VAE.", - "width": "Ancho", - "widthValidationMsg": "Ancho predeterminado de tu modelo.", - "height": "Alto", - "heightValidationMsg": "Alto predeterminado de tu modelo.", - "addModel": "Añadir Modelo", - "updateModel": "Actualizar Modelo", - "availableModels": "Modelos disponibles", - "search": "Búsqueda", - "load": "Cargar", - "active": "activo", - "notLoaded": "no cargado", - "cached": "en caché", - "checkpointFolder": "Directorio de Checkpoint", - "clearCheckpointFolder": "Limpiar directorio de checkpoint", - "findModels": "Buscar modelos", - "scanAgain": "Escanear de nuevo", - "modelsFound": "Modelos encontrados", - "selectFolder": "Selecciona un directorio", - "selected": "Seleccionado", - "selectAll": "Seleccionar todo", - "deselectAll": "Deseleccionar todo", - "showExisting": "Mostrar existentes", - "addSelected": "Añadir seleccionados", - "modelExists": "Modelo existente", - "selectAndAdd": "Selecciona de la lista un modelo para añadir", - "noModelsFound": "No se encontró ningún modelo", - "delete": "Eliminar", - "deleteModel": "Eliminar Modelo", - "deleteConfig": "Eliminar Configuración", - "deleteMsg1": "¿Estás seguro de que deseas eliminar este modelo de InvokeAI?", - "deleteMsg2": "Esto eliminará el modelo del disco si está en la carpeta raíz de InvokeAI. Si está utilizando una ubicación personalizada, el modelo NO se eliminará del disco.", - "safetensorModels": "SafeTensors", - "addDiffuserModel": "Añadir difusores", - "inpainting": "v1 Repintado", - "repoIDValidationMsg": "Repositorio en línea de tu modelo", - "checkpointModels": "Puntos de control", - "convertToDiffusersHelpText4": "Este proceso se realiza una sola vez. Puede tardar entre 30 y 60 segundos dependiendo de las especificaciones de tu ordenador.", - "diffusersModels": "Difusores", - "addCheckpointModel": "Agregar modelo de punto de control/Modelo Safetensor", - "vaeRepoID": "Identificador del repositorio de VAE", - "vaeRepoIDValidationMsg": "Repositorio en línea de tú VAE", - "formMessageDiffusersModelLocation": "Difusores Modelo Ubicación", - "formMessageDiffusersModelLocationDesc": "Por favor, introduzca al menos uno.", - "formMessageDiffusersVAELocation": "Ubicación VAE", - "formMessageDiffusersVAELocationDesc": "Si no se proporciona, InvokeAI buscará el archivo VAE dentro de la ubicación del modelo indicada anteriormente.", - "convert": "Convertir", - "convertToDiffusers": "Convertir en difusores", - "convertToDiffusersHelpText1": "Este modelo se convertirá al formato 🧨 Difusores.", - "convertToDiffusersHelpText2": "Este proceso sustituirá su entrada del Gestor de Modelos por la versión de Difusores del mismo modelo.", - "convertToDiffusersHelpText3": "Tu archivo del punto de control en el disco se eliminará si está en la carpeta raíz de InvokeAI. Si está en una ubicación personalizada, NO se eliminará.", - "convertToDiffusersHelpText5": "Por favor, asegúrate de tener suficiente espacio en el disco. Los modelos generalmente varían entre 2 GB y 7 GB de tamaño.", - "convertToDiffusersHelpText6": "¿Desea transformar este modelo?", - "convertToDiffusersSaveLocation": "Guardar ubicación", - "v1": "v1", - "statusConverting": "Adaptar", - "modelConverted": "Modelo adaptado", - "sameFolder": "La misma carpeta", - "invokeRoot": "Carpeta InvokeAI", - "custom": "Personalizado", - "customSaveLocation": "Ubicación personalizada para guardar", - "merge": "Fusión", - "modelsMerged": "Modelos fusionados", - "mergeModels": "Combinar modelos", - "modelOne": "Modelo 1", - "modelTwo": "Modelo 2", - "modelThree": "Modelo 3", - "mergedModelName": "Nombre del modelo combinado", - "alpha": "Alfa", - "interpolationType": "Tipo de interpolación", - "mergedModelSaveLocation": "Guardar ubicación", - "mergedModelCustomSaveLocation": "Ruta personalizada", - "invokeAIFolder": "Invocar carpeta de la inteligencia artificial", - "modelMergeHeaderHelp2": "Sólo se pueden fusionar difusores. Si desea fusionar un modelo de punto de control, conviértalo primero en difusores.", - "modelMergeAlphaHelp": "Alfa controla la fuerza de mezcla de los modelos. Los valores alfa más bajos reducen la influencia del segundo modelo.", - "modelMergeInterpAddDifferenceHelp": "En este modo, el Modelo 3 se sustrae primero del Modelo 2. La versión resultante se mezcla con el Modelo 1 con la tasa alfa establecida anteriormente. La versión resultante se mezcla con el Modelo 1 con la tasa alfa establecida anteriormente.", - "ignoreMismatch": "Ignorar discrepancias entre modelos seleccionados", - "modelMergeHeaderHelp1": "Puede unir hasta tres modelos diferentes para crear una combinación que se adapte a sus necesidades.", - "inverseSigmoid": "Sigmoideo inverso", - "weightedSum": "Modelo de suma ponderada", - "sigmoid": "Función sigmoide", - "allModels": "Todos los modelos", - "repo_id": "Identificador del repositorio", - "pathToCustomConfig": "Ruta a la configuración personalizada", - "customConfig": "Configuración personalizada", - "v2_base": "v2 (512px)", - "none": "ninguno", - "pickModelType": "Elige el tipo de modelo", - "v2_768": "v2 (768px)", - "addDifference": "Añadir una diferencia", - "scanForModels": "Buscar modelos", - "vae": "VAE", - "variant": "Variante", - "baseModel": "Modelo básico", - "modelConversionFailed": "Conversión al modelo fallida", - "selectModel": "Seleccionar un modelo", - "modelUpdateFailed": "Error al actualizar el modelo", - "modelsMergeFailed": "Fusión del modelo fallida", - "convertingModelBegin": "Convirtiendo el modelo. Por favor, espere.", - "modelDeleted": "Modelo eliminado", - "modelDeleteFailed": "Error al borrar el modelo", - "noCustomLocationProvided": "‐No se proporcionó una ubicación personalizada", - "importModels": "Importar los modelos", - "settings": "Ajustes", - "syncModels": "Sincronizar las plantillas", - "syncModelsDesc": "Si tus plantillas no están sincronizados con el backend, puedes actualizarlas usando esta opción. Esto suele ser útil en los casos en los que actualizas manualmente tu archivo models.yaml o añades plantillas a la carpeta raíz de InvokeAI después de que la aplicación haya arrancado.", - "modelsSynced": "Plantillas sincronizadas", - "modelSyncFailed": "La sincronización de la plantilla falló", - "loraModels": "LoRA", - "onnxModels": "Onnx", - "oliveModels": "Olives" - }, - "parameters": { - "images": "Imágenes", - "steps": "Pasos", - "cfgScale": "Escala CFG", - "width": "Ancho", - "height": "Alto", - "seed": "Semilla", - "randomizeSeed": "Semilla aleatoria", - "shuffle": "Semilla aleatoria", - "noiseThreshold": "Umbral de Ruido", - "perlinNoise": "Ruido Perlin", - "variations": "Variaciones", - "variationAmount": "Cantidad de Variación", - "seedWeights": "Peso de las semillas", - "faceRestoration": "Restauración de Rostros", - "restoreFaces": "Restaurar rostros", - "type": "Tipo", - "strength": "Fuerza", - "upscaling": "Aumento de resolución", - "upscale": "Aumentar resolución", - "upscaleImage": "Aumentar la resolución de la imagen", - "scale": "Escala", - "otherOptions": "Otras opciones", - "seamlessTiling": "Mosaicos sin parches", - "hiresOptim": "Optimización de Alta Resolución", - "imageFit": "Ajuste tamaño de imagen inicial al tamaño objetivo", - "codeformerFidelity": "Fidelidad", - "scaleBeforeProcessing": "Redimensionar antes de procesar", - "scaledWidth": "Ancho escalado", - "scaledHeight": "Alto escalado", - "infillMethod": "Método de relleno", - "tileSize": "Tamaño del mosaico", - "boundingBoxHeader": "Caja contenedora", - "seamCorrectionHeader": "Corrección de parches", - "infillScalingHeader": "Remplazo y escalado", - "img2imgStrength": "Peso de Imagen a Imagen", - "toggleLoopback": "Alternar Retroalimentación", - "sendTo": "Enviar a", - "sendToImg2Img": "Enviar a Imagen a Imagen", - "sendToUnifiedCanvas": "Enviar a Lienzo Unificado", - "copyImageToLink": "Copiar imagen a enlace", - "downloadImage": "Descargar imagen", - "openInViewer": "Abrir en Visor", - "closeViewer": "Cerrar Visor", - "usePrompt": "Usar Entrada", - "useSeed": "Usar Semilla", - "useAll": "Usar Todo", - "useInitImg": "Usar Imagen Inicial", - "info": "Información", - "initialImage": "Imagen Inicial", - "showOptionsPanel": "Mostrar panel de opciones", - "symmetry": "Simetría", - "vSymmetryStep": "Paso de simetría V", - "hSymmetryStep": "Paso de simetría H", - "cancel": { - "immediate": "Cancelar inmediatamente", - "schedule": "Cancelar tras la iteración actual", - "isScheduled": "Cancelando", - "setType": "Tipo de cancelación" - }, - "copyImage": "Copiar la imagen", - "general": "General", - "imageToImage": "Imagen a imagen", - "denoisingStrength": "Intensidad de la eliminación del ruido", - "hiresStrength": "Alta resistencia", - "showPreview": "Mostrar la vista previa", - "hidePreview": "Ocultar la vista previa", - "noiseSettings": "Ruido", - "seamlessXAxis": "Eje x", - "seamlessYAxis": "Eje y", - "scheduler": "Programador", - "boundingBoxWidth": "Anchura del recuadro", - "boundingBoxHeight": "Altura del recuadro", - "positivePromptPlaceholder": "Prompt Positivo", - "negativePromptPlaceholder": "Prompt Negativo", - "controlNetControlMode": "Modo de control", - "clipSkip": "Omitir el CLIP", - "aspectRatio": "Relación", - "maskAdjustmentsHeader": "Ajustes de la máscara", - "maskBlur": "Difuminar", - "maskBlurMethod": "Método del desenfoque", - "seamHighThreshold": "Alto", - "seamLowThreshold": "Bajo", - "coherencePassHeader": "Parámetros de la coherencia", - "compositingSettingsHeader": "Ajustes de la composición", - "coherenceSteps": "Pasos", - "coherenceStrength": "Fuerza", - "patchmatchDownScaleSize": "Reducir a escala", - "coherenceMode": "Modo" - }, - "settings": { - "models": "Modelos", - "displayInProgress": "Mostrar las imágenes del progreso", - "saveSteps": "Guardar imágenes cada n pasos", - "confirmOnDelete": "Confirmar antes de eliminar", - "displayHelpIcons": "Mostrar iconos de ayuda", - "enableImageDebugging": "Habilitar depuración de imágenes", - "resetWebUI": "Restablecer interfaz web", - "resetWebUIDesc1": "Al restablecer la interfaz web, solo se restablece la caché local del navegador de sus imágenes y la configuración guardada. No se elimina ninguna imagen de su disco duro.", - "resetWebUIDesc2": "Si las imágenes no se muestran en la galería o algo más no funciona, intente restablecer antes de reportar un incidente en GitHub.", - "resetComplete": "Se ha restablecido la interfaz web.", - "useSlidersForAll": "Utilice controles deslizantes para todas las opciones", - "general": "General", - "consoleLogLevel": "Nivel del registro", - "shouldLogToConsole": "Registro de la consola", - "developer": "Desarrollador", - "antialiasProgressImages": "Imágenes del progreso de Antialias", - "showProgressInViewer": "Mostrar las imágenes del progreso en el visor", - "ui": "Interfaz del usuario", - "generation": "Generación", - "favoriteSchedulers": "Programadores favoritos", - "favoriteSchedulersPlaceholder": "No hay programadores favoritos", - "showAdvancedOptions": "Mostrar las opciones avanzadas", - "alternateCanvasLayout": "Diseño alternativo del lienzo", - "beta": "Beta", - "enableNodesEditor": "Activar el editor de nodos", - "experimental": "Experimental", - "autoChangeDimensions": "Actualiza W/H a los valores predeterminados del modelo cuando se modifica" - }, - "toast": { - "tempFoldersEmptied": "Directorio temporal vaciado", - "uploadFailed": "Error al subir archivo", - "uploadFailedUnableToLoadDesc": "No se pudo cargar la imágen", - "downloadImageStarted": "Descargando imágen", - "imageCopied": "Imágen copiada", - "imageLinkCopied": "Enlace de imágen copiado", - "imageNotLoaded": "No se cargó la imágen", - "imageNotLoadedDesc": "No se pudo encontrar la imagen", - "imageSavedToGallery": "Imágen guardada en la galería", - "canvasMerged": "Lienzo consolidado", - "sentToImageToImage": "Enviar hacia Imagen a Imagen", - "sentToUnifiedCanvas": "Enviar hacia Lienzo Consolidado", - "parametersSet": "Parámetros establecidos", - "parametersNotSet": "Parámetros no establecidos", - "parametersNotSetDesc": "No se encontraron metadatos para esta imágen.", - "parametersFailed": "Error cargando parámetros", - "parametersFailedDesc": "No fue posible cargar la imagen inicial.", - "seedSet": "Semilla establecida", - "seedNotSet": "Semilla no establecida", - "seedNotSetDesc": "No se encontró una semilla para esta imágen.", - "promptSet": "Entrada establecida", - "promptNotSet": "Entrada no establecida", - "promptNotSetDesc": "No se encontró una entrada para esta imágen.", - "upscalingFailed": "Error al aumentar tamaño de imagn", - "faceRestoreFailed": "Restauración de rostro fallida", - "metadataLoadFailed": "Error al cargar metadatos", - "initialImageSet": "Imágen inicial establecida", - "initialImageNotSet": "Imagen inicial no establecida", - "initialImageNotSetDesc": "Error al establecer la imágen inicial", - "serverError": "Error en el servidor", - "disconnected": "Desconectado del servidor", - "canceled": "Procesando la cancelación", - "connected": "Conectado al servidor", - "problemCopyingImageLink": "No se puede copiar el enlace de la imagen", - "uploadFailedInvalidUploadDesc": "Debe ser una sola imagen PNG o JPEG", - "parameterSet": "Conjunto de parámetros", - "parameterNotSet": "Parámetro no configurado", - "nodesSaved": "Nodos guardados", - "nodesLoadedFailed": "Error al cargar los nodos", - "nodesLoaded": "Nodos cargados", - "nodesCleared": "Nodos borrados", - "problemCopyingImage": "No se puede copiar la imagen", - "nodesNotValidJSON": "JSON no válido", - "nodesCorruptedGraph": "No se puede cargar. El gráfico parece estar dañado.", - "nodesUnrecognizedTypes": "No se puede cargar. El gráfico tiene tipos no reconocidos", - "nodesNotValidGraph": "Gráfico del nodo InvokeAI no válido", - "nodesBrokenConnections": "No se puede cargar. Algunas conexiones están rotas." - }, - "tooltip": { - "feature": { - "prompt": "Este campo tomará todo el texto de entrada, incluidos tanto los términos de contenido como los estilísticos. Si bien se pueden incluir pesos en la solicitud, los comandos/parámetros estándar de línea de comandos no funcionarán.", - "gallery": "Conforme se generan nuevas invocaciones, los archivos del directorio de salida se mostrarán aquí. Las generaciones tienen opciones adicionales para configurar nuevas generaciones.", - "other": "Estas opciones habilitarán modos de procesamiento alternativos para Invoke. 'Seamless mosaico' creará patrones repetitivos en la salida. 'Alta resolución' es la generación en dos pasos con img2img: use esta configuración cuando desee una imagen más grande y más coherente sin artefactos. tomar más tiempo de lo habitual txt2img.", - "seed": "Los valores de semilla proporcionan un conjunto inicial de ruido que guían el proceso de eliminación de ruido y se pueden aleatorizar o rellenar con una semilla de una invocación anterior. La función Umbral se puede usar para mitigar resultados indeseables a valores CFG más altos (intente entre 0-10), y Perlin se puede usar para agregar ruido Perlin al proceso de eliminación de ruido. Ambos sirven para agregar variación a sus salidas.", - "variations": "Pruebe una variación con una cantidad entre 0 y 1 para cambiar la imagen de salida para la semilla establecida. Se encuentran variaciones interesantes en la semilla entre 0.1 y 0.3.", - "upscale": "Usando ESRGAN, puede aumentar la resolución de salida sin requerir un ancho/alto más alto en la generación inicial.", - "faceCorrection": "Usando GFPGAN o Codeformer, la corrección de rostros intentará identificar rostros en las salidas y corregir cualquier defecto/anormalidad. Los valores de fuerza más altos aplicarán una presión correctiva más fuerte en las salidas, lo que resultará en rostros más atractivos. Con Codeformer, una mayor fidelidad intentará preservar la imagen original, a expensas de la fuerza de corrección de rostros.", - "imageToImage": "Imagen a Imagen permite cargar una imagen inicial, que InvokeAI usará para guiar el proceso de generación, junto con una solicitud. Un valor más bajo para esta configuración se parecerá más a la imagen original. Se aceptan valores entre 0-1, y se recomienda un rango de .25-.75", - "boundingBox": "La caja delimitadora es análoga a las configuraciones de Ancho y Alto para Texto a Imagen o Imagen a Imagen. Solo se procesará el área en la caja.", - "seamCorrection": "Controla el manejo de parches visibles que pueden ocurrir cuando se pega una imagen generada de nuevo en el lienzo.", - "infillAndScaling": "Administra los métodos de relleno (utilizados en áreas enmascaradas o borradas del lienzo) y la escala (útil para tamaños de caja delimitadora pequeños)." - } - }, - "unifiedCanvas": { - "layer": "Capa", - "base": "Base", - "mask": "Máscara", - "maskingOptions": "Opciones de máscara", - "enableMask": "Habilitar Máscara", - "preserveMaskedArea": "Preservar área enmascarada", - "clearMask": "Limpiar máscara", - "brush": "Pincel", - "eraser": "Borrador", - "fillBoundingBox": "Rellenar Caja Contenedora", - "eraseBoundingBox": "Eliminar Caja Contenedora", - "colorPicker": "Selector de color", - "brushOptions": "Opciones de pincel", - "brushSize": "Tamaño", - "move": "Mover", - "resetView": "Restablecer vista", - "mergeVisible": "Consolidar vista", - "saveToGallery": "Guardar en galería", - "copyToClipboard": "Copiar al portapapeles", - "downloadAsImage": "Descargar como imagen", - "undo": "Deshacer", - "redo": "Rehacer", - "clearCanvas": "Limpiar lienzo", - "canvasSettings": "Ajustes de lienzo", - "showIntermediates": "Mostrar intermedios", - "showGrid": "Mostrar cuadrícula", - "snapToGrid": "Ajustar a cuadrícula", - "darkenOutsideSelection": "Oscurecer fuera de la selección", - "autoSaveToGallery": "Guardar automáticamente en galería", - "saveBoxRegionOnly": "Guardar solo región dentro de la caja", - "limitStrokesToBox": "Limitar trazos a la caja", - "showCanvasDebugInfo": "Mostrar la información adicional del lienzo", - "clearCanvasHistory": "Limpiar historial de lienzo", - "clearHistory": "Limpiar historial", - "clearCanvasHistoryMessage": "Limpiar el historial de lienzo también restablece completamente el lienzo unificado. Esto incluye todo el historial de deshacer/rehacer, las imágenes en el área de preparación y la capa base del lienzo.", - "clearCanvasHistoryConfirm": "¿Está seguro de que desea limpiar el historial del lienzo?", - "emptyTempImageFolder": "Vaciar directorio de imágenes temporales", - "emptyFolder": "Vaciar directorio", - "emptyTempImagesFolderMessage": "Vaciar el directorio de imágenes temporales también restablece completamente el lienzo unificado. Esto incluye todo el historial de deshacer/rehacer, las imágenes en el área de preparación y la capa base del lienzo.", - "emptyTempImagesFolderConfirm": "¿Está seguro de que desea vaciar el directorio temporal?", - "activeLayer": "Capa activa", - "canvasScale": "Escala de lienzo", - "boundingBox": "Caja contenedora", - "scaledBoundingBox": "Caja contenedora escalada", - "boundingBoxPosition": "Posición de caja contenedora", - "canvasDimensions": "Dimensiones de lienzo", - "canvasPosition": "Posición de lienzo", - "cursorPosition": "Posición del cursor", - "previous": "Anterior", - "next": "Siguiente", - "accept": "Aceptar", - "showHide": "Mostrar/Ocultar", - "discardAll": "Descartar todo", - "betaClear": "Limpiar", - "betaDarkenOutside": "Oscurecer fuera", - "betaLimitToBox": "Limitar a caja", - "betaPreserveMasked": "Preservar área enmascarada", - "antialiasing": "Suavizado" - }, - "accessibility": { - "invokeProgressBar": "Activar la barra de progreso", - "modelSelect": "Seleccionar modelo", - "reset": "Reiniciar", - "uploadImage": "Cargar imagen", - "previousImage": "Imagen anterior", - "nextImage": "Siguiente imagen", - "useThisParameter": "Utiliza este parámetro", - "copyMetadataJson": "Copiar los metadatos JSON", - "exitViewer": "Salir del visor", - "zoomIn": "Acercar", - "zoomOut": "Alejar", - "rotateCounterClockwise": "Girar en sentido antihorario", - "rotateClockwise": "Girar en sentido horario", - "flipHorizontally": "Voltear horizontalmente", - "flipVertically": "Voltear verticalmente", - "modifyConfig": "Modificar la configuración", - "toggleAutoscroll": "Activar el autodesplazamiento", - "toggleLogViewer": "Alternar el visor de registros", - "showOptionsPanel": "Mostrar el panel lateral", - "menu": "Menú" - }, - "ui": { - "hideProgressImages": "Ocultar el progreso de la imagen", - "showProgressImages": "Mostrar el progreso de la imagen", - "swapSizes": "Cambiar los tamaños", - "lockRatio": "Proporción del bloqueo" - }, - "nodes": { - "showGraphNodes": "Mostrar la superposición de los gráficos", - "zoomInNodes": "Acercar", - "hideMinimapnodes": "Ocultar el minimapa", - "fitViewportNodes": "Ajustar la vista", - "zoomOutNodes": "Alejar", - "hideGraphNodes": "Ocultar la superposición de los gráficos", - "hideLegendNodes": "Ocultar la leyenda del tipo de campo", - "showLegendNodes": "Mostrar la leyenda del tipo de campo", - "showMinimapnodes": "Mostrar el minimapa", - "reloadNodeTemplates": "Recargar las plantillas de nodos", - "loadWorkflow": "Cargar el flujo de trabajo", - "resetWorkflow": "Reiniciar e flujo de trabajo", - "resetWorkflowDesc": "¿Está seguro de que deseas restablecer este flujo de trabajo?", - "resetWorkflowDesc2": "Al reiniciar el flujo de trabajo se borrarán todos los nodos, aristas y detalles del flujo de trabajo.", - "downloadWorkflow": "Descargar el flujo de trabajo en un archivo JSON" - } -} diff --git a/invokeai/frontend/web/dist/locales/fi.json b/invokeai/frontend/web/dist/locales/fi.json deleted file mode 100644 index cf7fc6701b..0000000000 --- a/invokeai/frontend/web/dist/locales/fi.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "accessibility": { - "reset": "Resetoi", - "useThisParameter": "Käytä tätä parametria", - "modelSelect": "Mallin Valinta", - "exitViewer": "Poistu katselimesta", - "uploadImage": "Lataa kuva", - "copyMetadataJson": "Kopioi metadata JSON:iin", - "invokeProgressBar": "Invoken edistymispalkki", - "nextImage": "Seuraava kuva", - "previousImage": "Edellinen kuva", - "zoomIn": "Lähennä", - "flipHorizontally": "Käännä vaakasuoraan", - "zoomOut": "Loitonna", - "rotateCounterClockwise": "Kierrä vastapäivään", - "rotateClockwise": "Kierrä myötäpäivään", - "flipVertically": "Käännä pystysuoraan", - "modifyConfig": "Muokkaa konfiguraatiota", - "toggleAutoscroll": "Kytke automaattinen vieritys", - "toggleLogViewer": "Kytke lokin katselutila", - "showOptionsPanel": "Näytä asetukset" - }, - "common": { - "postProcessDesc2": "Erillinen käyttöliittymä tullaan julkaisemaan helpottaaksemme työnkulkua jälkikäsittelyssä.", - "training": "Kouluta", - "statusLoadingModel": "Ladataan mallia", - "statusModelChanged": "Malli vaihdettu", - "statusConvertingModel": "Muunnetaan mallia", - "statusModelConverted": "Malli muunnettu", - "langFrench": "Ranska", - "langItalian": "Italia", - "languagePickerLabel": "Kielen valinta", - "hotkeysLabel": "Pikanäppäimet", - "reportBugLabel": "Raportoi Bugista", - "langPolish": "Puola", - "langDutch": "Hollanti", - "settingsLabel": "Asetukset", - "githubLabel": "Github", - "langGerman": "Saksa", - "langPortuguese": "Portugali", - "discordLabel": "Discord", - "langEnglish": "Englanti", - "langRussian": "Venäjä", - "langUkranian": "Ukraina", - "langSpanish": "Espanja", - "upload": "Lataa", - "statusMergedModels": "Mallit yhdistelty", - "img2img": "Kuva kuvaksi", - "nodes": "Solmut", - "nodesDesc": "Solmupohjainen järjestelmä kuvien generoimiseen on parhaillaan kehitteillä. Pysy kuulolla päivityksistä tähän uskomattomaan ominaisuuteen liittyen.", - "postProcessDesc1": "Invoke AI tarjoaa monenlaisia jälkikäsittelyominaisuukisa. Kuvan laadun skaalaus sekä kasvojen korjaus ovat jo saatavilla WebUI:ssä. Voit ottaa ne käyttöön lisäasetusten valikosta teksti kuvaksi sekä kuva kuvaksi -välilehdiltä. Voit myös suoraan prosessoida kuvia käyttämällä kuvan toimintapainikkeita nykyisen kuvan yläpuolella tai tarkastelussa.", - "postprocessing": "Jälkikäsitellään", - "postProcessing": "Jälkikäsitellään", - "cancel": "Peruuta", - "close": "Sulje", - "accept": "Hyväksy", - "statusConnected": "Yhdistetty", - "statusError": "Virhe", - "statusProcessingComplete": "Prosessointi valmis", - "load": "Lataa", - "back": "Takaisin", - "statusGeneratingTextToImage": "Generoidaan tekstiä kuvaksi", - "trainingDesc2": "InvokeAI tukee jo mukautettujen upotusten kouluttamista tekstin inversiolla käyttäen pääskriptiä.", - "statusDisconnected": "Yhteys katkaistu", - "statusPreparing": "Valmistellaan", - "statusIterationComplete": "Iteraatio valmis", - "statusMergingModels": "Yhdistellään malleja", - "statusProcessingCanceled": "Valmistelu peruutettu", - "statusSavingImage": "Tallennetaan kuvaa", - "statusGeneratingImageToImage": "Generoidaan kuvaa kuvaksi", - "statusRestoringFacesGFPGAN": "Korjataan kasvoja (GFPGAN)", - "statusRestoringFacesCodeFormer": "Korjataan kasvoja (CodeFormer)", - "statusGeneratingInpainting": "Generoidaan sisällemaalausta", - "statusGeneratingOutpainting": "Generoidaan ulosmaalausta", - "statusRestoringFaces": "Korjataan kasvoja", - "loadingInvokeAI": "Ladataan Invoke AI:ta", - "loading": "Ladataan", - "statusGenerating": "Generoidaan", - "txt2img": "Teksti kuvaksi", - "trainingDesc1": "Erillinen työnkulku omien upotusten ja tarkastuspisteiden kouluttamiseksi käyttäen tekstin inversiota ja dreamboothia selaimen käyttöliittymässä.", - "postProcessDesc3": "Invoke AI:n komentorivi tarjoaa paljon muita ominaisuuksia, kuten esimerkiksi Embiggenin.", - "unifiedCanvas": "Yhdistetty kanvas", - "statusGenerationComplete": "Generointi valmis" - }, - "gallery": { - "uploads": "Lataukset", - "showUploads": "Näytä lataukset", - "galleryImageResetSize": "Resetoi koko", - "maintainAspectRatio": "Säilytä kuvasuhde", - "galleryImageSize": "Kuvan koko", - "showGenerations": "Näytä generaatiot", - "singleColumnLayout": "Yhden sarakkeen asettelu", - "generations": "Generoinnit", - "gallerySettings": "Gallerian asetukset", - "autoSwitchNewImages": "Vaihda uusiin kuviin automaattisesti", - "allImagesLoaded": "Kaikki kuvat ladattu", - "noImagesInGallery": "Ei kuvia galleriassa", - "loadMore": "Lataa lisää" - }, - "hotkeys": { - "keyboardShortcuts": "näppäimistön pikavalinnat", - "appHotkeys": "Sovelluksen pikanäppäimet", - "generalHotkeys": "Yleiset pikanäppäimet", - "galleryHotkeys": "Gallerian pikanäppäimet", - "unifiedCanvasHotkeys": "Yhdistetyn kanvaan pikanäppäimet", - "cancel": { - "desc": "Peruuta kuvan luominen", - "title": "Peruuta" - }, - "invoke": { - "desc": "Luo kuva" - } - } -} diff --git a/invokeai/frontend/web/dist/locales/fr.json b/invokeai/frontend/web/dist/locales/fr.json deleted file mode 100644 index b7ab932fcc..0000000000 --- a/invokeai/frontend/web/dist/locales/fr.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "common": { - "hotkeysLabel": "Raccourcis clavier", - "languagePickerLabel": "Sélecteur de langue", - "reportBugLabel": "Signaler un bug", - "settingsLabel": "Paramètres", - "img2img": "Image en image", - "unifiedCanvas": "Canvas unifié", - "nodes": "Nœuds", - "langFrench": "Français", - "nodesDesc": "Un système basé sur les nœuds pour la génération d'images est actuellement en développement. Restez à l'écoute pour des mises à jour à ce sujet.", - "postProcessing": "Post-traitement", - "postProcessDesc1": "Invoke AI offre une grande variété de fonctionnalités de post-traitement. Le redimensionnement d'images et la restauration de visages sont déjà disponibles dans la WebUI. Vous pouvez y accéder à partir du menu 'Options avancées' des onglets 'Texte vers image' et 'Image vers image'. Vous pouvez également traiter les images directement en utilisant les boutons d'action d'image au-dessus de l'affichage d'image actuel ou dans le visualiseur.", - "postProcessDesc2": "Une interface dédiée sera bientôt disponible pour faciliter les workflows de post-traitement plus avancés.", - "postProcessDesc3": "L'interface en ligne de commande d'Invoke AI offre diverses autres fonctionnalités, notamment Embiggen.", - "training": "Formation", - "trainingDesc1": "Un workflow dédié pour former vos propres embeddings et checkpoints en utilisant Textual Inversion et Dreambooth depuis l'interface web.", - "trainingDesc2": "InvokeAI prend déjà en charge la formation d'embeddings personnalisés en utilisant Textual Inversion en utilisant le script principal.", - "upload": "Télécharger", - "close": "Fermer", - "load": "Charger", - "back": "Retour", - "statusConnected": "En ligne", - "statusDisconnected": "Hors ligne", - "statusError": "Erreur", - "statusPreparing": "Préparation", - "statusProcessingCanceled": "Traitement annulé", - "statusProcessingComplete": "Traitement terminé", - "statusGenerating": "Génération", - "statusGeneratingTextToImage": "Génération Texte vers Image", - "statusGeneratingImageToImage": "Génération Image vers Image", - "statusGeneratingInpainting": "Génération de réparation", - "statusGeneratingOutpainting": "Génération de complétion", - "statusGenerationComplete": "Génération terminée", - "statusIterationComplete": "Itération terminée", - "statusSavingImage": "Sauvegarde de l'image", - "statusRestoringFaces": "Restauration des visages", - "statusRestoringFacesGFPGAN": "Restauration des visages (GFPGAN)", - "statusRestoringFacesCodeFormer": "Restauration des visages (CodeFormer)", - "statusUpscaling": "Mise à échelle", - "statusUpscalingESRGAN": "Mise à échelle (ESRGAN)", - "statusLoadingModel": "Chargement du modèle", - "statusModelChanged": "Modèle changé", - "discordLabel": "Discord", - "githubLabel": "Github", - "accept": "Accepter", - "statusMergingModels": "Mélange des modèles", - "loadingInvokeAI": "Chargement de Invoke AI", - "cancel": "Annuler", - "langEnglish": "Anglais", - "statusConvertingModel": "Conversion du modèle", - "statusModelConverted": "Modèle converti", - "loading": "Chargement", - "statusMergedModels": "Modèles mélangés", - "txt2img": "Texte vers image", - "postprocessing": "Post-Traitement" - }, - "gallery": { - "generations": "Générations", - "showGenerations": "Afficher les générations", - "uploads": "Téléchargements", - "showUploads": "Afficher les téléchargements", - "galleryImageSize": "Taille de l'image", - "galleryImageResetSize": "Réinitialiser la taille", - "gallerySettings": "Paramètres de la galerie", - "maintainAspectRatio": "Maintenir le rapport d'aspect", - "autoSwitchNewImages": "Basculer automatiquement vers de nouvelles images", - "singleColumnLayout": "Mise en page en colonne unique", - "allImagesLoaded": "Toutes les images chargées", - "loadMore": "Charger plus", - "noImagesInGallery": "Aucune image dans la galerie" - }, - "hotkeys": { - "keyboardShortcuts": "Raccourcis clavier", - "appHotkeys": "Raccourcis de l'application", - "generalHotkeys": "Raccourcis généraux", - "galleryHotkeys": "Raccourcis de la galerie", - "unifiedCanvasHotkeys": "Raccourcis du canvas unifié", - "invoke": { - "title": "Invoquer", - "desc": "Générer une image" - }, - "cancel": { - "title": "Annuler", - "desc": "Annuler la génération d'image" - }, - "focusPrompt": { - "title": "Prompt de focus", - "desc": "Mettre en focus la zone de saisie de la commande" - }, - "toggleOptions": { - "title": "Affichage des options", - "desc": "Afficher et masquer le panneau d'options" - }, - "pinOptions": { - "title": "Epinglage des options", - "desc": "Epingler le panneau d'options" - }, - "toggleViewer": { - "title": "Affichage de la visionneuse", - "desc": "Afficher et masquer la visionneuse d'image" - }, - "toggleGallery": { - "title": "Affichage de la galerie", - "desc": "Afficher et masquer la galerie" - }, - "maximizeWorkSpace": { - "title": "Maximiser la zone de travail", - "desc": "Fermer les panneaux et maximiser la zone de travail" - }, - "changeTabs": { - "title": "Changer d'onglet", - "desc": "Passer à un autre espace de travail" - }, - "consoleToggle": { - "title": "Affichage de la console", - "desc": "Afficher et masquer la console" - }, - "setPrompt": { - "title": "Définir le prompt", - "desc": "Utiliser le prompt de l'image actuelle" - }, - "setSeed": { - "title": "Définir la graine", - "desc": "Utiliser la graine de l'image actuelle" - }, - "setParameters": { - "title": "Définir les paramètres", - "desc": "Utiliser tous les paramètres de l'image actuelle" - }, - "restoreFaces": { - "title": "Restaurer les visages", - "desc": "Restaurer l'image actuelle" - }, - "upscale": { - "title": "Agrandir", - "desc": "Agrandir l'image actuelle" - }, - "showInfo": { - "title": "Afficher les informations", - "desc": "Afficher les informations de métadonnées de l'image actuelle" - }, - "sendToImageToImage": { - "title": "Envoyer à l'image à l'image", - "desc": "Envoyer l'image actuelle à l'image à l'image" - }, - "deleteImage": { - "title": "Supprimer l'image", - "desc": "Supprimer l'image actuelle" - }, - "closePanels": { - "title": "Fermer les panneaux", - "desc": "Fermer les panneaux ouverts" - }, - "previousImage": { - "title": "Image précédente", - "desc": "Afficher l'image précédente dans la galerie" - }, - "nextImage": { - "title": "Image suivante", - "desc": "Afficher l'image suivante dans la galerie" - }, - "toggleGalleryPin": { - "title": "Activer/désactiver l'épinglage de la galerie", - "desc": "Épingle ou dépingle la galerie à l'interface" - }, - "increaseGalleryThumbSize": { - "title": "Augmenter la taille des miniatures de la galerie", - "desc": "Augmente la taille des miniatures de la galerie" - }, - "decreaseGalleryThumbSize": { - "title": "Diminuer la taille des miniatures de la galerie", - "desc": "Diminue la taille des miniatures de la galerie" - }, - "selectBrush": { - "title": "Sélectionner un pinceau", - "desc": "Sélectionne le pinceau de la toile" - }, - "selectEraser": { - "title": "Sélectionner un gomme", - "desc": "Sélectionne la gomme de la toile" - }, - "decreaseBrushSize": { - "title": "Diminuer la taille du pinceau", - "desc": "Diminue la taille du pinceau/gomme de la toile" - }, - "increaseBrushSize": { - "title": "Augmenter la taille du pinceau", - "desc": "Augmente la taille du pinceau/gomme de la toile" - }, - "decreaseBrushOpacity": { - "title": "Diminuer l'opacité du pinceau", - "desc": "Diminue l'opacité du pinceau de la toile" - }, - "increaseBrushOpacity": { - "title": "Augmenter l'opacité du pinceau", - "desc": "Augmente l'opacité du pinceau de la toile" - }, - "moveTool": { - "title": "Outil de déplacement", - "desc": "Permet la navigation sur la toile" - }, - "fillBoundingBox": { - "title": "Remplir la boîte englobante", - "desc": "Remplit la boîte englobante avec la couleur du pinceau" - }, - "eraseBoundingBox": { - "title": "Effacer la boîte englobante", - "desc": "Efface la zone de la boîte englobante" - }, - "colorPicker": { - "title": "Sélectionnez le sélecteur de couleur", - "desc": "Sélectionne le sélecteur de couleur de la toile" - }, - "toggleSnap": { - "title": "Basculer Snap", - "desc": "Basculer Snap à la grille" - }, - "quickToggleMove": { - "title": "Basculer rapidement déplacer", - "desc": "Basculer temporairement le mode Déplacer" - }, - "toggleLayer": { - "title": "Basculer la couche", - "desc": "Basculer la sélection de la couche masque/base" - }, - "clearMask": { - "title": "Effacer le masque", - "desc": "Effacer entièrement le masque" - }, - "hideMask": { - "title": "Masquer le masque", - "desc": "Masquer et démasquer le masque" - }, - "showHideBoundingBox": { - "title": "Afficher/Masquer la boîte englobante", - "desc": "Basculer la visibilité de la boîte englobante" - }, - "mergeVisible": { - "title": "Fusionner visible", - "desc": "Fusionner toutes les couches visibles de la toile" - }, - "saveToGallery": { - "title": "Enregistrer dans la galerie", - "desc": "Enregistrer la toile actuelle dans la galerie" - }, - "copyToClipboard": { - "title": "Copier dans le presse-papiers", - "desc": "Copier la toile actuelle dans le presse-papiers" - }, - "downloadImage": { - "title": "Télécharger l'image", - "desc": "Télécharger la toile actuelle" - }, - "undoStroke": { - "title": "Annuler le trait", - "desc": "Annuler un coup de pinceau" - }, - "redoStroke": { - "title": "Rétablir le trait", - "desc": "Rétablir un coup de pinceau" - }, - "resetView": { - "title": "Réinitialiser la vue", - "desc": "Réinitialiser la vue de la toile" - }, - "previousStagingImage": { - "title": "Image de mise en scène précédente", - "desc": "Image précédente de la zone de mise en scène" - }, - "nextStagingImage": { - "title": "Image de mise en scène suivante", - "desc": "Image suivante de la zone de mise en scène" - }, - "acceptStagingImage": { - "title": "Accepter l'image de mise en scène", - "desc": "Accepter l'image actuelle de la zone de mise en scène" - } - }, - "modelManager": { - "modelManager": "Gestionnaire de modèle", - "model": "Modèle", - "allModels": "Tous les modèles", - "checkpointModels": "Points de contrôle", - "diffusersModels": "Diffuseurs", - "safetensorModels": "SafeTensors", - "modelAdded": "Modèle ajouté", - "modelUpdated": "Modèle mis à jour", - "modelEntryDeleted": "Entrée de modèle supprimée", - "cannotUseSpaces": "Ne peut pas utiliser d'espaces", - "addNew": "Ajouter un nouveau", - "addNewModel": "Ajouter un nouveau modèle", - "addCheckpointModel": "Ajouter un modèle de point de contrôle / SafeTensor", - "addDiffuserModel": "Ajouter des diffuseurs", - "addManually": "Ajouter manuellement", - "manual": "Manuel", - "name": "Nom", - "nameValidationMsg": "Entrez un nom pour votre modèle", - "description": "Description", - "descriptionValidationMsg": "Ajoutez une description pour votre modèle", - "config": "Config", - "configValidationMsg": "Chemin vers le fichier de configuration de votre modèle.", - "modelLocation": "Emplacement du modèle", - "modelLocationValidationMsg": "Chemin vers où votre modèle est situé localement.", - "repo_id": "ID de dépôt", - "repoIDValidationMsg": "Dépôt en ligne de votre modèle", - "vaeLocation": "Emplacement VAE", - "vaeLocationValidationMsg": "Chemin vers où votre VAE est situé.", - "vaeRepoID": "ID de dépôt VAE", - "vaeRepoIDValidationMsg": "Dépôt en ligne de votre VAE", - "width": "Largeur", - "widthValidationMsg": "Largeur par défaut de votre modèle.", - "height": "Hauteur", - "heightValidationMsg": "Hauteur par défaut de votre modèle.", - "addModel": "Ajouter un modèle", - "updateModel": "Mettre à jour le modèle", - "availableModels": "Modèles disponibles", - "search": "Rechercher", - "load": "Charger", - "active": "actif", - "notLoaded": "non chargé", - "cached": "en cache", - "checkpointFolder": "Dossier de point de contrôle", - "clearCheckpointFolder": "Effacer le dossier de point de contrôle", - "findModels": "Trouver des modèles", - "scanAgain": "Scanner à nouveau", - "modelsFound": "Modèles trouvés", - "selectFolder": "Sélectionner un dossier", - "selected": "Sélectionné", - "selectAll": "Tout sélectionner", - "deselectAll": "Tout désélectionner", - "showExisting": "Afficher existant", - "addSelected": "Ajouter sélectionné", - "modelExists": "Modèle existant", - "selectAndAdd": "Sélectionner et ajouter les modèles listés ci-dessous", - "noModelsFound": "Aucun modèle trouvé", - "delete": "Supprimer", - "deleteModel": "Supprimer le modèle", - "deleteConfig": "Supprimer la configuration", - "deleteMsg1": "Voulez-vous vraiment supprimer cette entrée de modèle dans InvokeAI ?", - "deleteMsg2": "Cela n'effacera pas le fichier de point de contrôle du modèle de votre disque. Vous pouvez les réajouter si vous le souhaitez.", - "formMessageDiffusersModelLocation": "Emplacement du modèle de diffuseurs", - "formMessageDiffusersModelLocationDesc": "Veuillez en entrer au moins un.", - "formMessageDiffusersVAELocation": "Emplacement VAE", - "formMessageDiffusersVAELocationDesc": "Si non fourni, InvokeAI recherchera le fichier VAE à l'emplacement du modèle donné ci-dessus." - }, - "parameters": { - "images": "Images", - "steps": "Etapes", - "cfgScale": "CFG Echelle", - "width": "Largeur", - "height": "Hauteur", - "seed": "Graine", - "randomizeSeed": "Graine Aléatoire", - "shuffle": "Mélanger", - "noiseThreshold": "Seuil de Bruit", - "perlinNoise": "Bruit de Perlin", - "variations": "Variations", - "variationAmount": "Montant de Variation", - "seedWeights": "Poids des Graines", - "faceRestoration": "Restauration de Visage", - "restoreFaces": "Restaurer les Visages", - "type": "Type", - "strength": "Force", - "upscaling": "Agrandissement", - "upscale": "Agrandir", - "upscaleImage": "Image en Agrandissement", - "scale": "Echelle", - "otherOptions": "Autres Options", - "seamlessTiling": "Carreau Sans Joint", - "hiresOptim": "Optimisation Haute Résolution", - "imageFit": "Ajuster Image Initiale à la Taille de Sortie", - "codeformerFidelity": "Fidélité", - "scaleBeforeProcessing": "Echelle Avant Traitement", - "scaledWidth": "Larg. Échelle", - "scaledHeight": "Haut. Échelle", - "infillMethod": "Méthode de Remplissage", - "tileSize": "Taille des Tuiles", - "boundingBoxHeader": "Boîte Englobante", - "seamCorrectionHeader": "Correction des Joints", - "infillScalingHeader": "Remplissage et Mise à l'Échelle", - "img2imgStrength": "Force de l'Image à l'Image", - "toggleLoopback": "Activer/Désactiver la Boucle", - "sendTo": "Envoyer à", - "sendToImg2Img": "Envoyer à Image à Image", - "sendToUnifiedCanvas": "Envoyer au Canvas Unifié", - "copyImage": "Copier Image", - "copyImageToLink": "Copier l'Image en Lien", - "downloadImage": "Télécharger Image", - "openInViewer": "Ouvrir dans le visualiseur", - "closeViewer": "Fermer le visualiseur", - "usePrompt": "Utiliser la suggestion", - "useSeed": "Utiliser la graine", - "useAll": "Tout utiliser", - "useInitImg": "Utiliser l'image initiale", - "info": "Info", - "initialImage": "Image initiale", - "showOptionsPanel": "Afficher le panneau d'options" - }, - "settings": { - "models": "Modèles", - "displayInProgress": "Afficher les images en cours", - "saveSteps": "Enregistrer les images tous les n étapes", - "confirmOnDelete": "Confirmer la suppression", - "displayHelpIcons": "Afficher les icônes d'aide", - "enableImageDebugging": "Activer le débogage d'image", - "resetWebUI": "Réinitialiser l'interface Web", - "resetWebUIDesc1": "Réinitialiser l'interface Web ne réinitialise que le cache local du navigateur de vos images et de vos paramètres enregistrés. Cela n'efface pas les images du disque.", - "resetWebUIDesc2": "Si les images ne s'affichent pas dans la galerie ou si quelque chose d'autre ne fonctionne pas, veuillez essayer de réinitialiser avant de soumettre une demande sur GitHub.", - "resetComplete": "L'interface Web a été réinitialisée. Rafraîchissez la page pour recharger." - }, - "toast": { - "tempFoldersEmptied": "Dossiers temporaires vidés", - "uploadFailed": "Téléchargement échoué", - "uploadFailedUnableToLoadDesc": "Impossible de charger le fichier", - "downloadImageStarted": "Téléchargement de l'image démarré", - "imageCopied": "Image copiée", - "imageLinkCopied": "Lien d'image copié", - "imageNotLoaded": "Aucune image chargée", - "imageNotLoadedDesc": "Aucune image trouvée pour envoyer à module d'image", - "imageSavedToGallery": "Image enregistrée dans la galerie", - "canvasMerged": "Canvas fusionné", - "sentToImageToImage": "Envoyé à Image à Image", - "sentToUnifiedCanvas": "Envoyé à Canvas unifié", - "parametersSet": "Paramètres définis", - "parametersNotSet": "Paramètres non définis", - "parametersNotSetDesc": "Aucune métadonnée trouvée pour cette image.", - "parametersFailed": "Problème de chargement des paramètres", - "parametersFailedDesc": "Impossible de charger l'image d'initiation.", - "seedSet": "Graine définie", - "seedNotSet": "Graine non définie", - "seedNotSetDesc": "Impossible de trouver la graine pour cette image.", - "promptSet": "Invite définie", - "promptNotSet": "Invite non définie", - "promptNotSetDesc": "Impossible de trouver l'invite pour cette image.", - "upscalingFailed": "Échec de la mise à l'échelle", - "faceRestoreFailed": "Échec de la restauration du visage", - "metadataLoadFailed": "Échec du chargement des métadonnées", - "initialImageSet": "Image initiale définie", - "initialImageNotSet": "Image initiale non définie", - "initialImageNotSetDesc": "Impossible de charger l'image initiale" - }, - "tooltip": { - "feature": { - "prompt": "Ceci est le champ prompt. Le prompt inclut des objets de génération et des termes stylistiques. Vous pouvez également ajouter un poids (importance du jeton) dans le prompt, mais les commandes CLI et les paramètres ne fonctionneront pas.", - "gallery": "La galerie affiche les générations à partir du dossier de sortie à mesure qu'elles sont créées. Les paramètres sont stockés dans des fichiers et accessibles via le menu contextuel.", - "other": "Ces options activent des modes de traitement alternatifs pour Invoke. 'Tuilage seamless' créera des motifs répétitifs dans la sortie. 'Haute résolution' est la génération en deux étapes avec img2img : utilisez ce paramètre lorsque vous souhaitez une image plus grande et plus cohérente sans artefacts. Cela prendra plus de temps que d'habitude txt2img.", - "seed": "La valeur de grain affecte le bruit initial à partir duquel l'image est formée. Vous pouvez utiliser les graines déjà existantes provenant d'images précédentes. 'Seuil de bruit' est utilisé pour atténuer les artefacts à des valeurs CFG élevées (essayez la plage de 0 à 10), et Perlin pour ajouter du bruit Perlin pendant la génération : les deux servent à ajouter de la variété à vos sorties.", - "variations": "Essayez une variation avec une valeur comprise entre 0,1 et 1,0 pour changer le résultat pour une graine donnée. Des variations intéressantes de la graine sont entre 0,1 et 0,3.", - "upscale": "Utilisez ESRGAN pour agrandir l'image immédiatement après la génération.", - "faceCorrection": "Correction de visage avec GFPGAN ou Codeformer : l'algorithme détecte les visages dans l'image et corrige tout défaut. La valeur élevée changera plus l'image, ce qui donnera des visages plus attirants. Codeformer avec une fidélité plus élevée préserve l'image originale au prix d'une correction de visage plus forte.", - "imageToImage": "Image to Image charge n'importe quelle image en tant qu'initiale, qui est ensuite utilisée pour générer une nouvelle avec le prompt. Plus la valeur est élevée, plus l'image de résultat changera. Des valeurs de 0,0 à 1,0 sont possibles, la plage recommandée est de 0,25 à 0,75", - "boundingBox": "La boîte englobante est la même que les paramètres Largeur et Hauteur pour Texte à Image ou Image à Image. Seulement la zone dans la boîte sera traitée.", - "seamCorrection": "Contrôle la gestion des coutures visibles qui se produisent entre les images générées sur la toile.", - "infillAndScaling": "Gérer les méthodes de remplissage (utilisées sur les zones masquées ou effacées de la toile) et le redimensionnement (utile pour les petites tailles de boîte englobante)." - } - }, - "unifiedCanvas": { - "layer": "Couche", - "base": "Base", - "mask": "Masque", - "maskingOptions": "Options de masquage", - "enableMask": "Activer le masque", - "preserveMaskedArea": "Préserver la zone masquée", - "clearMask": "Effacer le masque", - "brush": "Pinceau", - "eraser": "Gomme", - "fillBoundingBox": "Remplir la boîte englobante", - "eraseBoundingBox": "Effacer la boîte englobante", - "colorPicker": "Sélecteur de couleur", - "brushOptions": "Options de pinceau", - "brushSize": "Taille", - "move": "Déplacer", - "resetView": "Réinitialiser la vue", - "mergeVisible": "Fusionner les visibles", - "saveToGallery": "Enregistrer dans la galerie", - "copyToClipboard": "Copier dans le presse-papiers", - "downloadAsImage": "Télécharger en tant qu'image", - "undo": "Annuler", - "redo": "Refaire", - "clearCanvas": "Effacer le canvas", - "canvasSettings": "Paramètres du canvas", - "showIntermediates": "Afficher les intermédiaires", - "showGrid": "Afficher la grille", - "snapToGrid": "Aligner sur la grille", - "darkenOutsideSelection": "Assombrir à l'extérieur de la sélection", - "autoSaveToGallery": "Enregistrement automatique dans la galerie", - "saveBoxRegionOnly": "Enregistrer uniquement la région de la boîte", - "limitStrokesToBox": "Limiter les traits à la boîte", - "showCanvasDebugInfo": "Afficher les informations de débogage du canvas", - "clearCanvasHistory": "Effacer l'historique du canvas", - "clearHistory": "Effacer l'historique", - "clearCanvasHistoryMessage": "Effacer l'historique du canvas laisse votre canvas actuel intact, mais efface de manière irréversible l'historique annuler et refaire.", - "clearCanvasHistoryConfirm": "Voulez-vous vraiment effacer l'historique du canvas ?", - "emptyTempImageFolder": "Vider le dossier d'images temporaires", - "emptyFolder": "Vider le dossier", - "emptyTempImagesFolderMessage": "Vider le dossier d'images temporaires réinitialise également complètement le canvas unifié. Cela inclut tout l'historique annuler/refaire, les images dans la zone de mise en attente et la couche de base du canvas.", - "emptyTempImagesFolderConfirm": "Voulez-vous vraiment vider le dossier temporaire ?", - "activeLayer": "Calque actif", - "canvasScale": "Échelle du canevas", - "boundingBox": "Boîte englobante", - "scaledBoundingBox": "Boîte englobante mise à l'échelle", - "boundingBoxPosition": "Position de la boîte englobante", - "canvasDimensions": "Dimensions du canevas", - "canvasPosition": "Position du canevas", - "cursorPosition": "Position du curseur", - "previous": "Précédent", - "next": "Suivant", - "accept": "Accepter", - "showHide": "Afficher/Masquer", - "discardAll": "Tout abandonner", - "betaClear": "Effacer", - "betaDarkenOutside": "Assombrir à l'extérieur", - "betaLimitToBox": "Limiter à la boîte", - "betaPreserveMasked": "Conserver masqué" - }, - "accessibility": { - "uploadImage": "Charger une image", - "reset": "Réinitialiser", - "nextImage": "Image suivante", - "previousImage": "Image précédente", - "useThisParameter": "Utiliser ce paramètre", - "zoomIn": "Zoom avant", - "zoomOut": "Zoom arrière", - "showOptionsPanel": "Montrer la page d'options", - "modelSelect": "Choix du modèle", - "invokeProgressBar": "Barre de Progression Invoke", - "copyMetadataJson": "Copie des métadonnées JSON", - "menu": "Menu" - } -} diff --git a/invokeai/frontend/web/dist/locales/he.json b/invokeai/frontend/web/dist/locales/he.json deleted file mode 100644 index dfb5ea0360..0000000000 --- a/invokeai/frontend/web/dist/locales/he.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "modelManager": { - "cannotUseSpaces": "לא ניתן להשתמש ברווחים", - "addNew": "הוסף חדש", - "vaeLocationValidationMsg": "נתיב למקום שבו ממוקם ה- VAE שלך.", - "height": "גובה", - "load": "טען", - "search": "חיפוש", - "heightValidationMsg": "גובה ברירת המחדל של המודל שלך.", - "addNewModel": "הוסף מודל חדש", - "allModels": "כל המודלים", - "checkpointModels": "נקודות ביקורת", - "diffusersModels": "מפזרים", - "safetensorModels": "טנסורים בטוחים", - "modelAdded": "מודל התווסף", - "modelUpdated": "מודל עודכן", - "modelEntryDeleted": "רשומת המודל נמחקה", - "addCheckpointModel": "הוסף נקודת ביקורת / מודל טנסור בטוח", - "addDiffuserModel": "הוסף מפזרים", - "addManually": "הוספה ידנית", - "manual": "ידני", - "name": "שם", - "description": "תיאור", - "descriptionValidationMsg": "הוסף תיאור למודל שלך", - "config": "תצורה", - "configValidationMsg": "נתיב לקובץ התצורה של המודל שלך.", - "modelLocation": "מיקום המודל", - "modelLocationValidationMsg": "נתיב למקום שבו המודל שלך ממוקם באופן מקומי.", - "repo_id": "מזהה מאגר", - "repoIDValidationMsg": "מאגר מקוון של המודל שלך", - "vaeLocation": "מיקום VAE", - "vaeRepoIDValidationMsg": "המאגר המקוון של VAE שלך", - "width": "רוחב", - "widthValidationMsg": "רוחב ברירת המחדל של המודל שלך.", - "addModel": "הוסף מודל", - "updateModel": "עדכן מודל", - "active": "פעיל", - "modelsFound": "מודלים נמצאו", - "cached": "נשמר במטמון", - "checkpointFolder": "תיקיית נקודות ביקורת", - "findModels": "מצא מודלים", - "scanAgain": "סרוק מחדש", - "selectFolder": "בחירת תיקייה", - "selected": "נבחר", - "selectAll": "בחר הכל", - "deselectAll": "ביטול בחירת הכל", - "showExisting": "הצג קיים", - "addSelected": "הוסף פריטים שנבחרו", - "modelExists": "המודל קיים", - "selectAndAdd": "בחר והוסך מודלים המפורטים להלן", - "deleteModel": "מחיקת מודל", - "deleteConfig": "מחיקת תצורה", - "formMessageDiffusersModelLocation": "מיקום מפזרי המודל", - "formMessageDiffusersModelLocationDesc": "נא להזין לפחות אחד.", - "convertToDiffusersHelpText5": "אנא ודא/י שיש לך מספיק מקום בדיסק. גדלי מודלים בדרך כלל הינם בין 4GB-7GB.", - "convertToDiffusersHelpText1": "מודל זה יומר לפורמט 🧨 המפזרים.", - "convertToDiffusersHelpText2": "תהליך זה יחליף את הרשומה של מנהל המודלים שלך בגרסת המפזרים של אותו המודל.", - "convertToDiffusersHelpText6": "האם ברצונך להמיר מודל זה?", - "convertToDiffusersSaveLocation": "שמירת מיקום", - "inpainting": "v1 צביעת תוך", - "statusConverting": "ממיר", - "modelConverted": "מודל הומר", - "sameFolder": "אותה תיקיה", - "custom": "התאמה אישית", - "merge": "מזג", - "modelsMerged": "מודלים מוזגו", - "mergeModels": "מזג מודלים", - "modelOne": "מודל 1", - "customSaveLocation": "מיקום שמירה מותאם אישית", - "alpha": "אלפא", - "mergedModelSaveLocation": "שמירת מיקום", - "mergedModelCustomSaveLocation": "נתיב מותאם אישית", - "ignoreMismatch": "התעלמות מאי-התאמות בין מודלים שנבחרו", - "modelMergeHeaderHelp1": "ניתן למזג עד שלושה מודלים שונים כדי ליצור שילוב שמתאים לצרכים שלכם.", - "modelMergeAlphaHelp": "אלפא שולט בחוזק מיזוג עבור המודלים. ערכי אלפא נמוכים יותר מובילים להשפעה נמוכה יותר של המודל השני.", - "nameValidationMsg": "הכנס שם למודל שלך", - "vaeRepoID": "מזהה מאגר ה VAE", - "modelManager": "מנהל המודלים", - "model": "מודל", - "availableModels": "מודלים זמינים", - "notLoaded": "לא נטען", - "clearCheckpointFolder": "נקה את תיקיית נקודות הביקורת", - "noModelsFound": "לא נמצאו מודלים", - "delete": "מחיקה", - "deleteMsg1": "האם אתה בטוח שברצונך למחוק רשומת מודל זו מ- InvokeAI?", - "deleteMsg2": "פעולה זו לא תמחק את קובץ נקודת הביקורת מהדיסק שלך. ניתן לקרוא אותם מחדש במידת הצורך.", - "formMessageDiffusersVAELocation": "מיקום VAE", - "formMessageDiffusersVAELocationDesc": "במידה ולא מסופק, InvokeAI תחפש את קובץ ה-VAE במיקום המודל המופיע לעיל.", - "convertToDiffusers": "המרה למפזרים", - "convert": "המרה", - "modelTwo": "מודל 2", - "modelThree": "מודל 3", - "mergedModelName": "שם מודל ממוזג", - "v1": "v1", - "invokeRoot": "תיקיית InvokeAI", - "customConfig": "תצורה מותאמת אישית", - "pathToCustomConfig": "נתיב לתצורה מותאמת אישית", - "interpolationType": "סוג אינטרפולציה", - "invokeAIFolder": "תיקיית InvokeAI", - "sigmoid": "סיגמואיד", - "weightedSum": "סכום משוקלל", - "modelMergeHeaderHelp2": "רק מפזרים זמינים למיזוג. אם ברצונך למזג מודל של נקודת ביקורת, המר אותו תחילה למפזרים.", - "inverseSigmoid": "הפוך סיגמואיד", - "convertToDiffusersHelpText3": "קובץ נקודת הביקורת שלך בדיסק לא יימחק או ישונה בכל מקרה. אתה יכול להוסיף את נקודת הביקורת שלך למנהל המודלים שוב אם תרצה בכך.", - "convertToDiffusersHelpText4": "זהו תהליך חד פעמי בלבד. התהליך עשוי לקחת בסביבות 30-60 שניות, תלוי במפרט המחשב שלך.", - "modelMergeInterpAddDifferenceHelp": "במצב זה, מודל 3 מופחת תחילה ממודל 2. הגרסה המתקבלת משולבת עם מודל 1 עם קצב האלפא שנקבע לעיל." - }, - "common": { - "nodesDesc": "מערכת מבוססת צמתים עבור יצירת תמונות עדיין תחת פיתוח. השארו קשובים לעדכונים עבור הפיצ׳ר המדהים הזה.", - "languagePickerLabel": "בחירת שפה", - "githubLabel": "גיטהאב", - "discordLabel": "דיסקורד", - "settingsLabel": "הגדרות", - "langEnglish": "אנגלית", - "langDutch": "הולנדית", - "langArabic": "ערבית", - "langFrench": "צרפתית", - "langGerman": "גרמנית", - "langJapanese": "יפנית", - "langBrPortuguese": "פורטוגזית", - "langRussian": "רוסית", - "langSimplifiedChinese": "סינית", - "langUkranian": "אוקראינית", - "langSpanish": "ספרדית", - "img2img": "תמונה לתמונה", - "unifiedCanvas": "קנבס מאוחד", - "nodes": "צמתים", - "postProcessing": "לאחר עיבוד", - "postProcessDesc2": "תצוגה ייעודית תשוחרר בקרוב על מנת לתמוך בתהליכים ועיבודים מורכבים.", - "postProcessDesc3": "ממשק שורת הפקודה של Invoke AI מציע תכונות שונות אחרות כולל Embiggen.", - "close": "סגירה", - "statusConnected": "מחובר", - "statusDisconnected": "מנותק", - "statusError": "שגיאה", - "statusPreparing": "בהכנה", - "statusProcessingCanceled": "עיבוד בוטל", - "statusProcessingComplete": "עיבוד הסתיים", - "statusGenerating": "מייצר", - "statusGeneratingTextToImage": "מייצר טקסט לתמונה", - "statusGeneratingImageToImage": "מייצר תמונה לתמונה", - "statusGeneratingInpainting": "מייצר ציור לתוך", - "statusGeneratingOutpainting": "מייצר ציור החוצה", - "statusIterationComplete": "איטרציה הסתיימה", - "statusRestoringFaces": "משחזר פרצופים", - "statusRestoringFacesCodeFormer": "משחזר פרצופים (CodeFormer)", - "statusUpscaling": "העלאת קנה מידה", - "statusUpscalingESRGAN": "העלאת קנה מידה (ESRGAN)", - "statusModelChanged": "מודל השתנה", - "statusConvertingModel": "ממיר מודל", - "statusModelConverted": "מודל הומר", - "statusMergingModels": "מיזוג מודלים", - "statusMergedModels": "מודלים מוזגו", - "hotkeysLabel": "מקשים חמים", - "reportBugLabel": "דווח באג", - "langItalian": "איטלקית", - "upload": "העלאה", - "langPolish": "פולנית", - "training": "אימון", - "load": "טעינה", - "back": "אחורה", - "statusSavingImage": "שומר תמונה", - "statusGenerationComplete": "ייצור הסתיים", - "statusRestoringFacesGFPGAN": "משחזר פרצופים (GFPGAN)", - "statusLoadingModel": "טוען מודל", - "trainingDesc2": "InvokeAI כבר תומך באימון הטמעות מותאמות אישית באמצעות היפוך טקסט באמצעות הסקריפט הראשי.", - "postProcessDesc1": "InvokeAI מציעה מגוון רחב של תכונות עיבוד שלאחר. העלאת קנה מידה של תמונה ושחזור פנים כבר זמינים בממשק המשתמש. ניתן לגשת אליהם מתפריט 'אפשרויות מתקדמות' בכרטיסיות 'טקסט לתמונה' ו'תמונה לתמונה'. ניתן גם לעבד תמונות ישירות, באמצעות לחצני הפעולה של התמונה מעל תצוגת התמונה הנוכחית או בתוך המציג.", - "trainingDesc1": "תהליך עבודה ייעודי לאימון ההטמעות ונקודות הביקורת שלך באמצעות היפוך טקסט ו-Dreambooth מממשק המשתמש." - }, - "hotkeys": { - "toggleGallery": { - "desc": "פתח וסגור את מגירת הגלריה", - "title": "הצג את הגלריה" - }, - "keyboardShortcuts": "קיצורי מקלדת", - "appHotkeys": "קיצורי אפליקציה", - "generalHotkeys": "קיצורי דרך כלליים", - "galleryHotkeys": "קיצורי דרך של הגלריה", - "unifiedCanvasHotkeys": "קיצורי דרך לקנבס המאוחד", - "invoke": { - "title": "הפעל", - "desc": "צור תמונה" - }, - "focusPrompt": { - "title": "התמקדות על הבקשה", - "desc": "התמקדות על איזור הקלדת הבקשה" - }, - "toggleOptions": { - "desc": "פתח וסגור את פאנל ההגדרות", - "title": "הצג הגדרות" - }, - "pinOptions": { - "title": "הצמד הגדרות", - "desc": "הצמד את פאנל ההגדרות" - }, - "toggleViewer": { - "title": "הצג את חלון ההצגה", - "desc": "פתח וסגור את מציג התמונות" - }, - "changeTabs": { - "title": "החלף לשוניות", - "desc": "החלף לאיזור עבודה אחר" - }, - "consoleToggle": { - "desc": "פתח וסגור את הקונסול", - "title": "הצג קונסול" - }, - "setPrompt": { - "title": "הגדרת בקשה", - "desc": "שימוש בבקשה של התמונה הנוכחית" - }, - "restoreFaces": { - "desc": "שחזור התמונה הנוכחית", - "title": "שחזור פרצופים" - }, - "upscale": { - "title": "הגדלת קנה מידה", - "desc": "הגדל את התמונה הנוכחית" - }, - "showInfo": { - "title": "הצג מידע", - "desc": "הצגת פרטי מטא-נתונים של התמונה הנוכחית" - }, - "sendToImageToImage": { - "title": "שלח לתמונה לתמונה", - "desc": "שלח תמונה נוכחית לתמונה לתמונה" - }, - "deleteImage": { - "title": "מחק תמונה", - "desc": "מחק את התמונה הנוכחית" - }, - "closePanels": { - "title": "סגור לוחות", - "desc": "סוגר לוחות פתוחים" - }, - "previousImage": { - "title": "תמונה קודמת", - "desc": "הצג את התמונה הקודמת בגלריה" - }, - "toggleGalleryPin": { - "title": "הצג את מצמיד הגלריה", - "desc": "הצמדה וביטול הצמדה של הגלריה לממשק המשתמש" - }, - "decreaseGalleryThumbSize": { - "title": "הקטנת גודל תמונת גלריה", - "desc": "מקטין את גודל התמונות הממוזערות של הגלריה" - }, - "selectBrush": { - "desc": "בוחר את מברשת הקנבס", - "title": "בחר מברשת" - }, - "selectEraser": { - "title": "בחר מחק", - "desc": "בוחר את מחק הקנבס" - }, - "decreaseBrushSize": { - "title": "הקטנת גודל המברשת", - "desc": "מקטין את גודל מברשת הקנבס/מחק" - }, - "increaseBrushSize": { - "desc": "מגדיל את גודל מברשת הקנבס/מחק", - "title": "הגדלת גודל המברשת" - }, - "decreaseBrushOpacity": { - "title": "הפחת את אטימות המברשת", - "desc": "מקטין את האטימות של מברשת הקנבס" - }, - "increaseBrushOpacity": { - "title": "הגדל את אטימות המברשת", - "desc": "מגביר את האטימות של מברשת הקנבס" - }, - "moveTool": { - "title": "כלי הזזה", - "desc": "מאפשר ניווט על קנבס" - }, - "fillBoundingBox": { - "desc": "ממלא את התיבה התוחמת בצבע מברשת", - "title": "מילוי תיבה תוחמת" - }, - "eraseBoundingBox": { - "desc": "מוחק את אזור התיבה התוחמת", - "title": "מחק תיבה תוחמת" - }, - "colorPicker": { - "title": "בחר בבורר צבעים", - "desc": "בוחר את בורר צבעי הקנבס" - }, - "toggleSnap": { - "title": "הפעל הצמדה", - "desc": "מפעיל הצמדה לרשת" - }, - "quickToggleMove": { - "title": "הפעלה מהירה להזזה", - "desc": "מפעיל זמנית את מצב ההזזה" - }, - "toggleLayer": { - "title": "הפעל שכבה", - "desc": "הפעל בחירת שכבת בסיס/מסיכה" - }, - "clearMask": { - "title": "נקה מסיכה", - "desc": "נקה את כל המסכה" - }, - "hideMask": { - "desc": "הסתרה והצגה של מסיכה", - "title": "הסתר מסיכה" - }, - "showHideBoundingBox": { - "title": "הצגה/הסתרה של תיבה תוחמת", - "desc": "הפעל תצוגה של התיבה התוחמת" - }, - "mergeVisible": { - "title": "מיזוג תוכן גלוי", - "desc": "מיזוג כל השכבות הגלויות של הקנבס" - }, - "saveToGallery": { - "title": "שמור לגלריה", - "desc": "שמור את הקנבס הנוכחי בגלריה" - }, - "copyToClipboard": { - "title": "העתק ללוח ההדבקה", - "desc": "העתק את הקנבס הנוכחי ללוח ההדבקה" - }, - "downloadImage": { - "title": "הורד תמונה", - "desc": "הורד את הקנבס הנוכחי" - }, - "undoStroke": { - "title": "בטל משיכה", - "desc": "בטל משיכת מברשת" - }, - "redoStroke": { - "title": "בצע שוב משיכה", - "desc": "ביצוע מחדש של משיכת מברשת" - }, - "resetView": { - "title": "איפוס תצוגה", - "desc": "אפס תצוגת קנבס" - }, - "previousStagingImage": { - "desc": "תמונת אזור ההערכות הקודמת", - "title": "תמונת הערכות קודמת" - }, - "nextStagingImage": { - "title": "תמנות הערכות הבאה", - "desc": "תמונת אזור ההערכות הבאה" - }, - "acceptStagingImage": { - "desc": "אשר את תמונת איזור ההערכות הנוכחית", - "title": "אשר תמונת הערכות" - }, - "cancel": { - "desc": "ביטול יצירת תמונה", - "title": "ביטול" - }, - "maximizeWorkSpace": { - "title": "מקסם את איזור העבודה", - "desc": "סגור פאנלים ומקסם את איזור העבודה" - }, - "setSeed": { - "title": "הגדר זרע", - "desc": "השתמש בזרע התמונה הנוכחית" - }, - "setParameters": { - "title": "הגדרת פרמטרים", - "desc": "שימוש בכל הפרמטרים של התמונה הנוכחית" - }, - "increaseGalleryThumbSize": { - "title": "הגדל את גודל תמונת הגלריה", - "desc": "מגדיל את התמונות הממוזערות של הגלריה" - }, - "nextImage": { - "title": "תמונה הבאה", - "desc": "הצג את התמונה הבאה בגלריה" - } - }, - "gallery": { - "uploads": "העלאות", - "galleryImageSize": "גודל תמונה", - "gallerySettings": "הגדרות גלריה", - "maintainAspectRatio": "שמור על יחס רוחב-גובה", - "autoSwitchNewImages": "החלף אוטומטית לתמונות חדשות", - "singleColumnLayout": "תצוגת עמודה אחת", - "allImagesLoaded": "כל התמונות נטענו", - "loadMore": "טען עוד", - "noImagesInGallery": "אין תמונות בגלריה", - "galleryImageResetSize": "איפוס גודל", - "generations": "דורות", - "showGenerations": "הצג דורות", - "showUploads": "הצג העלאות" - }, - "parameters": { - "images": "תמונות", - "steps": "צעדים", - "cfgScale": "סולם CFG", - "width": "רוחב", - "height": "גובה", - "seed": "זרע", - "imageToImage": "תמונה לתמונה", - "randomizeSeed": "זרע אקראי", - "variationAmount": "כמות וריאציה", - "seedWeights": "משקלי זרע", - "faceRestoration": "שחזור פנים", - "restoreFaces": "שחזר פנים", - "type": "סוג", - "strength": "חוזק", - "upscale": "הגדלת קנה מידה", - "upscaleImage": "הגדלת קנה מידת התמונה", - "denoisingStrength": "חוזק מנטרל הרעש", - "otherOptions": "אפשרויות אחרות", - "hiresOptim": "אופטימיזצית רזולוציה גבוהה", - "hiresStrength": "חוזק רזולוציה גבוהה", - "codeformerFidelity": "דבקות", - "scaleBeforeProcessing": "שנה קנה מידה לפני עיבוד", - "scaledWidth": "קנה מידה לאחר שינוי W", - "scaledHeight": "קנה מידה לאחר שינוי H", - "infillMethod": "שיטת מילוי", - "tileSize": "גודל אריח", - "boundingBoxHeader": "תיבה תוחמת", - "seamCorrectionHeader": "תיקון תפר", - "infillScalingHeader": "מילוי וקנה מידה", - "toggleLoopback": "הפעל לולאה חוזרת", - "symmetry": "סימטריה", - "vSymmetryStep": "צעד סימטריה V", - "hSymmetryStep": "צעד סימטריה H", - "cancel": { - "schedule": "ביטול לאחר האיטרציה הנוכחית", - "isScheduled": "מבטל", - "immediate": "ביטול מיידי", - "setType": "הגדר סוג ביטול" - }, - "sendTo": "שליחה אל", - "copyImage": "העתקת תמונה", - "downloadImage": "הורדת תמונה", - "sendToImg2Img": "שליחה לתמונה לתמונה", - "sendToUnifiedCanvas": "שליחה אל קנבס מאוחד", - "openInViewer": "פתח במציג", - "closeViewer": "סגור מציג", - "usePrompt": "שימוש בבקשה", - "useSeed": "שימוש בזרע", - "useAll": "שימוש בהכל", - "useInitImg": "שימוש בתמונה ראשונית", - "info": "פרטים", - "showOptionsPanel": "הצג חלונית אפשרויות", - "shuffle": "ערבוב", - "noiseThreshold": "סף רעש", - "perlinNoise": "רעש פרלין", - "variations": "וריאציות", - "imageFit": "התאמת תמונה ראשונית לגודל הפלט", - "general": "כללי", - "upscaling": "מגדיל את קנה מידה", - "scale": "סולם", - "seamlessTiling": "ריצוף חלק", - "img2imgStrength": "חוזק תמונה לתמונה", - "initialImage": "תמונה ראשונית", - "copyImageToLink": "העתקת תמונה לקישור" - }, - "settings": { - "models": "מודלים", - "displayInProgress": "הצגת תמונות בתהליך", - "confirmOnDelete": "אישור בעת המחיקה", - "useSlidersForAll": "שימוש במחוונים לכל האפשרויות", - "resetWebUI": "איפוס ממשק משתמש", - "resetWebUIDesc1": "איפוס ממשק המשתמש האינטרנטי מאפס רק את המטמון המקומי של הדפדפן של התמונות וההגדרות שנשמרו. זה לא מוחק תמונות מהדיסק.", - "resetComplete": "ממשק המשתמש אופס. יש לבצע רענון דף בכדי לטעון אותו מחדש.", - "enableImageDebugging": "הפעלת איתור באגים בתמונה", - "displayHelpIcons": "הצג סמלי עזרה", - "saveSteps": "שמירת תמונות כל n צעדים", - "resetWebUIDesc2": "אם תמונות לא מופיעות בגלריה או שמשהו אחר לא עובד, נא לנסות איפוס /או אתחול לפני שליחת תקלה ב-GitHub." - }, - "toast": { - "uploadFailed": "העלאה נכשלה", - "imageCopied": "התמונה הועתקה", - "imageLinkCopied": "קישור תמונה הועתק", - "imageNotLoadedDesc": "לא נמצאה תמונה לשליחה למודול תמונה לתמונה", - "imageSavedToGallery": "התמונה נשמרה בגלריה", - "canvasMerged": "קנבס מוזג", - "sentToImageToImage": "נשלח לתמונה לתמונה", - "sentToUnifiedCanvas": "נשלח אל קנבס מאוחד", - "parametersSet": "הגדרת פרמטרים", - "parametersNotSet": "פרמטרים לא הוגדרו", - "parametersNotSetDesc": "לא נמצאו מטא-נתונים עבור תמונה זו.", - "parametersFailedDesc": "לא ניתן לטעון תמונת התחלה.", - "seedSet": "זרע הוגדר", - "seedNotSetDesc": "לא ניתן היה למצוא זרע לתמונה זו.", - "promptNotSetDesc": "לא היתה אפשרות למצוא בקשה עבור תמונה זו.", - "metadataLoadFailed": "טעינת מטא-נתונים נכשלה", - "initialImageSet": "סט תמונה ראשוני", - "initialImageNotSet": "התמונה הראשונית לא הוגדרה", - "initialImageNotSetDesc": "לא ניתן היה לטעון את התמונה הראשונית", - "uploadFailedUnableToLoadDesc": "לא ניתן לטעון את הקובץ", - "tempFoldersEmptied": "התיקייה הזמנית רוקנה", - "downloadImageStarted": "הורדת התמונה החלה", - "imageNotLoaded": "לא נטענה תמונה", - "parametersFailed": "בעיה בטעינת פרמטרים", - "promptNotSet": "בקשה לא הוגדרה", - "upscalingFailed": "העלאת קנה המידה נכשלה", - "faceRestoreFailed": "שחזור הפנים נכשל", - "seedNotSet": "זרע לא הוגדר", - "promptSet": "בקשה הוגדרה" - }, - "tooltip": { - "feature": { - "gallery": "הגלריה מציגה יצירות מתיקיית הפלטים בעת יצירתם. ההגדרות מאוחסנות בתוך קבצים ונגישות באמצעות תפריט הקשר.", - "upscale": "השתמש ב-ESRGAN כדי להגדיל את התמונה מיד לאחר היצירה.", - "imageToImage": "תמונה לתמונה טוענת כל תמונה כראשונית, המשמשת לאחר מכן ליצירת תמונה חדשה יחד עם הבקשה. ככל שהערך גבוה יותר, כך תמונת התוצאה תשתנה יותר. ערכים מ- 0.0 עד 1.0 אפשריים, הטווח המומלץ הוא .25-.75", - "seamCorrection": "שליטה בטיפול בתפרים גלויים המתרחשים בין תמונות שנוצרו על בד הציור.", - "prompt": "זהו שדה הבקשה. הבקשה כוללת אובייקטי יצירה ומונחים סגנוניים. באפשרותך להוסיף משקל (חשיבות אסימון) גם בשורת הפקודה, אך פקודות ופרמטרים של CLI לא יפעלו.", - "variations": "נסה וריאציה עם ערך בין 0.1 ל- 1.0 כדי לשנות את התוצאה עבור זרע נתון. וריאציות מעניינות של הזרע הן בין 0.1 ל -0.3.", - "other": "אפשרויות אלה יאפשרו מצבי עיבוד חלופיים עבור ההרצה. 'ריצוף חלק' ייצור תבניות חוזרות בפלט. 'רזולוציה גבוהה' נוצר בשני שלבים עם img2img: השתמש בהגדרה זו כאשר אתה רוצה תמונה גדולה וקוהרנטית יותר ללא חפצים. פעולה זאת תקח יותר זמן מפעולת טקסט לתמונה רגילה.", - "faceCorrection": "תיקון פנים עם GFPGAN או Codeformer: האלגוריתם מזהה פרצופים בתמונה ומתקן כל פגם. ערך גבוה ישנה את התמונה יותר, וכתוצאה מכך הפרצופים יהיו אטרקטיביים יותר. Codeformer עם נאמנות גבוהה יותר משמר את התמונה המקורית על חשבון תיקון פנים חזק יותר.", - "seed": "ערך הזרע משפיע על הרעש הראשוני שממנו נוצרת התמונה. אתה יכול להשתמש בזרעים שכבר קיימים מתמונות קודמות. 'סף רעש' משמש להפחתת חפצים בערכי CFG גבוהים (נסה את טווח 0-10), ופרלין כדי להוסיף רעשי פרלין במהלך היצירה: שניהם משמשים להוספת וריאציה לתפוקות שלך.", - "infillAndScaling": "נהל שיטות מילוי (המשמשות באזורים עם מסיכה או אזורים שנמחקו בבד הציור) ושינוי קנה מידה (שימושי לגדלים קטנים של תיבות תוחמות).", - "boundingBox": "התיבה התוחמת זהה להגדרות 'רוחב' ו'גובה' עבור 'טקסט לתמונה' או 'תמונה לתמונה'. רק האזור בתיבה יעובד." - } - }, - "unifiedCanvas": { - "layer": "שכבה", - "base": "בסיס", - "maskingOptions": "אפשרויות מסכות", - "enableMask": "הפעלת מסיכה", - "colorPicker": "בוחר הצבעים", - "preserveMaskedArea": "שימור איזור ממוסך", - "clearMask": "ניקוי מסיכה", - "brush": "מברשת", - "eraser": "מחק", - "fillBoundingBox": "מילוי תיבה תוחמת", - "eraseBoundingBox": "מחק תיבה תוחמת", - "copyToClipboard": "העתק ללוח ההדבקה", - "downloadAsImage": "הורדה כתמונה", - "undo": "ביטול", - "redo": "ביצוע מחדש", - "clearCanvas": "ניקוי קנבס", - "showGrid": "הצגת רשת", - "snapToGrid": "הצמדה לרשת", - "darkenOutsideSelection": "הכהיית בחירה חיצונית", - "saveBoxRegionOnly": "שמירת איזור תיבה בלבד", - "limitStrokesToBox": "הגבלת משיכות לקופסא", - "showCanvasDebugInfo": "הצגת מידע איתור באגים בקנבס", - "clearCanvasHistory": "ניקוי הסטוריית קנבס", - "clearHistory": "ניקוי היסטוריה", - "clearCanvasHistoryConfirm": "האם את/ה בטוח/ה שברצונך לנקות את היסטוריית הקנבס?", - "emptyFolder": "ריקון תיקייה", - "emptyTempImagesFolderConfirm": "האם את/ה בטוח/ה שברצונך לרוקן את התיקיה הזמנית?", - "activeLayer": "שכבה פעילה", - "canvasScale": "קנה מידה של קנבס", - "betaLimitToBox": "הגבל לקופסא", - "betaDarkenOutside": "הכההת הבחוץ", - "canvasDimensions": "מידות קנבס", - "previous": "הקודם", - "next": "הבא", - "accept": "אישור", - "showHide": "הצג/הסתר", - "discardAll": "בטל הכל", - "betaClear": "איפוס", - "boundingBox": "תיבה תוחמת", - "scaledBoundingBox": "תיבה תוחמת לאחר שינוי קנה מידה", - "betaPreserveMasked": "שמר מסיכה", - "brushOptions": "אפשרויות מברשת", - "brushSize": "גודל", - "mergeVisible": "מיזוג תוכן גלוי", - "move": "הזזה", - "resetView": "איפוס תצוגה", - "saveToGallery": "שמור לגלריה", - "canvasSettings": "הגדרות קנבס", - "showIntermediates": "הצגת מתווכים", - "autoSaveToGallery": "שמירה אוטומטית בגלריה", - "emptyTempImageFolder": "ריקון תיקיית תמונות זמניות", - "clearCanvasHistoryMessage": "ניקוי היסטוריית הקנבס משאיר את הקנבס הנוכחי ללא שינוי, אך מנקה באופן בלתי הפיך את היסטוריית הביטול והביצוע מחדש.", - "emptyTempImagesFolderMessage": "ריקון תיקיית התמונה הזמנית גם מאפס באופן מלא את הקנבס המאוחד. זה כולל את כל היסטוריית הביטול/ביצוע מחדש, תמונות באזור ההערכות ושכבת הבסיס של בד הציור.", - "boundingBoxPosition": "מיקום תיבה תוחמת", - "canvasPosition": "מיקום קנבס", - "cursorPosition": "מיקום הסמן", - "mask": "מסכה" - } -} diff --git a/invokeai/frontend/web/dist/locales/it.json b/invokeai/frontend/web/dist/locales/it.json deleted file mode 100644 index 53b0339ae4..0000000000 --- a/invokeai/frontend/web/dist/locales/it.json +++ /dev/null @@ -1,1504 +0,0 @@ -{ - "common": { - "hotkeysLabel": "Tasti di scelta rapida", - "languagePickerLabel": "Lingua", - "reportBugLabel": "Segnala un errore", - "settingsLabel": "Impostazioni", - "img2img": "Immagine a Immagine", - "unifiedCanvas": "Tela unificata", - "nodes": "Editor del flusso di lavoro", - "langItalian": "Italiano", - "nodesDesc": "Attualmente è in fase di sviluppo un sistema basato su nodi per la generazione di immagini. Resta sintonizzato per gli aggiornamenti su questa fantastica funzionalità.", - "postProcessing": "Post-elaborazione", - "postProcessDesc1": "Invoke AI offre un'ampia varietà di funzionalità di post-elaborazione. Ampliamento Immagine e Restaura Volti sono già disponibili nell'interfaccia Web. È possibile accedervi dal menu 'Opzioni avanzate' delle schede 'Testo a Immagine' e 'Immagine a Immagine'. È inoltre possibile elaborare le immagini direttamente, utilizzando i pulsanti di azione dell'immagine sopra la visualizzazione dell'immagine corrente o nel visualizzatore.", - "postProcessDesc2": "Presto verrà rilasciata un'interfaccia utente dedicata per facilitare flussi di lavoro di post-elaborazione più avanzati.", - "postProcessDesc3": "L'interfaccia da riga di comando di 'Invoke AI' offre varie altre funzionalità tra cui Embiggen.", - "training": "Addestramento", - "trainingDesc1": "Un flusso di lavoro dedicato per addestrare i tuoi Incorporamenti e Checkpoint utilizzando Inversione Testuale e Dreambooth dall'interfaccia web.", - "trainingDesc2": "InvokeAI supporta già l'addestramento di incorporamenti personalizzati utilizzando l'inversione testuale tramite lo script principale.", - "upload": "Caricamento", - "close": "Chiudi", - "load": "Carica", - "back": "Indietro", - "statusConnected": "Collegato", - "statusDisconnected": "Disconnesso", - "statusError": "Errore", - "statusPreparing": "Preparazione", - "statusProcessingCanceled": "Elaborazione annullata", - "statusProcessingComplete": "Elaborazione completata", - "statusGenerating": "Generazione in corso", - "statusGeneratingTextToImage": "Generazione Testo a Immagine", - "statusGeneratingImageToImage": "Generazione da Immagine a Immagine", - "statusGeneratingInpainting": "Generazione Inpainting", - "statusGeneratingOutpainting": "Generazione Outpainting", - "statusGenerationComplete": "Generazione completata", - "statusIterationComplete": "Iterazione completata", - "statusSavingImage": "Salvataggio dell'immagine", - "statusRestoringFaces": "Restaura volti", - "statusRestoringFacesGFPGAN": "Restaura volti (GFPGAN)", - "statusRestoringFacesCodeFormer": "Restaura volti (CodeFormer)", - "statusUpscaling": "Ampliamento", - "statusUpscalingESRGAN": "Ampliamento (ESRGAN)", - "statusLoadingModel": "Caricamento del modello", - "statusModelChanged": "Modello cambiato", - "githubLabel": "GitHub", - "discordLabel": "Discord", - "langArabic": "Arabo", - "langEnglish": "Inglese", - "langFrench": "Francese", - "langGerman": "Tedesco", - "langJapanese": "Giapponese", - "langPolish": "Polacco", - "langBrPortuguese": "Portoghese Basiliano", - "langRussian": "Russo", - "langUkranian": "Ucraino", - "langSpanish": "Spagnolo", - "statusMergingModels": "Fusione Modelli", - "statusMergedModels": "Modelli fusi", - "langSimplifiedChinese": "Cinese semplificato", - "langDutch": "Olandese", - "statusModelConverted": "Modello Convertito", - "statusConvertingModel": "Conversione Modello", - "langKorean": "Coreano", - "langPortuguese": "Portoghese", - "loading": "Caricamento in corso", - "langHebrew": "Ebraico", - "loadingInvokeAI": "Caricamento Invoke AI", - "postprocessing": "Post Elaborazione", - "txt2img": "Testo a Immagine", - "accept": "Accetta", - "cancel": "Annulla", - "linear": "Lineare", - "generate": "Genera", - "random": "Casuale", - "openInNewTab": "Apri in una nuova scheda", - "areYouSure": "Sei sicuro?", - "dontAskMeAgain": "Non chiedermelo più", - "imagePrompt": "Prompt Immagine", - "darkMode": "Modalità scura", - "lightMode": "Modalità chiara", - "batch": "Gestione Lotto", - "modelManager": "Gestore modello", - "communityLabel": "Comunità", - "nodeEditor": "Editor dei nodi", - "statusProcessing": "Elaborazione in corso", - "advanced": "Avanzate", - "imageFailedToLoad": "Impossibile caricare l'immagine", - "learnMore": "Per saperne di più", - "ipAdapter": "Adattatore IP", - "t2iAdapter": "Adattatore T2I", - "controlAdapter": "Adattatore di Controllo", - "controlNet": "ControlNet", - "auto": "Automatico" - }, - "gallery": { - "generations": "Generazioni", - "showGenerations": "Mostra Generazioni", - "uploads": "Caricamenti", - "showUploads": "Mostra caricamenti", - "galleryImageSize": "Dimensione dell'immagine", - "galleryImageResetSize": "Ripristina dimensioni", - "gallerySettings": "Impostazioni della galleria", - "maintainAspectRatio": "Mantenere le proporzioni", - "autoSwitchNewImages": "Passaggio automatico a nuove immagini", - "singleColumnLayout": "Layout a colonna singola", - "allImagesLoaded": "Tutte le immagini caricate", - "loadMore": "Carica altro", - "noImagesInGallery": "Nessuna immagine da visualizzare", - "deleteImage": "Elimina l'immagine", - "deleteImagePermanent": "Le immagini eliminate non possono essere ripristinate.", - "deleteImageBin": "Le immagini eliminate verranno spostate nel Cestino del tuo sistema operativo.", - "images": "Immagini", - "assets": "Risorse", - "autoAssignBoardOnClick": "Assegna automaticamente la bacheca al clic", - "featuresWillReset": "Se elimini questa immagine, quelle funzionalità verranno immediatamente ripristinate.", - "loading": "Caricamento in corso", - "unableToLoad": "Impossibile caricare la Galleria", - "currentlyInUse": "Questa immagine è attualmente utilizzata nelle seguenti funzionalità:", - "copy": "Copia", - "download": "Scarica", - "setCurrentImage": "Imposta come immagine corrente", - "preparingDownload": "Preparazione del download", - "preparingDownloadFailed": "Problema durante la preparazione del download", - "downloadSelection": "Scarica gli elementi selezionati" - }, - "hotkeys": { - "keyboardShortcuts": "Tasti rapidi", - "appHotkeys": "Tasti di scelta rapida dell'applicazione", - "generalHotkeys": "Tasti di scelta rapida generali", - "galleryHotkeys": "Tasti di scelta rapida della galleria", - "unifiedCanvasHotkeys": "Tasti di scelta rapida Tela Unificata", - "invoke": { - "title": "Invoke", - "desc": "Genera un'immagine" - }, - "cancel": { - "title": "Annulla", - "desc": "Annulla la generazione dell'immagine" - }, - "focusPrompt": { - "title": "Metti a fuoco il Prompt", - "desc": "Mette a fuoco l'area di immissione del prompt" - }, - "toggleOptions": { - "title": "Attiva/disattiva le opzioni", - "desc": "Apre e chiude il pannello delle opzioni" - }, - "pinOptions": { - "title": "Appunta le opzioni", - "desc": "Blocca il pannello delle opzioni" - }, - "toggleViewer": { - "title": "Attiva/disattiva visualizzatore", - "desc": "Apre e chiude il visualizzatore immagini" - }, - "toggleGallery": { - "title": "Attiva/disattiva Galleria", - "desc": "Apre e chiude il pannello della galleria" - }, - "maximizeWorkSpace": { - "title": "Massimizza lo spazio di lavoro", - "desc": "Chiude i pannelli e massimizza l'area di lavoro" - }, - "changeTabs": { - "title": "Cambia scheda", - "desc": "Passa a un'altra area di lavoro" - }, - "consoleToggle": { - "title": "Attiva/disattiva console", - "desc": "Apre e chiude la console" - }, - "setPrompt": { - "title": "Imposta Prompt", - "desc": "Usa il prompt dell'immagine corrente" - }, - "setSeed": { - "title": "Imposta seme", - "desc": "Usa il seme dell'immagine corrente" - }, - "setParameters": { - "title": "Imposta parametri", - "desc": "Utilizza tutti i parametri dell'immagine corrente" - }, - "restoreFaces": { - "title": "Restaura volti", - "desc": "Restaura l'immagine corrente" - }, - "upscale": { - "title": "Amplia", - "desc": "Amplia l'immagine corrente" - }, - "showInfo": { - "title": "Mostra informazioni", - "desc": "Mostra le informazioni sui metadati dell'immagine corrente" - }, - "sendToImageToImage": { - "title": "Invia a Immagine a Immagine", - "desc": "Invia l'immagine corrente a da Immagine a Immagine" - }, - "deleteImage": { - "title": "Elimina immagine", - "desc": "Elimina l'immagine corrente" - }, - "closePanels": { - "title": "Chiudi pannelli", - "desc": "Chiude i pannelli aperti" - }, - "previousImage": { - "title": "Immagine precedente", - "desc": "Visualizza l'immagine precedente nella galleria" - }, - "nextImage": { - "title": "Immagine successiva", - "desc": "Visualizza l'immagine successiva nella galleria" - }, - "toggleGalleryPin": { - "title": "Attiva/disattiva il blocco della galleria", - "desc": "Blocca/sblocca la galleria dall'interfaccia utente" - }, - "increaseGalleryThumbSize": { - "title": "Aumenta dimensione immagini nella galleria", - "desc": "Aumenta la dimensione delle miniature della galleria" - }, - "decreaseGalleryThumbSize": { - "title": "Riduci dimensione immagini nella galleria", - "desc": "Riduce le dimensioni delle miniature della galleria" - }, - "selectBrush": { - "title": "Seleziona Pennello", - "desc": "Seleziona il pennello della tela" - }, - "selectEraser": { - "title": "Seleziona Cancellino", - "desc": "Seleziona il cancellino della tela" - }, - "decreaseBrushSize": { - "title": "Riduci la dimensione del pennello", - "desc": "Riduce la dimensione del pennello/cancellino della tela" - }, - "increaseBrushSize": { - "title": "Aumenta la dimensione del pennello", - "desc": "Aumenta la dimensione del pennello/cancellino della tela" - }, - "decreaseBrushOpacity": { - "title": "Riduci l'opacità del pennello", - "desc": "Diminuisce l'opacità del pennello della tela" - }, - "increaseBrushOpacity": { - "title": "Aumenta l'opacità del pennello", - "desc": "Aumenta l'opacità del pennello della tela" - }, - "moveTool": { - "title": "Strumento Sposta", - "desc": "Consente la navigazione nella tela" - }, - "fillBoundingBox": { - "title": "Riempi riquadro di selezione", - "desc": "Riempie il riquadro di selezione con il colore del pennello" - }, - "eraseBoundingBox": { - "title": "Cancella riquadro di selezione", - "desc": "Cancella l'area del riquadro di selezione" - }, - "colorPicker": { - "title": "Seleziona Selettore colore", - "desc": "Seleziona il selettore colore della tela" - }, - "toggleSnap": { - "title": "Attiva/disattiva Aggancia", - "desc": "Attiva/disattiva Aggancia alla griglia" - }, - "quickToggleMove": { - "title": "Attiva/disattiva Sposta rapido", - "desc": "Attiva/disattiva temporaneamente la modalità Sposta" - }, - "toggleLayer": { - "title": "Attiva/disattiva livello", - "desc": "Attiva/disattiva la selezione del livello base/maschera" - }, - "clearMask": { - "title": "Cancella maschera", - "desc": "Cancella l'intera maschera" - }, - "hideMask": { - "title": "Nascondi maschera", - "desc": "Nasconde e mostra la maschera" - }, - "showHideBoundingBox": { - "title": "Mostra/Nascondi riquadro di selezione", - "desc": "Attiva/disattiva la visibilità del riquadro di selezione" - }, - "mergeVisible": { - "title": "Fondi il visibile", - "desc": "Fonde tutti gli strati visibili della tela" - }, - "saveToGallery": { - "title": "Salva nella galleria", - "desc": "Salva la tela corrente nella galleria" - }, - "copyToClipboard": { - "title": "Copia negli appunti", - "desc": "Copia la tela corrente negli appunti" - }, - "downloadImage": { - "title": "Scarica l'immagine", - "desc": "Scarica la tela corrente" - }, - "undoStroke": { - "title": "Annulla tratto", - "desc": "Annulla una pennellata" - }, - "redoStroke": { - "title": "Ripeti tratto", - "desc": "Ripeti una pennellata" - }, - "resetView": { - "title": "Reimposta vista", - "desc": "Ripristina la visualizzazione della tela" - }, - "previousStagingImage": { - "title": "Immagine della sessione precedente", - "desc": "Immagine dell'area della sessione precedente" - }, - "nextStagingImage": { - "title": "Immagine della sessione successivo", - "desc": "Immagine dell'area della sessione successiva" - }, - "acceptStagingImage": { - "title": "Accetta l'immagine della sessione", - "desc": "Accetta l'immagine dell'area della sessione corrente" - }, - "nodesHotkeys": "Tasti di scelta rapida dei Nodi", - "addNodes": { - "title": "Aggiungi Nodi", - "desc": "Apre il menu Aggiungi Nodi" - } - }, - "modelManager": { - "modelManager": "Gestione Modelli", - "model": "Modello", - "allModels": "Tutti i Modelli", - "checkpointModels": "Checkpoint", - "diffusersModels": "Diffusori", - "safetensorModels": "SafeTensor", - "modelAdded": "Modello Aggiunto", - "modelUpdated": "Modello Aggiornato", - "modelEntryDeleted": "Voce del modello eliminata", - "cannotUseSpaces": "Impossibile utilizzare gli spazi", - "addNew": "Aggiungi nuovo", - "addNewModel": "Aggiungi nuovo Modello", - "addCheckpointModel": "Aggiungi modello Checkpoint / Safetensor", - "addDiffuserModel": "Aggiungi Diffusori", - "addManually": "Aggiungi manualmente", - "manual": "Manuale", - "name": "Nome", - "nameValidationMsg": "Inserisci un nome per il modello", - "description": "Descrizione", - "descriptionValidationMsg": "Aggiungi una descrizione per il modello", - "config": "Configurazione", - "configValidationMsg": "Percorso del file di configurazione del modello.", - "modelLocation": "Posizione del modello", - "modelLocationValidationMsg": "Fornisci il percorso di una cartella locale in cui è archiviato il tuo modello di diffusori", - "repo_id": "Repo ID", - "repoIDValidationMsg": "Repository online del modello", - "vaeLocation": "Posizione file VAE", - "vaeLocationValidationMsg": "Percorso dove si trova il file VAE.", - "vaeRepoID": "VAE Repo ID", - "vaeRepoIDValidationMsg": "Repository online del file VAE", - "width": "Larghezza", - "widthValidationMsg": "Larghezza predefinita del modello.", - "height": "Altezza", - "heightValidationMsg": "Altezza predefinita del modello.", - "addModel": "Aggiungi modello", - "updateModel": "Aggiorna modello", - "availableModels": "Modelli disponibili", - "search": "Ricerca", - "load": "Carica", - "active": "attivo", - "notLoaded": "non caricato", - "cached": "memorizzato nella cache", - "checkpointFolder": "Cartella Checkpoint", - "clearCheckpointFolder": "Svuota cartella checkpoint", - "findModels": "Trova modelli", - "scanAgain": "Scansiona nuovamente", - "modelsFound": "Modelli trovati", - "selectFolder": "Seleziona cartella", - "selected": "Selezionato", - "selectAll": "Seleziona tutto", - "deselectAll": "Deseleziona tutto", - "showExisting": "Mostra esistenti", - "addSelected": "Aggiungi selezionato", - "modelExists": "Il modello esiste", - "selectAndAdd": "Seleziona e aggiungi i modelli elencati", - "noModelsFound": "Nessun modello trovato", - "delete": "Elimina", - "deleteModel": "Elimina modello", - "deleteConfig": "Elimina configurazione", - "deleteMsg1": "Sei sicuro di voler eliminare questo modello da InvokeAI?", - "deleteMsg2": "Questo eliminerà il modello dal disco se si trova nella cartella principale di InvokeAI. Se utilizzi una cartella personalizzata, il modello NON verrà eliminato dal disco.", - "formMessageDiffusersModelLocation": "Ubicazione modelli diffusori", - "formMessageDiffusersModelLocationDesc": "Inseriscine almeno uno.", - "formMessageDiffusersVAELocation": "Ubicazione file VAE", - "formMessageDiffusersVAELocationDesc": "Se non fornito, InvokeAI cercherà il file VAE all'interno dell'ubicazione del modello sopra indicata.", - "convert": "Converti", - "convertToDiffusers": "Converti in Diffusori", - "convertToDiffusersHelpText2": "Questo processo sostituirà la voce in Gestione Modelli con la versione Diffusori dello stesso modello.", - "convertToDiffusersHelpText4": "Questo è un processo una tantum. Potrebbero essere necessari circa 30-60 secondi a seconda delle specifiche del tuo computer.", - "convertToDiffusersHelpText5": "Assicurati di avere spazio su disco sufficiente. I modelli generalmente variano tra 2 GB e 7 GB di dimensioni.", - "convertToDiffusersHelpText6": "Vuoi convertire questo modello?", - "convertToDiffusersSaveLocation": "Ubicazione salvataggio", - "inpainting": "v1 Inpainting", - "customConfig": "Configurazione personalizzata", - "statusConverting": "Conversione in corso", - "modelConverted": "Modello convertito", - "sameFolder": "Stessa cartella", - "invokeRoot": "Cartella InvokeAI", - "merge": "Unisci", - "modelsMerged": "Modelli uniti", - "mergeModels": "Unisci Modelli", - "modelOne": "Modello 1", - "modelTwo": "Modello 2", - "mergedModelName": "Nome del modello unito", - "alpha": "Alpha", - "interpolationType": "Tipo di interpolazione", - "mergedModelCustomSaveLocation": "Percorso personalizzato", - "invokeAIFolder": "Cartella Invoke AI", - "ignoreMismatch": "Ignora le discrepanze tra i modelli selezionati", - "modelMergeHeaderHelp2": "Solo i diffusori sono disponibili per l'unione. Se desideri unire un modello Checkpoint, convertilo prima in Diffusori.", - "modelMergeInterpAddDifferenceHelp": "In questa modalità, il Modello 3 viene prima sottratto dal Modello 2. La versione risultante viene unita al Modello 1 con il tasso Alpha impostato sopra.", - "mergedModelSaveLocation": "Ubicazione salvataggio", - "convertToDiffusersHelpText1": "Questo modello verrà convertito nel formato 🧨 Diffusore.", - "custom": "Personalizzata", - "convertToDiffusersHelpText3": "Il file checkpoint su disco SARÀ eliminato se si trova nella cartella principale di InvokeAI. Se si trova in una posizione personalizzata, NON verrà eliminato.", - "v1": "v1", - "pathToCustomConfig": "Percorso alla configurazione personalizzata", - "modelThree": "Modello 3", - "modelMergeHeaderHelp1": "Puoi unire fino a tre diversi modelli per creare una miscela adatta alle tue esigenze.", - "modelMergeAlphaHelp": "Il valore Alpha controlla la forza di miscelazione dei modelli. Valori Alpha più bassi attenuano l'influenza del secondo modello.", - "customSaveLocation": "Ubicazione salvataggio personalizzata", - "weightedSum": "Somma pesata", - "sigmoid": "Sigmoide", - "inverseSigmoid": "Sigmoide inverso", - "v2_base": "v2 (512px)", - "v2_768": "v2 (768px)", - "none": "nessuno", - "addDifference": "Aggiungi differenza", - "pickModelType": "Scegli il tipo di modello", - "scanForModels": "Cerca modelli", - "variant": "Variante", - "baseModel": "Modello Base", - "vae": "VAE", - "modelUpdateFailed": "Aggiornamento del modello non riuscito", - "modelConversionFailed": "Conversione del modello non riuscita", - "modelsMergeFailed": "Unione modelli non riuscita", - "selectModel": "Seleziona Modello", - "modelDeleted": "Modello eliminato", - "modelDeleteFailed": "Impossibile eliminare il modello", - "noCustomLocationProvided": "Nessuna posizione personalizzata fornita", - "convertingModelBegin": "Conversione del modello. Attendere prego.", - "importModels": "Importa modelli", - "modelsSynced": "Modelli sincronizzati", - "modelSyncFailed": "Sincronizzazione modello non riuscita", - "settings": "Impostazioni", - "syncModels": "Sincronizza Modelli", - "syncModelsDesc": "Se i tuoi modelli non sono sincronizzati con il back-end, puoi aggiornarli utilizzando questa opzione. Questo è generalmente utile nei casi in cui aggiorni manualmente il tuo file models.yaml o aggiungi modelli alla cartella principale di InvokeAI dopo l'avvio dell'applicazione.", - "loraModels": "LoRA", - "oliveModels": "Olive", - "onnxModels": "ONNX", - "noModels": "Nessun modello trovato", - "predictionType": "Tipo di previsione (per modelli Stable Diffusion 2.x ed alcuni modelli Stable Diffusion 1.x)", - "quickAdd": "Aggiunta rapida", - "simpleModelDesc": "Fornire un percorso a un modello diffusori locale, un modello checkpoint/safetensor locale, un ID repository HuggingFace o un URL del modello checkpoint/diffusori.", - "advanced": "Avanzate", - "useCustomConfig": "Utilizza configurazione personalizzata", - "closeAdvanced": "Chiudi Avanzate", - "modelType": "Tipo di modello", - "customConfigFileLocation": "Posizione del file di configurazione personalizzato", - "vaePrecision": "Precisione VAE" - }, - "parameters": { - "images": "Immagini", - "steps": "Passi", - "cfgScale": "Scala CFG", - "width": "Larghezza", - "height": "Altezza", - "seed": "Seme", - "randomizeSeed": "Seme randomizzato", - "shuffle": "Mescola il seme", - "noiseThreshold": "Soglia del rumore", - "perlinNoise": "Rumore Perlin", - "variations": "Variazioni", - "variationAmount": "Quantità di variazione", - "seedWeights": "Pesi dei semi", - "faceRestoration": "Restauro volti", - "restoreFaces": "Restaura volti", - "type": "Tipo", - "strength": "Forza", - "upscaling": "Ampliamento", - "upscale": "Amplia (Shift + U)", - "upscaleImage": "Amplia Immagine", - "scale": "Scala", - "otherOptions": "Altre opzioni", - "seamlessTiling": "Piastrella senza cuciture", - "hiresOptim": "Ottimizzazione alta risoluzione", - "imageFit": "Adatta l'immagine iniziale alle dimensioni di output", - "codeformerFidelity": "Fedeltà", - "scaleBeforeProcessing": "Scala prima dell'elaborazione", - "scaledWidth": "Larghezza ridimensionata", - "scaledHeight": "Altezza ridimensionata", - "infillMethod": "Metodo di riempimento", - "tileSize": "Dimensione piastrella", - "boundingBoxHeader": "Rettangolo di selezione", - "seamCorrectionHeader": "Correzione della cucitura", - "infillScalingHeader": "Riempimento e ridimensionamento", - "img2imgStrength": "Forza da Immagine a Immagine", - "toggleLoopback": "Attiva/disattiva elaborazione ricorsiva", - "sendTo": "Invia a", - "sendToImg2Img": "Invia a Immagine a Immagine", - "sendToUnifiedCanvas": "Invia a Tela Unificata", - "copyImageToLink": "Copia l'immagine nel collegamento", - "downloadImage": "Scarica l'immagine", - "openInViewer": "Apri nel visualizzatore", - "closeViewer": "Chiudi visualizzatore", - "usePrompt": "Usa Prompt", - "useSeed": "Usa Seme", - "useAll": "Usa Tutto", - "useInitImg": "Usa l'immagine iniziale", - "info": "Informazioni", - "initialImage": "Immagine iniziale", - "showOptionsPanel": "Mostra il pannello laterale (O o T)", - "general": "Generale", - "denoisingStrength": "Forza di riduzione del rumore", - "copyImage": "Copia immagine", - "hiresStrength": "Forza Alta Risoluzione", - "imageToImage": "Immagine a Immagine", - "cancel": { - "schedule": "Annulla dopo l'iterazione corrente", - "isScheduled": "Annullamento", - "setType": "Imposta il tipo di annullamento", - "immediate": "Annulla immediatamente", - "cancel": "Annulla" - }, - "hSymmetryStep": "Passi Simmetria Orizzontale", - "vSymmetryStep": "Passi Simmetria Verticale", - "symmetry": "Simmetria", - "hidePreview": "Nascondi l'anteprima", - "showPreview": "Mostra l'anteprima", - "noiseSettings": "Rumore", - "seamlessXAxis": "Asse X", - "seamlessYAxis": "Asse Y", - "scheduler": "Campionatore", - "boundingBoxWidth": "Larghezza riquadro di delimitazione", - "boundingBoxHeight": "Altezza riquadro di delimitazione", - "positivePromptPlaceholder": "Prompt Positivo", - "negativePromptPlaceholder": "Prompt Negativo", - "controlNetControlMode": "Modalità di controllo", - "clipSkip": "CLIP Skip", - "aspectRatio": "Proporzioni", - "maskAdjustmentsHeader": "Regolazioni della maschera", - "maskBlur": "Sfocatura", - "maskBlurMethod": "Metodo di sfocatura", - "seamLowThreshold": "Basso", - "seamHighThreshold": "Alto", - "coherencePassHeader": "Passaggio di coerenza", - "coherenceSteps": "Passi", - "coherenceStrength": "Forza", - "compositingSettingsHeader": "Impostazioni di composizione", - "patchmatchDownScaleSize": "Ridimensiona", - "coherenceMode": "Modalità", - "invoke": { - "noNodesInGraph": "Nessun nodo nel grafico", - "noModelSelected": "Nessun modello selezionato", - "noPrompts": "Nessun prompt generato", - "noInitialImageSelected": "Nessuna immagine iniziale selezionata", - "readyToInvoke": "Pronto per invocare", - "addingImagesTo": "Aggiungi immagini a", - "systemBusy": "Sistema occupato", - "unableToInvoke": "Impossibile invocare", - "systemDisconnected": "Sistema disconnesso", - "noControlImageForControlAdapter": "L'adattatore di controllo #{{number}} non ha un'immagine di controllo", - "noModelForControlAdapter": "Nessun modello selezionato per l'adattatore di controllo #{{number}}.", - "incompatibleBaseModelForControlAdapter": "Il modello dell'adattatore di controllo #{{number}} non è compatibile con il modello principale.", - "missingNodeTemplate": "Modello di nodo mancante", - "missingInputForField": "{{nodeLabel}} -> {{fieldLabel}} ingresso mancante", - "missingFieldTemplate": "Modello di campo mancante" - }, - "enableNoiseSettings": "Abilita le impostazioni del rumore", - "cpuNoise": "Rumore CPU", - "gpuNoise": "Rumore GPU", - "useCpuNoise": "Usa la CPU per generare rumore", - "manualSeed": "Seme manuale", - "randomSeed": "Seme casuale", - "iterations": "Iterazioni", - "iterationsWithCount_one": "{{count}} Iterazione", - "iterationsWithCount_many": "{{count}} Iterazioni", - "iterationsWithCount_other": "{{count}} Iterazioni", - "seamlessX&Y": "Senza cuciture X & Y", - "isAllowedToUpscale": { - "useX2Model": "L'immagine è troppo grande per l'ampliamento con il modello x4, utilizza il modello x2", - "tooLarge": "L'immagine è troppo grande per l'ampliamento, seleziona un'immagine più piccola" - }, - "seamlessX": "Senza cuciture X", - "seamlessY": "Senza cuciture Y", - "imageActions": "Azioni Immagine", - "aspectRatioFree": "Libere" - }, - "settings": { - "models": "Modelli", - "displayInProgress": "Visualizza le immagini di avanzamento", - "saveSteps": "Salva le immagini ogni n passaggi", - "confirmOnDelete": "Conferma l'eliminazione", - "displayHelpIcons": "Visualizza le icone della Guida", - "enableImageDebugging": "Abilita il debug dell'immagine", - "resetWebUI": "Reimposta l'interfaccia utente Web", - "resetWebUIDesc1": "Il ripristino dell'interfaccia utente Web reimposta solo la cache locale del browser delle immagini e le impostazioni memorizzate. Non cancella alcuna immagine dal disco.", - "resetWebUIDesc2": "Se le immagini non vengono visualizzate nella galleria o qualcos'altro non funziona, prova a reimpostare prima di segnalare un problema su GitHub.", - "resetComplete": "L'interfaccia utente Web è stata reimpostata.", - "useSlidersForAll": "Usa i cursori per tutte le opzioni", - "general": "Generale", - "consoleLogLevel": "Livello del registro", - "shouldLogToConsole": "Registrazione della console", - "developer": "Sviluppatore", - "antialiasProgressImages": "Anti aliasing delle immagini di avanzamento", - "showProgressInViewer": "Mostra le immagini di avanzamento nel visualizzatore", - "generation": "Generazione", - "ui": "Interfaccia Utente", - "favoriteSchedulersPlaceholder": "Nessun campionatore preferito", - "favoriteSchedulers": "Campionatori preferiti", - "showAdvancedOptions": "Mostra Opzioni Avanzate", - "alternateCanvasLayout": "Layout alternativo della tela", - "beta": "Beta", - "enableNodesEditor": "Abilita l'editor dei nodi", - "experimental": "Sperimentale", - "autoChangeDimensions": "Aggiorna L/A alle impostazioni predefinite del modello in caso di modifica", - "clearIntermediates": "Cancella le immagini intermedie", - "clearIntermediatesDesc3": "Le immagini della galleria non verranno eliminate.", - "clearIntermediatesDesc2": "Le immagini intermedie sono sottoprodotti della generazione, diversi dalle immagini risultanti nella galleria. La cancellazione degli intermedi libererà spazio su disco.", - "intermediatesCleared_one": "Cancellata {{count}} immagine intermedia", - "intermediatesCleared_many": "Cancellate {{count}} immagini intermedie", - "intermediatesCleared_other": "Cancellate {{count}} immagini intermedie", - "clearIntermediatesDesc1": "La cancellazione delle immagini intermedie ripristinerà lo stato di Tela Unificata e ControlNet.", - "intermediatesClearedFailed": "Problema con la cancellazione delle immagini intermedie", - "clearIntermediatesWithCount_one": "Cancella {{count}} immagine intermedia", - "clearIntermediatesWithCount_many": "Cancella {{count}} immagini intermedie", - "clearIntermediatesWithCount_other": "Cancella {{count}} immagini intermedie", - "clearIntermediatesDisabled": "La coda deve essere vuota per cancellare le immagini intermedie" - }, - "toast": { - "tempFoldersEmptied": "Cartella temporanea svuotata", - "uploadFailed": "Caricamento fallito", - "uploadFailedUnableToLoadDesc": "Impossibile caricare il file", - "downloadImageStarted": "Download dell'immagine avviato", - "imageCopied": "Immagine copiata", - "imageLinkCopied": "Collegamento immagine copiato", - "imageNotLoaded": "Nessuna immagine caricata", - "imageNotLoadedDesc": "Impossibile trovare l'immagine", - "imageSavedToGallery": "Immagine salvata nella Galleria", - "canvasMerged": "Tela unita", - "sentToImageToImage": "Inviato a Immagine a Immagine", - "sentToUnifiedCanvas": "Inviato a Tela Unificata", - "parametersSet": "Parametri impostati", - "parametersNotSet": "Parametri non impostati", - "parametersNotSetDesc": "Nessun metadato trovato per questa immagine.", - "parametersFailed": "Problema durante il caricamento dei parametri", - "parametersFailedDesc": "Impossibile caricare l'immagine iniziale.", - "seedSet": "Seme impostato", - "seedNotSet": "Seme non impostato", - "seedNotSetDesc": "Impossibile trovare il seme per questa immagine.", - "promptSet": "Prompt impostato", - "promptNotSet": "Prompt non impostato", - "promptNotSetDesc": "Impossibile trovare il prompt per questa immagine.", - "upscalingFailed": "Ampliamento non riuscito", - "faceRestoreFailed": "Restauro facciale non riuscito", - "metadataLoadFailed": "Impossibile caricare i metadati", - "initialImageSet": "Immagine iniziale impostata", - "initialImageNotSet": "Immagine iniziale non impostata", - "initialImageNotSetDesc": "Impossibile caricare l'immagine iniziale", - "serverError": "Errore del Server", - "disconnected": "Disconnesso dal Server", - "connected": "Connesso al Server", - "canceled": "Elaborazione annullata", - "problemCopyingImageLink": "Impossibile copiare il collegamento dell'immagine", - "uploadFailedInvalidUploadDesc": "Deve essere una singola immagine PNG o JPEG", - "parameterSet": "Parametro impostato", - "parameterNotSet": "Parametro non impostato", - "nodesLoadedFailed": "Impossibile caricare i nodi", - "nodesSaved": "Nodi salvati", - "nodesLoaded": "Nodi caricati", - "nodesCleared": "Nodi cancellati", - "problemCopyingImage": "Impossibile copiare l'immagine", - "nodesNotValidGraph": "Grafico del nodo InvokeAI non valido", - "nodesCorruptedGraph": "Impossibile caricare. Il grafico sembra essere danneggiato.", - "nodesUnrecognizedTypes": "Impossibile caricare. Il grafico ha tipi di dati non riconosciuti", - "nodesNotValidJSON": "JSON non valido", - "nodesBrokenConnections": "Impossibile caricare. Alcune connessioni sono interrotte.", - "baseModelChangedCleared_one": "Il modello base è stato modificato, cancellato o disabilitato {{count}} sotto-modello incompatibile", - "baseModelChangedCleared_many": "Il modello base è stato modificato, cancellato o disabilitato {{count}} sotto-modelli incompatibili", - "baseModelChangedCleared_other": "Il modello base è stato modificato, cancellato o disabilitato {{count}} sotto-modelli incompatibili", - "imageSavingFailed": "Salvataggio dell'immagine non riuscito", - "canvasSentControlnetAssets": "Tela inviata a ControlNet & Risorse", - "problemCopyingCanvasDesc": "Impossibile copiare la tela", - "loadedWithWarnings": "Flusso di lavoro caricato con avvisi", - "canvasCopiedClipboard": "Tela copiata negli appunti", - "maskSavedAssets": "Maschera salvata nelle risorse", - "modelAddFailed": "Aggiunta del modello non riuscita", - "problemDownloadingCanvas": "Problema durante il download della tela", - "problemMergingCanvas": "Problema nell'unione delle tele", - "imageUploaded": "Immagine caricata", - "addedToBoard": "Aggiunto alla bacheca", - "modelAddedSimple": "Modello aggiunto", - "problemImportingMaskDesc": "Impossibile importare la maschera", - "problemCopyingCanvas": "Problema durante la copia della tela", - "problemSavingCanvas": "Problema nel salvataggio della tela", - "canvasDownloaded": "Tela scaricata", - "problemMergingCanvasDesc": "Impossibile unire le tele", - "problemDownloadingCanvasDesc": "Impossibile scaricare la tela", - "imageSaved": "Immagine salvata", - "maskSentControlnetAssets": "Maschera inviata a ControlNet & Risorse", - "canvasSavedGallery": "Tela salvata nella Galleria", - "imageUploadFailed": "Caricamento immagine non riuscito", - "modelAdded": "Modello aggiunto: {{modelName}}", - "problemImportingMask": "Problema durante l'importazione della maschera", - "setInitialImage": "Imposta come immagine iniziale", - "setControlImage": "Imposta come immagine di controllo", - "setNodeField": "Imposta come campo nodo", - "problemSavingMask": "Problema nel salvataggio della maschera", - "problemSavingCanvasDesc": "Impossibile salvare la tela", - "setCanvasInitialImage": "Imposta come immagine iniziale della tela", - "workflowLoaded": "Flusso di lavoro caricato", - "setIPAdapterImage": "Imposta come immagine per l'Adattatore IP", - "problemSavingMaskDesc": "Impossibile salvare la maschera" - }, - "tooltip": { - "feature": { - "prompt": "Questo è il campo del prompt. Il prompt include oggetti di generazione e termini stilistici. Puoi anche aggiungere il peso (importanza del token) nel prompt, ma i comandi e i parametri dell'interfaccia a linea di comando non funzioneranno.", - "gallery": "Galleria visualizza le generazioni dalla cartella degli output man mano che vengono create. Le impostazioni sono memorizzate all'interno di file e accessibili dal menu contestuale.", - "other": "Queste opzioni abiliteranno modalità di elaborazione alternative per Invoke. 'Piastrella senza cuciture' creerà modelli ripetuti nell'output. 'Ottimizzazione Alta risoluzione' è la generazione in due passaggi con 'Immagine a Immagine': usa questa impostazione quando vuoi un'immagine più grande e più coerente senza artefatti. Ci vorrà più tempo del solito 'Testo a Immagine'.", - "seed": "Il valore del Seme influenza il rumore iniziale da cui è formata l'immagine. Puoi usare i semi già esistenti dalle immagini precedenti. 'Soglia del rumore' viene utilizzato per mitigare gli artefatti a valori CFG elevati (provare l'intervallo 0-10) e Perlin per aggiungere il rumore Perlin durante la generazione: entrambi servono per aggiungere variazioni ai risultati.", - "variations": "Prova una variazione con un valore compreso tra 0.1 e 1.0 per modificare il risultato per un dato seme. Variazioni interessanti del seme sono comprese tra 0.1 e 0.3.", - "upscale": "Utilizza ESRGAN per ingrandire l'immagine subito dopo la generazione.", - "faceCorrection": "Correzione del volto con GFPGAN o Codeformer: l'algoritmo rileva i volti nell'immagine e corregge eventuali difetti. Un valore alto cambierà maggiormente l'immagine, dando luogo a volti più attraenti. Codeformer con una maggiore fedeltà preserva l'immagine originale a scapito di una correzione facciale più forte.", - "imageToImage": "Da Immagine a Immagine carica qualsiasi immagine come iniziale, che viene quindi utilizzata per generarne una nuova in base al prompt. Più alto è il valore, più cambierà l'immagine risultante. Sono possibili valori da 0.0 a 1.0, l'intervallo consigliato è 0.25-0.75", - "boundingBox": "Il riquadro di selezione è lo stesso delle impostazioni Larghezza e Altezza per da Testo a Immagine o da Immagine a Immagine. Verrà elaborata solo l'area nella casella.", - "seamCorrection": "Controlla la gestione delle giunzioni visibili che si verificano tra le immagini generate sulla tela.", - "infillAndScaling": "Gestisce i metodi di riempimento (utilizzati su aree mascherate o cancellate dell'area di disegno) e il ridimensionamento (utile per i riquadri di selezione di piccole dimensioni)." - } - }, - "unifiedCanvas": { - "layer": "Livello", - "base": "Base", - "mask": "Maschera", - "maskingOptions": "Opzioni di mascheramento", - "enableMask": "Abilita maschera", - "preserveMaskedArea": "Mantieni area mascherata", - "clearMask": "Elimina la maschera", - "brush": "Pennello", - "eraser": "Cancellino", - "fillBoundingBox": "Riempi rettangolo di selezione", - "eraseBoundingBox": "Cancella rettangolo di selezione", - "colorPicker": "Selettore Colore", - "brushOptions": "Opzioni pennello", - "brushSize": "Dimensioni", - "move": "Sposta", - "resetView": "Reimposta vista", - "mergeVisible": "Fondi il visibile", - "saveToGallery": "Salva nella galleria", - "copyToClipboard": "Copia negli appunti", - "downloadAsImage": "Scarica come immagine", - "undo": "Annulla", - "redo": "Ripeti", - "clearCanvas": "Cancella la Tela", - "canvasSettings": "Impostazioni Tela", - "showIntermediates": "Mostra intermedi", - "showGrid": "Mostra griglia", - "snapToGrid": "Aggancia alla griglia", - "darkenOutsideSelection": "Scurisci l'esterno della selezione", - "autoSaveToGallery": "Salvataggio automatico nella Galleria", - "saveBoxRegionOnly": "Salva solo l'area di selezione", - "limitStrokesToBox": "Limita i tratti all'area di selezione", - "showCanvasDebugInfo": "Mostra ulteriori informazioni sulla Tela", - "clearCanvasHistory": "Cancella cronologia Tela", - "clearHistory": "Cancella la cronologia", - "clearCanvasHistoryMessage": "La cancellazione della cronologia della tela lascia intatta la tela corrente, ma cancella in modo irreversibile la cronologia degli annullamenti e dei ripristini.", - "clearCanvasHistoryConfirm": "Sei sicuro di voler cancellare la cronologia della Tela?", - "emptyTempImageFolder": "Svuota la cartella delle immagini temporanee", - "emptyFolder": "Svuota la cartella", - "emptyTempImagesFolderMessage": "Lo svuotamento della cartella delle immagini temporanee ripristina completamente anche la Tela Unificata. Ciò include tutta la cronologia di annullamento/ripristino, le immagini nell'area di staging e il livello di base della tela.", - "emptyTempImagesFolderConfirm": "Sei sicuro di voler svuotare la cartella temporanea?", - "activeLayer": "Livello attivo", - "canvasScale": "Scala della Tela", - "boundingBox": "Rettangolo di selezione", - "scaledBoundingBox": "Rettangolo di selezione scalato", - "boundingBoxPosition": "Posizione del Rettangolo di selezione", - "canvasDimensions": "Dimensioni della Tela", - "canvasPosition": "Posizione Tela", - "cursorPosition": "Posizione del cursore", - "previous": "Precedente", - "next": "Successivo", - "accept": "Accetta", - "showHide": "Mostra/nascondi", - "discardAll": "Scarta tutto", - "betaClear": "Svuota", - "betaDarkenOutside": "Oscura all'esterno", - "betaLimitToBox": "Limita al rettangolo", - "betaPreserveMasked": "Conserva quanto mascherato", - "antialiasing": "Anti aliasing", - "showResultsOn": "Mostra i risultati (attivato)", - "showResultsOff": "Mostra i risultati (disattivato)" - }, - "accessibility": { - "modelSelect": "Seleziona modello", - "invokeProgressBar": "Barra di avanzamento generazione", - "uploadImage": "Carica immagine", - "previousImage": "Immagine precedente", - "nextImage": "Immagine successiva", - "useThisParameter": "Usa questo parametro", - "reset": "Reimposta", - "copyMetadataJson": "Copia i metadati JSON", - "exitViewer": "Esci dal visualizzatore", - "zoomIn": "Zoom avanti", - "zoomOut": "Zoom indietro", - "rotateCounterClockwise": "Ruotare in senso antiorario", - "rotateClockwise": "Ruotare in senso orario", - "flipHorizontally": "Capovolgi orizzontalmente", - "toggleLogViewer": "Attiva/disattiva visualizzatore registro", - "showOptionsPanel": "Mostra il pannello laterale", - "flipVertically": "Capovolgi verticalmente", - "toggleAutoscroll": "Attiva/disattiva lo scorrimento automatico", - "modifyConfig": "Modifica configurazione", - "menu": "Menu", - "showGalleryPanel": "Mostra il pannello Galleria", - "loadMore": "Carica altro" - }, - "ui": { - "hideProgressImages": "Nascondi avanzamento immagini", - "showProgressImages": "Mostra avanzamento immagini", - "swapSizes": "Scambia dimensioni", - "lockRatio": "Blocca le proporzioni" - }, - "nodes": { - "zoomOutNodes": "Rimpicciolire", - "hideGraphNodes": "Nascondi sovrapposizione grafico", - "hideLegendNodes": "Nascondi la legenda del tipo di campo", - "showLegendNodes": "Mostra legenda del tipo di campo", - "hideMinimapnodes": "Nascondi minimappa", - "showMinimapnodes": "Mostra minimappa", - "zoomInNodes": "Ingrandire", - "fitViewportNodes": "Adatta vista", - "showGraphNodes": "Mostra sovrapposizione grafico", - "resetWorkflowDesc2": "Reimpostare il flusso di lavoro cancellerà tutti i nodi, i bordi e i dettagli del flusso di lavoro.", - "reloadNodeTemplates": "Ricarica i modelli di nodo", - "loadWorkflow": "Importa flusso di lavoro JSON", - "resetWorkflow": "Reimposta flusso di lavoro", - "resetWorkflowDesc": "Sei sicuro di voler reimpostare questo flusso di lavoro?", - "downloadWorkflow": "Esporta flusso di lavoro JSON", - "scheduler": "Campionatore", - "addNode": "Aggiungi nodo", - "sDXLMainModelFieldDescription": "Campo del modello SDXL.", - "boardField": "Bacheca", - "animatedEdgesHelp": "Anima i bordi selezionati e i bordi collegati ai nodi selezionati", - "sDXLMainModelField": "Modello SDXL", - "executionStateInProgress": "In corso", - "executionStateError": "Errore", - "executionStateCompleted": "Completato", - "boardFieldDescription": "Una bacheca della galleria", - "addNodeToolTip": "Aggiungi nodo (Shift+A, Space)", - "sDXLRefinerModelField": "Modello Refiner", - "problemReadingMetadata": "Problema durante la lettura dei metadati dall'immagine", - "colorCodeEdgesHelp": "Bordi con codice colore in base ai campi collegati", - "animatedEdges": "Bordi animati", - "snapToGrid": "Aggancia alla griglia", - "validateConnections": "Convalida connessioni e grafico", - "validateConnectionsHelp": "Impedisce che vengano effettuate connessioni non valide e che vengano \"invocati\" grafici non validi", - "fullyContainNodesHelp": "I nodi devono essere completamente all'interno della casella di selezione per essere selezionati", - "fullyContainNodes": "Contenere completamente i nodi da selezionare", - "snapToGridHelp": "Aggancia i nodi alla griglia quando vengono spostati", - "workflowSettings": "Impostazioni Editor del flusso di lavoro", - "colorCodeEdges": "Bordi con codice colore", - "mainModelField": "Modello", - "noOutputRecorded": "Nessun output registrato", - "noFieldsLinearview": "Nessun campo aggiunto alla vista lineare", - "removeLinearView": "Rimuovi dalla vista lineare", - "workflowDescription": "Breve descrizione", - "workflowContact": "Contatto", - "workflowVersion": "Versione", - "workflow": "Flusso di lavoro", - "noWorkflow": "Nessun flusso di lavoro", - "workflowTags": "Tag", - "workflowValidation": "Errore di convalida del flusso di lavoro", - "workflowAuthor": "Autore", - "workflowName": "Nome", - "workflowNotes": "Note", - "unhandledInputProperty": "Proprietà di input non gestita", - "versionUnknown": " Versione sconosciuta", - "unableToValidateWorkflow": "Impossibile convalidare il flusso di lavoro", - "updateApp": "Aggiorna App", - "problemReadingWorkflow": "Problema durante la lettura del flusso di lavoro dall'immagine", - "unableToLoadWorkflow": "Impossibile caricare il flusso di lavoro", - "updateNode": "Aggiorna nodo", - "version": "Versione", - "notes": "Note", - "problemSettingTitle": "Problema nell'impostazione del titolo", - "unkownInvocation": "Tipo di invocazione sconosciuta", - "unknownTemplate": "Modello sconosciuto", - "nodeType": "Tipo di nodo", - "vaeField": "VAE", - "unhandledOutputProperty": "Proprietà di output non gestita", - "notesDescription": "Aggiunge note sul tuo flusso di lavoro", - "unknownField": "Campo sconosciuto", - "unknownNode": "Nodo sconosciuto", - "vaeFieldDescription": "Sotto modello VAE.", - "booleanPolymorphicDescription": "Una raccolta di booleani.", - "missingTemplate": "Modello mancante", - "outputSchemaNotFound": "Schema di output non trovato", - "colorFieldDescription": "Un colore RGBA.", - "maybeIncompatible": "Potrebbe essere incompatibile con quello installato", - "noNodeSelected": "Nessun nodo selezionato", - "colorPolymorphic": "Colore polimorfico", - "booleanCollectionDescription": "Una raccolta di booleani.", - "colorField": "Colore", - "nodeTemplate": "Modello di nodo", - "nodeOpacity": "Opacità del nodo", - "pickOne": "Sceglierne uno", - "outputField": "Campo di output", - "nodeSearch": "Cerca nodi", - "nodeOutputs": "Uscite del nodo", - "collectionItem": "Oggetto della raccolta", - "noConnectionInProgress": "Nessuna connessione in corso", - "noConnectionData": "Nessun dato di connessione", - "outputFields": "Campi di output", - "cannotDuplicateConnection": "Impossibile creare connessioni duplicate", - "booleanPolymorphic": "Polimorfico booleano", - "colorPolymorphicDescription": "Una collezione di colori polimorfici.", - "missingCanvaInitImage": "Immagine iniziale della tela mancante", - "clipFieldDescription": "Sottomodelli di tokenizzatore e codificatore di testo.", - "noImageFoundState": "Nessuna immagine iniziale trovata nello stato", - "clipField": "CLIP", - "noMatchingNodes": "Nessun nodo corrispondente", - "noFieldType": "Nessun tipo di campo", - "colorCollection": "Una collezione di colori.", - "noOutputSchemaName": "Nessun nome dello schema di output trovato nell'oggetto di riferimento", - "boolean": "Booleani", - "missingCanvaInitMaskImages": "Immagini di inizializzazione e maschera della tela mancanti", - "oNNXModelField": "Modello ONNX", - "node": "Nodo", - "booleanDescription": "I booleani sono veri o falsi.", - "collection": "Raccolta", - "cannotConnectInputToInput": "Impossibile collegare Input a Input", - "cannotConnectOutputToOutput": "Impossibile collegare Output ad Output", - "booleanCollection": "Raccolta booleana", - "cannotConnectToSelf": "Impossibile connettersi a se stesso", - "mismatchedVersion": "Ha una versione non corrispondente", - "outputNode": "Nodo di Output", - "loadingNodes": "Caricamento nodi...", - "oNNXModelFieldDescription": "Campo del modello ONNX.", - "denoiseMaskFieldDescription": "La maschera di riduzione del rumore può essere passata tra i nodi", - "floatCollectionDescription": "Una raccolta di numeri virgola mobile.", - "enum": "Enumeratore", - "float": "In virgola mobile", - "doesNotExist": "non esiste", - "currentImageDescription": "Visualizza l'immagine corrente nell'editor dei nodi", - "fieldTypesMustMatch": "I tipi di campo devono corrispondere", - "edge": "Bordo", - "enumDescription": "Gli enumeratori sono valori che possono essere una delle diverse opzioni.", - "denoiseMaskField": "Maschera riduzione rumore", - "currentImage": "Immagine corrente", - "floatCollection": "Raccolta in virgola mobile", - "inputField": "Campo di Input", - "controlFieldDescription": "Informazioni di controllo passate tra i nodi.", - "skippingUnknownOutputType": "Tipo di campo di output sconosciuto saltato", - "latentsFieldDescription": "Le immagini latenti possono essere passate tra i nodi.", - "ipAdapterPolymorphicDescription": "Una raccolta di adattatori IP.", - "latentsPolymorphicDescription": "Le immagini latenti possono essere passate tra i nodi.", - "ipAdapterCollection": "Raccolta Adattatori IP", - "conditioningCollection": "Raccolta condizionamenti", - "ipAdapterPolymorphic": "Adattatore IP Polimorfico", - "integerPolymorphicDescription": "Una raccolta di numeri interi.", - "conditioningCollectionDescription": "Il condizionamento può essere passato tra i nodi.", - "skippingReservedFieldType": "Tipo di campo riservato saltato", - "conditioningPolymorphic": "Condizionamento Polimorfico", - "integer": "Numero Intero", - "latentsCollection": "Raccolta Latenti", - "sourceNode": "Nodo di origine", - "integerDescription": "Gli interi sono numeri senza punto decimale.", - "stringPolymorphic": "Stringa polimorfica", - "conditioningPolymorphicDescription": "Il condizionamento può essere passato tra i nodi.", - "skipped": "Saltato", - "imagePolymorphic": "Immagine Polimorfica", - "imagePolymorphicDescription": "Una raccolta di immagini.", - "floatPolymorphic": "Numeri in virgola mobile Polimorfici", - "ipAdapterCollectionDescription": "Una raccolta di adattatori IP.", - "stringCollectionDescription": "Una raccolta di stringhe.", - "unableToParseNode": "Impossibile analizzare il nodo", - "controlCollection": "Raccolta di Controllo", - "stringCollection": "Raccolta di stringhe", - "inputMayOnlyHaveOneConnection": "L'ingresso può avere solo una connessione", - "ipAdapter": "Adattatore IP", - "integerCollection": "Raccolta di numeri interi", - "controlCollectionDescription": "Informazioni di controllo passate tra i nodi.", - "skippedReservedInput": "Campo di input riservato saltato", - "inputNode": "Nodo di Input", - "imageField": "Immagine", - "skippedReservedOutput": "Campo di output riservato saltato", - "integerCollectionDescription": "Una raccolta di numeri interi.", - "conditioningFieldDescription": "Il condizionamento può essere passato tra i nodi.", - "stringDescription": "Le stringhe sono testo.", - "integerPolymorphic": "Numero intero Polimorfico", - "ipAdapterModel": "Modello Adattatore IP", - "latentsPolymorphic": "Latenti polimorfici", - "skippingInputNoTemplate": "Campo di input senza modello saltato", - "ipAdapterDescription": "Un adattatore di prompt di immagini (Adattatore IP).", - "stringPolymorphicDescription": "Una raccolta di stringhe.", - "skippingUnknownInputType": "Tipo di campo di input sconosciuto saltato", - "controlField": "Controllo", - "ipAdapterModelDescription": "Campo Modello adattatore IP", - "invalidOutputSchema": "Schema di output non valido", - "floatDescription": "I numeri in virgola mobile sono numeri con un punto decimale.", - "floatPolymorphicDescription": "Una raccolta di numeri in virgola mobile.", - "conditioningField": "Condizionamento", - "string": "Stringa", - "latentsField": "Latenti", - "connectionWouldCreateCycle": "La connessione creerebbe un ciclo", - "inputFields": "Campi di Input", - "uNetFieldDescription": "Sub-modello UNet.", - "imageCollectionDescription": "Una raccolta di immagini.", - "imageFieldDescription": "Le immagini possono essere passate tra i nodi.", - "unableToParseEdge": "Impossibile analizzare il bordo", - "latentsCollectionDescription": "Le immagini latenti possono essere passate tra i nodi.", - "imageCollection": "Raccolta Immagini", - "loRAModelField": "LoRA" - }, - "boards": { - "autoAddBoard": "Aggiungi automaticamente bacheca", - "menuItemAutoAdd": "Aggiungi automaticamente a questa Bacheca", - "cancel": "Annulla", - "addBoard": "Aggiungi Bacheca", - "bottomMessage": "L'eliminazione di questa bacheca e delle sue immagini ripristinerà tutte le funzionalità che le stanno attualmente utilizzando.", - "changeBoard": "Cambia Bacheca", - "loading": "Caricamento in corso ...", - "clearSearch": "Cancella Ricerca", - "topMessage": "Questa bacheca contiene immagini utilizzate nelle seguenti funzionalità:", - "move": "Sposta", - "myBoard": "Bacheca", - "searchBoard": "Cerca bacheche ...", - "noMatching": "Nessuna bacheca corrispondente", - "selectBoard": "Seleziona una Bacheca", - "uncategorized": "Non categorizzato", - "downloadBoard": "Scarica la bacheca" - }, - "controlnet": { - "contentShuffleDescription": "Rimescola il contenuto di un'immagine", - "contentShuffle": "Rimescola contenuto", - "beginEndStepPercent": "Percentuale passi Inizio / Fine", - "duplicate": "Duplica", - "balanced": "Bilanciato", - "depthMidasDescription": "Generazione di mappe di profondità usando Midas", - "control": "ControlNet", - "crop": "Ritaglia", - "depthMidas": "Profondità (Midas)", - "enableControlnet": "Abilita ControlNet", - "detectResolution": "Rileva risoluzione", - "controlMode": "Modalità Controllo", - "cannyDescription": "Canny rilevamento bordi", - "depthZoe": "Profondità (Zoe)", - "autoConfigure": "Configura automaticamente il processore", - "delete": "Elimina", - "depthZoeDescription": "Generazione di mappe di profondità usando Zoe", - "resize": "Ridimensiona", - "showAdvanced": "Mostra opzioni Avanzate", - "bgth": "Soglia rimozione sfondo", - "importImageFromCanvas": "Importa immagine dalla Tela", - "lineartDescription": "Converte l'immagine in lineart", - "importMaskFromCanvas": "Importa maschera dalla Tela", - "hideAdvanced": "Nascondi opzioni avanzate", - "ipAdapterModel": "Modello Adattatore", - "resetControlImage": "Reimposta immagine di controllo", - "f": "F", - "h": "H", - "prompt": "Prompt", - "openPoseDescription": "Stima della posa umana utilizzando Openpose", - "resizeMode": "Modalità ridimensionamento", - "weight": "Peso", - "selectModel": "Seleziona un modello", - "w": "W", - "processor": "Processore", - "none": "Nessuno", - "incompatibleBaseModel": "Modello base incompatibile:", - "pidiDescription": "Elaborazione immagini PIDI", - "fill": "Riempire", - "colorMapDescription": "Genera una mappa dei colori dall'immagine", - "lineartAnimeDescription": "Elaborazione lineart in stile anime", - "imageResolution": "Risoluzione dell'immagine", - "colorMap": "Colore", - "lowThreshold": "Soglia inferiore", - "highThreshold": "Soglia superiore", - "normalBaeDescription": "Elaborazione BAE normale", - "noneDescription": "Nessuna elaborazione applicata", - "saveControlImage": "Salva immagine di controllo", - "toggleControlNet": "Attiva/disattiva questo ControlNet", - "safe": "Sicuro", - "colorMapTileSize": "Dimensione piastrella", - "ipAdapterImageFallback": "Nessuna immagine dell'Adattatore IP selezionata", - "mediapipeFaceDescription": "Rilevamento dei volti tramite Mediapipe", - "hedDescription": "Rilevamento dei bordi nidificati olisticamente", - "setControlImageDimensions": "Imposta le dimensioni dell'immagine di controllo su L/A", - "resetIPAdapterImage": "Reimposta immagine Adattatore IP", - "handAndFace": "Mano e faccia", - "enableIPAdapter": "Abilita Adattatore IP", - "maxFaces": "Numero massimo di volti", - "addT2IAdapter": "Aggiungi $t(common.t2iAdapter)", - "controlNetEnabledT2IDisabled": "$t(common.controlNet) abilitato, $t(common.t2iAdapter) disabilitati", - "t2iEnabledControlNetDisabled": "$t(common.t2iAdapter) abilitato, $t(common.controlNet) disabilitati", - "addControlNet": "Aggiungi $t(common.controlNet)", - "controlNetT2IMutexDesc": "$t(common.controlNet) e $t(common.t2iAdapter) contemporaneamente non sono attualmente supportati.", - "addIPAdapter": "Aggiungi $t(common.ipAdapter)", - "controlAdapter_one": "Adattatore di Controllo", - "controlAdapter_many": "Adattatori di Controllo", - "controlAdapter_other": "Adattatori di Controllo", - "megaControl": "Mega ControlNet", - "minConfidence": "Confidenza minima", - "scribble": "Scribble", - "amult": "Angolo di illuminazione" - }, - "queue": { - "queueFront": "Aggiungi all'inizio della coda", - "queueBack": "Aggiungi alla coda", - "queueCountPrediction": "Aggiungi {{predicted}} alla coda", - "queue": "Coda", - "status": "Stato", - "pruneSucceeded": "Rimossi {{item_count}} elementi completati dalla coda", - "cancelTooltip": "Annulla l'elemento corrente", - "queueEmpty": "Coda vuota", - "pauseSucceeded": "Elaborazione sospesa", - "in_progress": "In corso", - "notReady": "Impossibile mettere in coda", - "batchFailedToQueue": "Impossibile mettere in coda il lotto", - "completed": "Completati", - "batchValues": "Valori del lotto", - "cancelFailed": "Problema durante l'annullamento dell'elemento", - "batchQueued": "Lotto aggiunto alla coda", - "pauseFailed": "Problema durante la sospensione dell'elaborazione", - "clearFailed": "Problema nella cancellazione della coda", - "queuedCount": "{{pending}} In attesa", - "front": "inizio", - "clearSucceeded": "Coda cancellata", - "pause": "Sospendi", - "pruneTooltip": "Rimuovi {{item_count}} elementi completati", - "cancelSucceeded": "Elemento annullato", - "batchQueuedDesc_one": "Aggiunta {{count}} sessione a {{direction}} della coda", - "batchQueuedDesc_many": "Aggiunte {{count}} sessioni a {{direction}} della coda", - "batchQueuedDesc_other": "Aggiunte {{count}} sessioni a {{direction}} della coda", - "graphQueued": "Grafico in coda", - "batch": "Lotto", - "clearQueueAlertDialog": "Lo svuotamento della coda annulla immediatamente tutti gli elementi in elaborazione e cancella completamente la coda.", - "pending": "In attesa", - "completedIn": "Completato in", - "resumeFailed": "Problema nel riavvio dell'elaborazione", - "clear": "Cancella", - "prune": "Rimuovi", - "total": "Totale", - "canceled": "Annullati", - "pruneFailed": "Problema nel rimuovere la coda", - "cancelBatchSucceeded": "Lotto annullato", - "clearTooltip": "Annulla e cancella tutti gli elementi", - "current": "Attuale", - "pauseTooltip": "Sospende l'elaborazione", - "failed": "Falliti", - "cancelItem": "Annulla l'elemento", - "next": "Prossimo", - "cancelBatch": "Annulla lotto", - "back": "fine", - "cancel": "Annulla", - "session": "Sessione", - "queueTotal": "{{total}} Totale", - "resumeSucceeded": "Elaborazione ripresa", - "enqueueing": "Lotto in coda", - "resumeTooltip": "Riprendi l'elaborazione", - "resume": "Riprendi", - "cancelBatchFailed": "Problema durante l'annullamento del lotto", - "clearQueueAlertDialog2": "Sei sicuro di voler cancellare la coda?", - "item": "Elemento", - "graphFailedToQueue": "Impossibile mettere in coda il grafico", - "queueMaxExceeded": "È stato superato il limite massimo di {{max_queue_size}} e {{skip}} elementi verrebbero saltati" - }, - "embedding": { - "noMatchingEmbedding": "Nessun Incorporamento corrispondente", - "addEmbedding": "Aggiungi Incorporamento", - "incompatibleModel": "Modello base incompatibile:" - }, - "models": { - "noMatchingModels": "Nessun modello corrispondente", - "loading": "caricamento", - "noMatchingLoRAs": "Nessun LoRA corrispondente", - "noLoRAsAvailable": "Nessun LoRA disponibile", - "noModelsAvailable": "Nessun modello disponibile", - "selectModel": "Seleziona un modello", - "selectLoRA": "Seleziona un LoRA", - "noRefinerModelsInstalled": "Nessun modello SDXL Refiner installato", - "noLoRAsInstalled": "Nessun LoRA installato" - }, - "invocationCache": { - "disable": "Disabilita", - "misses": "Non trovati in cache", - "enableFailed": "Problema nell'abilitazione della cache delle invocazioni", - "invocationCache": "Cache delle invocazioni", - "clearSucceeded": "Cache delle invocazioni svuotata", - "enableSucceeded": "Cache delle invocazioni abilitata", - "clearFailed": "Problema durante lo svuotamento della cache delle invocazioni", - "hits": "Trovati in cache", - "disableSucceeded": "Cache delle invocazioni disabilitata", - "disableFailed": "Problema durante la disabilitazione della cache delle invocazioni", - "enable": "Abilita", - "clear": "Svuota", - "maxCacheSize": "Dimensione max cache", - "cacheSize": "Dimensione cache" - }, - "dynamicPrompts": { - "seedBehaviour": { - "perPromptDesc": "Utilizza un seme diverso per ogni immagine", - "perIterationLabel": "Per iterazione", - "perIterationDesc": "Utilizza un seme diverso per ogni iterazione", - "perPromptLabel": "Per immagine", - "label": "Comportamento del seme" - }, - "enableDynamicPrompts": "Abilita prompt dinamici", - "combinatorial": "Generazione combinatoria", - "maxPrompts": "Numero massimo di prompt", - "promptsWithCount_one": "{{count}} Prompt", - "promptsWithCount_many": "{{count}} Prompt", - "promptsWithCount_other": "{{count}} Prompt", - "dynamicPrompts": "Prompt dinamici" - }, - "popovers": { - "paramScheduler": { - "paragraphs": [ - "Il campionatore definisce come aggiungere in modo iterativo il rumore a un'immagine o come aggiornare un campione in base all'output di un modello." - ], - "heading": "Campionatore" - }, - "compositingMaskAdjustments": { - "heading": "Regolazioni della maschera", - "paragraphs": [ - "Regola la maschera." - ] - }, - "compositingCoherenceSteps": { - "heading": "Passi", - "paragraphs": [ - "Numero di passi di riduzione del rumore utilizzati nel Passaggio di Coerenza.", - "Uguale al parametro principale Passi." - ] - }, - "compositingBlur": { - "heading": "Sfocatura", - "paragraphs": [ - "Il raggio di sfocatura della maschera." - ] - }, - "compositingCoherenceMode": { - "heading": "Modalità", - "paragraphs": [ - "La modalità del Passaggio di Coerenza." - ] - }, - "clipSkip": { - "paragraphs": [ - "Scegli quanti livelli del modello CLIP saltare.", - "Alcuni modelli funzionano meglio con determinate impostazioni di CLIP Skip.", - "Un valore più alto in genere produce un'immagine meno dettagliata." - ] - }, - "compositingCoherencePass": { - "heading": "Passaggio di Coerenza", - "paragraphs": [ - "Un secondo ciclo di riduzione del rumore aiuta a comporre l'immagine Inpaint/Outpaint." - ] - }, - "compositingStrength": { - "heading": "Forza", - "paragraphs": [ - "Intensità di riduzione del rumore per il passaggio di coerenza.", - "Uguale al parametro intensità di riduzione del rumore da immagine a immagine." - ] - }, - "paramNegativeConditioning": { - "paragraphs": [ - "Il processo di generazione evita i concetti nel prompt negativo. Utilizzatelo per escludere qualità o oggetti dall'output.", - "Supporta la sintassi e gli incorporamenti di Compel." - ], - "heading": "Prompt negativo" - }, - "compositingBlurMethod": { - "heading": "Metodo di sfocatura", - "paragraphs": [ - "Il metodo di sfocatura applicato all'area mascherata." - ] - }, - "paramPositiveConditioning": { - "heading": "Prompt positivo", - "paragraphs": [ - "Guida il processo di generazione. Puoi usare qualsiasi parola o frase.", - "Supporta sintassi e incorporamenti di Compel e Prompt Dinamici." - ] - }, - "controlNetBeginEnd": { - "heading": "Percentuale passi Inizio / Fine", - "paragraphs": [ - "A quali passi del processo di rimozione del rumore verrà applicato ControlNet.", - "I ControlNet applicati all'inizio del processo guidano la composizione, mentre i ControlNet applicati alla fine guidano i dettagli." - ] - }, - "noiseUseCPU": { - "paragraphs": [ - "Controlla se viene generato rumore sulla CPU o sulla GPU.", - "Con il rumore della CPU abilitato, un seme particolare produrrà la stessa immagine su qualsiasi macchina.", - "Non vi è alcun impatto sulle prestazioni nell'abilitare il rumore della CPU." - ], - "heading": "Usa la CPU per generare rumore" - }, - "scaleBeforeProcessing": { - "paragraphs": [ - "Ridimensiona l'area selezionata alla dimensione più adatta al modello prima del processo di generazione dell'immagine." - ], - "heading": "Scala prima dell'elaborazione" - }, - "paramRatio": { - "heading": "Proporzioni", - "paragraphs": [ - "Le proporzioni delle dimensioni dell'immagine generata.", - "Per i modelli SD1.5 si consiglia una dimensione dell'immagine (in numero di pixel) equivalente a 512x512 mentre per i modelli SDXL si consiglia una dimensione equivalente a 1024x1024." - ] - }, - "dynamicPrompts": { - "paragraphs": [ - "Prompt Dinamici crea molte variazioni a partire da un singolo prompt.", - "La sintassi di base è \"a {red|green|blue} ball\". Ciò produrrà tre prompt: \"a red ball\", \"a green ball\" e \"a blue ball\".", - "Puoi utilizzare la sintassi quante volte vuoi in un singolo prompt, ma assicurati di tenere sotto controllo il numero di prompt generati con l'impostazione \"Numero massimo di prompt\"." - ], - "heading": "Prompt Dinamici" - }, - "paramVAE": { - "paragraphs": [ - "Modello utilizzato per tradurre l'output dell'intelligenza artificiale nell'immagine finale." - ], - "heading": "VAE" - }, - "paramIterations": { - "paragraphs": [ - "Il numero di immagini da generare.", - "Se i prompt dinamici sono abilitati, ciascuno dei prompt verrà generato questo numero di volte." - ], - "heading": "Iterazioni" - }, - "paramVAEPrecision": { - "heading": "Precisione VAE", - "paragraphs": [ - "La precisione utilizzata durante la codifica e decodifica VAE. FP16/mezza precisione è più efficiente, a scapito di minori variazioni dell'immagine." - ] - }, - "paramSeed": { - "paragraphs": [ - "Controlla il rumore iniziale utilizzato per la generazione.", - "Disabilita seme \"Casuale\" per produrre risultati identici con le stesse impostazioni di generazione." - ], - "heading": "Seme" - }, - "controlNetResizeMode": { - "heading": "Modalità ridimensionamento", - "paragraphs": [ - "Come l'immagine ControlNet verrà adattata alle dimensioni di output dell'immagine." - ] - }, - "dynamicPromptsSeedBehaviour": { - "paragraphs": [ - "Controlla il modo in cui viene utilizzato il seme durante la generazione dei prompt.", - "Per iterazione utilizzerà un seme univoco per ogni iterazione. Usalo per esplorare variazioni del prompt su un singolo seme.", - "Ad esempio, se hai 5 prompt, ogni immagine utilizzerà lo stesso seme.", - "Per immagine utilizzerà un seme univoco per ogni immagine. Ciò fornisce più variazione." - ], - "heading": "Comportamento del seme" - }, - "paramModel": { - "heading": "Modello", - "paragraphs": [ - "Modello utilizzato per i passaggi di riduzione del rumore.", - "Diversi modelli sono generalmente addestrati per specializzarsi nella produzione di particolari risultati e contenuti estetici." - ] - }, - "paramDenoisingStrength": { - "paragraphs": [ - "Quanto rumore viene aggiunto all'immagine in ingresso.", - "0 risulterà in un'immagine identica, mentre 1 risulterà in un'immagine completamente nuova." - ], - "heading": "Forza di riduzione del rumore" - }, - "dynamicPromptsMaxPrompts": { - "heading": "Numero massimo di prompt", - "paragraphs": [ - "Limita il numero di prompt che possono essere generati da Prompt Dinamici." - ] - }, - "infillMethod": { - "paragraphs": [ - "Metodo per riempire l'area selezionata." - ], - "heading": "Metodo di riempimento" - }, - "controlNetWeight": { - "heading": "Peso", - "paragraphs": [ - "Quanto forte sarà l'impatto di ControlNet sull'immagine generata." - ] - }, - "paramCFGScale": { - "heading": "Scala CFG", - "paragraphs": [ - "Controlla quanto il tuo prompt influenza il processo di generazione." - ] - }, - "controlNetControlMode": { - "paragraphs": [ - "Attribuisce più peso al prompt o a ControlNet." - ], - "heading": "Modalità di controllo" - }, - "paramSteps": { - "heading": "Passi", - "paragraphs": [ - "Numero di passi che verranno eseguiti in ogni generazione.", - "Un numero di passi più elevato generalmente creerà immagini migliori ma richiederà più tempo di generazione." - ] - }, - "lora": { - "heading": "Peso LoRA", - "paragraphs": [ - "Un peso LoRA più elevato porterà a impatti maggiori sull'immagine finale." - ] - }, - "controlNet": { - "paragraphs": [ - "ControlNet fornisce una guida al processo di generazione, aiutando a creare immagini con composizione, struttura o stile controllati, a seconda del modello selezionato." - ], - "heading": "ControlNet" - } - }, - "sdxl": { - "selectAModel": "Seleziona un modello", - "scheduler": "Campionatore", - "noModelsAvailable": "Nessun modello disponibile", - "denoisingStrength": "Forza di riduzione del rumore", - "concatPromptStyle": "Concatena Prompt & Stile", - "loading": "Caricamento...", - "steps": "Passi", - "refinerStart": "Inizio Affinamento", - "cfgScale": "Scala CFG", - "negStylePrompt": "Prompt Stile negativo", - "refiner": "Affinatore", - "negAestheticScore": "Punteggio estetico negativo", - "useRefiner": "Utilizza l'affinatore", - "refinermodel": "Modello Affinatore", - "posAestheticScore": "Punteggio estetico positivo", - "posStylePrompt": "Prompt Stile positivo" - }, - "metadata": { - "initImage": "Immagine iniziale", - "seamless": "Senza giunture", - "positivePrompt": "Prompt positivo", - "negativePrompt": "Prompt negativo", - "generationMode": "Modalità generazione", - "Threshold": "Livello di soglia del rumore", - "metadata": "Metadati", - "strength": "Forza Immagine a Immagine", - "seed": "Seme", - "imageDetails": "Dettagli dell'immagine", - "perlin": "Rumore Perlin", - "model": "Modello", - "noImageDetails": "Nessun dettaglio dell'immagine trovato", - "hiresFix": "Ottimizzazione Alta Risoluzione", - "cfgScale": "Scala CFG", - "fit": "Adatta Immagine a Immagine", - "height": "Altezza", - "variations": "Coppie Peso-Seme", - "noMetaData": "Nessun metadato trovato", - "width": "Larghezza", - "createdBy": "Creato da", - "workflow": "Flusso di lavoro", - "steps": "Passi", - "scheduler": "Campionatore", - "recallParameters": "Richiama i parametri", - "noRecallParameters": "Nessun parametro da richiamare trovato" - }, - "hrf": { - "enableHrf": "Abilita Correzione Alta Risoluzione", - "upscaleMethod": "Metodo di ampliamento", - "enableHrfTooltip": "Genera con una risoluzione iniziale inferiore, esegue l'ampliamento alla risoluzione di base, quindi esegue Immagine a Immagine.", - "metadata": { - "strength": "Forza della Correzione Alta Risoluzione", - "enabled": "Correzione Alta Risoluzione Abilitata", - "method": "Metodo della Correzione Alta Risoluzione" - }, - "hrf": "Correzione Alta Risoluzione", - "hrfStrength": "Forza della Correzione Alta Risoluzione", - "strengthTooltip": "Valori più bassi comportano meno dettagli, il che può ridurre potenziali artefatti." - } -} diff --git a/invokeai/frontend/web/dist/locales/ja.json b/invokeai/frontend/web/dist/locales/ja.json deleted file mode 100644 index c7718e7b7c..0000000000 --- a/invokeai/frontend/web/dist/locales/ja.json +++ /dev/null @@ -1,816 +0,0 @@ -{ - "common": { - "languagePickerLabel": "言語", - "reportBugLabel": "バグ報告", - "settingsLabel": "設定", - "langJapanese": "日本語", - "nodesDesc": "現在、画像生成のためのノードベースシステムを開発中です。機能についてのアップデートにご期待ください。", - "postProcessing": "後処理", - "postProcessDesc1": "Invoke AIは、多彩な後処理の機能を備えています。アップスケーリングと顔修復は、すでにWebUI上で利用可能です。これらは、[Text To Image]および[Image To Image]タブの[詳細オプション]メニューからアクセスできます。また、現在の画像表示の上やビューア内の画像アクションボタンを使って、画像を直接処理することもできます。", - "postProcessDesc2": "より高度な後処理の機能を実現するための専用UIを近日中にリリース予定です。", - "postProcessDesc3": "Invoke AI CLIでは、この他にもEmbiggenをはじめとする様々な機能を利用することができます。", - "training": "追加学習", - "trainingDesc1": "Textual InversionとDreamboothを使って、WebUIから独自のEmbeddingとチェックポイントを追加学習するための専用ワークフローです。", - "trainingDesc2": "InvokeAIは、すでにメインスクリプトを使ったTextual Inversionによるカスタム埋め込み追加学習にも対応しています。", - "upload": "アップロード", - "close": "閉じる", - "load": "ロード", - "back": "戻る", - "statusConnected": "接続済", - "statusDisconnected": "切断済", - "statusError": "エラー", - "statusPreparing": "準備中", - "statusProcessingCanceled": "処理をキャンセル", - "statusProcessingComplete": "処理完了", - "statusGenerating": "生成中", - "statusGeneratingTextToImage": "Text To Imageで生成中", - "statusGeneratingImageToImage": "Image To Imageで生成中", - "statusGenerationComplete": "生成完了", - "statusSavingImage": "画像を保存", - "statusRestoringFaces": "顔の修復", - "statusRestoringFacesGFPGAN": "顔の修復 (GFPGAN)", - "statusRestoringFacesCodeFormer": "顔の修復 (CodeFormer)", - "statusUpscaling": "アップスケーリング", - "statusUpscalingESRGAN": "アップスケーリング (ESRGAN)", - "statusLoadingModel": "モデルを読み込む", - "statusModelChanged": "モデルを変更", - "cancel": "キャンセル", - "accept": "同意", - "langBrPortuguese": "Português do Brasil", - "langRussian": "Русский", - "langSimplifiedChinese": "简体中文", - "langUkranian": "Украї́нська", - "langSpanish": "Español", - "img2img": "img2img", - "unifiedCanvas": "Unified Canvas", - "statusMergingModels": "モデルのマージ", - "statusModelConverted": "変換済モデル", - "statusGeneratingInpainting": "Inpaintingを生成", - "statusIterationComplete": "Iteration Complete", - "statusGeneratingOutpainting": "Outpaintingを生成", - "loading": "ロード中", - "loadingInvokeAI": "Invoke AIをロード中", - "statusConvertingModel": "モデルの変換", - "statusMergedModels": "マージ済モデル", - "githubLabel": "Github", - "hotkeysLabel": "ホットキー", - "langHebrew": "עברית", - "discordLabel": "Discord", - "langItalian": "Italiano", - "langEnglish": "English", - "langArabic": "アラビア語", - "langDutch": "Nederlands", - "langFrench": "Français", - "langGerman": "Deutsch", - "langPortuguese": "Português", - "nodes": "ワークフローエディター", - "langKorean": "한국어", - "langPolish": "Polski", - "txt2img": "txt2img", - "postprocessing": "Post Processing", - "t2iAdapter": "T2I アダプター", - "communityLabel": "コミュニティ", - "dontAskMeAgain": "次回から確認しない", - "areYouSure": "本当によろしいですか?", - "on": "オン", - "nodeEditor": "ノードエディター", - "ipAdapter": "IPアダプター", - "controlAdapter": "コントロールアダプター", - "auto": "自動", - "openInNewTab": "新しいタブで開く", - "controlNet": "コントロールネット", - "statusProcessing": "処理中", - "linear": "リニア", - "imageFailedToLoad": "画像が読み込めません", - "imagePrompt": "画像プロンプト", - "modelManager": "モデルマネージャー", - "lightMode": "ライトモード", - "generate": "生成", - "learnMore": "もっと学ぶ", - "darkMode": "ダークモード", - "random": "ランダム", - "batch": "バッチマネージャー", - "advanced": "高度な設定" - }, - "gallery": { - "uploads": "アップロード", - "showUploads": "アップロードした画像を見る", - "galleryImageSize": "画像のサイズ", - "galleryImageResetSize": "サイズをリセット", - "gallerySettings": "ギャラリーの設定", - "maintainAspectRatio": "アスペクト比を維持", - "singleColumnLayout": "1カラムレイアウト", - "allImagesLoaded": "すべての画像を読み込む", - "loadMore": "さらに読み込む", - "noImagesInGallery": "ギャラリーに画像がありません", - "generations": "生成", - "showGenerations": "生成過程を見る", - "autoSwitchNewImages": "新しい画像に自動切替" - }, - "hotkeys": { - "keyboardShortcuts": "キーボードショートカット", - "appHotkeys": "アプリのホットキー", - "generalHotkeys": "Generalのホットキー", - "galleryHotkeys": "ギャラリーのホットキー", - "unifiedCanvasHotkeys": "Unified Canvasのホットキー", - "invoke": { - "desc": "画像を生成", - "title": "Invoke" - }, - "cancel": { - "title": "キャンセル", - "desc": "画像の生成をキャンセル" - }, - "focusPrompt": { - "desc": "プロンプトテキストボックスにフォーカス", - "title": "プロジェクトにフォーカス" - }, - "toggleOptions": { - "title": "オプションパネルのトグル", - "desc": "オプションパネルの開閉" - }, - "pinOptions": { - "title": "ピン", - "desc": "オプションパネルを固定" - }, - "toggleViewer": { - "title": "ビュワーのトグル", - "desc": "ビュワーを開閉" - }, - "toggleGallery": { - "title": "ギャラリーのトグル", - "desc": "ギャラリードロワーの開閉" - }, - "maximizeWorkSpace": { - "title": "作業領域の最大化", - "desc": "パネルを閉じて、作業領域を最大に" - }, - "changeTabs": { - "title": "タブの切替", - "desc": "他の作業領域と切替" - }, - "consoleToggle": { - "title": "コンソールのトグル", - "desc": "コンソールの開閉" - }, - "setPrompt": { - "title": "プロンプトをセット", - "desc": "現在の画像のプロンプトを使用" - }, - "setSeed": { - "title": "シード値をセット", - "desc": "現在の画像のシード値を使用" - }, - "setParameters": { - "title": "パラメータをセット", - "desc": "現在の画像のすべてのパラメータを使用" - }, - "restoreFaces": { - "title": "顔の修復", - "desc": "現在の画像を修復" - }, - "upscale": { - "title": "アップスケール", - "desc": "現在の画像をアップスケール" - }, - "showInfo": { - "title": "情報を見る", - "desc": "現在の画像のメタデータ情報を表示" - }, - "sendToImageToImage": { - "title": "Image To Imageに転送", - "desc": "現在の画像をImage to Imageに転送" - }, - "deleteImage": { - "title": "画像を削除", - "desc": "現在の画像を削除" - }, - "closePanels": { - "title": "パネルを閉じる", - "desc": "開いているパネルを閉じる" - }, - "previousImage": { - "title": "前の画像", - "desc": "ギャラリー内の1つ前の画像を表示" - }, - "nextImage": { - "title": "次の画像", - "desc": "ギャラリー内の1つ後の画像を表示" - }, - "toggleGalleryPin": { - "title": "ギャラリードロワーの固定", - "desc": "ギャラリーをUIにピン留め/解除" - }, - "increaseGalleryThumbSize": { - "title": "ギャラリーの画像を拡大", - "desc": "ギャラリーのサムネイル画像を拡大" - }, - "decreaseGalleryThumbSize": { - "title": "ギャラリーの画像サイズを縮小", - "desc": "ギャラリーのサムネイル画像を縮小" - }, - "selectBrush": { - "title": "ブラシを選択", - "desc": "ブラシを選択" - }, - "selectEraser": { - "title": "消しゴムを選択", - "desc": "消しゴムを選択" - }, - "decreaseBrushSize": { - "title": "ブラシサイズを縮小", - "desc": "ブラシ/消しゴムのサイズを縮小" - }, - "increaseBrushSize": { - "title": "ブラシサイズを拡大", - "desc": "ブラシ/消しゴムのサイズを拡大" - }, - "decreaseBrushOpacity": { - "title": "ブラシの不透明度を下げる", - "desc": "キャンバスブラシの不透明度を下げる" - }, - "increaseBrushOpacity": { - "title": "ブラシの不透明度を上げる", - "desc": "キャンバスブラシの不透明度を上げる" - }, - "fillBoundingBox": { - "title": "バウンディングボックスを塗りつぶす", - "desc": "ブラシの色でバウンディングボックス領域を塗りつぶす" - }, - "eraseBoundingBox": { - "title": "バウンディングボックスを消す", - "desc": "バウンディングボックス領域を消す" - }, - "colorPicker": { - "title": "カラーピッカーを選択", - "desc": "カラーピッカーを選択" - }, - "toggleLayer": { - "title": "レイヤーを切替", - "desc": "マスク/ベースレイヤの選択を切替" - }, - "clearMask": { - "title": "マスクを消す", - "desc": "マスク全体を消す" - }, - "hideMask": { - "title": "マスクを非表示", - "desc": "マスクを表示/非表示" - }, - "showHideBoundingBox": { - "title": "バウンディングボックスを表示/非表示", - "desc": "バウンディングボックスの表示/非表示を切替" - }, - "saveToGallery": { - "title": "ギャラリーに保存", - "desc": "現在のキャンバスをギャラリーに保存" - }, - "copyToClipboard": { - "title": "クリップボードにコピー", - "desc": "現在のキャンバスをクリップボードにコピー" - }, - "downloadImage": { - "title": "画像をダウンロード", - "desc": "現在の画像をダウンロード" - }, - "resetView": { - "title": "キャンバスをリセット", - "desc": "キャンバスをリセット" - } - }, - "modelManager": { - "modelManager": "モデルマネージャ", - "model": "モデル", - "allModels": "すべてのモデル", - "modelAdded": "モデルを追加", - "modelUpdated": "モデルをアップデート", - "addNew": "新規に追加", - "addNewModel": "新規モデル追加", - "addCheckpointModel": "Checkpointを追加 / Safetensorモデル", - "addDiffuserModel": "Diffusersを追加", - "addManually": "手動で追加", - "manual": "手動", - "name": "名前", - "nameValidationMsg": "モデルの名前を入力", - "description": "概要", - "descriptionValidationMsg": "モデルの概要を入力", - "config": "Config", - "configValidationMsg": "モデルの設定ファイルへのパス", - "modelLocation": "モデルの場所", - "modelLocationValidationMsg": "ディフューザーモデルのあるローカルフォルダーのパスを入力してください", - "repo_id": "Repo ID", - "repoIDValidationMsg": "モデルのリモートリポジトリ", - "vaeLocation": "VAEの場所", - "vaeLocationValidationMsg": "Vaeが配置されている場所へのパス", - "vaeRepoIDValidationMsg": "Vaeのリモートリポジトリ", - "width": "幅", - "widthValidationMsg": "モデルのデフォルトの幅", - "height": "高さ", - "heightValidationMsg": "モデルのデフォルトの高さ", - "addModel": "モデルを追加", - "updateModel": "モデルをアップデート", - "availableModels": "モデルを有効化", - "search": "検索", - "load": "Load", - "active": "active", - "notLoaded": "読み込まれていません", - "cached": "キャッシュ済", - "checkpointFolder": "Checkpointフォルダ", - "clearCheckpointFolder": "Checkpointフォルダ内を削除", - "findModels": "モデルを見つける", - "scanAgain": "再度スキャン", - "modelsFound": "モデルを発見", - "selectFolder": "フォルダを選択", - "selected": "選択済", - "selectAll": "すべて選択", - "deselectAll": "すべて選択解除", - "showExisting": "既存を表示", - "addSelected": "選択済を追加", - "modelExists": "モデルの有無", - "selectAndAdd": "以下のモデルを選択し、追加できます。", - "noModelsFound": "モデルが見つかりません。", - "delete": "削除", - "deleteModel": "モデルを削除", - "deleteConfig": "設定を削除", - "deleteMsg1": "InvokeAIからこのモデルを削除してよろしいですか?", - "deleteMsg2": "これは、モデルがInvokeAIルートフォルダ内にある場合、ディスクからモデルを削除します。カスタム保存場所を使用している場合、モデルはディスクから削除されません。", - "formMessageDiffusersModelLocation": "Diffusersモデルの場所", - "formMessageDiffusersModelLocationDesc": "最低でも1つは入力してください。", - "formMessageDiffusersVAELocation": "VAEの場所s", - "formMessageDiffusersVAELocationDesc": "指定しない場合、InvokeAIは上記のモデルの場所にあるVAEファイルを探します。", - "importModels": "モデルをインポート", - "custom": "カスタム", - "none": "なし", - "convert": "変換", - "statusConverting": "変換中", - "cannotUseSpaces": "スペースは使えません", - "convertToDiffusersHelpText6": "このモデルを変換しますか?", - "checkpointModels": "チェックポイント", - "settings": "設定", - "convertingModelBegin": "モデルを変換しています...", - "baseModel": "ベースモデル", - "modelDeleteFailed": "モデルの削除ができませんでした", - "convertToDiffusers": "ディフューザーに変換", - "alpha": "アルファ", - "diffusersModels": "ディフューザー", - "pathToCustomConfig": "カスタム設定のパス", - "noCustomLocationProvided": "カスタムロケーションが指定されていません", - "modelConverted": "モデル変換が完了しました", - "weightedSum": "重み付け総和", - "inverseSigmoid": "逆シグモイド", - "invokeAIFolder": "Invoke AI フォルダ", - "syncModelsDesc": "モデルがバックエンドと同期していない場合、このオプションを使用してモデルを更新できます。通常、モデル.yamlファイルを手動で更新したり、アプリケーションの起動後にモデルをInvokeAIルートフォルダに追加した場合に便利です。", - "noModels": "モデルが見つかりません", - "sigmoid": "シグモイド", - "merge": "マージ", - "modelMergeInterpAddDifferenceHelp": "このモードでは、モデル3がまずモデル2から減算されます。その結果得られたバージョンが、上記で設定されたアルファ率でモデル1とブレンドされます。", - "customConfig": "カスタム設定", - "predictionType": "予測タイプ(安定したディフュージョン 2.x モデルおよび一部の安定したディフュージョン 1.x モデル用)", - "selectModel": "モデルを選択", - "modelSyncFailed": "モデルの同期に失敗しました", - "quickAdd": "クイック追加", - "simpleModelDesc": "ローカルのDiffusersモデル、ローカルのチェックポイント/safetensorsモデル、HuggingFaceリポジトリのID、またはチェックポイント/ DiffusersモデルのURLへのパスを指定してください。", - "customSaveLocation": "カスタム保存場所", - "advanced": "高度な設定", - "modelDeleted": "モデルが削除されました", - "convertToDiffusersHelpText2": "このプロセスでは、モデルマネージャーのエントリーを同じモデルのディフューザーバージョンに置き換えます。", - "modelUpdateFailed": "モデル更新が失敗しました", - "useCustomConfig": "カスタム設定を使用する", - "convertToDiffusersHelpText5": "十分なディスク空き容量があることを確認してください。モデルは一般的に2GBから7GBのサイズがあります。", - "modelConversionFailed": "モデル変換が失敗しました", - "modelEntryDeleted": "モデルエントリーが削除されました", - "syncModels": "モデルを同期", - "mergedModelSaveLocation": "保存場所", - "closeAdvanced": "高度な設定を閉じる", - "modelType": "モデルタイプ", - "modelsMerged": "モデルマージ完了", - "modelsMergeFailed": "モデルマージ失敗", - "scanForModels": "モデルをスキャン", - "customConfigFileLocation": "カスタム設定ファイルの場所", - "convertToDiffusersHelpText1": "このモデルは 🧨 Diffusers フォーマットに変換されます。", - "modelsSynced": "モデルが同期されました", - "invokeRoot": "InvokeAIフォルダ", - "mergedModelCustomSaveLocation": "カスタムパス", - "mergeModels": "マージモデル", - "interpolationType": "補間タイプ", - "modelMergeHeaderHelp2": "マージできるのはDiffusersのみです。チェックポイントモデルをマージしたい場合は、まずDiffusersに変換してください。", - "convertToDiffusersSaveLocation": "保存場所", - "pickModelType": "モデルタイプを選択", - "sameFolder": "同じフォルダ", - "convertToDiffusersHelpText3": "チェックポイントファイルは、InvokeAIルートフォルダ内にある場合、ディスクから削除されます。カスタムロケーションにある場合は、削除されません。", - "loraModels": "LoRA", - "modelMergeAlphaHelp": "アルファはモデルのブレンド強度を制御します。アルファ値が低いと、2番目のモデルの影響が低くなります。", - "addDifference": "差分を追加", - "modelMergeHeaderHelp1": "あなたのニーズに適したブレンドを作成するために、異なるモデルを最大3つまでマージすることができます。", - "ignoreMismatch": "選択されたモデル間の不一致を無視する", - "convertToDiffusersHelpText4": "これは一回限りのプロセスです。コンピュータの仕様によっては、約30秒から60秒かかる可能性があります。", - "mergedModelName": "マージされたモデル名" - }, - "parameters": { - "images": "画像", - "steps": "ステップ数", - "width": "幅", - "height": "高さ", - "seed": "シード値", - "randomizeSeed": "ランダムなシード値", - "shuffle": "シャッフル", - "seedWeights": "シード値の重み", - "faceRestoration": "顔の修復", - "restoreFaces": "顔の修復", - "strength": "強度", - "upscaling": "アップスケーリング", - "upscale": "アップスケール", - "upscaleImage": "画像をアップスケール", - "scale": "Scale", - "otherOptions": "その他のオプション", - "scaleBeforeProcessing": "処理前のスケール", - "scaledWidth": "幅のスケール", - "scaledHeight": "高さのスケール", - "boundingBoxHeader": "バウンディングボックス", - "img2imgStrength": "Image To Imageの強度", - "sendTo": "転送", - "sendToImg2Img": "Image to Imageに転送", - "sendToUnifiedCanvas": "Unified Canvasに転送", - "downloadImage": "画像をダウンロード", - "openInViewer": "ビュワーを開く", - "closeViewer": "ビュワーを閉じる", - "usePrompt": "プロンプトを使用", - "useSeed": "シード値を使用", - "useAll": "すべてを使用", - "info": "情報", - "showOptionsPanel": "オプションパネルを表示" - }, - "settings": { - "models": "モデル", - "displayInProgress": "生成中の画像を表示する", - "saveSteps": "nステップごとに画像を保存", - "confirmOnDelete": "削除時に確認", - "displayHelpIcons": "ヘルプアイコンを表示", - "enableImageDebugging": "画像のデバッグを有効化", - "resetWebUI": "WebUIをリセット", - "resetWebUIDesc1": "WebUIのリセットは、画像と保存された設定のキャッシュをリセットするだけです。画像を削除するわけではありません。", - "resetWebUIDesc2": "もしギャラリーに画像が表示されないなど、何か問題が発生した場合はGitHubにissueを提出する前にリセットを試してください。", - "resetComplete": "WebUIはリセットされました。F5を押して再読み込みしてください。" - }, - "toast": { - "uploadFailed": "アップロード失敗", - "uploadFailedUnableToLoadDesc": "ファイルを読み込むことができません。", - "downloadImageStarted": "画像ダウンロード開始", - "imageCopied": "画像をコピー", - "imageLinkCopied": "画像のURLをコピー", - "imageNotLoaded": "画像を読み込めません。", - "imageNotLoadedDesc": "Image To Imageに転送する画像が見つかりません。", - "imageSavedToGallery": "画像をギャラリーに保存する", - "canvasMerged": "Canvas Merged", - "sentToImageToImage": "Image To Imageに転送", - "sentToUnifiedCanvas": "Unified Canvasに転送", - "parametersNotSetDesc": "この画像にはメタデータがありません。", - "parametersFailed": "パラメータ読み込みの不具合", - "parametersFailedDesc": "initイメージを読み込めません。", - "seedNotSetDesc": "この画像のシード値が見つかりません。", - "promptNotSetDesc": "この画像のプロンプトが見つかりませんでした。", - "upscalingFailed": "アップスケーリング失敗", - "faceRestoreFailed": "顔の修復に失敗", - "metadataLoadFailed": "メタデータの読み込みに失敗。" - }, - "tooltip": { - "feature": { - "prompt": "これはプロンプトフィールドです。プロンプトには生成オブジェクトや文法用語が含まれます。プロンプトにも重み(Tokenの重要度)を付けることができますが、CLIコマンドやパラメータは機能しません。", - "gallery": "ギャラリーは、出力先フォルダから生成物を表示します。設定はファイル内に保存され、コンテキストメニューからアクセスできます。.", - "seed": "シード値は、画像が形成される際の初期ノイズに影響します。以前の画像から既に存在するシードを使用することができます。ノイズしきい値は高いCFG値でのアーティファクトを軽減するために使用され、Perlinは生成中にPerlinノイズを追加します(0-10の範囲を試してみてください): どちらも出力にバリエーションを追加するのに役立ちます。", - "variations": "0.1から1.0の間の値で試し、付与されたシードに対する結果を変えてみてください。面白いバリュエーションは0.1〜0.3の間です。", - "upscale": "生成直後の画像をアップスケールするには、ESRGANを使用します。", - "faceCorrection": "GFPGANまたはCodeformerによる顔の修復: 画像内の顔を検出し不具合を修正するアルゴリズムです。高い値を設定すると画像がより変化し、より魅力的な顔になります。Codeformerは顔の修復を犠牲にして、元の画像をできる限り保持します。", - "imageToImage": "Image To Imageは任意の画像を初期値として読み込み、プロンプトとともに新しい画像を生成するために使用されます。値が高いほど結果画像はより変化します。0.0から1.0までの値が可能で、推奨範囲は0.25から0.75です。", - "boundingBox": "バウンディングボックスは、Text To ImageまたはImage To Imageの幅/高さの設定と同じです。ボックス内の領域のみが処理されます。", - "seamCorrection": "キャンバス上の生成された画像間に発生する可視可能な境界の処理を制御します。" - } - }, - "unifiedCanvas": { - "mask": "マスク", - "maskingOptions": "マスクのオプション", - "enableMask": "マスクを有効化", - "preserveMaskedArea": "マスク領域の保存", - "clearMask": "マスクを解除", - "brush": "ブラシ", - "eraser": "消しゴム", - "fillBoundingBox": "バウンディングボックスの塗りつぶし", - "eraseBoundingBox": "バウンディングボックスの消去", - "colorPicker": "カラーピッカー", - "brushOptions": "ブラシオプション", - "brushSize": "サイズ", - "saveToGallery": "ギャラリーに保存", - "copyToClipboard": "クリップボードにコピー", - "downloadAsImage": "画像としてダウンロード", - "undo": "取り消し", - "redo": "やり直し", - "clearCanvas": "キャンバスを片付ける", - "canvasSettings": "キャンバスの設定", - "showGrid": "グリッドを表示", - "darkenOutsideSelection": "外周を暗くする", - "autoSaveToGallery": "ギャラリーに自動保存", - "saveBoxRegionOnly": "ボックス領域のみ保存", - "showCanvasDebugInfo": "キャンバスのデバッグ情報を表示", - "clearCanvasHistory": "キャンバスの履歴を削除", - "clearHistory": "履歴を削除", - "clearCanvasHistoryMessage": "履歴を消去すると現在のキャンバスは残りますが、取り消しややり直しの履歴は不可逆的に消去されます。", - "clearCanvasHistoryConfirm": "履歴を削除しますか?", - "emptyTempImageFolder": "Empty Temp Image Folde", - "emptyFolder": "空のフォルダ", - "emptyTempImagesFolderMessage": "一時フォルダを空にすると、Unified Canvasも完全にリセットされます。これには、すべての取り消し/やり直しの履歴、ステージング領域の画像、およびキャンバスのベースレイヤーが含まれます。", - "emptyTempImagesFolderConfirm": "一時フォルダを削除しますか?", - "activeLayer": "Active Layer", - "canvasScale": "Canvas Scale", - "boundingBox": "バウンディングボックス", - "boundingBoxPosition": "バウンディングボックスの位置", - "canvasDimensions": "キャンバスの大きさ", - "canvasPosition": "キャンバスの位置", - "cursorPosition": "カーソルの位置", - "previous": "前", - "next": "次", - "accept": "同意", - "showHide": "表示/非表示", - "discardAll": "すべて破棄", - "snapToGrid": "グリッドにスナップ" - }, - "accessibility": { - "modelSelect": "モデルを選択", - "invokeProgressBar": "進捗バー", - "reset": "リセット", - "uploadImage": "画像をアップロード", - "previousImage": "前の画像", - "nextImage": "次の画像", - "useThisParameter": "このパラメータを使用する", - "copyMetadataJson": "メタデータをコピー(JSON)", - "zoomIn": "ズームイン", - "exitViewer": "ビューアーを終了", - "zoomOut": "ズームアウト", - "rotateCounterClockwise": "反時計回りに回転", - "rotateClockwise": "時計回りに回転", - "flipHorizontally": "水平方向に反転", - "flipVertically": "垂直方向に反転", - "toggleAutoscroll": "自動スクロールの切替", - "modifyConfig": "Modify Config", - "toggleLogViewer": "Log Viewerの切替", - "showOptionsPanel": "サイドパネルを表示", - "showGalleryPanel": "ギャラリーパネルを表示", - "menu": "メニュー", - "loadMore": "さらに読み込む" - }, - "controlnet": { - "resize": "リサイズ", - "showAdvanced": "高度な設定を表示", - "addT2IAdapter": "$t(common.t2iAdapter)を追加", - "importImageFromCanvas": "キャンバスから画像をインポート", - "lineartDescription": "画像を線画に変換", - "importMaskFromCanvas": "キャンバスからマスクをインポート", - "hideAdvanced": "高度な設定を非表示", - "ipAdapterModel": "アダプターモデル", - "resetControlImage": "コントロール画像をリセット", - "beginEndStepPercent": "開始 / 終了ステップパーセンテージ", - "duplicate": "複製", - "balanced": "バランス", - "prompt": "プロンプト", - "depthMidasDescription": "Midasを使用して深度マップを生成", - "openPoseDescription": "Openposeを使用してポーズを推定", - "control": "コントロール", - "resizeMode": "リサイズモード", - "weight": "重み", - "selectModel": "モデルを選択", - "crop": "切り抜き", - "w": "幅", - "processor": "プロセッサー", - "addControlNet": "$t(common.controlNet)を追加", - "none": "なし", - "incompatibleBaseModel": "互換性のないベースモデル:", - "enableControlnet": "コントロールネットを有効化", - "detectResolution": "検出解像度", - "controlNetT2IMutexDesc": "$t(common.controlNet)と$t(common.t2iAdapter)の同時使用は現在サポートされていません。", - "pidiDescription": "PIDI画像処理", - "controlMode": "コントロールモード", - "fill": "塗りつぶし", - "cannyDescription": "Canny 境界検出", - "addIPAdapter": "$t(common.ipAdapter)を追加", - "colorMapDescription": "画像からカラーマップを生成", - "lineartAnimeDescription": "アニメスタイルの線画処理", - "imageResolution": "画像解像度", - "megaControl": "メガコントロール", - "lowThreshold": "最低閾値", - "autoConfigure": "プロセッサーを自動設定", - "highThreshold": "最大閾値", - "saveControlImage": "コントロール画像を保存", - "toggleControlNet": "このコントロールネットを切り替え", - "delete": "削除", - "controlAdapter_other": "コントロールアダプター", - "colorMapTileSize": "タイルサイズ", - "ipAdapterImageFallback": "IP Adapterの画像が選択されていません", - "mediapipeFaceDescription": "Mediapipeを使用して顔を検出", - "depthZoeDescription": "Zoeを使用して深度マップを生成", - "setControlImageDimensions": "コントロール画像のサイズを幅と高さにセット", - "resetIPAdapterImage": "IP Adapterの画像をリセット", - "handAndFace": "手と顔", - "enableIPAdapter": "IP Adapterを有効化", - "amult": "a_mult", - "contentShuffleDescription": "画像の内容をシャッフルします", - "bgth": "bg_th", - "controlNetEnabledT2IDisabled": "$t(common.controlNet) が有効化され、$t(common.t2iAdapter)s が無効化されました", - "controlnet": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.controlNet))", - "t2iEnabledControlNetDisabled": "$t(common.t2iAdapter) が有効化され、$t(common.controlNet)s が無効化されました", - "ip_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.ipAdapter))", - "t2i_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.t2iAdapter))", - "minConfidence": "最小確信度", - "colorMap": "Color", - "noneDescription": "処理は行われていません", - "canny": "Canny", - "hedDescription": "階層的エッジ検出", - "maxFaces": "顔の最大数" - }, - "metadata": { - "seamless": "シームレス", - "Threshold": "ノイズ閾値", - "seed": "シード", - "width": "幅", - "workflow": "ワークフロー", - "steps": "ステップ", - "scheduler": "スケジューラー", - "positivePrompt": "ポジティブプロンプト", - "strength": "Image to Image 強度", - "perlin": "パーリンノイズ", - "recallParameters": "パラメータを呼び出す" - }, - "queue": { - "queueEmpty": "キューが空です", - "pauseSucceeded": "処理が一時停止されました", - "queueFront": "キューの先頭へ追加", - "queueBack": "キューに追加", - "queueCountPrediction": "{{predicted}}をキューに追加", - "queuedCount": "保留中 {{pending}}", - "pause": "一時停止", - "queue": "キュー", - "pauseTooltip": "処理を一時停止", - "cancel": "キャンセル", - "queueTotal": "合計 {{total}}", - "resumeSucceeded": "処理が再開されました", - "resumeTooltip": "処理を再開", - "resume": "再会", - "status": "ステータス", - "pruneSucceeded": "キューから完了アイテム{{item_count}}件を削除しました", - "cancelTooltip": "現在のアイテムをキャンセル", - "in_progress": "進行中", - "notReady": "キューに追加できません", - "batchFailedToQueue": "バッチをキューに追加できませんでした", - "completed": "完了", - "batchValues": "バッチの値", - "cancelFailed": "アイテムのキャンセルに問題があります", - "batchQueued": "バッチをキューに追加しました", - "pauseFailed": "処理の一時停止に問題があります", - "clearFailed": "キューのクリアに問題があります", - "front": "先頭", - "clearSucceeded": "キューがクリアされました", - "pruneTooltip": "{{item_count}} の完了アイテムを削除", - "cancelSucceeded": "アイテムがキャンセルされました", - "batchQueuedDesc_other": "{{count}} セッションをキューの{{direction}}に追加しました", - "graphQueued": "グラフをキューに追加しました", - "batch": "バッチ", - "clearQueueAlertDialog": "キューをクリアすると、処理中のアイテムは直ちにキャンセルされ、キューは完全にクリアされます。", - "pending": "保留中", - "resumeFailed": "処理の再開に問題があります", - "clear": "クリア", - "total": "合計", - "canceled": "キャンセル", - "pruneFailed": "キューの削除に問題があります", - "cancelBatchSucceeded": "バッチがキャンセルされました", - "clearTooltip": "全てのアイテムをキャンセルしてクリア", - "current": "現在", - "failed": "失敗", - "cancelItem": "項目をキャンセル", - "next": "次", - "cancelBatch": "バッチをキャンセル", - "session": "セッション", - "enqueueing": "バッチをキューに追加", - "queueMaxExceeded": "{{max_queue_size}} の最大値を超えたため、{{skip}} をスキップします", - "cancelBatchFailed": "バッチのキャンセルに問題があります", - "clearQueueAlertDialog2": "キューをクリアしてもよろしいですか?", - "item": "アイテム", - "graphFailedToQueue": "グラフをキューに追加できませんでした" - }, - "models": { - "noMatchingModels": "一致するモデルがありません", - "loading": "読み込み中", - "noMatchingLoRAs": "一致するLoRAがありません", - "noLoRAsAvailable": "使用可能なLoRAがありません", - "noModelsAvailable": "使用可能なモデルがありません", - "selectModel": "モデルを選択してください", - "selectLoRA": "LoRAを選択してください" - }, - "nodes": { - "addNode": "ノードを追加", - "boardField": "ボード", - "boolean": "ブーリアン", - "boardFieldDescription": "ギャラリーボード", - "addNodeToolTip": "ノードを追加 (Shift+A, Space)", - "booleanPolymorphicDescription": "ブーリアンのコレクション。", - "inputField": "入力フィールド", - "latentsFieldDescription": "潜在空間はノード間で伝達できます。", - "floatCollectionDescription": "浮動小数点のコレクション。", - "missingTemplate": "テンプレートが見つかりません", - "ipAdapterPolymorphicDescription": "IP-Adaptersのコレクション。", - "latentsPolymorphicDescription": "潜在空間はノード間で伝達できます。", - "colorFieldDescription": "RGBAカラー。", - "ipAdapterCollection": "IP-Adapterコレクション", - "conditioningCollection": "条件付きコレクション", - "hideGraphNodes": "グラフオーバーレイを非表示", - "loadWorkflow": "ワークフローを読み込み", - "integerPolymorphicDescription": "整数のコレクション。", - "hideLegendNodes": "フィールドタイプの凡例を非表示", - "float": "浮動小数点", - "booleanCollectionDescription": "ブーリアンのコレクション。", - "integer": "整数", - "colorField": "カラー", - "nodeTemplate": "ノードテンプレート", - "integerDescription": "整数は小数点を持たない数値です。", - "imagePolymorphicDescription": "画像のコレクション。", - "doesNotExist": "存在しません", - "ipAdapterCollectionDescription": "IP-Adaptersのコレクション。", - "inputMayOnlyHaveOneConnection": "入力は1つの接続しか持つことができません", - "nodeOutputs": "ノード出力", - "currentImageDescription": "ノードエディタ内の現在の画像を表示", - "downloadWorkflow": "ワークフローのJSONをダウンロード", - "integerCollection": "整数コレクション", - "collectionItem": "コレクションアイテム", - "fieldTypesMustMatch": "フィールドタイプが一致している必要があります", - "edge": "輪郭", - "inputNode": "入力ノード", - "imageField": "画像", - "animatedEdgesHelp": "選択したエッジおよび選択したノードに接続されたエッジをアニメーション化します", - "cannotDuplicateConnection": "重複した接続は作れません", - "noWorkflow": "ワークフローがありません", - "integerCollectionDescription": "整数のコレクション。", - "colorPolymorphicDescription": "カラーのコレクション。", - "missingCanvaInitImage": "キャンバスの初期画像が見つかりません", - "clipFieldDescription": "トークナイザーとテキストエンコーダーサブモデル。", - "fullyContainNodesHelp": "ノードは選択ボックス内に完全に存在する必要があります", - "clipField": "クリップ", - "nodeType": "ノードタイプ", - "executionStateInProgress": "処理中", - "executionStateError": "エラー", - "ipAdapterModel": "IP-Adapterモデル", - "ipAdapterDescription": "イメージプロンプトアダプター(IP-Adapter)。", - "missingCanvaInitMaskImages": "キャンバスの初期画像およびマスクが見つかりません", - "hideMinimapnodes": "ミニマップを非表示", - "fitViewportNodes": "全体を表示", - "executionStateCompleted": "完了", - "node": "ノード", - "currentImage": "現在の画像", - "controlField": "コントロール", - "booleanDescription": "ブーリアンはtrueかfalseです。", - "collection": "コレクション", - "ipAdapterModelDescription": "IP-Adapterモデルフィールド", - "cannotConnectInputToInput": "入力から入力には接続できません", - "invalidOutputSchema": "無効な出力スキーマ", - "floatDescription": "浮動小数点は、小数点を持つ数値です。", - "floatPolymorphicDescription": "浮動小数点のコレクション。", - "floatCollection": "浮動小数点コレクション", - "latentsField": "潜在空間", - "cannotConnectOutputToOutput": "出力から出力には接続できません", - "booleanCollection": "ブーリアンコレクション", - "cannotConnectToSelf": "自身のノードには接続できません", - "inputFields": "入力フィールド(複数)", - "colorCodeEdges": "カラー-Code Edges", - "imageCollectionDescription": "画像のコレクション。", - "loadingNodes": "ノードを読み込み中...", - "imageCollection": "画像コレクション" - }, - "boards": { - "autoAddBoard": "自動追加するボード", - "move": "移動", - "menuItemAutoAdd": "このボードに自動追加", - "myBoard": "マイボード", - "searchBoard": "ボードを検索...", - "noMatching": "一致するボードがありません", - "selectBoard": "ボードを選択", - "cancel": "キャンセル", - "addBoard": "ボードを追加", - "uncategorized": "未分類", - "downloadBoard": "ボードをダウンロード", - "changeBoard": "ボードを変更", - "loading": "ロード中...", - "topMessage": "このボードには、以下の機能で使用されている画像が含まれています:", - "bottomMessage": "このボードおよび画像を削除すると、現在これらを利用している機能はリセットされます。", - "clearSearch": "検索をクリア" - }, - "embedding": { - "noMatchingEmbedding": "一致する埋め込みがありません", - "addEmbedding": "埋め込みを追加", - "incompatibleModel": "互換性のないベースモデル:" - }, - "invocationCache": { - "invocationCache": "呼び出しキャッシュ", - "clearSucceeded": "呼び出しキャッシュをクリアしました", - "clearFailed": "呼び出しキャッシュのクリアに問題があります", - "enable": "有効", - "clear": "クリア", - "maxCacheSize": "最大キャッシュサイズ", - "cacheSize": "キャッシュサイズ" - } -} diff --git a/invokeai/frontend/web/dist/locales/ko.json b/invokeai/frontend/web/dist/locales/ko.json deleted file mode 100644 index 8baab54ac9..0000000000 --- a/invokeai/frontend/web/dist/locales/ko.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "common": { - "languagePickerLabel": "언어 설정", - "reportBugLabel": "버그 리포트", - "githubLabel": "Github", - "settingsLabel": "설정", - "langArabic": "العربية", - "langEnglish": "English", - "langDutch": "Nederlands", - "unifiedCanvas": "통합 캔버스", - "langFrench": "Français", - "langGerman": "Deutsch", - "langItalian": "Italiano", - "langJapanese": "日本語", - "langBrPortuguese": "Português do Brasil", - "langRussian": "Русский", - "langSpanish": "Español", - "nodes": "노드", - "nodesDesc": "이미지 생성을 위한 노드 기반 시스템은 현재 개발 중입니다. 이 놀라운 기능에 대한 업데이트를 계속 지켜봐 주세요.", - "postProcessing": "후처리", - "postProcessDesc2": "보다 진보된 후처리 작업을 위한 전용 UI가 곧 출시될 예정입니다.", - "postProcessDesc3": "Invoke AI CLI는 Embiggen을 비롯한 다양한 기능을 제공합니다.", - "training": "학습", - "trainingDesc1": "Textual Inversion과 Dreambooth를 이용해 Web UI에서 나만의 embedding 및 checkpoint를 교육하기 위한 전용 워크플로우입니다.", - "trainingDesc2": "InvokeAI는 이미 메인 스크립트를 사용한 Textual Inversion를 이용한 Custom embedding 학습을 지원하고 있습니다.", - "upload": "업로드", - "close": "닫기", - "load": "로드", - "back": "뒤로 가기", - "statusConnected": "연결됨", - "statusDisconnected": "연결 끊김", - "statusError": "에러", - "statusPreparing": "준비 중", - "langSimplifiedChinese": "简体中文", - "statusGenerating": "생성 중", - "statusGeneratingTextToImage": "텍스트->이미지 생성", - "statusGeneratingInpainting": "인페인팅 생성", - "statusGeneratingOutpainting": "아웃페인팅 생성", - "statusGenerationComplete": "생성 완료", - "statusRestoringFaces": "얼굴 복원", - "statusRestoringFacesGFPGAN": "얼굴 복원 (GFPGAN)", - "statusRestoringFacesCodeFormer": "얼굴 복원 (CodeFormer)", - "statusUpscaling": "업스케일링", - "statusUpscalingESRGAN": "업스케일링 (ESRGAN)", - "statusLoadingModel": "모델 로딩중", - "statusModelChanged": "모델 변경됨", - "statusConvertingModel": "모델 컨버팅", - "statusModelConverted": "모델 컨버팅됨", - "statusMergedModels": "모델 병합됨", - "statusMergingModels": "모델 병합중", - "hotkeysLabel": "단축키 설정", - "img2img": "이미지->이미지", - "discordLabel": "Discord", - "langPolish": "Polski", - "postProcessDesc1": "Invoke AI는 다양한 후처리 기능을 제공합니다. 이미지 업스케일링 및 얼굴 복원은 이미 Web UI에서 사용할 수 있습니다. 텍스트->이미지 또는 이미지->이미지 탭의 고급 옵션 메뉴에서 사용할 수 있습니다. 또한 현재 이미지 표시 위, 또는 뷰어에서 액션 버튼을 사용하여 이미지를 직접 처리할 수도 있습니다.", - "langUkranian": "Украї́нська", - "statusProcessingCanceled": "처리 취소됨", - "statusGeneratingImageToImage": "이미지->이미지 생성", - "statusProcessingComplete": "처리 완료", - "statusIterationComplete": "반복(Iteration) 완료", - "statusSavingImage": "이미지 저장" - }, - "gallery": { - "showGenerations": "생성된 이미지 보기", - "generations": "생성된 이미지", - "uploads": "업로드된 이미지", - "showUploads": "업로드된 이미지 보기", - "galleryImageSize": "이미지 크기", - "galleryImageResetSize": "사이즈 리셋", - "gallerySettings": "갤러리 설정", - "maintainAspectRatio": "종횡비 유지" - }, - "unifiedCanvas": { - "betaPreserveMasked": "마스크 레이어 유지" - } -} diff --git a/invokeai/frontend/web/dist/locales/mn.json b/invokeai/frontend/web/dist/locales/mn.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/invokeai/frontend/web/dist/locales/mn.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/invokeai/frontend/web/dist/locales/nl.json b/invokeai/frontend/web/dist/locales/nl.json deleted file mode 100644 index 2d50a602d1..0000000000 --- a/invokeai/frontend/web/dist/locales/nl.json +++ /dev/null @@ -1,1509 +0,0 @@ -{ - "common": { - "hotkeysLabel": "Sneltoetsen", - "languagePickerLabel": "Taal", - "reportBugLabel": "Meld bug", - "settingsLabel": "Instellingen", - "img2img": "Afbeelding naar afbeelding", - "unifiedCanvas": "Centraal canvas", - "nodes": "Werkstroom-editor", - "langDutch": "Nederlands", - "nodesDesc": "Een op knooppunten gebaseerd systeem voor het genereren van afbeeldingen is momenteel in ontwikkeling. Blijf op de hoogte voor nieuws over deze verbluffende functie.", - "postProcessing": "Naverwerking", - "postProcessDesc1": "Invoke AI biedt een breed scala aan naverwerkingsfuncties. Afbeeldingsopschaling en Gezichtsherstel zijn al beschikbaar in de web-UI. Je kunt ze openen via het menu Uitgebreide opties in de tabbladen Tekst naar afbeelding en Afbeelding naar afbeelding. Je kunt een afbeelding ook direct verwerken via de afbeeldingsactieknoppen boven de weergave van de huidigde afbeelding of in de Viewer.", - "postProcessDesc2": "Een individuele gebruikersinterface voor uitgebreidere naverwerkingsworkflows.", - "postProcessDesc3": "De opdrachtregelinterface van InvokeAI biedt diverse andere functies, waaronder Embiggen.", - "trainingDesc1": "Een individuele workflow in de webinterface voor het trainen van je eigen embeddings en checkpoints via Textual Inversion en Dreambooth.", - "trainingDesc2": "InvokeAI ondersteunt al het trainen van eigen embeddings via Textual Inversion via het hoofdscript.", - "upload": "Upload", - "close": "Sluit", - "load": "Laad", - "statusConnected": "Verbonden", - "statusDisconnected": "Niet verbonden", - "statusError": "Fout", - "statusPreparing": "Voorbereiden", - "statusProcessingCanceled": "Verwerking geannuleerd", - "statusProcessingComplete": "Verwerking voltooid", - "statusGenerating": "Genereren", - "statusGeneratingTextToImage": "Genereren van tekst naar afbeelding", - "statusGeneratingImageToImage": "Genereren van afbeelding naar afbeelding", - "statusGeneratingInpainting": "Genereren van Inpainting", - "statusGeneratingOutpainting": "Genereren van Outpainting", - "statusGenerationComplete": "Genereren voltooid", - "statusIterationComplete": "Iteratie voltooid", - "statusSavingImage": "Afbeelding bewaren", - "statusRestoringFaces": "Gezichten herstellen", - "statusRestoringFacesGFPGAN": "Gezichten herstellen (GFPGAN)", - "statusRestoringFacesCodeFormer": "Gezichten herstellen (CodeFormer)", - "statusUpscaling": "Opschaling", - "statusUpscalingESRGAN": "Opschaling (ESRGAN)", - "statusLoadingModel": "Laden van model", - "statusModelChanged": "Model gewijzigd", - "githubLabel": "Github", - "discordLabel": "Discord", - "langArabic": "Arabisch", - "langEnglish": "Engels", - "langFrench": "Frans", - "langGerman": "Duits", - "langItalian": "Italiaans", - "langJapanese": "Japans", - "langPolish": "Pools", - "langBrPortuguese": "Portugees (Brazilië)", - "langRussian": "Russisch", - "langSimplifiedChinese": "Chinees (vereenvoudigd)", - "langUkranian": "Oekraïens", - "langSpanish": "Spaans", - "training": "Training", - "back": "Terug", - "statusConvertingModel": "Omzetten van model", - "statusModelConverted": "Model omgezet", - "statusMergingModels": "Samenvoegen van modellen", - "statusMergedModels": "Modellen samengevoegd", - "cancel": "Annuleer", - "accept": "Akkoord", - "langPortuguese": "Portugees", - "loading": "Bezig met laden", - "loadingInvokeAI": "Bezig met laden van Invoke AI", - "langHebrew": "עברית", - "langKorean": "한국어", - "txt2img": "Tekst naar afbeelding", - "postprocessing": "Naverwerking", - "dontAskMeAgain": "Vraag niet opnieuw", - "imagePrompt": "Afbeeldingsprompt", - "random": "Willekeurig", - "generate": "Genereer", - "openInNewTab": "Open in nieuw tabblad", - "areYouSure": "Weet je het zeker?", - "linear": "Lineair", - "batch": "Seriebeheer", - "modelManager": "Modelbeheer", - "darkMode": "Donkere modus", - "lightMode": "Lichte modus", - "communityLabel": "Gemeenschap", - "t2iAdapter": "T2I-adapter", - "on": "Aan", - "nodeEditor": "Knooppunteditor", - "ipAdapter": "IP-adapter", - "controlAdapter": "Control-adapter", - "auto": "Autom.", - "controlNet": "ControlNet", - "statusProcessing": "Bezig met verwerken", - "imageFailedToLoad": "Kan afbeelding niet laden", - "learnMore": "Meer informatie", - "advanced": "Uitgebreid" - }, - "gallery": { - "generations": "Gegenereerde afbeeldingen", - "showGenerations": "Toon gegenereerde afbeeldingen", - "uploads": "Uploads", - "showUploads": "Toon uploads", - "galleryImageSize": "Afbeeldingsgrootte", - "galleryImageResetSize": "Herstel grootte", - "gallerySettings": "Instellingen galerij", - "maintainAspectRatio": "Behoud beeldverhoiding", - "autoSwitchNewImages": "Wissel autom. naar nieuwe afbeeldingen", - "singleColumnLayout": "Eenkolomsindeling", - "allImagesLoaded": "Alle afbeeldingen geladen", - "loadMore": "Laad meer", - "noImagesInGallery": "Geen afbeeldingen om te tonen", - "deleteImage": "Verwijder afbeelding", - "deleteImageBin": "Verwijderde afbeeldingen worden naar de prullenbak van je besturingssysteem gestuurd.", - "deleteImagePermanent": "Verwijderde afbeeldingen kunnen niet worden hersteld.", - "assets": "Eigen onderdelen", - "images": "Afbeeldingen", - "autoAssignBoardOnClick": "Ken automatisch bord toe bij klikken", - "featuresWillReset": "Als je deze afbeelding verwijdert, dan worden deze functies onmiddellijk teruggezet.", - "loading": "Bezig met laden", - "unableToLoad": "Kan galerij niet laden", - "preparingDownload": "Bezig met voorbereiden van download", - "preparingDownloadFailed": "Fout bij voorbereiden van download", - "downloadSelection": "Download selectie", - "currentlyInUse": "Deze afbeelding is momenteel in gebruik door de volgende functies:", - "copy": "Kopieer", - "download": "Download", - "setCurrentImage": "Stel in als huidige afbeelding" - }, - "hotkeys": { - "keyboardShortcuts": "Sneltoetsen", - "appHotkeys": "Appsneltoetsen", - "generalHotkeys": "Algemene sneltoetsen", - "galleryHotkeys": "Sneltoetsen galerij", - "unifiedCanvasHotkeys": "Sneltoetsen centraal canvas", - "invoke": { - "title": "Genereer", - "desc": "Genereert een afbeelding" - }, - "cancel": { - "title": "Annuleer", - "desc": "Annuleert het genereren van een afbeelding" - }, - "focusPrompt": { - "title": "Focus op invoer", - "desc": "Legt de focus op het invoertekstvak" - }, - "toggleOptions": { - "title": "Open/sluit Opties", - "desc": "Opent of sluit het deelscherm Opties" - }, - "pinOptions": { - "title": "Zet Opties vast", - "desc": "Zet het deelscherm Opties vast" - }, - "toggleViewer": { - "title": "Zet Viewer vast", - "desc": "Opent of sluit Afbeeldingsviewer" - }, - "toggleGallery": { - "title": "Zet Galerij vast", - "desc": "Opent of sluit het deelscherm Galerij" - }, - "maximizeWorkSpace": { - "title": "Maximaliseer werkgebied", - "desc": "Sluit deelschermen en maximaliseer het werkgebied" - }, - "changeTabs": { - "title": "Wissel van tabblad", - "desc": "Wissel naar een ander werkgebied" - }, - "consoleToggle": { - "title": "Open/sluit console", - "desc": "Opent of sluit de console" - }, - "setPrompt": { - "title": "Stel invoertekst in", - "desc": "Gebruikt de invoertekst van de huidige afbeelding" - }, - "setSeed": { - "title": "Stel seed in", - "desc": "Gebruikt de seed van de huidige afbeelding" - }, - "setParameters": { - "title": "Stel parameters in", - "desc": "Gebruikt alle parameters van de huidige afbeelding" - }, - "restoreFaces": { - "title": "Herstel gezichten", - "desc": "Herstelt de huidige afbeelding" - }, - "upscale": { - "title": "Schaal op", - "desc": "Schaalt de huidige afbeelding op" - }, - "showInfo": { - "title": "Toon info", - "desc": "Toont de metagegevens van de huidige afbeelding" - }, - "sendToImageToImage": { - "title": "Stuur naar Afbeelding naar afbeelding", - "desc": "Stuurt de huidige afbeelding naar Afbeelding naar afbeelding" - }, - "deleteImage": { - "title": "Verwijder afbeelding", - "desc": "Verwijdert de huidige afbeelding" - }, - "closePanels": { - "title": "Sluit deelschermen", - "desc": "Sluit geopende deelschermen" - }, - "previousImage": { - "title": "Vorige afbeelding", - "desc": "Toont de vorige afbeelding in de galerij" - }, - "nextImage": { - "title": "Volgende afbeelding", - "desc": "Toont de volgende afbeelding in de galerij" - }, - "toggleGalleryPin": { - "title": "Zet galerij vast/los", - "desc": "Zet de galerij vast of los aan de gebruikersinterface" - }, - "increaseGalleryThumbSize": { - "title": "Vergroot afbeeldingsgrootte galerij", - "desc": "Vergroot de grootte van de galerijminiaturen" - }, - "decreaseGalleryThumbSize": { - "title": "Verklein afbeeldingsgrootte galerij", - "desc": "Verkleint de grootte van de galerijminiaturen" - }, - "selectBrush": { - "title": "Kies penseel", - "desc": "Kiest de penseel op het canvas" - }, - "selectEraser": { - "title": "Kies gum", - "desc": "Kiest de gum op het canvas" - }, - "decreaseBrushSize": { - "title": "Verklein penseelgrootte", - "desc": "Verkleint de grootte van het penseel/gum op het canvas" - }, - "increaseBrushSize": { - "title": "Vergroot penseelgrootte", - "desc": "Vergroot de grootte van het penseel/gum op het canvas" - }, - "decreaseBrushOpacity": { - "title": "Verlaag ondoorzichtigheid penseel", - "desc": "Verlaagt de ondoorzichtigheid van de penseel op het canvas" - }, - "increaseBrushOpacity": { - "title": "Verhoog ondoorzichtigheid penseel", - "desc": "Verhoogt de ondoorzichtigheid van de penseel op het canvas" - }, - "moveTool": { - "title": "Verplaats canvas", - "desc": "Maakt canvasnavigatie mogelijk" - }, - "fillBoundingBox": { - "title": "Vul tekenvak", - "desc": "Vult het tekenvak met de penseelkleur" - }, - "eraseBoundingBox": { - "title": "Wis tekenvak", - "desc": "Wist het gebied van het tekenvak" - }, - "colorPicker": { - "title": "Kleurkiezer", - "desc": "Opent de kleurkiezer op het canvas" - }, - "toggleSnap": { - "title": "Zet uitlijnen aan/uit", - "desc": "Zet uitlijnen op raster aan/uit" - }, - "quickToggleMove": { - "title": "Verplaats canvas even", - "desc": "Verplaats kortstondig het canvas" - }, - "toggleLayer": { - "title": "Zet laag aan/uit", - "desc": "Wisselt tussen de masker- en basislaag" - }, - "clearMask": { - "title": "Wis masker", - "desc": "Wist het volledig masker" - }, - "hideMask": { - "title": "Toon/verberg masker", - "desc": "Toont of verbegt het masker" - }, - "showHideBoundingBox": { - "title": "Toon/verberg tekenvak", - "desc": "Wisselt de zichtbaarheid van het tekenvak" - }, - "mergeVisible": { - "title": "Voeg lagen samen", - "desc": "Voegt alle zichtbare lagen op het canvas samen" - }, - "saveToGallery": { - "title": "Bewaar in galerij", - "desc": "Bewaart het huidige canvas in de galerij" - }, - "copyToClipboard": { - "title": "Kopieer naar klembord", - "desc": "Kopieert het huidige canvas op het klembord" - }, - "downloadImage": { - "title": "Download afbeelding", - "desc": "Downloadt het huidige canvas" - }, - "undoStroke": { - "title": "Maak streek ongedaan", - "desc": "Maakt een penseelstreek ongedaan" - }, - "redoStroke": { - "title": "Herhaal streek", - "desc": "Voert een ongedaan gemaakte penseelstreek opnieuw uit" - }, - "resetView": { - "title": "Herstel weergave", - "desc": "Herstelt de canvasweergave" - }, - "previousStagingImage": { - "title": "Vorige sessie-afbeelding", - "desc": "Bladert terug naar de vorige afbeelding in het sessiegebied" - }, - "nextStagingImage": { - "title": "Volgende sessie-afbeelding", - "desc": "Bladert vooruit naar de volgende afbeelding in het sessiegebied" - }, - "acceptStagingImage": { - "title": "Accepteer sessie-afbeelding", - "desc": "Accepteert de huidige sessie-afbeelding" - }, - "addNodes": { - "title": "Voeg knooppunten toe", - "desc": "Opent het menu Voeg knooppunt toe" - }, - "nodesHotkeys": "Sneltoetsen knooppunten" - }, - "modelManager": { - "modelManager": "Modelonderhoud", - "model": "Model", - "modelAdded": "Model toegevoegd", - "modelUpdated": "Model bijgewerkt", - "modelEntryDeleted": "Modelregel verwijderd", - "cannotUseSpaces": "Spaties zijn niet toegestaan", - "addNew": "Voeg nieuwe toe", - "addNewModel": "Voeg nieuw model toe", - "addManually": "Voeg handmatig toe", - "manual": "Handmatig", - "name": "Naam", - "nameValidationMsg": "Geef een naam voor je model", - "description": "Beschrijving", - "descriptionValidationMsg": "Voeg een beschrijving toe voor je model", - "config": "Configuratie", - "configValidationMsg": "Pad naar het configuratiebestand van je model.", - "modelLocation": "Locatie model", - "modelLocationValidationMsg": "Geef het pad naar een lokale map waar je Diffusers-model wordt bewaard", - "vaeLocation": "Locatie VAE", - "vaeLocationValidationMsg": "Pad naar waar je VAE zich bevindt.", - "width": "Breedte", - "widthValidationMsg": "Standaardbreedte van je model.", - "height": "Hoogte", - "heightValidationMsg": "Standaardhoogte van je model.", - "addModel": "Voeg model toe", - "updateModel": "Werk model bij", - "availableModels": "Beschikbare modellen", - "search": "Zoek", - "load": "Laad", - "active": "actief", - "notLoaded": "niet geladen", - "cached": "gecachet", - "checkpointFolder": "Checkpointmap", - "clearCheckpointFolder": "Wis checkpointmap", - "findModels": "Zoek modellen", - "scanAgain": "Kijk opnieuw", - "modelsFound": "Gevonden modellen", - "selectFolder": "Kies map", - "selected": "Gekozen", - "selectAll": "Kies alles", - "deselectAll": "Kies niets", - "showExisting": "Toon bestaande", - "addSelected": "Voeg gekozen toe", - "modelExists": "Model bestaat", - "selectAndAdd": "Kies en voeg de hieronder opgesomde modellen toe", - "noModelsFound": "Geen modellen gevonden", - "delete": "Verwijder", - "deleteModel": "Verwijder model", - "deleteConfig": "Verwijder configuratie", - "deleteMsg1": "Weet je zeker dat je dit model wilt verwijderen uit InvokeAI?", - "deleteMsg2": "Hiermee ZAL het model van schijf worden verwijderd als het zich bevindt in de beginmap van InvokeAI. Als je het model vanaf een eigen locatie gebruikt, dan ZAL het model NIET van schijf worden verwijderd.", - "formMessageDiffusersVAELocationDesc": "Indien niet opgegeven, dan zal InvokeAI kijken naar het VAE-bestand in de hierboven gegeven modellocatie.", - "repoIDValidationMsg": "Online repository van je model", - "formMessageDiffusersModelLocation": "Locatie Diffusers-model", - "convertToDiffusersHelpText3": "Je checkpoint-bestand op de schijf ZAL worden verwijderd als het zich in de beginmap van InvokeAI bevindt. Het ZAL NIET worden verwijderd als het zich in een andere locatie bevindt.", - "convertToDiffusersHelpText6": "Wil je dit model omzetten?", - "allModels": "Alle modellen", - "checkpointModels": "Checkpoints", - "safetensorModels": "SafeTensors", - "addCheckpointModel": "Voeg Checkpoint-/SafeTensor-model toe", - "addDiffuserModel": "Voeg Diffusers-model toe", - "diffusersModels": "Diffusers", - "repo_id": "Repo-id", - "vaeRepoID": "Repo-id VAE", - "vaeRepoIDValidationMsg": "Online repository van je VAE", - "formMessageDiffusersModelLocationDesc": "Voer er minimaal een in.", - "formMessageDiffusersVAELocation": "Locatie VAE", - "convert": "Omzetten", - "convertToDiffusers": "Omzetten naar Diffusers", - "convertToDiffusersHelpText1": "Dit model wordt omgezet naar de🧨 Diffusers-indeling.", - "convertToDiffusersHelpText2": "Dit proces vervangt het onderdeel in Modelonderhoud met de Diffusers-versie van hetzelfde model.", - "convertToDiffusersHelpText4": "Dit is een eenmalig proces. Dit neemt ongeveer 30 tot 60 sec. in beslag, afhankelijk van de specificaties van je computer.", - "convertToDiffusersHelpText5": "Zorg ervoor dat je genoeg schijfruimte hebt. Modellen nemen gewoonlijk ongeveer 2 tot 7 GB ruimte in beslag.", - "convertToDiffusersSaveLocation": "Bewaarlocatie", - "v1": "v1", - "inpainting": "v1-inpainting", - "customConfig": "Eigen configuratie", - "pathToCustomConfig": "Pad naar eigen configuratie", - "statusConverting": "Omzetten", - "modelConverted": "Model omgezet", - "sameFolder": "Dezelfde map", - "invokeRoot": "InvokeAI-map", - "custom": "Eigen", - "customSaveLocation": "Eigen bewaarlocatie", - "merge": "Samenvoegen", - "modelsMerged": "Modellen samengevoegd", - "mergeModels": "Voeg modellen samen", - "modelOne": "Model 1", - "modelTwo": "Model 2", - "modelThree": "Model 3", - "mergedModelName": "Samengevoegde modelnaam", - "alpha": "Alfa", - "interpolationType": "Soort interpolatie", - "mergedModelSaveLocation": "Bewaarlocatie", - "mergedModelCustomSaveLocation": "Eigen pad", - "invokeAIFolder": "InvokeAI-map", - "ignoreMismatch": "Negeer discrepanties tussen gekozen modellen", - "modelMergeHeaderHelp1": "Je kunt tot drie verschillende modellen samenvoegen om een mengvorm te maken die aan je behoeften voldoet.", - "modelMergeHeaderHelp2": "Alleen Diffusers kunnen worden samengevoegd. Als je een Checkpointmodel wilt samenvoegen, zet deze eerst om naar Diffusers.", - "modelMergeAlphaHelp": "Alfa stuurt de mengsterkte aan voor de modellen. Lagere alfawaarden leiden tot een kleinere invloed op het tweede model.", - "modelMergeInterpAddDifferenceHelp": "In deze stand wordt model 3 eerst van model 2 afgehaald. Wat daar uitkomt wordt gemengd met model 1, gebruikmakend van de hierboven ingestelde alfawaarde.", - "inverseSigmoid": "Keer Sigmoid om", - "sigmoid": "Sigmoid", - "weightedSum": "Gewogen som", - "v2_base": "v2 (512px)", - "v2_768": "v2 (768px)", - "none": "geen", - "addDifference": "Voeg verschil toe", - "scanForModels": "Scan naar modellen", - "pickModelType": "Kies modelsoort", - "baseModel": "Basismodel", - "vae": "VAE", - "variant": "Variant", - "modelConversionFailed": "Omzetten model mislukt", - "modelUpdateFailed": "Bijwerken model mislukt", - "modelsMergeFailed": "Samenvoegen model mislukt", - "selectModel": "Kies model", - "settings": "Instellingen", - "modelDeleted": "Model verwijderd", - "noCustomLocationProvided": "Geen Aangepaste Locatie Opgegeven", - "syncModels": "Synchroniseer Modellen", - "modelsSynced": "Modellen Gesynchroniseerd", - "modelSyncFailed": "Synchronisatie modellen mislukt", - "modelDeleteFailed": "Model kon niet verwijderd worden", - "convertingModelBegin": "Model aan het converteren. Even geduld.", - "importModels": "Importeer Modellen", - "syncModelsDesc": "Als je modellen niet meer synchroon zijn met de backend, kan je ze met deze optie vernieuwen. Dit wordt meestal gebruikt in het geval je het bestand models.yaml met de hand bewerkt of als je modellen aan de beginmap van InvokeAI toevoegt nadat de applicatie gestart is.", - "loraModels": "LoRA's", - "onnxModels": "Onnx", - "oliveModels": "Olives", - "noModels": "Geen modellen gevonden", - "predictionType": "Soort voorspelling (voor Stable Diffusion 2.x-modellen en incidentele Stable Diffusion 1.x-modellen)", - "quickAdd": "Voeg snel toe", - "simpleModelDesc": "Geef een pad naar een lokaal Diffusers-model, lokale-checkpoint- / safetensors-model, een HuggingFace-repo-ID of een url naar een checkpoint- / Diffusers-model.", - "advanced": "Uitgebreid", - "useCustomConfig": "Gebruik eigen configuratie", - "closeAdvanced": "Sluit uitgebreid", - "modelType": "Soort model", - "customConfigFileLocation": "Locatie eigen configuratiebestand", - "vaePrecision": "Nauwkeurigheid VAE" - }, - "parameters": { - "images": "Afbeeldingen", - "steps": "Stappen", - "cfgScale": "CFG-schaal", - "width": "Breedte", - "height": "Hoogte", - "seed": "Seed", - "randomizeSeed": "Willekeurige seed", - "shuffle": "Mengseed", - "noiseThreshold": "Drempelwaarde ruis", - "perlinNoise": "Perlinruis", - "variations": "Variaties", - "variationAmount": "Hoeveelheid variatie", - "seedWeights": "Gewicht seed", - "faceRestoration": "Gezichtsherstel", - "restoreFaces": "Herstel gezichten", - "type": "Soort", - "strength": "Sterkte", - "upscaling": "Opschalen", - "upscale": "Vergroot (Shift + U)", - "upscaleImage": "Schaal afbeelding op", - "scale": "Schaal", - "otherOptions": "Andere opties", - "seamlessTiling": "Naadloze tegels", - "hiresOptim": "Hogeresolutie-optimalisatie", - "imageFit": "Pas initiële afbeelding in uitvoergrootte", - "codeformerFidelity": "Getrouwheid", - "scaleBeforeProcessing": "Schalen voor verwerking", - "scaledWidth": "Geschaalde B", - "scaledHeight": "Geschaalde H", - "infillMethod": "Infill-methode", - "tileSize": "Grootte tegel", - "boundingBoxHeader": "Tekenvak", - "seamCorrectionHeader": "Correctie naad", - "infillScalingHeader": "Infill en schaling", - "img2imgStrength": "Sterkte Afbeelding naar afbeelding", - "toggleLoopback": "Zet recursieve verwerking aan/uit", - "sendTo": "Stuur naar", - "sendToImg2Img": "Stuur naar Afbeelding naar afbeelding", - "sendToUnifiedCanvas": "Stuur naar Centraal canvas", - "copyImageToLink": "Stuur afbeelding naar koppeling", - "downloadImage": "Download afbeelding", - "openInViewer": "Open in Viewer", - "closeViewer": "Sluit Viewer", - "usePrompt": "Hergebruik invoertekst", - "useSeed": "Hergebruik seed", - "useAll": "Hergebruik alles", - "useInitImg": "Gebruik initiële afbeelding", - "info": "Info", - "initialImage": "Initiële afbeelding", - "showOptionsPanel": "Toon deelscherm Opties (O of T)", - "symmetry": "Symmetrie", - "hSymmetryStep": "Stap horiz. symmetrie", - "vSymmetryStep": "Stap vert. symmetrie", - "cancel": { - "immediate": "Annuleer direct", - "isScheduled": "Annuleren", - "setType": "Stel annuleervorm in", - "schedule": "Annuleer na huidige iteratie", - "cancel": "Annuleer" - }, - "general": "Algemeen", - "copyImage": "Kopieer afbeelding", - "imageToImage": "Afbeelding naar afbeelding", - "denoisingStrength": "Sterkte ontruisen", - "hiresStrength": "Sterkte hogere resolutie", - "scheduler": "Planner", - "noiseSettings": "Ruis", - "seamlessXAxis": "X-as", - "seamlessYAxis": "Y-as", - "hidePreview": "Verberg voorvertoning", - "showPreview": "Toon voorvertoning", - "boundingBoxWidth": "Tekenvak breedte", - "boundingBoxHeight": "Tekenvak hoogte", - "clipSkip": "Overslaan CLIP", - "aspectRatio": "Beeldverhouding", - "negativePromptPlaceholder": "Negatieve prompt", - "controlNetControlMode": "Aansturingsmodus", - "positivePromptPlaceholder": "Positieve prompt", - "maskAdjustmentsHeader": "Maskeraanpassingen", - "compositingSettingsHeader": "Instellingen afbeeldingsopbouw", - "coherencePassHeader": "Coherentiestap", - "maskBlur": "Vervaag", - "maskBlurMethod": "Vervagingsmethode", - "coherenceSteps": "Stappen", - "coherenceStrength": "Sterkte", - "seamHighThreshold": "Hoog", - "seamLowThreshold": "Laag", - "invoke": { - "noNodesInGraph": "Geen knooppunten in graaf", - "noModelSelected": "Geen model ingesteld", - "invoke": "Start", - "noPrompts": "Geen prompts gegenereerd", - "systemBusy": "Systeem is bezig", - "noInitialImageSelected": "Geen initiële afbeelding gekozen", - "missingInputForField": "{{nodeLabel}} -> {{fieldLabel}} invoer ontbreekt", - "noControlImageForControlAdapter": "Controle-adapter #{{number}} heeft geen controle-afbeelding", - "noModelForControlAdapter": "Control-adapter #{{number}} heeft geen model ingesteld staan.", - "unableToInvoke": "Kan niet starten", - "incompatibleBaseModelForControlAdapter": "Model van controle-adapter #{{number}} is ongeldig in combinatie met het hoofdmodel.", - "systemDisconnected": "Systeem is niet verbonden", - "missingNodeTemplate": "Knooppuntsjabloon ontbreekt", - "readyToInvoke": "Klaar om te starten", - "missingFieldTemplate": "Veldsjabloon ontbreekt", - "addingImagesTo": "Bezig met toevoegen van afbeeldingen aan" - }, - "seamlessX&Y": "Naadloos X en Y", - "isAllowedToUpscale": { - "useX2Model": "Afbeelding is te groot om te vergroten met het x4-model. Gebruik hiervoor het x2-model", - "tooLarge": "Afbeelding is te groot om te vergoten. Kies een kleinere afbeelding" - }, - "aspectRatioFree": "Vrij", - "cpuNoise": "CPU-ruis", - "patchmatchDownScaleSize": "Verklein", - "gpuNoise": "GPU-ruis", - "seamlessX": "Naadloos X", - "useCpuNoise": "Gebruik CPU-ruis", - "clipSkipWithLayerCount": "Overslaan CLIP {{layerCount}}", - "seamlessY": "Naadloos Y", - "manualSeed": "Handmatige seedwaarde", - "imageActions": "Afbeeldingshandeling", - "randomSeed": "Willekeurige seedwaarde", - "iterations": "Iteraties", - "iterationsWithCount_one": "{{count}} iteratie", - "iterationsWithCount_other": "{{count}} iteraties", - "enableNoiseSettings": "Schakel ruisinstellingen in", - "coherenceMode": "Modus" - }, - "settings": { - "models": "Modellen", - "displayInProgress": "Toon voortgangsafbeeldingen", - "saveSteps": "Bewaar afbeeldingen elke n stappen", - "confirmOnDelete": "Bevestig bij verwijderen", - "displayHelpIcons": "Toon hulppictogrammen", - "enableImageDebugging": "Schakel foutopsporing afbeelding in", - "resetWebUI": "Herstel web-UI", - "resetWebUIDesc1": "Herstel web-UI herstelt alleen de lokale afbeeldingscache en de onthouden instellingen van je browser. Het verwijdert geen afbeeldingen van schijf.", - "resetWebUIDesc2": "Als afbeeldingen niet getoond worden in de galerij of iets anders werkt niet, probeer dan eerst deze herstelfunctie voordat je een fout aanmeldt op GitHub.", - "resetComplete": "Webinterface is hersteld.", - "useSlidersForAll": "Gebruik schuifbalken voor alle opties", - "consoleLogLevel": "Niveau logboek", - "shouldLogToConsole": "Schrijf logboek naar console", - "developer": "Ontwikkelaar", - "general": "Algemeen", - "showProgressInViewer": "Toon voortgangsafbeeldingen in viewer", - "generation": "Genereren", - "ui": "Gebruikersinterface", - "antialiasProgressImages": "Voer anti-aliasing uit op voortgangsafbeeldingen", - "showAdvancedOptions": "Toon uitgebreide opties", - "favoriteSchedulers": "Favoriete planners", - "favoriteSchedulersPlaceholder": "Geen favoriete planners ingesteld", - "beta": "Bèta", - "experimental": "Experimenteel", - "alternateCanvasLayout": "Omwisselen Canvas Layout", - "enableNodesEditor": "Schakel Knooppunteditor in", - "autoChangeDimensions": "Werk B/H bij naar modelstandaard bij wijziging", - "clearIntermediates": "Wis tussentijdse afbeeldingen", - "clearIntermediatesDesc3": "Je galerijafbeeldingen zullen niet worden verwijderd.", - "clearIntermediatesWithCount_one": "Wis {{count}} tussentijdse afbeelding", - "clearIntermediatesWithCount_other": "Wis {{count}} tussentijdse afbeeldingen", - "clearIntermediatesDesc2": "Tussentijdse afbeeldingen zijn nevenproducten bij het genereren. Deze wijken af van de uitvoerafbeeldingen in de galerij. Als je tussentijdse afbeeldingen wist, wordt schijfruimte vrijgemaakt.", - "intermediatesCleared_one": "{{count}} tussentijdse afbeelding gewist", - "intermediatesCleared_other": "{{count}} tussentijdse afbeeldingen gewist", - "clearIntermediatesDesc1": "Als je tussentijdse afbeeldingen wist, dan wordt de staat hersteld van je canvas en van ControlNet.", - "intermediatesClearedFailed": "Fout bij wissen van tussentijdse afbeeldingen" - }, - "toast": { - "tempFoldersEmptied": "Tijdelijke map geleegd", - "uploadFailed": "Upload mislukt", - "uploadFailedUnableToLoadDesc": "Kan bestand niet laden", - "downloadImageStarted": "Afbeeldingsdownload gestart", - "imageCopied": "Afbeelding gekopieerd", - "imageLinkCopied": "Afbeeldingskoppeling gekopieerd", - "imageNotLoaded": "Geen afbeelding geladen", - "imageNotLoadedDesc": "Geen afbeeldingen gevonden", - "imageSavedToGallery": "Afbeelding opgeslagen naar galerij", - "canvasMerged": "Canvas samengevoegd", - "sentToImageToImage": "Gestuurd naar Afbeelding naar afbeelding", - "sentToUnifiedCanvas": "Gestuurd naar Centraal canvas", - "parametersSet": "Parameters ingesteld", - "parametersNotSet": "Parameters niet ingesteld", - "parametersNotSetDesc": "Geen metagegevens gevonden voor deze afbeelding.", - "parametersFailed": "Fout bij laden van parameters", - "parametersFailedDesc": "Kan initiële afbeelding niet laden.", - "seedSet": "Seed ingesteld", - "seedNotSet": "Seed niet ingesteld", - "seedNotSetDesc": "Kan seed niet vinden voor deze afbeelding.", - "promptSet": "Invoertekst ingesteld", - "promptNotSet": "Invoertekst niet ingesteld", - "promptNotSetDesc": "Kan invoertekst niet vinden voor deze afbeelding.", - "upscalingFailed": "Opschalen mislukt", - "faceRestoreFailed": "Gezichtsherstel mislukt", - "metadataLoadFailed": "Fout bij laden metagegevens", - "initialImageSet": "Initiële afbeelding ingesteld", - "initialImageNotSet": "Initiële afbeelding niet ingesteld", - "initialImageNotSetDesc": "Kan initiële afbeelding niet laden", - "serverError": "Serverfout", - "disconnected": "Verbinding met server verbroken", - "connected": "Verbonden met server", - "canceled": "Verwerking geannuleerd", - "uploadFailedInvalidUploadDesc": "Moet een enkele PNG- of JPEG-afbeelding zijn", - "problemCopyingImageLink": "Kan afbeeldingslink niet kopiëren", - "parameterNotSet": "Parameter niet ingesteld", - "parameterSet": "Instellen parameters", - "nodesSaved": "Knooppunten bewaard", - "nodesLoaded": "Knooppunten geladen", - "nodesCleared": "Knooppunten weggehaald", - "nodesLoadedFailed": "Laden knooppunten mislukt", - "problemCopyingImage": "Kan Afbeelding Niet Kopiëren", - "nodesNotValidJSON": "Ongeldige JSON", - "nodesCorruptedGraph": "Kan niet laden. Graph lijkt corrupt.", - "nodesUnrecognizedTypes": "Laden mislukt. Graph heeft onherkenbare types", - "nodesBrokenConnections": "Laden mislukt. Sommige verbindingen zijn verbroken.", - "nodesNotValidGraph": "Geen geldige knooppunten graph", - "baseModelChangedCleared_one": "Basismodel is gewijzigd: {{count}} niet-compatibel submodel weggehaald of uitgeschakeld", - "baseModelChangedCleared_other": "Basismodel is gewijzigd: {{count}} niet-compatibele submodellen weggehaald of uitgeschakeld", - "imageSavingFailed": "Fout bij bewaren afbeelding", - "canvasSentControlnetAssets": "Canvas gestuurd naar ControlNet en Assets", - "problemCopyingCanvasDesc": "Kan basislaag niet exporteren", - "loadedWithWarnings": "Werkstroom geladen met waarschuwingen", - "setInitialImage": "Ingesteld als initiële afbeelding", - "canvasCopiedClipboard": "Canvas gekopieerd naar klembord", - "setControlImage": "Ingesteld als controle-afbeelding", - "setNodeField": "Ingesteld als knooppuntveld", - "problemSavingMask": "Fout bij bewaren masker", - "problemSavingCanvasDesc": "Kan basislaag niet exporteren", - "maskSavedAssets": "Masker bewaard in Assets", - "modelAddFailed": "Fout bij toevoegen model", - "problemDownloadingCanvas": "Fout bij downloaden van canvas", - "problemMergingCanvas": "Fout bij samenvoegen canvas", - "setCanvasInitialImage": "Ingesteld als initiële canvasafbeelding", - "imageUploaded": "Afbeelding geüpload", - "addedToBoard": "Toegevoegd aan bord", - "workflowLoaded": "Werkstroom geladen", - "modelAddedSimple": "Model toegevoegd", - "problemImportingMaskDesc": "Kan masker niet exporteren", - "problemCopyingCanvas": "Fout bij kopiëren canvas", - "problemSavingCanvas": "Fout bij bewaren canvas", - "canvasDownloaded": "Canvas gedownload", - "setIPAdapterImage": "Ingesteld als IP-adapterafbeelding", - "problemMergingCanvasDesc": "Kan basislaag niet exporteren", - "problemDownloadingCanvasDesc": "Kan basislaag niet exporteren", - "problemSavingMaskDesc": "Kan masker niet exporteren", - "imageSaved": "Afbeelding bewaard", - "maskSentControlnetAssets": "Masker gestuurd naar ControlNet en Assets", - "canvasSavedGallery": "Canvas bewaard in galerij", - "imageUploadFailed": "Fout bij uploaden afbeelding", - "modelAdded": "Model toegevoegd: {{modelName}}", - "problemImportingMask": "Fout bij importeren masker" - }, - "tooltip": { - "feature": { - "prompt": "Dit is het invoertekstvak. De invoertekst bevat de te genereren voorwerpen en stylistische termen. Je kunt hiernaast in de invoertekst ook het gewicht (het belang van een trefwoord) toekennen. Opdrachten en parameters voor op de opdrachtregelinterface werken hier niet.", - "gallery": "De galerij toont gegenereerde afbeeldingen uit de uitvoermap nadat ze gegenereerd zijn. Instellingen worden opgeslagen binnen de bestanden zelf en zijn toegankelijk via het contextmenu.", - "other": "Deze opties maken alternative werkingsstanden voor Invoke mogelijk. De optie 'Naadloze tegels' maakt herhalende patronen in de uitvoer. 'Hoge resolutie' genereert in twee stappen via Afbeelding naar afbeelding: gebruik dit als je een grotere en coherentere afbeelding wilt zonder artifacten. Dit zal meer tijd in beslag nemen t.o.v. Tekst naar afbeelding.", - "seed": "Seedwaarden hebben invloed op de initiële ruis op basis waarvan de afbeelding wordt gevormd. Je kunt de al bestaande seeds van eerdere afbeeldingen gebruiken. De waarde 'Drempelwaarde ruis' wordt gebruikt om de hoeveelheid artifacten te verkleinen bij hoge CFG-waarden (beperk je tot 0 - 10). De Perlinruiswaarde wordt gebruikt om Perlinruis toe te voegen bij het genereren: beide dienen als variatie op de uitvoer.", - "variations": "Probeer een variatie met een waarden tussen 0,1 en 1,0 om het resultaat voor een bepaalde seed te beïnvloeden. Interessante seedvariaties ontstaan bij waarden tussen 0,1 en 0,3.", - "upscale": "Gebruik ESRGAN om de afbeelding direct na het genereren te vergroten.", - "faceCorrection": "Gezichtsherstel via GFPGAN of Codeformer: het algoritme herkent gezichten die voorkomen in de afbeelding en herstelt onvolkomenheden. Een hogere waarde heeft meer invloed op de afbeelding, wat leidt tot aantrekkelijkere gezichten. Codeformer met een hogere getrouwheid behoudt de oorspronkelijke afbeelding ten koste van een sterkere gezichtsherstel.", - "imageToImage": "Afbeelding naar afbeelding laadt een afbeelding als initiële afbeelding, welke vervolgens gebruikt wordt om een nieuwe afbeelding mee te maken i.c.m. de invoertekst. Hoe hoger de waarde, des te meer invloed dit heeft op de uiteindelijke afbeelding. Waarden tussen 0,1 en 1,0 zijn mogelijk. Aanbevolen waarden zijn 0,25 - 0,75", - "boundingBox": "Het tekenvak is gelijk aan de instellingen Breedte en Hoogte voor de functies Tekst naar afbeelding en Afbeelding naar afbeelding. Alleen het gebied in het tekenvak wordt verwerkt.", - "seamCorrection": "Heeft invloed op hoe wordt omgegaan met zichtbare naden die voorkomen tussen gegenereerde afbeeldingen op het canvas.", - "infillAndScaling": "Onderhoud van infillmethodes (gebruikt op gemaskeerde of gewiste gebieden op het canvas) en opschaling (nuttig bij kleine tekenvakken)." - } - }, - "unifiedCanvas": { - "layer": "Laag", - "base": "Basis", - "mask": "Masker", - "maskingOptions": "Maskeropties", - "enableMask": "Schakel masker in", - "preserveMaskedArea": "Behoud gemaskeerd gebied", - "clearMask": "Wis masker", - "brush": "Penseel", - "eraser": "Gum", - "fillBoundingBox": "Vul tekenvak", - "eraseBoundingBox": "Wis tekenvak", - "colorPicker": "Kleurenkiezer", - "brushOptions": "Penseelopties", - "brushSize": "Grootte", - "move": "Verplaats", - "resetView": "Herstel weergave", - "mergeVisible": "Voeg lagen samen", - "saveToGallery": "Bewaar in galerij", - "copyToClipboard": "Kopieer naar klembord", - "downloadAsImage": "Download als afbeelding", - "undo": "Maak ongedaan", - "redo": "Herhaal", - "clearCanvas": "Wis canvas", - "canvasSettings": "Canvasinstellingen", - "showIntermediates": "Toon tussenafbeeldingen", - "showGrid": "Toon raster", - "snapToGrid": "Lijn uit op raster", - "darkenOutsideSelection": "Verduister buiten selectie", - "autoSaveToGallery": "Bewaar automatisch naar galerij", - "saveBoxRegionOnly": "Bewaar alleen tekengebied", - "limitStrokesToBox": "Beperk streken tot tekenvak", - "showCanvasDebugInfo": "Toon aanvullende canvasgegevens", - "clearCanvasHistory": "Wis canvasgeschiedenis", - "clearHistory": "Wis geschiedenis", - "clearCanvasHistoryMessage": "Het wissen van de canvasgeschiedenis laat het huidige canvas ongemoeid, maar wist onherstelbaar de geschiedenis voor het ongedaan maken en herhalen.", - "clearCanvasHistoryConfirm": "Weet je zeker dat je de canvasgeschiedenis wilt wissen?", - "emptyTempImageFolder": "Leeg tijdelijke afbeeldingenmap", - "emptyFolder": "Leeg map", - "emptyTempImagesFolderMessage": "Het legen van de tijdelijke afbeeldingenmap herstelt ook volledig het Centraal canvas. Hieronder valt de geschiedenis voor het ongedaan maken en herhalen, de afbeeldingen in het sessiegebied en de basislaag van het canvas.", - "emptyTempImagesFolderConfirm": "Weet je zeker dat je de tijdelijke afbeeldingenmap wilt legen?", - "activeLayer": "Actieve laag", - "canvasScale": "Schaal canvas", - "boundingBox": "Tekenvak", - "scaledBoundingBox": "Geschaalde tekenvak", - "boundingBoxPosition": "Positie tekenvak", - "canvasDimensions": "Afmetingen canvas", - "canvasPosition": "Positie canvas", - "cursorPosition": "Positie cursor", - "previous": "Vorige", - "next": "Volgende", - "accept": "Accepteer", - "showHide": "Toon/verberg", - "discardAll": "Gooi alles weg", - "betaClear": "Wis", - "betaDarkenOutside": "Verduister buiten tekenvak", - "betaLimitToBox": "Beperk tot tekenvak", - "betaPreserveMasked": "Behoud masker", - "antialiasing": "Anti-aliasing", - "showResultsOn": "Toon resultaten (aan)", - "showResultsOff": "Toon resultaten (uit)" - }, - "accessibility": { - "exitViewer": "Stop viewer", - "zoomIn": "Zoom in", - "rotateCounterClockwise": "Draai tegen de klok in", - "modelSelect": "Modelkeuze", - "invokeProgressBar": "Voortgangsbalk Invoke", - "reset": "Herstel", - "uploadImage": "Upload afbeelding", - "previousImage": "Vorige afbeelding", - "nextImage": "Volgende afbeelding", - "useThisParameter": "Gebruik deze parameter", - "copyMetadataJson": "Kopieer metagegevens-JSON", - "zoomOut": "Zoom uit", - "rotateClockwise": "Draai met de klok mee", - "flipHorizontally": "Spiegel horizontaal", - "flipVertically": "Spiegel verticaal", - "modifyConfig": "Wijzig configuratie", - "toggleAutoscroll": "Autom. scrollen aan/uit", - "toggleLogViewer": "Logboekviewer aan/uit", - "showOptionsPanel": "Toon zijscherm", - "menu": "Menu", - "showGalleryPanel": "Toon deelscherm Galerij", - "loadMore": "Laad meer" - }, - "ui": { - "showProgressImages": "Toon voortgangsafbeeldingen", - "hideProgressImages": "Verberg voortgangsafbeeldingen", - "swapSizes": "Wissel afmetingen om", - "lockRatio": "Zet verhouding vast" - }, - "nodes": { - "zoomOutNodes": "Uitzoomen", - "fitViewportNodes": "Aanpassen aan beeld", - "hideMinimapnodes": "Minimap verbergen", - "showLegendNodes": "Typelegende veld tonen", - "zoomInNodes": "Inzoomen", - "hideGraphNodes": "Graph overlay verbergen", - "showGraphNodes": "Graph overlay tonen", - "showMinimapnodes": "Minimap tonen", - "hideLegendNodes": "Typelegende veld verbergen", - "reloadNodeTemplates": "Herlaad knooppuntsjablonen", - "loadWorkflow": "Laad werkstroom", - "resetWorkflow": "Herstel werkstroom", - "resetWorkflowDesc": "Weet je zeker dat je deze werkstroom wilt herstellen?", - "resetWorkflowDesc2": "Herstel van een werkstroom haalt alle knooppunten, randen en werkstroomdetails weg.", - "downloadWorkflow": "Download JSON van werkstroom", - "booleanPolymorphicDescription": "Een verzameling Booleanse waarden.", - "scheduler": "Planner", - "inputField": "Invoerveld", - "controlFieldDescription": "Controlegegevens doorgegeven tussen knooppunten.", - "skippingUnknownOutputType": "Overslaan van onbekend soort uitvoerveld", - "latentsFieldDescription": "Latents kunnen worden doorgegeven tussen knooppunten.", - "denoiseMaskFieldDescription": "Ontruisingsmasker kan worden doorgegeven tussen knooppunten", - "floatCollectionDescription": "Een verzameling zwevende-kommagetallen.", - "missingTemplate": "Ontbrekende sjabloon", - "outputSchemaNotFound": "Uitvoerschema niet gevonden", - "ipAdapterPolymorphicDescription": "Een verzameling IP-adapters.", - "workflowDescription": "Korte beschrijving", - "latentsPolymorphicDescription": "Latents kunnen worden doorgegeven tussen knooppunten.", - "colorFieldDescription": "Een RGBA-kleur.", - "mainModelField": "Model", - "unhandledInputProperty": "Onverwerkt invoerkenmerk", - "versionUnknown": " Versie onbekend", - "ipAdapterCollection": "Verzameling IP-adapters", - "conditioningCollection": "Verzameling conditionering", - "maybeIncompatible": "Is mogelijk niet compatibel met geïnstalleerde knooppunten", - "ipAdapterPolymorphic": "Polymorfisme IP-adapter", - "noNodeSelected": "Geen knooppunt gekozen", - "addNode": "Voeg knooppunt toe", - "unableToValidateWorkflow": "Kan werkstroom niet valideren", - "enum": "Enumeratie", - "integerPolymorphicDescription": "Een verzameling gehele getallen.", - "noOutputRecorded": "Geen uitvoer opgenomen", - "updateApp": "Werk app bij", - "conditioningCollectionDescription": "Conditionering kan worden doorgegeven tussen knooppunten.", - "colorPolymorphic": "Polymorfisme kleur", - "colorCodeEdgesHelp": "Kleurgecodeerde randen op basis van hun verbonden velden", - "collectionDescription": "TODO", - "float": "Zwevende-kommagetal", - "workflowContact": "Contactpersoon", - "skippingReservedFieldType": "Overslaan van gereserveerd veldsoort", - "animatedEdges": "Geanimeerde randen", - "booleanCollectionDescription": "Een verzameling van Booleanse waarden.", - "sDXLMainModelFieldDescription": "SDXL-modelveld.", - "conditioningPolymorphic": "Polymorfisme conditionering", - "integer": "Geheel getal", - "colorField": "Kleur", - "boardField": "Bord", - "nodeTemplate": "Sjabloon knooppunt", - "latentsCollection": "Verzameling latents", - "problemReadingWorkflow": "Fout bij lezen van werkstroom uit afbeelding", - "sourceNode": "Bronknooppunt", - "nodeOpacity": "Dekking knooppunt", - "pickOne": "Kies er een", - "collectionItemDescription": "TODO", - "integerDescription": "Gehele getallen zijn getallen zonder een decimaalteken.", - "outputField": "Uitvoerveld", - "unableToLoadWorkflow": "Kan werkstroom niet valideren", - "snapToGrid": "Lijn uit op raster", - "stringPolymorphic": "Polymorfisme tekenreeks", - "conditioningPolymorphicDescription": "Conditionering kan worden doorgegeven tussen knooppunten.", - "noFieldsLinearview": "Geen velden toegevoegd aan lineaire weergave", - "skipped": "Overgeslagen", - "imagePolymorphic": "Polymorfisme afbeelding", - "nodeSearch": "Zoek naar knooppunten", - "updateNode": "Werk knooppunt bij", - "sDXLRefinerModelFieldDescription": "Beschrijving", - "imagePolymorphicDescription": "Een verzameling afbeeldingen.", - "floatPolymorphic": "Polymorfisme zwevende-kommagetal", - "version": "Versie", - "doesNotExist": "bestaat niet", - "ipAdapterCollectionDescription": "Een verzameling van IP-adapters.", - "stringCollectionDescription": "Een verzameling tekenreeksen.", - "unableToParseNode": "Kan knooppunt niet inlezen", - "controlCollection": "Controle-verzameling", - "validateConnections": "Valideer verbindingen en graaf", - "stringCollection": "Verzameling tekenreeksen", - "inputMayOnlyHaveOneConnection": "Invoer mag slechts een enkele verbinding hebben", - "notes": "Opmerkingen", - "uNetField": "UNet", - "nodeOutputs": "Uitvoer knooppunt", - "currentImageDescription": "Toont de huidige afbeelding in de knooppunteditor", - "validateConnectionsHelp": "Voorkom dat er ongeldige verbindingen worden gelegd en dat er ongeldige grafen worden aangeroepen", - "problemSettingTitle": "Fout bij instellen titel", - "ipAdapter": "IP-adapter", - "integerCollection": "Verzameling gehele getallen", - "collectionItem": "Verzamelingsonderdeel", - "noConnectionInProgress": "Geen verbinding bezig te maken", - "vaeModelField": "VAE", - "controlCollectionDescription": "Controlegegevens doorgegeven tussen knooppunten.", - "skippedReservedInput": "Overgeslagen gereserveerd invoerveld", - "workflowVersion": "Versie", - "noConnectionData": "Geen verbindingsgegevens", - "outputFields": "Uitvoervelden", - "fieldTypesMustMatch": "Veldsoorten moeten overeenkomen", - "workflow": "Werkstroom", - "edge": "Rand", - "inputNode": "Invoerknooppunt", - "enumDescription": "Enumeraties zijn waarden die uit een aantal opties moeten worden gekozen.", - "unkownInvocation": "Onbekende aanroepsoort", - "loRAModelFieldDescription": "TODO", - "imageField": "Afbeelding", - "skippedReservedOutput": "Overgeslagen gereserveerd uitvoerveld", - "animatedEdgesHelp": "Animeer gekozen randen en randen verbonden met de gekozen knooppunten", - "cannotDuplicateConnection": "Kan geen dubbele verbindingen maken", - "booleanPolymorphic": "Polymorfisme Booleaanse waarden", - "unknownTemplate": "Onbekend sjabloon", - "noWorkflow": "Geen werkstroom", - "removeLinearView": "Verwijder uit lineaire weergave", - "colorCollectionDescription": "TODO", - "integerCollectionDescription": "Een verzameling gehele getallen.", - "colorPolymorphicDescription": "Een verzameling kleuren.", - "sDXLMainModelField": "SDXL-model", - "workflowTags": "Labels", - "denoiseMaskField": "Ontruisingsmasker", - "schedulerDescription": "Beschrijving", - "missingCanvaInitImage": "Ontbrekende initialisatie-afbeelding voor canvas", - "conditioningFieldDescription": "Conditionering kan worden doorgegeven tussen knooppunten.", - "clipFieldDescription": "Submodellen voor tokenizer en text_encoder.", - "fullyContainNodesHelp": "Knooppunten moeten zich volledig binnen het keuzevak bevinden om te worden gekozen", - "noImageFoundState": "Geen initiële afbeelding gevonden in de staat", - "workflowValidation": "Validatiefout werkstroom", - "clipField": "Clip", - "stringDescription": "Tekenreeksen zijn tekst.", - "nodeType": "Soort knooppunt", - "noMatchingNodes": "Geen overeenkomende knooppunten", - "fullyContainNodes": "Omvat knooppunten volledig om ze te kiezen", - "integerPolymorphic": "Polymorfisme geheel getal", - "executionStateInProgress": "Bezig", - "noFieldType": "Geen soort veld", - "colorCollection": "Een verzameling kleuren.", - "executionStateError": "Fout", - "noOutputSchemaName": "Geen naam voor uitvoerschema gevonden in referentieobject", - "ipAdapterModel": "Model IP-adapter", - "latentsPolymorphic": "Polymorfisme latents", - "vaeModelFieldDescription": "Beschrijving", - "skippingInputNoTemplate": "Overslaan van invoerveld zonder sjabloon", - "ipAdapterDescription": "Een Afbeeldingsprompt-adapter (IP-adapter).", - "boolean": "Booleaanse waarden", - "missingCanvaInitMaskImages": "Ontbrekende initialisatie- en maskerafbeeldingen voor canvas", - "problemReadingMetadata": "Fout bij lezen van metagegevens uit afbeelding", - "stringPolymorphicDescription": "Een verzameling tekenreeksen.", - "oNNXModelField": "ONNX-model", - "executionStateCompleted": "Voltooid", - "node": "Knooppunt", - "skippingUnknownInputType": "Overslaan van onbekend soort invoerveld", - "workflowAuthor": "Auteur", - "currentImage": "Huidige afbeelding", - "controlField": "Controle", - "workflowName": "Naam", - "booleanDescription": "Booleanse waarden zijn waar en onwaar.", - "collection": "Verzameling", - "ipAdapterModelDescription": "Modelveld IP-adapter", - "cannotConnectInputToInput": "Kan invoer niet aan invoer verbinden", - "invalidOutputSchema": "Ongeldig uitvoerschema", - "boardFieldDescription": "Een galerijbord", - "floatDescription": "Zwevende-kommagetallen zijn getallen met een decimaalteken.", - "floatPolymorphicDescription": "Een verzameling zwevende-kommagetallen.", - "vaeField": "Vae", - "conditioningField": "Conditionering", - "unhandledOutputProperty": "Onverwerkt uitvoerkenmerk", - "workflowNotes": "Opmerkingen", - "string": "Tekenreeks", - "floatCollection": "Verzameling zwevende-kommagetallen", - "latentsField": "Latents", - "cannotConnectOutputToOutput": "Kan uitvoer niet aan uitvoer verbinden", - "booleanCollection": "Verzameling Booleaanse waarden", - "connectionWouldCreateCycle": "Verbinding zou cyclisch worden", - "cannotConnectToSelf": "Kan niet aan zichzelf verbinden", - "notesDescription": "Voeg opmerkingen toe aan je werkstroom", - "unknownField": "Onbekend veld", - "inputFields": "Invoervelden", - "colorCodeEdges": "Kleurgecodeerde randen", - "uNetFieldDescription": "UNet-submodel.", - "unknownNode": "Onbekend knooppunt", - "imageCollectionDescription": "Een verzameling afbeeldingen.", - "mismatchedVersion": "Heeft niet-overeenkomende versie", - "vaeFieldDescription": "Vae-submodel.", - "imageFieldDescription": "Afbeeldingen kunnen worden doorgegeven tussen knooppunten.", - "outputNode": "Uitvoerknooppunt", - "addNodeToolTip": "Voeg knooppunt toe (Shift+A, spatie)", - "loadingNodes": "Bezig met laden van knooppunten...", - "snapToGridHelp": "Lijn knooppunten uit op raster bij verplaatsing", - "workflowSettings": "Instellingen werkstroomeditor", - "mainModelFieldDescription": "TODO", - "sDXLRefinerModelField": "Verfijningsmodel", - "loRAModelField": "LoRA", - "unableToParseEdge": "Kan rand niet inlezen", - "latentsCollectionDescription": "Latents kunnen worden doorgegeven tussen knooppunten.", - "oNNXModelFieldDescription": "ONNX-modelveld.", - "imageCollection": "Afbeeldingsverzameling" - }, - "controlnet": { - "amult": "a_mult", - "resize": "Schaal", - "showAdvanced": "Toon uitgebreide opties", - "contentShuffleDescription": "Verschuift het materiaal in de afbeelding", - "bgth": "bg_th", - "addT2IAdapter": "Voeg $t(common.t2iAdapter) toe", - "pidi": "PIDI", - "importImageFromCanvas": "Importeer afbeelding uit canvas", - "lineartDescription": "Zet afbeelding om naar line-art", - "normalBae": "Normale BAE", - "importMaskFromCanvas": "Importeer masker uit canvas", - "hed": "HED", - "hideAdvanced": "Verberg uitgebreid", - "contentShuffle": "Verschuif materiaal", - "controlNetEnabledT2IDisabled": "$t(common.controlNet) ingeschakeld, $t(common.t2iAdapter)s uitgeschakeld", - "ipAdapterModel": "Adaptermodel", - "resetControlImage": "Herstel controle-afbeelding", - "beginEndStepPercent": "Percentage begin-/eindstap", - "mlsdDescription": "Minimalistische herkenning lijnsegmenten", - "duplicate": "Maak kopie", - "balanced": "Gebalanceerd", - "f": "F", - "h": "H", - "prompt": "Prompt", - "depthMidasDescription": "Genereer diepteblad via Midas", - "controlnet": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.controlNet))", - "openPoseDescription": "Menselijke pose-benadering via Openpose", - "control": "Controle", - "resizeMode": "Modus schaling", - "t2iEnabledControlNetDisabled": "$t(common.t2iAdapter) ingeschakeld, $t(common.controlNet)s uitgeschakeld", - "coarse": "Grof", - "weight": "Gewicht", - "selectModel": "Kies een model", - "crop": "Snij bij", - "depthMidas": "Diepte (Midas)", - "w": "B", - "processor": "Verwerker", - "addControlNet": "Voeg $t(common.controlNet) toe", - "none": "Geen", - "incompatibleBaseModel": "Niet-compatibel basismodel:", - "enableControlnet": "Schakel ControlNet in", - "detectResolution": "Herken resolutie", - "controlNetT2IMutexDesc": "Gelijktijdig gebruik van $t(common.controlNet) en $t(common.t2iAdapter) wordt op dit moment niet ondersteund.", - "ip_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.ipAdapter))", - "pidiDescription": "PIDI-afbeeldingsverwerking", - "mediapipeFace": "Mediapipe - Gezicht", - "mlsd": "M-LSD", - "controlMode": "Controlemodus", - "fill": "Vul", - "cannyDescription": "Herkenning Canny-rand", - "addIPAdapter": "Voeg $t(common.ipAdapter) toe", - "lineart": "Line-art", - "colorMapDescription": "Genereert een kleurenblad van de afbeelding", - "lineartAnimeDescription": "Lineartverwerking in anime-stijl", - "t2i_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.t2iAdapter))", - "minConfidence": "Min. vertrouwensniveau", - "imageResolution": "Resolutie afbeelding", - "megaControl": "Zeer veel controle", - "depthZoe": "Diepte (Zoe)", - "colorMap": "Kleur", - "lowThreshold": "Lage drempelwaarde", - "autoConfigure": "Configureer verwerker automatisch", - "highThreshold": "Hoge drempelwaarde", - "normalBaeDescription": "Normale BAE-verwerking", - "noneDescription": "Geen verwerking toegepast", - "saveControlImage": "Bewaar controle-afbeelding", - "openPose": "Openpose", - "toggleControlNet": "Zet deze ControlNet aan/uit", - "delete": "Verwijder", - "controlAdapter_one": "Control-adapter", - "controlAdapter_other": "Control-adapters", - "safe": "Veilig", - "colorMapTileSize": "Grootte tegel", - "lineartAnime": "Line-art voor anime", - "ipAdapterImageFallback": "Geen IP-adapterafbeelding gekozen", - "mediapipeFaceDescription": "Gezichtsherkenning met Mediapipe", - "canny": "Canny", - "depthZoeDescription": "Genereer diepteblad via Zoe", - "hedDescription": "Herkenning van holistisch-geneste randen", - "setControlImageDimensions": "Stel afmetingen controle-afbeelding in op B/H", - "scribble": "Krabbel", - "resetIPAdapterImage": "Herstel IP-adapterafbeelding", - "handAndFace": "Hand en gezicht", - "enableIPAdapter": "Schakel IP-adapter in", - "maxFaces": "Max. gezichten" - }, - "dynamicPrompts": { - "seedBehaviour": { - "perPromptDesc": "Gebruik een verschillende seedwaarde per afbeelding", - "perIterationLabel": "Seedwaarde per iteratie", - "perIterationDesc": "Gebruik een verschillende seedwaarde per iteratie", - "perPromptLabel": "Seedwaarde per afbeelding", - "label": "Gedrag seedwaarde" - }, - "enableDynamicPrompts": "Schakel dynamische prompts in", - "combinatorial": "Combinatorisch genereren", - "maxPrompts": "Max. prompts", - "promptsWithCount_one": "{{count}} prompt", - "promptsWithCount_other": "{{count}} prompts", - "dynamicPrompts": "Dynamische prompts" - }, - "popovers": { - "noiseUseCPU": { - "paragraphs": [ - "Bepaalt of ruis wordt gegenereerd op de CPU of de GPU.", - "Met CPU-ruis ingeschakeld zal een bepaalde seedwaarde dezelfde afbeelding opleveren op welke machine dan ook.", - "Er is geen prestatieverschil bij het inschakelen van CPU-ruis." - ], - "heading": "Gebruik CPU-ruis" - }, - "paramScheduler": { - "paragraphs": [ - "De planner bepaalt hoe ruis per iteratie wordt toegevoegd aan een afbeelding of hoe een monster wordt bijgewerkt op basis van de uitvoer van een model." - ], - "heading": "Planner" - }, - "scaleBeforeProcessing": { - "paragraphs": [ - "Schaalt het gekozen gebied naar de grootte die het meest geschikt is voor het model, vooraf aan het proces van het afbeeldingen genereren." - ], - "heading": "Schaal vooraf aan verwerking" - }, - "compositingMaskAdjustments": { - "heading": "Aanpassingen masker", - "paragraphs": [ - "Pas het masker aan." - ] - }, - "paramRatio": { - "heading": "Beeldverhouding", - "paragraphs": [ - "De beeldverhouding van de afmetingen van de afbeelding die wordt gegenereerd.", - "Een afbeeldingsgrootte (in aantal pixels) equivalent aan 512x512 wordt aanbevolen voor SD1.5-modellen. Een grootte-equivalent van 1024x1024 wordt aanbevolen voor SDXL-modellen." - ] - }, - "compositingCoherenceSteps": { - "heading": "Stappen", - "paragraphs": [ - "Het aantal te gebruiken ontruisingsstappen in de coherentiefase.", - "Gelijk aan de hoofdparameter Stappen." - ] - }, - "dynamicPrompts": { - "paragraphs": [ - "Dynamische prompts vormt een enkele prompt om in vele.", - "De basissyntax is \"a {red|green|blue} ball\". Dit zal de volgende drie prompts geven: \"a red ball\", \"a green ball\" en \"a blue ball\".", - "Gebruik de syntax zo vaak als je wilt in een enkele prompt, maar zorg ervoor dat het aantal gegenereerde prompts in lijn ligt met de instelling Max. prompts." - ], - "heading": "Dynamische prompts" - }, - "paramVAE": { - "paragraphs": [ - "Het model gebruikt voor het vertalen van AI-uitvoer naar de uiteindelijke afbeelding." - ], - "heading": "VAE" - }, - "compositingBlur": { - "heading": "Vervaging", - "paragraphs": [ - "De vervagingsstraal van het masker." - ] - }, - "paramIterations": { - "paragraphs": [ - "Het aantal te genereren afbeeldingen.", - "Als dynamische prompts is ingeschakeld, dan zal elke prompt dit aantal keer gegenereerd worden." - ], - "heading": "Iteraties" - }, - "paramVAEPrecision": { - "heading": "Nauwkeurigheid VAE", - "paragraphs": [ - "De nauwkeurigheid gebruikt tijdens de VAE-codering en -decodering. FP16/halve nauwkeurig is efficiënter, ten koste van kleine afbeeldingsvariaties." - ] - }, - "compositingCoherenceMode": { - "heading": "Modus", - "paragraphs": [ - "De modus van de coherentiefase." - ] - }, - "paramSeed": { - "paragraphs": [ - "Bepaalt de startruis die gebruikt wordt bij het genereren.", - "Schakel \"Willekeurige seedwaarde\" uit om identieke resultaten te krijgen met dezelfde genereer-instellingen." - ], - "heading": "Seedwaarde" - }, - "controlNetResizeMode": { - "heading": "Schaalmodus", - "paragraphs": [ - "Hoe de ControlNet-afbeelding zal worden geschaald aan de uitvoergrootte van de afbeelding." - ] - }, - "controlNetBeginEnd": { - "paragraphs": [ - "Op welke stappen van het ontruisingsproces ControlNet worden toegepast.", - "ControlNets die worden toegepast aan het begin begeleiden het compositieproces. ControlNets die worden toegepast aan het eind zorgen voor details." - ], - "heading": "Percentage begin- / eindstap" - }, - "dynamicPromptsSeedBehaviour": { - "paragraphs": [ - "Bepaalt hoe de seedwaarde wordt gebruikt bij het genereren van prompts.", - "Per iteratie zal een unieke seedwaarde worden gebruikt voor elke iteratie. Gebruik dit om de promptvariaties binnen een enkele seedwaarde te verkennen.", - "Bijvoorbeeld: als je vijf prompts heb, dan zal voor elke afbeelding dezelfde seedwaarde gebruikt worden.", - "De optie Per afbeelding zal een unieke seedwaarde voor elke afbeelding gebruiken. Dit biedt meer variatie." - ], - "heading": "Gedrag seedwaarde" - }, - "clipSkip": { - "paragraphs": [ - "Kies hoeveel CLIP-modellagen je wilt overslaan.", - "Bepaalde modellen werken beter met bepaalde Overslaan CLIP-instellingen.", - "Een hogere waarde geeft meestal een minder gedetailleerde afbeelding." - ], - "heading": "Overslaan CLIP" - }, - "paramModel": { - "heading": "Model", - "paragraphs": [ - "Model gebruikt voor de ontruisingsstappen.", - "Verschillende modellen zijn meestal getraind om zich te specialiseren in het maken van bepaalde esthetische resultaten en materiaal." - ] - }, - "compositingCoherencePass": { - "heading": "Coherentiefase", - "paragraphs": [ - "Een tweede ronde ontruising helpt bij het samenstellen van de erin- of eruitgetekende afbeelding." - ] - }, - "paramDenoisingStrength": { - "paragraphs": [ - "Hoeveel ruis wordt toegevoegd aan de invoerafbeelding.", - "0 levert een identieke afbeelding op, waarbij 1 een volledig nieuwe afbeelding oplevert." - ], - "heading": "Ontruisingssterkte" - }, - "compositingStrength": { - "heading": "Sterkte", - "paragraphs": [ - "Ontruisingssterkte voor de coherentiefase.", - "Gelijk aan de parameter Ontruisingssterkte Afbeelding naar afbeelding." - ] - }, - "paramNegativeConditioning": { - "paragraphs": [ - "Het genereerproces voorkomt de gegeven begrippen in de negatieve prompt. Gebruik dit om bepaalde zaken of voorwerpen uit te sluiten van de uitvoerafbeelding.", - "Ondersteunt Compel-syntax en -embeddingen." - ], - "heading": "Negatieve prompt" - }, - "compositingBlurMethod": { - "heading": "Vervagingsmethode", - "paragraphs": [ - "De methode van de vervaging die wordt toegepast op het gemaskeerd gebied." - ] - }, - "dynamicPromptsMaxPrompts": { - "heading": "Max. prompts", - "paragraphs": [ - "Beperkt het aantal prompts die kunnen worden gegenereerd door dynamische prompts." - ] - }, - "infillMethod": { - "paragraphs": [ - "Methode om een gekozen gebied in te vullen." - ], - "heading": "Invulmethode" - }, - "controlNetWeight": { - "heading": "Gewicht", - "paragraphs": [ - "Hoe sterk ControlNet effect heeft op de gegeneerde afbeelding." - ] - }, - "controlNet": { - "heading": "ControlNet", - "paragraphs": [ - "ControlNets begeleidt het genereerproces, waarbij geholpen wordt bij het maken van afbeeldingen met aangestuurde compositie, structuur of stijl, afhankelijk van het gekozen model." - ] - }, - "paramCFGScale": { - "heading": "CFG-schaal", - "paragraphs": [ - "Bepaalt hoeveel je prompt invloed heeft op het genereerproces." - ] - }, - "controlNetControlMode": { - "paragraphs": [ - "Geeft meer gewicht aan ofwel de prompt danwel ControlNet." - ], - "heading": "Controlemodus" - }, - "paramSteps": { - "heading": "Stappen", - "paragraphs": [ - "Het aantal uit te voeren stappen tijdens elke generatie.", - "Een hoger aantal stappen geven meestal betere afbeeldingen, ten koste van een hogere benodigde tijd om te genereren." - ] - }, - "paramPositiveConditioning": { - "heading": "Positieve prompt", - "paragraphs": [ - "Begeleidt het generartieproces. Gebruik een woord of frase naar keuze.", - "Syntaxes en embeddings voor Compel en dynamische prompts." - ] - }, - "lora": { - "heading": "Gewicht LoRA", - "paragraphs": [ - "Een hogere LoRA-gewicht zal leiden tot een groter effect op de uiteindelijke afbeelding." - ] - } - }, - "metadata": { - "seamless": "Naadloos", - "positivePrompt": "Positieve prompt", - "negativePrompt": "Negatieve prompt", - "generationMode": "Genereermodus", - "Threshold": "Drempelwaarde ruis", - "metadata": "Metagegevens", - "strength": "Sterkte Afbeelding naar afbeelding", - "seed": "Seedwaarde", - "imageDetails": "Afbeeldingsdetails", - "perlin": "Perlin-ruis", - "model": "Model", - "noImageDetails": "Geen afbeeldingsdetails gevonden", - "hiresFix": "Optimalisatie voor hoge resolutie", - "cfgScale": "CFG-schaal", - "fit": "Schaal aanpassen in Afbeelding naar afbeelding", - "initImage": "Initiële afbeelding", - "recallParameters": "Opnieuw aan te roepen parameters", - "height": "Hoogte", - "variations": "Paren seedwaarde-gewicht", - "noMetaData": "Geen metagegevens gevonden", - "width": "Breedte", - "createdBy": "Gemaakt door", - "workflow": "Werkstroom", - "steps": "Stappen", - "scheduler": "Planner", - "noRecallParameters": "Geen opnieuw uit te voeren parameters gevonden" - }, - "queue": { - "status": "Status", - "pruneSucceeded": "{{item_count}} voltooide onderdelen uit wachtrij opgeruimd", - "cancelTooltip": "Annuleer huidig onderdeel", - "queueEmpty": "Wachtrij leeg", - "pauseSucceeded": "Verwerker onderbroken", - "in_progress": "Bezig", - "queueFront": "Voeg vooraan toe in wachtrij", - "notReady": "Fout bij plaatsen in wachtrij", - "batchFailedToQueue": "Fout bij reeks in wachtrij plaatsen", - "completed": "Voltooid", - "queueBack": "Voeg toe aan wachtrij", - "batchValues": "Reekswaarden", - "cancelFailed": "Fout bij annuleren onderdeel", - "queueCountPrediction": "Voeg {{predicted}} toe aan wachtrij", - "batchQueued": "Reeks in wachtrij geplaatst", - "pauseFailed": "Fout bij onderbreken verwerker", - "clearFailed": "Fout bij wissen van wachtrij", - "queuedCount": "{{pending}} wachtend", - "front": "begin", - "clearSucceeded": "Wachtrij gewist", - "pause": "Onderbreek", - "pruneTooltip": "Ruim {{item_count}} voltooide onderdelen op", - "cancelSucceeded": "Onderdeel geannuleerd", - "batchQueuedDesc_one": "Voeg {{count}} sessie toe aan het {{direction}} van de wachtrij", - "batchQueuedDesc_other": "Voeg {{count}} sessies toe aan het {{direction}} van de wachtrij", - "graphQueued": "Graaf in wachtrij geplaatst", - "queue": "Wachtrij", - "batch": "Reeks", - "clearQueueAlertDialog": "Als je de wachtrij onmiddellijk wist, dan worden alle onderdelen die bezig zijn geannuleerd en wordt de wachtrij volledig gewist.", - "pending": "Wachtend", - "completedIn": "Voltooid na", - "resumeFailed": "Fout bij hervatten verwerker", - "clear": "Wis", - "prune": "Ruim op", - "total": "Totaal", - "canceled": "Geannuleerd", - "pruneFailed": "Fout bij opruimen van wachtrij", - "cancelBatchSucceeded": "Reeks geannuleerd", - "clearTooltip": "Annuleer en wis alle onderdelen", - "current": "Huidig", - "pauseTooltip": "Onderbreek verwerker", - "failed": "Mislukt", - "cancelItem": "Annuleer onderdeel", - "next": "Volgende", - "cancelBatch": "Annuleer reeks", - "back": "eind", - "cancel": "Annuleer", - "session": "Sessie", - "queueTotal": "Totaal {{total}}", - "resumeSucceeded": "Verwerker hervat", - "enqueueing": "Bezig met toevoegen van reeks aan wachtrij", - "resumeTooltip": "Hervat verwerker", - "queueMaxExceeded": "Max. aantal van {{max_queue_size}} overschreden, {{skip}} worden overgeslagen", - "resume": "Hervat", - "cancelBatchFailed": "Fout bij annuleren van reeks", - "clearQueueAlertDialog2": "Weet je zeker dat je de wachtrij wilt wissen?", - "item": "Onderdeel", - "graphFailedToQueue": "Fout bij toevoegen graaf aan wachtrij" - }, - "sdxl": { - "refinerStart": "Startwaarde verfijning", - "selectAModel": "Kies een model", - "scheduler": "Planner", - "cfgScale": "CFG-schaal", - "negStylePrompt": "Negatieve-stijlprompt", - "noModelsAvailable": "Geen modellen beschikbaar", - "refiner": "Verfijning", - "negAestheticScore": "Negatieve esthetische score", - "useRefiner": "Gebruik verfijning", - "denoisingStrength": "Sterkte ontruising", - "refinermodel": "Verfijningsmodel", - "posAestheticScore": "Positieve esthetische score", - "concatPromptStyle": "Plak prompt- en stijltekst aan elkaar", - "loading": "Bezig met laden...", - "steps": "Stappen", - "posStylePrompt": "Positieve-stijlprompt" - }, - "models": { - "noMatchingModels": "Geen overeenkomend modellen", - "loading": "bezig met laden", - "noMatchingLoRAs": "Geen overeenkomende LoRA's", - "noLoRAsAvailable": "Geen LoRA's beschikbaar", - "noModelsAvailable": "Geen modellen beschikbaar", - "selectModel": "Kies een model", - "selectLoRA": "Kies een LoRA" - }, - "boards": { - "autoAddBoard": "Voeg automatisch bord toe", - "topMessage": "Dit bord bevat afbeeldingen die in gebruik zijn door de volgende functies:", - "move": "Verplaats", - "menuItemAutoAdd": "Voeg dit automatisch toe aan bord", - "myBoard": "Mijn bord", - "searchBoard": "Zoek borden...", - "noMatching": "Geen overeenkomende borden", - "selectBoard": "Kies een bord", - "cancel": "Annuleer", - "addBoard": "Voeg bord toe", - "bottomMessage": "Als je dit bord en alle afbeeldingen erop verwijdert, dan worden alle functies teruggezet die ervan gebruik maken.", - "uncategorized": "Zonder categorie", - "downloadBoard": "Download bord", - "changeBoard": "Wijzig bord", - "loading": "Bezig met laden...", - "clearSearch": "Maak zoekopdracht leeg" - }, - "invocationCache": { - "disable": "Schakel uit", - "misses": "Mislukt cacheverzoek", - "enableFailed": "Fout bij inschakelen aanroepcache", - "invocationCache": "Aanroepcache", - "clearSucceeded": "Aanroepcache gewist", - "enableSucceeded": "Aanroepcache ingeschakeld", - "clearFailed": "Fout bij wissen aanroepcache", - "hits": "Gelukt cacheverzoek", - "disableSucceeded": "Aanroepcache uitgeschakeld", - "disableFailed": "Fout bij uitschakelen aanroepcache", - "enable": "Schakel in", - "clear": "Wis", - "maxCacheSize": "Max. grootte cache", - "cacheSize": "Grootte cache" - }, - "embedding": { - "noMatchingEmbedding": "Geen overeenkomende embeddings", - "addEmbedding": "Voeg embedding toe", - "incompatibleModel": "Niet-compatibel basismodel:" - } -} diff --git a/invokeai/frontend/web/dist/locales/pl.json b/invokeai/frontend/web/dist/locales/pl.json deleted file mode 100644 index f77c0c4710..0000000000 --- a/invokeai/frontend/web/dist/locales/pl.json +++ /dev/null @@ -1,461 +0,0 @@ -{ - "common": { - "hotkeysLabel": "Skróty klawiszowe", - "languagePickerLabel": "Wybór języka", - "reportBugLabel": "Zgłoś błąd", - "settingsLabel": "Ustawienia", - "img2img": "Obraz na obraz", - "unifiedCanvas": "Tryb uniwersalny", - "nodes": "Węzły", - "langPolish": "Polski", - "nodesDesc": "W tym miejscu powstanie graficzny system generowania obrazów oparty na węzłach. Jest na co czekać!", - "postProcessing": "Przetwarzanie końcowe", - "postProcessDesc1": "Invoke AI oferuje wiele opcji przetwarzania końcowego. Z poziomu przeglądarki dostępne jest już zwiększanie rozdzielczości oraz poprawianie twarzy. Znajdziesz je wśród ustawień w trybach \"Tekst na obraz\" oraz \"Obraz na obraz\". Są również obecne w pasku menu wyświetlanym nad podglądem wygenerowanego obrazu.", - "postProcessDesc2": "Niedługo zostanie udostępniony specjalny interfejs, który będzie oferował jeszcze więcej możliwości.", - "postProcessDesc3": "Z poziomu linii poleceń już teraz dostępne są inne opcje, takie jak skalowanie obrazu metodą Embiggen.", - "training": "Trenowanie", - "trainingDesc1": "W tym miejscu dostępny będzie system przeznaczony do tworzenia własnych zanurzeń (ang. embeddings) i punktów kontrolnych przy użyciu metod w rodzaju inwersji tekstowej lub Dreambooth.", - "trainingDesc2": "Obecnie jest możliwe tworzenie własnych zanurzeń przy użyciu skryptów wywoływanych z linii poleceń.", - "upload": "Prześlij", - "close": "Zamknij", - "load": "Załaduj", - "statusConnected": "Połączono z serwerem", - "statusDisconnected": "Odłączono od serwera", - "statusError": "Błąd", - "statusPreparing": "Przygotowywanie", - "statusProcessingCanceled": "Anulowano przetwarzanie", - "statusProcessingComplete": "Zakończono przetwarzanie", - "statusGenerating": "Przetwarzanie", - "statusGeneratingTextToImage": "Przetwarzanie tekstu na obraz", - "statusGeneratingImageToImage": "Przetwarzanie obrazu na obraz", - "statusGeneratingInpainting": "Przemalowywanie", - "statusGeneratingOutpainting": "Domalowywanie", - "statusGenerationComplete": "Zakończono generowanie", - "statusIterationComplete": "Zakończono iterację", - "statusSavingImage": "Zapisywanie obrazu", - "statusRestoringFaces": "Poprawianie twarzy", - "statusRestoringFacesGFPGAN": "Poprawianie twarzy (GFPGAN)", - "statusRestoringFacesCodeFormer": "Poprawianie twarzy (CodeFormer)", - "statusUpscaling": "Powiększanie obrazu", - "statusUpscalingESRGAN": "Powiększanie (ESRGAN)", - "statusLoadingModel": "Wczytywanie modelu", - "statusModelChanged": "Zmieniono model", - "githubLabel": "GitHub", - "discordLabel": "Discord", - "darkMode": "Tryb ciemny", - "lightMode": "Tryb jasny" - }, - "gallery": { - "generations": "Wygenerowane", - "showGenerations": "Pokaż wygenerowane obrazy", - "uploads": "Przesłane", - "showUploads": "Pokaż przesłane obrazy", - "galleryImageSize": "Rozmiar obrazów", - "galleryImageResetSize": "Resetuj rozmiar", - "gallerySettings": "Ustawienia galerii", - "maintainAspectRatio": "Zachowaj proporcje", - "autoSwitchNewImages": "Przełączaj na nowe obrazy", - "singleColumnLayout": "Układ jednokolumnowy", - "allImagesLoaded": "Koniec listy", - "loadMore": "Wczytaj więcej", - "noImagesInGallery": "Brak obrazów w galerii" - }, - "hotkeys": { - "keyboardShortcuts": "Skróty klawiszowe", - "appHotkeys": "Podstawowe", - "generalHotkeys": "Pomocnicze", - "galleryHotkeys": "Galeria", - "unifiedCanvasHotkeys": "Tryb uniwersalny", - "invoke": { - "title": "Wywołaj", - "desc": "Generuje nowy obraz" - }, - "cancel": { - "title": "Anuluj", - "desc": "Zatrzymuje generowanie obrazu" - }, - "focusPrompt": { - "title": "Aktywuj pole tekstowe", - "desc": "Aktywuje pole wprowadzania sugestii" - }, - "toggleOptions": { - "title": "Przełącz panel opcji", - "desc": "Wysuwa lub chowa panel opcji" - }, - "pinOptions": { - "title": "Przypnij opcje", - "desc": "Przypina panel opcji" - }, - "toggleViewer": { - "title": "Przełącz podgląd", - "desc": "Otwiera lub zamyka widok podglądu" - }, - "toggleGallery": { - "title": "Przełącz galerię", - "desc": "Wysuwa lub chowa galerię" - }, - "maximizeWorkSpace": { - "title": "Powiększ obraz roboczy", - "desc": "Chowa wszystkie panele, zostawia tylko podgląd obrazu" - }, - "changeTabs": { - "title": "Przełącznie trybu", - "desc": "Przełącza na n-ty tryb pracy" - }, - "consoleToggle": { - "title": "Przełącz konsolę", - "desc": "Otwiera lub chowa widok konsoli" - }, - "setPrompt": { - "title": "Skopiuj sugestie", - "desc": "Kopiuje sugestie z aktywnego obrazu" - }, - "setSeed": { - "title": "Skopiuj inicjator", - "desc": "Kopiuje inicjator z aktywnego obrazu" - }, - "setParameters": { - "title": "Skopiuj wszystko", - "desc": "Kopiuje wszystkie parametry z aktualnie aktywnego obrazu" - }, - "restoreFaces": { - "title": "Popraw twarze", - "desc": "Uruchamia proces poprawiania twarzy dla aktywnego obrazu" - }, - "upscale": { - "title": "Powiększ", - "desc": "Uruchamia proces powiększania aktywnego obrazu" - }, - "showInfo": { - "title": "Pokaż informacje", - "desc": "Pokazuje metadane zapisane w aktywnym obrazie" - }, - "sendToImageToImage": { - "title": "Użyj w trybie \"Obraz na obraz\"", - "desc": "Ustawia aktywny obraz jako źródło w trybie \"Obraz na obraz\"" - }, - "deleteImage": { - "title": "Usuń obraz", - "desc": "Usuwa aktywny obraz" - }, - "closePanels": { - "title": "Zamknij panele", - "desc": "Zamyka wszystkie otwarte panele" - }, - "previousImage": { - "title": "Poprzedni obraz", - "desc": "Aktywuje poprzedni obraz z galerii" - }, - "nextImage": { - "title": "Następny obraz", - "desc": "Aktywuje następny obraz z galerii" - }, - "toggleGalleryPin": { - "title": "Przypnij galerię", - "desc": "Przypina lub odpina widok galerii" - }, - "increaseGalleryThumbSize": { - "title": "Powiększ obrazy", - "desc": "Powiększa rozmiar obrazów w galerii" - }, - "decreaseGalleryThumbSize": { - "title": "Pomniejsz obrazy", - "desc": "Pomniejsza rozmiar obrazów w galerii" - }, - "selectBrush": { - "title": "Aktywuj pędzel", - "desc": "Aktywuje narzędzie malowania" - }, - "selectEraser": { - "title": "Aktywuj gumkę", - "desc": "Aktywuje narzędzie usuwania" - }, - "decreaseBrushSize": { - "title": "Zmniejsz rozmiar narzędzia", - "desc": "Zmniejsza rozmiar aktywnego narzędzia" - }, - "increaseBrushSize": { - "title": "Zwiększ rozmiar narzędzia", - "desc": "Zwiększa rozmiar aktywnego narzędzia" - }, - "decreaseBrushOpacity": { - "title": "Zmniejsz krycie", - "desc": "Zmniejsza poziom krycia pędzla" - }, - "increaseBrushOpacity": { - "title": "Zwiększ", - "desc": "Zwiększa poziom krycia pędzla" - }, - "moveTool": { - "title": "Aktywuj przesunięcie", - "desc": "Włącza narzędzie przesuwania" - }, - "fillBoundingBox": { - "title": "Wypełnij zaznaczenie", - "desc": "Wypełnia zaznaczony obszar aktualnym kolorem pędzla" - }, - "eraseBoundingBox": { - "title": "Wyczyść zaznaczenia", - "desc": "Usuwa całą zawartość zaznaczonego obszaru" - }, - "colorPicker": { - "title": "Aktywuj pipetę", - "desc": "Włącza narzędzie kopiowania koloru" - }, - "toggleSnap": { - "title": "Przyciąganie do siatki", - "desc": "Włącza lub wyłącza opcje przyciągania do siatki" - }, - "quickToggleMove": { - "title": "Szybkie przesunięcie", - "desc": "Tymczasowo włącza tryb przesuwania obszaru roboczego" - }, - "toggleLayer": { - "title": "Przełącz wartwę", - "desc": "Przełącza pomiędzy warstwą bazową i maskowania" - }, - "clearMask": { - "title": "Wyczyść maskę", - "desc": "Usuwa całą zawartość warstwy maskowania" - }, - "hideMask": { - "title": "Przełącz maskę", - "desc": "Pokazuje lub ukrywa podgląd maski" - }, - "showHideBoundingBox": { - "title": "Przełącz zaznaczenie", - "desc": "Pokazuje lub ukrywa podgląd zaznaczenia" - }, - "mergeVisible": { - "title": "Połącz widoczne", - "desc": "Łączy wszystkie widoczne maski w jeden obraz" - }, - "saveToGallery": { - "title": "Zapisz w galerii", - "desc": "Zapisuje całą zawartość płótna w galerii" - }, - "copyToClipboard": { - "title": "Skopiuj do schowka", - "desc": "Zapisuje zawartość płótna w schowku systemowym" - }, - "downloadImage": { - "title": "Pobierz obraz", - "desc": "Zapisuje zawartość płótna do pliku obrazu" - }, - "undoStroke": { - "title": "Cofnij", - "desc": "Cofa ostatnie pociągnięcie pędzlem" - }, - "redoStroke": { - "title": "Ponawia", - "desc": "Ponawia cofnięte pociągnięcie pędzlem" - }, - "resetView": { - "title": "Resetuj widok", - "desc": "Centruje widok płótna" - }, - "previousStagingImage": { - "title": "Poprzedni obraz tymczasowy", - "desc": "Pokazuje poprzedni obraz tymczasowy" - }, - "nextStagingImage": { - "title": "Następny obraz tymczasowy", - "desc": "Pokazuje następny obraz tymczasowy" - }, - "acceptStagingImage": { - "title": "Akceptuj obraz tymczasowy", - "desc": "Akceptuje aktualnie wybrany obraz tymczasowy" - } - }, - "parameters": { - "images": "L. obrazów", - "steps": "L. kroków", - "cfgScale": "Skala CFG", - "width": "Szerokość", - "height": "Wysokość", - "seed": "Inicjator", - "randomizeSeed": "Losowy inicjator", - "shuffle": "Losuj", - "noiseThreshold": "Poziom szumu", - "perlinNoise": "Szum Perlina", - "variations": "Wariacje", - "variationAmount": "Poziom zróżnicowania", - "seedWeights": "Wariacje inicjatora", - "faceRestoration": "Poprawianie twarzy", - "restoreFaces": "Popraw twarze", - "type": "Metoda", - "strength": "Siła", - "upscaling": "Powiększanie", - "upscale": "Powiększ", - "upscaleImage": "Powiększ obraz", - "scale": "Skala", - "otherOptions": "Pozostałe opcje", - "seamlessTiling": "Płynne scalanie", - "hiresOptim": "Optymalizacja wys. rozdzielczości", - "imageFit": "Przeskaluj oryginalny obraz", - "codeformerFidelity": "Dokładność", - "scaleBeforeProcessing": "Tryb skalowania", - "scaledWidth": "Sk. do szer.", - "scaledHeight": "Sk. do wys.", - "infillMethod": "Metoda wypełniania", - "tileSize": "Rozmiar kafelka", - "boundingBoxHeader": "Zaznaczony obszar", - "seamCorrectionHeader": "Scalanie", - "infillScalingHeader": "Wypełnienie i skalowanie", - "img2imgStrength": "Wpływ sugestii na obraz", - "toggleLoopback": "Wł/wył sprzężenie zwrotne", - "sendTo": "Wyślij do", - "sendToImg2Img": "Użyj w trybie \"Obraz na obraz\"", - "sendToUnifiedCanvas": "Użyj w trybie uniwersalnym", - "copyImageToLink": "Skopiuj adres obrazu", - "downloadImage": "Pobierz obraz", - "openInViewer": "Otwórz podgląd", - "closeViewer": "Zamknij podgląd", - "usePrompt": "Skopiuj sugestie", - "useSeed": "Skopiuj inicjator", - "useAll": "Skopiuj wszystko", - "useInitImg": "Użyj oryginalnego obrazu", - "info": "Informacje", - "initialImage": "Oryginalny obraz", - "showOptionsPanel": "Pokaż panel ustawień" - }, - "settings": { - "models": "Modele", - "displayInProgress": "Podgląd generowanego obrazu", - "saveSteps": "Zapisuj obrazy co X kroków", - "confirmOnDelete": "Potwierdzaj usuwanie", - "displayHelpIcons": "Wyświetlaj ikony pomocy", - "enableImageDebugging": "Włącz debugowanie obrazu", - "resetWebUI": "Zresetuj interfejs", - "resetWebUIDesc1": "Resetowanie interfejsu wyczyści jedynie dane i ustawienia zapisane w pamięci przeglądarki. Nie usunie żadnych obrazów z dysku.", - "resetWebUIDesc2": "Jeśli obrazy nie są poprawnie wyświetlane w galerii lub doświadczasz innych problemów, przed zgłoszeniem błędu spróbuj zresetować interfejs.", - "resetComplete": "Interfejs został zresetowany. Odśwież stronę, aby załadować ponownie." - }, - "toast": { - "tempFoldersEmptied": "Wyczyszczono folder tymczasowy", - "uploadFailed": "Błąd przesyłania obrazu", - "uploadFailedUnableToLoadDesc": "Błąd wczytywania obrazu", - "downloadImageStarted": "Rozpoczęto pobieranie", - "imageCopied": "Skopiowano obraz", - "imageLinkCopied": "Skopiowano link do obrazu", - "imageNotLoaded": "Nie wczytano obrazu", - "imageNotLoadedDesc": "Nie znaleziono obrazu, który można użyć w Obraz na obraz", - "imageSavedToGallery": "Zapisano obraz w galerii", - "canvasMerged": "Scalono widoczne warstwy", - "sentToImageToImage": "Wysłano do Obraz na obraz", - "sentToUnifiedCanvas": "Wysłano do trybu uniwersalnego", - "parametersSet": "Ustawiono parametry", - "parametersNotSet": "Nie ustawiono parametrów", - "parametersNotSetDesc": "Nie znaleziono metadanych dla wybranego obrazu", - "parametersFailed": "Problem z wczytaniem parametrów", - "parametersFailedDesc": "Problem z wczytaniem oryginalnego obrazu", - "seedSet": "Ustawiono inicjator", - "seedNotSet": "Nie ustawiono inicjatora", - "seedNotSetDesc": "Nie znaleziono inicjatora dla wybranego obrazu", - "promptSet": "Ustawiono sugestie", - "promptNotSet": "Nie ustawiono sugestii", - "promptNotSetDesc": "Nie znaleziono zapytania dla wybranego obrazu", - "upscalingFailed": "Błąd powiększania obrazu", - "faceRestoreFailed": "Błąd poprawiania twarzy", - "metadataLoadFailed": "Błąd wczytywania metadanych", - "initialImageSet": "Ustawiono oryginalny obraz", - "initialImageNotSet": "Nie ustawiono oryginalnego obrazu", - "initialImageNotSetDesc": "Błąd wczytywania oryginalnego obrazu" - }, - "tooltip": { - "feature": { - "prompt": "To pole musi zawierać cały tekst sugestii, w tym zarówno opis oczekiwanej zawartości, jak i terminy stylistyczne. Chociaż wagi mogą być zawarte w sugestiach, inne parametry znane z linii poleceń nie będą działać.", - "gallery": "W miarę generowania nowych wywołań w tym miejscu będą wyświetlane pliki z katalogu wyjściowego. Obrazy mają dodatkowo opcje konfiguracji nowych wywołań.", - "other": "Opcje umożliwią alternatywne tryby przetwarzania. Płynne scalanie będzie pomocne przy generowaniu powtarzających się wzorów. Optymalizacja wysokiej rozdzielczości wykonuje dwuetapowy cykl generowania i powinna być używana przy wyższych rozdzielczościach, gdy potrzebny jest bardziej spójny obraz/kompozycja.", - "seed": "Inicjator określa początkowy zestaw szumów, który kieruje procesem odszumiania i może być losowy lub pobrany z poprzedniego wywołania. Funkcja \"Poziom szumu\" może być użyta do złagodzenia saturacji przy wyższych wartościach CFG (spróbuj między 0-10), a Perlin może być użyty w celu dodania wariacji do twoich wyników.", - "variations": "Poziom zróżnicowania przyjmuje wartości od 0 do 1 i pozwala zmienić obraz wyjściowy dla ustawionego inicjatora. Interesujące wyniki uzyskuje się zwykle między 0,1 a 0,3.", - "upscale": "Korzystając z ESRGAN, możesz zwiększyć rozdzielczość obrazu wyjściowego bez konieczności zwiększania szerokości/wysokości w ustawieniach początkowych.", - "faceCorrection": "Poprawianie twarzy próbuje identyfikować twarze na obrazie wyjściowym i korygować wszelkie defekty/nieprawidłowości. W GFPGAN im większa siła, tym mocniejszy efekt. W metodzie Codeformer wyższa wartość oznacza bardziej wierne odtworzenie oryginalnej twarzy, nawet kosztem siły korekcji.", - "imageToImage": "Tryb \"Obraz na obraz\" pozwala na załadowanie obrazu wzorca, który obok wprowadzonych sugestii zostanie użyty porzez InvokeAI do wygenerowania nowego obrazu. Niższa wartość tego ustawienia będzie bardziej przypominać oryginalny obraz. Akceptowane są wartości od 0 do 1, a zalecany jest zakres od 0,25 do 0,75.", - "boundingBox": "Zaznaczony obszar odpowiada ustawieniom wysokości i szerokości w trybach Tekst na obraz i Obraz na obraz. Jedynie piksele znajdujące się w obszarze zaznaczenia zostaną uwzględnione podczas wywoływania nowego obrazu.", - "seamCorrection": "Opcje wpływające na poziom widoczności szwów, które mogą wystąpić, gdy wygenerowany obraz jest ponownie wklejany na płótno.", - "infillAndScaling": "Zarządzaj metodami wypełniania (używanymi na zamaskowanych lub wymazanych obszarach płótna) i skalowaniem (przydatne w przypadku zaznaczonego obszaru o b. małych rozmiarach)." - } - }, - "unifiedCanvas": { - "layer": "Warstwa", - "base": "Główna", - "mask": "Maska", - "maskingOptions": "Opcje maski", - "enableMask": "Włącz maskę", - "preserveMaskedArea": "Zachowaj obszar", - "clearMask": "Wyczyść maskę", - "brush": "Pędzel", - "eraser": "Gumka", - "fillBoundingBox": "Wypełnij zaznaczenie", - "eraseBoundingBox": "Wyczyść zaznaczenie", - "colorPicker": "Pipeta", - "brushOptions": "Ustawienia pędzla", - "brushSize": "Rozmiar", - "move": "Przesunięcie", - "resetView": "Resetuj widok", - "mergeVisible": "Scal warstwy", - "saveToGallery": "Zapisz w galerii", - "copyToClipboard": "Skopiuj do schowka", - "downloadAsImage": "Zapisz do pliku", - "undo": "Cofnij", - "redo": "Ponów", - "clearCanvas": "Wyczyść obraz", - "canvasSettings": "Ustawienia obrazu", - "showIntermediates": "Pokazuj stany pośrednie", - "showGrid": "Pokazuj siatkę", - "snapToGrid": "Przyciągaj do siatki", - "darkenOutsideSelection": "Przyciemnij poza zaznaczeniem", - "autoSaveToGallery": "Zapisuj automatycznie do galerii", - "saveBoxRegionOnly": "Zapisuj tylko zaznaczony obszar", - "limitStrokesToBox": "Rysuj tylko wewnątrz zaznaczenia", - "showCanvasDebugInfo": "Informacje dla developera", - "clearCanvasHistory": "Wyczyść historię operacji", - "clearHistory": "Wyczyść historię", - "clearCanvasHistoryMessage": "Wyczyszczenie historii nie będzie miało wpływu na sam obraz, ale niemożliwe będzie cofnięcie i otworzenie wszystkich wykonanych do tej pory operacji.", - "clearCanvasHistoryConfirm": "Czy na pewno chcesz wyczyścić historię operacji?", - "emptyTempImageFolder": "Wyczyść folder tymczasowy", - "emptyFolder": "Wyczyść", - "emptyTempImagesFolderMessage": "Wyczyszczenie folderu tymczasowego spowoduje usunięcie obrazu i maski w trybie uniwersalnym, historii operacji, oraz wszystkich wygenerowanych ale niezapisanych obrazów.", - "emptyTempImagesFolderConfirm": "Czy na pewno chcesz wyczyścić folder tymczasowy?", - "activeLayer": "Warstwa aktywna", - "canvasScale": "Poziom powiększenia", - "boundingBox": "Rozmiar zaznaczenia", - "scaledBoundingBox": "Rozmiar po skalowaniu", - "boundingBoxPosition": "Pozycja zaznaczenia", - "canvasDimensions": "Rozmiar płótna", - "canvasPosition": "Pozycja płótna", - "cursorPosition": "Pozycja kursora", - "previous": "Poprzedni", - "next": "Następny", - "accept": "Zaakceptuj", - "showHide": "Pokaż/Ukryj", - "discardAll": "Odrzuć wszystkie", - "betaClear": "Wyczyść", - "betaDarkenOutside": "Przyciemnienie", - "betaLimitToBox": "Ogranicz do zaznaczenia", - "betaPreserveMasked": "Zachowaj obszar" - }, - "accessibility": { - "zoomIn": "Przybliż", - "exitViewer": "Wyjdź z podglądu", - "modelSelect": "Wybór modelu", - "invokeProgressBar": "Pasek postępu", - "reset": "Zerowanie", - "useThisParameter": "Użyj tego parametru", - "copyMetadataJson": "Kopiuj metadane JSON", - "uploadImage": "Wgrywanie obrazu", - "previousImage": "Poprzedni obraz", - "nextImage": "Następny obraz", - "zoomOut": "Oddal", - "rotateClockwise": "Obróć zgodnie ze wskazówkami zegara", - "rotateCounterClockwise": "Obróć przeciwnie do wskazówek zegara", - "flipHorizontally": "Odwróć horyzontalnie", - "flipVertically": "Odwróć wertykalnie", - "modifyConfig": "Modyfikuj ustawienia", - "toggleAutoscroll": "Przełącz autoprzewijanie", - "toggleLogViewer": "Przełącz podgląd logów", - "showOptionsPanel": "Pokaż panel opcji", - "menu": "Menu" - } -} diff --git a/invokeai/frontend/web/dist/locales/pt.json b/invokeai/frontend/web/dist/locales/pt.json deleted file mode 100644 index ac9dd50b4d..0000000000 --- a/invokeai/frontend/web/dist/locales/pt.json +++ /dev/null @@ -1,602 +0,0 @@ -{ - "common": { - "langArabic": "العربية", - "reportBugLabel": "Reportar Bug", - "settingsLabel": "Configurações", - "langBrPortuguese": "Português do Brasil", - "languagePickerLabel": "Seletor de Idioma", - "langDutch": "Nederlands", - "langEnglish": "English", - "hotkeysLabel": "Hotkeys", - "langPolish": "Polski", - "langFrench": "Français", - "langGerman": "Deutsch", - "langItalian": "Italiano", - "langJapanese": "日本語", - "langSimplifiedChinese": "简体中文", - "langSpanish": "Espanhol", - "langRussian": "Русский", - "langUkranian": "Украї́нська", - "img2img": "Imagem para Imagem", - "unifiedCanvas": "Tela Unificada", - "nodes": "Nós", - "nodesDesc": "Um sistema baseado em nós para a geração de imagens está em desenvolvimento atualmente. Fique atento para atualizações sobre este recurso incrível.", - "postProcessDesc3": "A Interface de Linha de Comando do Invoke AI oferece vários outros recursos, incluindo o Embiggen.", - "postProcessing": "Pós Processamento", - "postProcessDesc1": "O Invoke AI oferece uma ampla variedade de recursos de pós-processamento. O aumento de resolução de imagem e a restauração de rosto já estão disponíveis na interface do usuário da Web. Você pode acessá-los no menu Opções Avançadas das guias Texto para Imagem e Imagem para Imagem. Você também pode processar imagens diretamente, usando os botões de ação de imagem acima da exibição da imagem atual ou no visualizador.", - "postProcessDesc2": "Em breve, uma interface do usuário dedicada será lançada para facilitar fluxos de trabalho de pós-processamento mais avançados.", - "trainingDesc1": "Um fluxo de trabalho dedicado para treinar seus próprios embeddings e checkpoints usando Textual Inversion e Dreambooth da interface da web.", - "trainingDesc2": "O InvokeAI já oferece suporte ao treinamento de embeddings personalizados usando a Inversão Textual por meio do script principal.", - "upload": "Upload", - "statusError": "Erro", - "statusGeneratingTextToImage": "Gerando Texto para Imagem", - "close": "Fechar", - "load": "Abrir", - "back": "Voltar", - "statusConnected": "Conectado", - "statusDisconnected": "Desconectado", - "statusPreparing": "Preparando", - "statusGenerating": "Gerando", - "statusProcessingCanceled": "Processamento Cancelado", - "statusProcessingComplete": "Processamento Completo", - "statusGeneratingImageToImage": "Gerando Imagem para Imagem", - "statusGeneratingInpainting": "Geração de Preenchimento de Lacunas", - "statusIterationComplete": "Iteração Completa", - "statusSavingImage": "Salvando Imagem", - "statusRestoringFacesGFPGAN": "Restaurando Faces (GFPGAN)", - "statusRestoringFaces": "Restaurando Faces", - "statusRestoringFacesCodeFormer": "Restaurando Faces (CodeFormer)", - "statusUpscaling": "Ampliando", - "statusUpscalingESRGAN": "Ampliando (ESRGAN)", - "statusConvertingModel": "Convertendo Modelo", - "statusModelConverted": "Modelo Convertido", - "statusLoadingModel": "Carregando Modelo", - "statusModelChanged": "Modelo Alterado", - "githubLabel": "Github", - "discordLabel": "Discord", - "training": "Treinando", - "statusGeneratingOutpainting": "Geração de Ampliação", - "statusGenerationComplete": "Geração Completa", - "statusMergingModels": "Mesclando Modelos", - "statusMergedModels": "Modelos Mesclados", - "loading": "A carregar", - "loadingInvokeAI": "A carregar Invoke AI", - "langPortuguese": "Português" - }, - "gallery": { - "galleryImageResetSize": "Resetar Imagem", - "gallerySettings": "Configurações de Galeria", - "maintainAspectRatio": "Mater Proporções", - "autoSwitchNewImages": "Trocar para Novas Imagens Automaticamente", - "singleColumnLayout": "Disposição em Coluna Única", - "allImagesLoaded": "Todas as Imagens Carregadas", - "loadMore": "Carregar Mais", - "noImagesInGallery": "Sem Imagens na Galeria", - "generations": "Gerações", - "showGenerations": "Mostrar Gerações", - "uploads": "Enviados", - "showUploads": "Mostrar Enviados", - "galleryImageSize": "Tamanho da Imagem" - }, - "hotkeys": { - "generalHotkeys": "Atalhos Gerais", - "galleryHotkeys": "Atalhos da Galeria", - "toggleViewer": { - "title": "Ativar Visualizador", - "desc": "Abrir e fechar o Visualizador de Imagens" - }, - "maximizeWorkSpace": { - "desc": "Fechar painéis e maximixar área de trabalho", - "title": "Maximizar a Área de Trabalho" - }, - "changeTabs": { - "title": "Mudar Guias", - "desc": "Trocar para outra área de trabalho" - }, - "consoleToggle": { - "desc": "Abrir e fechar console", - "title": "Ativar Console" - }, - "setPrompt": { - "title": "Definir Prompt", - "desc": "Usar o prompt da imagem atual" - }, - "sendToImageToImage": { - "desc": "Manda a imagem atual para Imagem Para Imagem", - "title": "Mandar para Imagem Para Imagem" - }, - "previousImage": { - "desc": "Mostra a imagem anterior na galeria", - "title": "Imagem Anterior" - }, - "nextImage": { - "title": "Próxima Imagem", - "desc": "Mostra a próxima imagem na galeria" - }, - "decreaseGalleryThumbSize": { - "desc": "Diminui o tamanho das thumbs na galeria", - "title": "Diminuir Tamanho da Galeria de Imagem" - }, - "selectBrush": { - "title": "Selecionar Pincel", - "desc": "Seleciona o pincel" - }, - "selectEraser": { - "title": "Selecionar Apagador", - "desc": "Seleciona o apagador" - }, - "decreaseBrushSize": { - "title": "Diminuir Tamanho do Pincel", - "desc": "Diminui o tamanho do pincel/apagador" - }, - "increaseBrushOpacity": { - "desc": "Aumenta a opacidade do pincel", - "title": "Aumentar Opacidade do Pincel" - }, - "moveTool": { - "title": "Ferramenta Mover", - "desc": "Permite navegar pela tela" - }, - "decreaseBrushOpacity": { - "desc": "Diminui a opacidade do pincel", - "title": "Diminuir Opacidade do Pincel" - }, - "toggleSnap": { - "title": "Ativar Encaixe", - "desc": "Ativa Encaixar na Grade" - }, - "quickToggleMove": { - "title": "Ativar Mover Rapidamente", - "desc": "Temporariamente ativa o modo Mover" - }, - "toggleLayer": { - "title": "Ativar Camada", - "desc": "Ativa a seleção de camada de máscara/base" - }, - "clearMask": { - "title": "Limpar Máscara", - "desc": "Limpa toda a máscara" - }, - "hideMask": { - "title": "Esconder Máscara", - "desc": "Esconde e Revela a máscara" - }, - "mergeVisible": { - "title": "Fundir Visível", - "desc": "Fundir todas as camadas visíveis das telas" - }, - "downloadImage": { - "desc": "Descarregar a tela atual", - "title": "Descarregar Imagem" - }, - "undoStroke": { - "title": "Desfazer Traço", - "desc": "Desfaz um traço de pincel" - }, - "redoStroke": { - "title": "Refazer Traço", - "desc": "Refaz o traço de pincel" - }, - "keyboardShortcuts": "Atalhos de Teclado", - "appHotkeys": "Atalhos do app", - "invoke": { - "title": "Invocar", - "desc": "Gerar uma imagem" - }, - "cancel": { - "title": "Cancelar", - "desc": "Cancelar geração de imagem" - }, - "focusPrompt": { - "title": "Foco do Prompt", - "desc": "Foco da área de texto do prompt" - }, - "toggleOptions": { - "title": "Ativar Opções", - "desc": "Abrir e fechar o painel de opções" - }, - "pinOptions": { - "title": "Fixar Opções", - "desc": "Fixar o painel de opções" - }, - "closePanels": { - "title": "Fechar Painéis", - "desc": "Fecha os painéis abertos" - }, - "unifiedCanvasHotkeys": "Atalhos da Tela Unificada", - "toggleGallery": { - "title": "Ativar Galeria", - "desc": "Abrir e fechar a gaveta da galeria" - }, - "setSeed": { - "title": "Definir Seed", - "desc": "Usar seed da imagem atual" - }, - "setParameters": { - "title": "Definir Parâmetros", - "desc": "Usar todos os parâmetros da imagem atual" - }, - "restoreFaces": { - "title": "Restaurar Rostos", - "desc": "Restaurar a imagem atual" - }, - "upscale": { - "title": "Redimensionar", - "desc": "Redimensionar a imagem atual" - }, - "showInfo": { - "title": "Mostrar Informações", - "desc": "Mostrar metadados de informações da imagem atual" - }, - "deleteImage": { - "title": "Apagar Imagem", - "desc": "Apaga a imagem atual" - }, - "toggleGalleryPin": { - "title": "Ativar Fixar Galeria", - "desc": "Fixa e desafixa a galeria na interface" - }, - "increaseGalleryThumbSize": { - "title": "Aumentar Tamanho da Galeria de Imagem", - "desc": "Aumenta o tamanho das thumbs na galeria" - }, - "increaseBrushSize": { - "title": "Aumentar Tamanho do Pincel", - "desc": "Aumenta o tamanho do pincel/apagador" - }, - "fillBoundingBox": { - "title": "Preencher Caixa Delimitadora", - "desc": "Preenche a caixa delimitadora com a cor do pincel" - }, - "eraseBoundingBox": { - "title": "Apagar Caixa Delimitadora", - "desc": "Apaga a área da caixa delimitadora" - }, - "colorPicker": { - "title": "Selecionar Seletor de Cor", - "desc": "Seleciona o seletor de cores" - }, - "showHideBoundingBox": { - "title": "Mostrar/Esconder Caixa Delimitadora", - "desc": "Ativa a visibilidade da caixa delimitadora" - }, - "saveToGallery": { - "title": "Gravara Na Galeria", - "desc": "Grava a tela atual na galeria" - }, - "copyToClipboard": { - "title": "Copiar para a Área de Transferência", - "desc": "Copia a tela atual para a área de transferência" - }, - "resetView": { - "title": "Resetar Visualização", - "desc": "Reseta Visualização da Tela" - }, - "previousStagingImage": { - "title": "Imagem de Preparação Anterior", - "desc": "Área de Imagem de Preparação Anterior" - }, - "nextStagingImage": { - "title": "Próxima Imagem de Preparação Anterior", - "desc": "Próxima Área de Imagem de Preparação Anterior" - }, - "acceptStagingImage": { - "title": "Aceitar Imagem de Preparação Anterior", - "desc": "Aceitar Área de Imagem de Preparação Anterior" - } - }, - "modelManager": { - "modelAdded": "Modelo Adicionado", - "modelUpdated": "Modelo Atualizado", - "modelEntryDeleted": "Entrada de modelo excluída", - "description": "Descrição", - "modelLocationValidationMsg": "Caminho para onde o seu modelo está localizado.", - "repo_id": "Repo ID", - "vaeRepoIDValidationMsg": "Repositório Online do seu VAE", - "width": "Largura", - "widthValidationMsg": "Largura padrão do seu modelo.", - "height": "Altura", - "heightValidationMsg": "Altura padrão do seu modelo.", - "findModels": "Encontrar Modelos", - "scanAgain": "Digitalize Novamente", - "deselectAll": "Deselecionar Tudo", - "showExisting": "Mostrar Existente", - "deleteConfig": "Apagar Config", - "convertToDiffusersHelpText6": "Deseja converter este modelo?", - "mergedModelName": "Nome do modelo mesclado", - "alpha": "Alpha", - "interpolationType": "Tipo de Interpolação", - "modelMergeHeaderHelp1": "Pode mesclar até três modelos diferentes para criar uma mistura que atenda às suas necessidades.", - "modelMergeHeaderHelp2": "Apenas Diffusers estão disponíveis para mesclagem. Se deseja mesclar um modelo de checkpoint, por favor, converta-o para Diffusers primeiro.", - "modelMergeInterpAddDifferenceHelp": "Neste modo, o Modelo 3 é primeiro subtraído do Modelo 2. A versão resultante é mesclada com o Modelo 1 com a taxa alpha definida acima.", - "nameValidationMsg": "Insira um nome para o seu modelo", - "descriptionValidationMsg": "Adicione uma descrição para o seu modelo", - "config": "Configuração", - "modelExists": "Modelo Existe", - "selectAndAdd": "Selecione e Adicione Modelos Listados Abaixo", - "noModelsFound": "Nenhum Modelo Encontrado", - "v2_768": "v2 (768px)", - "inpainting": "v1 Inpainting", - "customConfig": "Configuração personalizada", - "pathToCustomConfig": "Caminho para configuração personalizada", - "statusConverting": "A converter", - "modelConverted": "Modelo Convertido", - "ignoreMismatch": "Ignorar Divergências entre Modelos Selecionados", - "addDifference": "Adicionar diferença", - "pickModelType": "Escolha o tipo de modelo", - "safetensorModels": "SafeTensors", - "cannotUseSpaces": "Não pode usar espaços", - "addNew": "Adicionar Novo", - "addManually": "Adicionar Manualmente", - "manual": "Manual", - "name": "Nome", - "configValidationMsg": "Caminho para o ficheiro de configuração do seu modelo.", - "modelLocation": "Localização do modelo", - "repoIDValidationMsg": "Repositório Online do seu Modelo", - "updateModel": "Atualizar Modelo", - "availableModels": "Modelos Disponíveis", - "load": "Carregar", - "active": "Ativado", - "notLoaded": "Não carregado", - "deleteModel": "Apagar modelo", - "deleteMsg1": "Tem certeza de que deseja apagar esta entrada do modelo de InvokeAI?", - "deleteMsg2": "Isso não vai apagar o ficheiro de modelo checkpoint do seu disco. Pode lê-los, se desejar.", - "convertToDiffusers": "Converter para Diffusers", - "convertToDiffusersHelpText1": "Este modelo será convertido ao formato 🧨 Diffusers.", - "convertToDiffusersHelpText2": "Este processo irá substituir a sua entrada de Gestor de Modelos por uma versão Diffusers do mesmo modelo.", - "convertToDiffusersHelpText3": "O seu ficheiro de ponto de verificação no disco NÃO será excluído ou modificado de forma alguma. Pode adicionar o seu ponto de verificação ao Gestor de modelos novamente, se desejar.", - "convertToDiffusersSaveLocation": "Local para Gravar", - "v2_base": "v2 (512px)", - "mergeModels": "Mesclar modelos", - "modelOne": "Modelo 1", - "modelTwo": "Modelo 2", - "modelThree": "Modelo 3", - "mergedModelSaveLocation": "Local de Salvamento", - "merge": "Mesclar", - "modelsMerged": "Modelos mesclados", - "mergedModelCustomSaveLocation": "Caminho Personalizado", - "invokeAIFolder": "Pasta Invoke AI", - "inverseSigmoid": "Sigmóide Inversa", - "none": "nenhum", - "modelManager": "Gerente de Modelo", - "model": "Modelo", - "allModels": "Todos os Modelos", - "checkpointModels": "Checkpoints", - "diffusersModels": "Diffusers", - "addNewModel": "Adicionar Novo modelo", - "addCheckpointModel": "Adicionar Modelo de Checkpoint/Safetensor", - "addDiffuserModel": "Adicionar Diffusers", - "vaeLocation": "Localização VAE", - "vaeLocationValidationMsg": "Caminho para onde o seu VAE está localizado.", - "vaeRepoID": "VAE Repo ID", - "addModel": "Adicionar Modelo", - "search": "Procurar", - "cached": "Em cache", - "checkpointFolder": "Pasta de Checkpoint", - "clearCheckpointFolder": "Apagar Pasta de Checkpoint", - "modelsFound": "Modelos Encontrados", - "selectFolder": "Selecione a Pasta", - "selected": "Selecionada", - "selectAll": "Selecionar Tudo", - "addSelected": "Adicione Selecionado", - "delete": "Apagar", - "formMessageDiffusersModelLocation": "Localização dos Modelos Diffusers", - "formMessageDiffusersModelLocationDesc": "Por favor entre com ao menos um.", - "formMessageDiffusersVAELocation": "Localização do VAE", - "formMessageDiffusersVAELocationDesc": "Se não provido, InvokeAI irá procurar pelo ficheiro VAE dentro do local do modelo.", - "convert": "Converter", - "convertToDiffusersHelpText4": "Este é um processo único. Pode levar cerca de 30 a 60s, a depender das especificações do seu computador.", - "convertToDiffusersHelpText5": "Por favor, certifique-se de que tenha espaço suficiente no disco. Os modelos geralmente variam entre 4GB e 7GB de tamanho.", - "v1": "v1", - "sameFolder": "Mesma pasta", - "invokeRoot": "Pasta do InvokeAI", - "custom": "Personalizado", - "customSaveLocation": "Local de salvamento personalizado", - "modelMergeAlphaHelp": "Alpha controla a força da mistura dos modelos. Valores de alpha mais baixos resultam numa influência menor do segundo modelo.", - "sigmoid": "Sigmóide", - "weightedSum": "Soma Ponderada" - }, - "parameters": { - "width": "Largura", - "seed": "Seed", - "hiresStrength": "Força da Alta Resolução", - "general": "Geral", - "randomizeSeed": "Seed Aleatório", - "shuffle": "Embaralhar", - "noiseThreshold": "Limite de Ruído", - "perlinNoise": "Ruído de Perlin", - "variations": "Variatções", - "seedWeights": "Pesos da Seed", - "restoreFaces": "Restaurar Rostos", - "faceRestoration": "Restauração de Rosto", - "type": "Tipo", - "denoisingStrength": "A força de remoção de ruído", - "scale": "Escala", - "otherOptions": "Outras Opções", - "seamlessTiling": "Ladrilho Sem Fronteira", - "hiresOptim": "Otimização de Alta Res", - "imageFit": "Caber Imagem Inicial No Tamanho de Saída", - "codeformerFidelity": "Fidelidade", - "tileSize": "Tamanho do Ladrilho", - "boundingBoxHeader": "Caixa Delimitadora", - "seamCorrectionHeader": "Correção de Fronteira", - "infillScalingHeader": "Preencimento e Escala", - "img2imgStrength": "Força de Imagem Para Imagem", - "toggleLoopback": "Ativar Loopback", - "symmetry": "Simetria", - "sendTo": "Mandar para", - "openInViewer": "Abrir No Visualizador", - "closeViewer": "Fechar Visualizador", - "usePrompt": "Usar Prompt", - "initialImage": "Imagem inicial", - "showOptionsPanel": "Mostrar Painel de Opções", - "strength": "Força", - "upscaling": "Redimensionando", - "upscale": "Redimensionar", - "upscaleImage": "Redimensionar Imagem", - "scaleBeforeProcessing": "Escala Antes do Processamento", - "images": "Imagems", - "steps": "Passos", - "cfgScale": "Escala CFG", - "height": "Altura", - "imageToImage": "Imagem para Imagem", - "variationAmount": "Quntidade de Variatções", - "scaledWidth": "L Escalada", - "scaledHeight": "A Escalada", - "infillMethod": "Método de Preenchimento", - "hSymmetryStep": "H Passo de Simetria", - "vSymmetryStep": "V Passo de Simetria", - "cancel": { - "immediate": "Cancelar imediatamente", - "schedule": "Cancelar após a iteração atual", - "isScheduled": "A cancelar", - "setType": "Definir tipo de cancelamento" - }, - "sendToImg2Img": "Mandar para Imagem Para Imagem", - "sendToUnifiedCanvas": "Mandar para Tela Unificada", - "copyImage": "Copiar imagem", - "copyImageToLink": "Copiar Imagem Para a Ligação", - "downloadImage": "Descarregar Imagem", - "useSeed": "Usar Seed", - "useAll": "Usar Todos", - "useInitImg": "Usar Imagem Inicial", - "info": "Informações" - }, - "settings": { - "confirmOnDelete": "Confirmar Antes de Apagar", - "displayHelpIcons": "Mostrar Ícones de Ajuda", - "enableImageDebugging": "Ativar Depuração de Imagem", - "useSlidersForAll": "Usar deslizadores para todas as opções", - "resetWebUIDesc1": "Reiniciar a interface apenas reinicia o cache local do broswer para imagens e configurações lembradas. Não apaga nenhuma imagem do disco.", - "models": "Modelos", - "displayInProgress": "Mostrar Progresso de Imagens Em Andamento", - "saveSteps": "Gravar imagens a cada n passos", - "resetWebUI": "Reiniciar Interface", - "resetWebUIDesc2": "Se as imagens não estão a aparecer na galeria ou algo mais não está a funcionar, favor tentar reiniciar antes de postar um problema no GitHub.", - "resetComplete": "A interface foi reiniciada. Atualize a página para carregar." - }, - "toast": { - "uploadFailed": "Envio Falhou", - "uploadFailedUnableToLoadDesc": "Não foj possível carregar o ficheiro", - "downloadImageStarted": "Download de Imagem Começou", - "imageNotLoadedDesc": "Nenhuma imagem encontrada a enviar para o módulo de imagem para imagem", - "imageLinkCopied": "Ligação de Imagem Copiada", - "imageNotLoaded": "Nenhuma Imagem Carregada", - "parametersFailed": "Problema ao carregar parâmetros", - "parametersFailedDesc": "Não foi possível carregar imagem incial.", - "seedSet": "Seed Definida", - "upscalingFailed": "Redimensionamento Falhou", - "promptNotSet": "Prompt Não Definido", - "tempFoldersEmptied": "Pasta de Ficheiros Temporários Esvaziada", - "imageCopied": "Imagem Copiada", - "imageSavedToGallery": "Imagem Salva na Galeria", - "canvasMerged": "Tela Fundida", - "sentToImageToImage": "Mandar Para Imagem Para Imagem", - "sentToUnifiedCanvas": "Enviada para a Tela Unificada", - "parametersSet": "Parâmetros Definidos", - "parametersNotSet": "Parâmetros Não Definidos", - "parametersNotSetDesc": "Nenhum metadado foi encontrado para essa imagem.", - "seedNotSet": "Seed Não Definida", - "seedNotSetDesc": "Não foi possível achar a seed para a imagem.", - "promptSet": "Prompt Definido", - "promptNotSetDesc": "Não foi possível achar prompt para essa imagem.", - "faceRestoreFailed": "Restauração de Rosto Falhou", - "metadataLoadFailed": "Falha ao tentar carregar metadados", - "initialImageSet": "Imagem Inicial Definida", - "initialImageNotSet": "Imagem Inicial Não Definida", - "initialImageNotSetDesc": "Não foi possível carregar imagem incial" - }, - "tooltip": { - "feature": { - "prompt": "Este é o campo de prompt. O prompt inclui objetos de geração e termos estilísticos. Também pode adicionar peso (importância do token) no prompt, mas comandos e parâmetros de CLI não funcionarão.", - "other": "Essas opções ativam modos alternativos de processamento para o Invoke. 'Seamless tiling' criará padrões repetidos na saída. 'High resolution' é uma geração em duas etapas com img2img: use essa configuração quando desejar uma imagem maior e mais coerente sem artefatos. Levará mais tempo do que o txt2img usual.", - "seed": "O valor da semente afeta o ruído inicial a partir do qual a imagem é formada. Pode usar as sementes já existentes de imagens anteriores. 'Limiar de ruído' é usado para mitigar artefatos em valores CFG altos (experimente a faixa de 0-10) e o Perlin para adicionar ruído Perlin durante a geração: ambos servem para adicionar variação às suas saídas.", - "imageToImage": "Image to Image carrega qualquer imagem como inicial, que é então usada para gerar uma nova junto com o prompt. Quanto maior o valor, mais a imagem resultante mudará. Valores de 0.0 a 1.0 são possíveis, a faixa recomendada é de 0.25 a 0.75", - "faceCorrection": "Correção de rosto com GFPGAN ou Codeformer: o algoritmo detecta rostos na imagem e corrige quaisquer defeitos. Um valor alto mudará mais a imagem, a resultar em rostos mais atraentes. Codeformer com uma fidelidade maior preserva a imagem original às custas de uma correção de rosto mais forte.", - "seamCorrection": "Controla o tratamento das emendas visíveis que ocorrem entre as imagens geradas no canvas.", - "gallery": "A galeria exibe as gerações da pasta de saída conforme elas são criadas. As configurações são armazenadas em ficheiros e acessadas pelo menu de contexto.", - "variations": "Experimente uma variação com um valor entre 0,1 e 1,0 para mudar o resultado para uma determinada semente. Variações interessantes da semente estão entre 0,1 e 0,3.", - "upscale": "Use o ESRGAN para ampliar a imagem imediatamente após a geração.", - "boundingBox": "A caixa delimitadora é a mesma que as configurações de largura e altura para Texto para Imagem ou Imagem para Imagem. Apenas a área na caixa será processada.", - "infillAndScaling": "Gira os métodos de preenchimento (usados em áreas mascaradas ou apagadas do canvas) e a escala (útil para tamanhos de caixa delimitadora pequenos)." - } - }, - "unifiedCanvas": { - "emptyTempImagesFolderMessage": "Esvaziar a pasta de ficheiros de imagem temporários também reseta completamente a Tela Unificada. Isso inclui todo o histórico de desfazer/refazer, imagens na área de preparação e a camada base da tela.", - "scaledBoundingBox": "Caixa Delimitadora Escalada", - "boundingBoxPosition": "Posição da Caixa Delimitadora", - "next": "Próximo", - "accept": "Aceitar", - "showHide": "Mostrar/Esconder", - "discardAll": "Descartar Todos", - "betaClear": "Limpar", - "betaDarkenOutside": "Escurecer Externamente", - "base": "Base", - "brush": "Pincel", - "showIntermediates": "Mostrar Intermediários", - "showGrid": "Mostrar Grade", - "clearCanvasHistoryConfirm": "Tem certeza que quer limpar o histórico de tela?", - "boundingBox": "Caixa Delimitadora", - "canvasDimensions": "Dimensões da Tela", - "canvasPosition": "Posição da Tela", - "cursorPosition": "Posição do cursor", - "previous": "Anterior", - "betaLimitToBox": "Limitar á Caixa", - "layer": "Camada", - "mask": "Máscara", - "maskingOptions": "Opções de Mascaramento", - "enableMask": "Ativar Máscara", - "preserveMaskedArea": "Preservar Área da Máscara", - "clearMask": "Limpar Máscara", - "eraser": "Apagador", - "fillBoundingBox": "Preencher Caixa Delimitadora", - "eraseBoundingBox": "Apagar Caixa Delimitadora", - "colorPicker": "Seletor de Cor", - "brushOptions": "Opções de Pincel", - "brushSize": "Tamanho", - "move": "Mover", - "resetView": "Resetar Visualização", - "mergeVisible": "Fundir Visível", - "saveToGallery": "Gravar na Galeria", - "copyToClipboard": "Copiar para a Área de Transferência", - "downloadAsImage": "Descarregar Como Imagem", - "undo": "Desfazer", - "redo": "Refazer", - "clearCanvas": "Limpar Tela", - "canvasSettings": "Configurações de Tela", - "snapToGrid": "Encaixar na Grade", - "darkenOutsideSelection": "Escurecer Seleção Externa", - "autoSaveToGallery": "Gravar Automaticamente na Galeria", - "saveBoxRegionOnly": "Gravar Apenas a Região da Caixa", - "limitStrokesToBox": "Limitar Traços à Caixa", - "showCanvasDebugInfo": "Mostrar Informações de Depuração daTela", - "clearCanvasHistory": "Limpar o Histórico da Tela", - "clearHistory": "Limpar Históprico", - "clearCanvasHistoryMessage": "Limpar o histórico de tela deixa a sua tela atual intacta, mas limpa de forma irreversível o histórico de desfazer e refazer.", - "emptyTempImageFolder": "Esvaziar a Pasta de Ficheiros de Imagem Temporários", - "emptyFolder": "Esvaziar Pasta", - "emptyTempImagesFolderConfirm": "Tem certeza que quer esvaziar a pasta de ficheiros de imagem temporários?", - "activeLayer": "Camada Ativa", - "canvasScale": "Escala da Tela", - "betaPreserveMasked": "Preservar Máscarado" - }, - "accessibility": { - "invokeProgressBar": "Invocar barra de progresso", - "reset": "Repôr", - "nextImage": "Próxima imagem", - "useThisParameter": "Usar este parâmetro", - "copyMetadataJson": "Copiar metadados JSON", - "zoomIn": "Ampliar", - "zoomOut": "Reduzir", - "rotateCounterClockwise": "Girar no sentido anti-horário", - "rotateClockwise": "Girar no sentido horário", - "flipVertically": "Espelhar verticalmente", - "modifyConfig": "Modificar config", - "toggleAutoscroll": "Alternar rolagem automática", - "showOptionsPanel": "Mostrar painel de opções", - "uploadImage": "Enviar imagem", - "previousImage": "Imagem anterior", - "flipHorizontally": "Espelhar horizontalmente", - "toggleLogViewer": "Alternar visualizador de registo" - } -} diff --git a/invokeai/frontend/web/dist/locales/pt_BR.json b/invokeai/frontend/web/dist/locales/pt_BR.json deleted file mode 100644 index 3b45dbbbf3..0000000000 --- a/invokeai/frontend/web/dist/locales/pt_BR.json +++ /dev/null @@ -1,577 +0,0 @@ -{ - "common": { - "hotkeysLabel": "Teclas de atalho", - "languagePickerLabel": "Seletor de Idioma", - "reportBugLabel": "Relatar Bug", - "settingsLabel": "Configurações", - "img2img": "Imagem Para Imagem", - "unifiedCanvas": "Tela Unificada", - "nodes": "Nódulos", - "langBrPortuguese": "Português do Brasil", - "nodesDesc": "Um sistema baseado em nódulos para geração de imagens está em contrução. Fique ligado para atualizações sobre essa funcionalidade incrível.", - "postProcessing": "Pós-processamento", - "postProcessDesc1": "Invoke AI oferece uma variedade e funcionalidades de pós-processamento. Redimensionador de Imagem e Restauração Facial já estão disponíveis na interface. Você pode acessar elas no menu de Opções Avançadas na aba de Texto para Imagem e Imagem para Imagem. Você também pode processar imagens diretamente, usando os botões de ação de imagem acima da atual tela de imagens ou visualizador.", - "postProcessDesc2": "Uma interface dedicada será lançada em breve para facilitar fluxos de trabalho com opções mais avançadas de pós-processamento.", - "postProcessDesc3": "A interface do comando de linha da Invoke oferece várias funcionalidades incluindo Ampliação.", - "training": "Treinando", - "trainingDesc1": "Um fluxo de trabalho dedicado para treinar suas próprias incorporações e chockpoints usando Inversão Textual e Dreambooth na interface web.", - "trainingDesc2": "InvokeAI já suporta treinar incorporações personalizadas usando Inversão Textual com o script principal.", - "upload": "Enviar", - "close": "Fechar", - "load": "Carregar", - "statusConnected": "Conectado", - "statusDisconnected": "Disconectado", - "statusError": "Erro", - "statusPreparing": "Preparando", - "statusProcessingCanceled": "Processamento Canceledo", - "statusProcessingComplete": "Processamento Completo", - "statusGenerating": "Gerando", - "statusGeneratingTextToImage": "Gerando Texto Para Imagem", - "statusGeneratingImageToImage": "Gerando Imagem Para Imagem", - "statusGeneratingInpainting": "Gerando Inpainting", - "statusGeneratingOutpainting": "Gerando Outpainting", - "statusGenerationComplete": "Geração Completa", - "statusIterationComplete": "Iteração Completa", - "statusSavingImage": "Salvando Imagem", - "statusRestoringFaces": "Restaurando Rostos", - "statusRestoringFacesGFPGAN": "Restaurando Rostos (GFPGAN)", - "statusRestoringFacesCodeFormer": "Restaurando Rostos (CodeFormer)", - "statusUpscaling": "Redimensinando", - "statusUpscalingESRGAN": "Redimensinando (ESRGAN)", - "statusLoadingModel": "Carregando Modelo", - "statusModelChanged": "Modelo Alterado", - "githubLabel": "Github", - "discordLabel": "Discord", - "langArabic": "Árabe", - "langEnglish": "Inglês", - "langDutch": "Holandês", - "langFrench": "Francês", - "langGerman": "Alemão", - "langItalian": "Italiano", - "langJapanese": "Japonês", - "langPolish": "Polonês", - "langSimplifiedChinese": "Chinês", - "langUkranian": "Ucraniano", - "back": "Voltar", - "statusConvertingModel": "Convertendo Modelo", - "statusModelConverted": "Modelo Convertido", - "statusMergingModels": "Mesclando Modelos", - "statusMergedModels": "Modelos Mesclados", - "langRussian": "Russo", - "langSpanish": "Espanhol", - "loadingInvokeAI": "Carregando Invoke AI", - "loading": "Carregando" - }, - "gallery": { - "generations": "Gerações", - "showGenerations": "Mostrar Gerações", - "uploads": "Enviados", - "showUploads": "Mostrar Enviados", - "galleryImageSize": "Tamanho da Imagem", - "galleryImageResetSize": "Resetar Imagem", - "gallerySettings": "Configurações de Galeria", - "maintainAspectRatio": "Mater Proporções", - "autoSwitchNewImages": "Trocar para Novas Imagens Automaticamente", - "singleColumnLayout": "Disposição em Coluna Única", - "allImagesLoaded": "Todas as Imagens Carregadas", - "loadMore": "Carregar Mais", - "noImagesInGallery": "Sem Imagens na Galeria" - }, - "hotkeys": { - "keyboardShortcuts": "Atalhos de Teclado", - "appHotkeys": "Atalhos do app", - "generalHotkeys": "Atalhos Gerais", - "galleryHotkeys": "Atalhos da Galeria", - "unifiedCanvasHotkeys": "Atalhos da Tela Unificada", - "invoke": { - "title": "Invoke", - "desc": "Gerar uma imagem" - }, - "cancel": { - "title": "Cancelar", - "desc": "Cancelar geração de imagem" - }, - "focusPrompt": { - "title": "Foco do Prompt", - "desc": "Foco da área de texto do prompt" - }, - "toggleOptions": { - "title": "Ativar Opções", - "desc": "Abrir e fechar o painel de opções" - }, - "pinOptions": { - "title": "Fixar Opções", - "desc": "Fixar o painel de opções" - }, - "toggleViewer": { - "title": "Ativar Visualizador", - "desc": "Abrir e fechar o Visualizador de Imagens" - }, - "toggleGallery": { - "title": "Ativar Galeria", - "desc": "Abrir e fechar a gaveta da galeria" - }, - "maximizeWorkSpace": { - "title": "Maximizar a Área de Trabalho", - "desc": "Fechar painéis e maximixar área de trabalho" - }, - "changeTabs": { - "title": "Mudar Abas", - "desc": "Trocar para outra área de trabalho" - }, - "consoleToggle": { - "title": "Ativar Console", - "desc": "Abrir e fechar console" - }, - "setPrompt": { - "title": "Definir Prompt", - "desc": "Usar o prompt da imagem atual" - }, - "setSeed": { - "title": "Definir Seed", - "desc": "Usar seed da imagem atual" - }, - "setParameters": { - "title": "Definir Parâmetros", - "desc": "Usar todos os parâmetros da imagem atual" - }, - "restoreFaces": { - "title": "Restaurar Rostos", - "desc": "Restaurar a imagem atual" - }, - "upscale": { - "title": "Redimensionar", - "desc": "Redimensionar a imagem atual" - }, - "showInfo": { - "title": "Mostrar Informações", - "desc": "Mostrar metadados de informações da imagem atual" - }, - "sendToImageToImage": { - "title": "Mandar para Imagem Para Imagem", - "desc": "Manda a imagem atual para Imagem Para Imagem" - }, - "deleteImage": { - "title": "Apagar Imagem", - "desc": "Apaga a imagem atual" - }, - "closePanels": { - "title": "Fechar Painéis", - "desc": "Fecha os painéis abertos" - }, - "previousImage": { - "title": "Imagem Anterior", - "desc": "Mostra a imagem anterior na galeria" - }, - "nextImage": { - "title": "Próxima Imagem", - "desc": "Mostra a próxima imagem na galeria" - }, - "toggleGalleryPin": { - "title": "Ativar Fixar Galeria", - "desc": "Fixa e desafixa a galeria na interface" - }, - "increaseGalleryThumbSize": { - "title": "Aumentar Tamanho da Galeria de Imagem", - "desc": "Aumenta o tamanho das thumbs na galeria" - }, - "decreaseGalleryThumbSize": { - "title": "Diminuir Tamanho da Galeria de Imagem", - "desc": "Diminui o tamanho das thumbs na galeria" - }, - "selectBrush": { - "title": "Selecionar Pincel", - "desc": "Seleciona o pincel" - }, - "selectEraser": { - "title": "Selecionar Apagador", - "desc": "Seleciona o apagador" - }, - "decreaseBrushSize": { - "title": "Diminuir Tamanho do Pincel", - "desc": "Diminui o tamanho do pincel/apagador" - }, - "increaseBrushSize": { - "title": "Aumentar Tamanho do Pincel", - "desc": "Aumenta o tamanho do pincel/apagador" - }, - "decreaseBrushOpacity": { - "title": "Diminuir Opacidade do Pincel", - "desc": "Diminui a opacidade do pincel" - }, - "increaseBrushOpacity": { - "title": "Aumentar Opacidade do Pincel", - "desc": "Aumenta a opacidade do pincel" - }, - "moveTool": { - "title": "Ferramenta Mover", - "desc": "Permite navegar pela tela" - }, - "fillBoundingBox": { - "title": "Preencher Caixa Delimitadora", - "desc": "Preenche a caixa delimitadora com a cor do pincel" - }, - "eraseBoundingBox": { - "title": "Apagar Caixa Delimitadora", - "desc": "Apaga a área da caixa delimitadora" - }, - "colorPicker": { - "title": "Selecionar Seletor de Cor", - "desc": "Seleciona o seletor de cores" - }, - "toggleSnap": { - "title": "Ativar Encaixe", - "desc": "Ativa Encaixar na Grade" - }, - "quickToggleMove": { - "title": "Ativar Mover Rapidamente", - "desc": "Temporariamente ativa o modo Mover" - }, - "toggleLayer": { - "title": "Ativar Camada", - "desc": "Ativa a seleção de camada de máscara/base" - }, - "clearMask": { - "title": "Limpar Máscara", - "desc": "Limpa toda a máscara" - }, - "hideMask": { - "title": "Esconder Máscara", - "desc": "Esconde e Revela a máscara" - }, - "showHideBoundingBox": { - "title": "Mostrar/Esconder Caixa Delimitadora", - "desc": "Ativa a visibilidade da caixa delimitadora" - }, - "mergeVisible": { - "title": "Fundir Visível", - "desc": "Fundir todas as camadas visíveis em tela" - }, - "saveToGallery": { - "title": "Salvara Na Galeria", - "desc": "Salva a tela atual na galeria" - }, - "copyToClipboard": { - "title": "Copiar para a Área de Transferência", - "desc": "Copia a tela atual para a área de transferência" - }, - "downloadImage": { - "title": "Baixar Imagem", - "desc": "Baixa a tela atual" - }, - "undoStroke": { - "title": "Desfazer Traço", - "desc": "Desfaz um traço de pincel" - }, - "redoStroke": { - "title": "Refazer Traço", - "desc": "Refaz o traço de pincel" - }, - "resetView": { - "title": "Resetar Visualização", - "desc": "Reseta Visualização da Tela" - }, - "previousStagingImage": { - "title": "Imagem de Preparação Anterior", - "desc": "Área de Imagem de Preparação Anterior" - }, - "nextStagingImage": { - "title": "Próxima Imagem de Preparação Anterior", - "desc": "Próxima Área de Imagem de Preparação Anterior" - }, - "acceptStagingImage": { - "title": "Aceitar Imagem de Preparação Anterior", - "desc": "Aceitar Área de Imagem de Preparação Anterior" - } - }, - "modelManager": { - "modelManager": "Gerente de Modelo", - "model": "Modelo", - "modelAdded": "Modelo Adicionado", - "modelUpdated": "Modelo Atualizado", - "modelEntryDeleted": "Entrada de modelo excluída", - "cannotUseSpaces": "Não pode usar espaços", - "addNew": "Adicionar Novo", - "addNewModel": "Adicionar Novo modelo", - "addManually": "Adicionar Manualmente", - "manual": "Manual", - "name": "Nome", - "nameValidationMsg": "Insira um nome para o seu modelo", - "description": "Descrição", - "descriptionValidationMsg": "Adicione uma descrição para o seu modelo", - "config": "Configuração", - "configValidationMsg": "Caminho para o arquivo de configuração do seu modelo.", - "modelLocation": "Localização do modelo", - "modelLocationValidationMsg": "Caminho para onde seu modelo está localizado.", - "vaeLocation": "Localização VAE", - "vaeLocationValidationMsg": "Caminho para onde seu VAE está localizado.", - "width": "Largura", - "widthValidationMsg": "Largura padrão do seu modelo.", - "height": "Altura", - "heightValidationMsg": "Altura padrão do seu modelo.", - "addModel": "Adicionar Modelo", - "updateModel": "Atualizar Modelo", - "availableModels": "Modelos Disponíveis", - "search": "Procurar", - "load": "Carregar", - "active": "Ativado", - "notLoaded": "Não carregado", - "cached": "Em cache", - "checkpointFolder": "Pasta de Checkpoint", - "clearCheckpointFolder": "Apagar Pasta de Checkpoint", - "findModels": "Encontrar Modelos", - "modelsFound": "Modelos Encontrados", - "selectFolder": "Selecione a Pasta", - "selected": "Selecionada", - "selectAll": "Selecionar Tudo", - "deselectAll": "Deselecionar Tudo", - "showExisting": "Mostrar Existente", - "addSelected": "Adicione Selecionado", - "modelExists": "Modelo Existe", - "delete": "Excluir", - "deleteModel": "Excluir modelo", - "deleteConfig": "Excluir Config", - "deleteMsg1": "Tem certeza de que deseja excluir esta entrada do modelo de InvokeAI?", - "deleteMsg2": "Isso não vai excluir o arquivo de modelo checkpoint do seu disco. Você pode lê-los, se desejar.", - "checkpointModels": "Checkpoints", - "diffusersModels": "Diffusers", - "safetensorModels": "SafeTensors", - "addCheckpointModel": "Adicionar Modelo de Checkpoint/Safetensor", - "addDiffuserModel": "Adicionar Diffusers", - "repo_id": "Repo ID", - "vaeRepoID": "VAE Repo ID", - "vaeRepoIDValidationMsg": "Repositório Online do seu VAE", - "scanAgain": "Digitalize Novamente", - "selectAndAdd": "Selecione e Adicione Modelos Listados Abaixo", - "noModelsFound": "Nenhum Modelo Encontrado", - "formMessageDiffusersModelLocation": "Localização dos Modelos Diffusers", - "formMessageDiffusersModelLocationDesc": "Por favor entre com ao menos um.", - "formMessageDiffusersVAELocation": "Localização do VAE", - "formMessageDiffusersVAELocationDesc": "Se não provido, InvokeAI irá procurar pelo arquivo VAE dentro do local do modelo.", - "convertToDiffusers": "Converter para Diffusers", - "convertToDiffusersHelpText1": "Este modelo será convertido para o formato 🧨 Diffusers.", - "convertToDiffusersHelpText5": "Por favor, certifique-se de que você tenha espaço suficiente em disco. Os modelos geralmente variam entre 4GB e 7GB de tamanho.", - "convertToDiffusersHelpText6": "Você deseja converter este modelo?", - "convertToDiffusersSaveLocation": "Local para Salvar", - "v1": "v1", - "inpainting": "v1 Inpainting", - "customConfig": "Configuração personalizada", - "pathToCustomConfig": "Caminho para configuração personalizada", - "convertToDiffusersHelpText3": "Seu arquivo de ponto de verificação no disco NÃO será excluído ou modificado de forma alguma. Você pode adicionar seu ponto de verificação ao Gerenciador de modelos novamente, se desejar.", - "convertToDiffusersHelpText4": "Este é um processo único. Pode levar cerca de 30 a 60s, dependendo das especificações do seu computador.", - "merge": "Mesclar", - "modelsMerged": "Modelos mesclados", - "mergeModels": "Mesclar modelos", - "modelOne": "Modelo 1", - "modelTwo": "Modelo 2", - "modelThree": "Modelo 3", - "statusConverting": "Convertendo", - "modelConverted": "Modelo Convertido", - "sameFolder": "Mesma pasta", - "invokeRoot": "Pasta do InvokeAI", - "custom": "Personalizado", - "customSaveLocation": "Local de salvamento personalizado", - "mergedModelName": "Nome do modelo mesclado", - "alpha": "Alpha", - "allModels": "Todos os Modelos", - "repoIDValidationMsg": "Repositório Online do seu Modelo", - "convert": "Converter", - "convertToDiffusersHelpText2": "Este processo irá substituir sua entrada de Gerenciador de Modelos por uma versão Diffusers do mesmo modelo.", - "mergedModelCustomSaveLocation": "Caminho Personalizado", - "mergedModelSaveLocation": "Local de Salvamento", - "interpolationType": "Tipo de Interpolação", - "ignoreMismatch": "Ignorar Divergências entre Modelos Selecionados", - "invokeAIFolder": "Pasta Invoke AI", - "weightedSum": "Soma Ponderada", - "sigmoid": "Sigmóide", - "inverseSigmoid": "Sigmóide Inversa", - "modelMergeHeaderHelp1": "Você pode mesclar até três modelos diferentes para criar uma mistura que atenda às suas necessidades.", - "modelMergeInterpAddDifferenceHelp": "Neste modo, o Modelo 3 é primeiro subtraído do Modelo 2. A versão resultante é mesclada com o Modelo 1 com a taxa alpha definida acima.", - "modelMergeAlphaHelp": "Alpha controla a força da mistura dos modelos. Valores de alpha mais baixos resultam em uma influência menor do segundo modelo.", - "modelMergeHeaderHelp2": "Apenas Diffusers estão disponíveis para mesclagem. Se você deseja mesclar um modelo de checkpoint, por favor, converta-o para Diffusers primeiro." - }, - "parameters": { - "images": "Imagems", - "steps": "Passos", - "cfgScale": "Escala CFG", - "width": "Largura", - "height": "Altura", - "seed": "Seed", - "randomizeSeed": "Seed Aleatório", - "shuffle": "Embaralhar", - "noiseThreshold": "Limite de Ruído", - "perlinNoise": "Ruído de Perlin", - "variations": "Variatções", - "variationAmount": "Quntidade de Variatções", - "seedWeights": "Pesos da Seed", - "faceRestoration": "Restauração de Rosto", - "restoreFaces": "Restaurar Rostos", - "type": "Tipo", - "strength": "Força", - "upscaling": "Redimensionando", - "upscale": "Redimensionar", - "upscaleImage": "Redimensionar Imagem", - "scale": "Escala", - "otherOptions": "Outras Opções", - "seamlessTiling": "Ladrilho Sem Fronteira", - "hiresOptim": "Otimização de Alta Res", - "imageFit": "Caber Imagem Inicial No Tamanho de Saída", - "codeformerFidelity": "Fidelidade", - "scaleBeforeProcessing": "Escala Antes do Processamento", - "scaledWidth": "L Escalada", - "scaledHeight": "A Escalada", - "infillMethod": "Método de Preenchimento", - "tileSize": "Tamanho do Ladrilho", - "boundingBoxHeader": "Caixa Delimitadora", - "seamCorrectionHeader": "Correção de Fronteira", - "infillScalingHeader": "Preencimento e Escala", - "img2imgStrength": "Força de Imagem Para Imagem", - "toggleLoopback": "Ativar Loopback", - "sendTo": "Mandar para", - "sendToImg2Img": "Mandar para Imagem Para Imagem", - "sendToUnifiedCanvas": "Mandar para Tela Unificada", - "copyImageToLink": "Copiar Imagem Para Link", - "downloadImage": "Baixar Imagem", - "openInViewer": "Abrir No Visualizador", - "closeViewer": "Fechar Visualizador", - "usePrompt": "Usar Prompt", - "useSeed": "Usar Seed", - "useAll": "Usar Todos", - "useInitImg": "Usar Imagem Inicial", - "info": "Informações", - "initialImage": "Imagem inicial", - "showOptionsPanel": "Mostrar Painel de Opções", - "vSymmetryStep": "V Passo de Simetria", - "hSymmetryStep": "H Passo de Simetria", - "symmetry": "Simetria", - "copyImage": "Copiar imagem", - "hiresStrength": "Força da Alta Resolução", - "denoisingStrength": "A força de remoção de ruído", - "imageToImage": "Imagem para Imagem", - "cancel": { - "setType": "Definir tipo de cancelamento", - "isScheduled": "Cancelando", - "schedule": "Cancelar após a iteração atual", - "immediate": "Cancelar imediatamente" - }, - "general": "Geral" - }, - "settings": { - "models": "Modelos", - "displayInProgress": "Mostrar Progresso de Imagens Em Andamento", - "saveSteps": "Salvar imagens a cada n passos", - "confirmOnDelete": "Confirmar Antes de Apagar", - "displayHelpIcons": "Mostrar Ícones de Ajuda", - "enableImageDebugging": "Ativar Depuração de Imagem", - "resetWebUI": "Reiniciar Interface", - "resetWebUIDesc1": "Reiniciar a interface apenas reinicia o cache local do broswer para imagens e configurações lembradas. Não apaga nenhuma imagem do disco.", - "resetWebUIDesc2": "Se as imagens não estão aparecendo na galeria ou algo mais não está funcionando, favor tentar reiniciar antes de postar um problema no GitHub.", - "resetComplete": "A interface foi reiniciada. Atualize a página para carregar.", - "useSlidersForAll": "Usar deslizadores para todas as opções" - }, - "toast": { - "tempFoldersEmptied": "Pasta de Arquivos Temporários Esvaziada", - "uploadFailed": "Envio Falhou", - "uploadFailedUnableToLoadDesc": "Não foj possível carregar o arquivo", - "downloadImageStarted": "Download de Imagem Começou", - "imageCopied": "Imagem Copiada", - "imageLinkCopied": "Link de Imagem Copiada", - "imageNotLoaded": "Nenhuma Imagem Carregada", - "imageNotLoadedDesc": "Nenhuma imagem encontrar para mandar para o módulo de imagem para imagem", - "imageSavedToGallery": "Imagem Salva na Galeria", - "canvasMerged": "Tela Fundida", - "sentToImageToImage": "Mandar Para Imagem Para Imagem", - "sentToUnifiedCanvas": "Enviada para a Tela Unificada", - "parametersSet": "Parâmetros Definidos", - "parametersNotSet": "Parâmetros Não Definidos", - "parametersNotSetDesc": "Nenhum metadado foi encontrado para essa imagem.", - "parametersFailed": "Problema ao carregar parâmetros", - "parametersFailedDesc": "Não foi possível carregar imagem incial.", - "seedSet": "Seed Definida", - "seedNotSet": "Seed Não Definida", - "seedNotSetDesc": "Não foi possível achar a seed para a imagem.", - "promptSet": "Prompt Definido", - "promptNotSet": "Prompt Não Definido", - "promptNotSetDesc": "Não foi possível achar prompt para essa imagem.", - "upscalingFailed": "Redimensionamento Falhou", - "faceRestoreFailed": "Restauração de Rosto Falhou", - "metadataLoadFailed": "Falha ao tentar carregar metadados", - "initialImageSet": "Imagem Inicial Definida", - "initialImageNotSet": "Imagem Inicial Não Definida", - "initialImageNotSetDesc": "Não foi possível carregar imagem incial" - }, - "unifiedCanvas": { - "layer": "Camada", - "base": "Base", - "mask": "Máscara", - "maskingOptions": "Opções de Mascaramento", - "enableMask": "Ativar Máscara", - "preserveMaskedArea": "Preservar Área da Máscara", - "clearMask": "Limpar Máscara", - "brush": "Pincel", - "eraser": "Apagador", - "fillBoundingBox": "Preencher Caixa Delimitadora", - "eraseBoundingBox": "Apagar Caixa Delimitadora", - "colorPicker": "Seletor de Cor", - "brushOptions": "Opções de Pincel", - "brushSize": "Tamanho", - "move": "Mover", - "resetView": "Resetar Visualização", - "mergeVisible": "Fundir Visível", - "saveToGallery": "Salvar na Galeria", - "copyToClipboard": "Copiar para a Área de Transferência", - "downloadAsImage": "Baixar Como Imagem", - "undo": "Desfazer", - "redo": "Refazer", - "clearCanvas": "Limpar Tela", - "canvasSettings": "Configurações de Tela", - "showIntermediates": "Mostrar Intermediários", - "showGrid": "Mostrar Grade", - "snapToGrid": "Encaixar na Grade", - "darkenOutsideSelection": "Escurecer Seleção Externa", - "autoSaveToGallery": "Salvar Automaticamente na Galeria", - "saveBoxRegionOnly": "Salvar Apenas a Região da Caixa", - "limitStrokesToBox": "Limitar Traços para a Caixa", - "showCanvasDebugInfo": "Mostrar Informações de Depuração daTela", - "clearCanvasHistory": "Limpar o Histórico da Tela", - "clearHistory": "Limpar Históprico", - "clearCanvasHistoryMessage": "Limpar o histórico de tela deixa sua tela atual intacta, mas limpa de forma irreversível o histórico de desfazer e refazer.", - "clearCanvasHistoryConfirm": "Tem certeza que quer limpar o histórico de tela?", - "emptyTempImageFolder": "Esvaziar a Pasta de Arquivos de Imagem Temporários", - "emptyFolder": "Esvaziar Pasta", - "emptyTempImagesFolderMessage": "Esvaziar a pasta de arquivos de imagem temporários também reseta completamente a Tela Unificada. Isso inclui todo o histórico de desfazer/refazer, imagens na área de preparação e a camada base da tela.", - "emptyTempImagesFolderConfirm": "Tem certeza que quer esvaziar a pasta de arquivos de imagem temporários?", - "activeLayer": "Camada Ativa", - "canvasScale": "Escala da Tela", - "boundingBox": "Caixa Delimitadora", - "scaledBoundingBox": "Caixa Delimitadora Escalada", - "boundingBoxPosition": "Posição da Caixa Delimitadora", - "canvasDimensions": "Dimensões da Tela", - "canvasPosition": "Posição da Tela", - "cursorPosition": "Posição do cursor", - "previous": "Anterior", - "next": "Próximo", - "accept": "Aceitar", - "showHide": "Mostrar/Esconder", - "discardAll": "Descartar Todos", - "betaClear": "Limpar", - "betaDarkenOutside": "Escurecer Externamente", - "betaLimitToBox": "Limitar Para a Caixa", - "betaPreserveMasked": "Preservar Máscarado" - }, - "tooltip": { - "feature": { - "seed": "O valor da semente afeta o ruído inicial a partir do qual a imagem é formada. Você pode usar as sementes já existentes de imagens anteriores. 'Limiar de ruído' é usado para mitigar artefatos em valores CFG altos (experimente a faixa de 0-10), e o Perlin para adicionar ruído Perlin durante a geração: ambos servem para adicionar variação às suas saídas.", - "gallery": "A galeria exibe as gerações da pasta de saída conforme elas são criadas. As configurações são armazenadas em arquivos e acessadas pelo menu de contexto.", - "other": "Essas opções ativam modos alternativos de processamento para o Invoke. 'Seamless tiling' criará padrões repetidos na saída. 'High resolution' é uma geração em duas etapas com img2img: use essa configuração quando desejar uma imagem maior e mais coerente sem artefatos. Levará mais tempo do que o txt2img usual.", - "boundingBox": "A caixa delimitadora é a mesma que as configurações de largura e altura para Texto para Imagem ou Imagem para Imagem. Apenas a área na caixa será processada.", - "upscale": "Use o ESRGAN para ampliar a imagem imediatamente após a geração.", - "seamCorrection": "Controla o tratamento das emendas visíveis que ocorrem entre as imagens geradas no canvas.", - "faceCorrection": "Correção de rosto com GFPGAN ou Codeformer: o algoritmo detecta rostos na imagem e corrige quaisquer defeitos. Um valor alto mudará mais a imagem, resultando em rostos mais atraentes. Codeformer com uma fidelidade maior preserva a imagem original às custas de uma correção de rosto mais forte.", - "prompt": "Este é o campo de prompt. O prompt inclui objetos de geração e termos estilísticos. Você também pode adicionar peso (importância do token) no prompt, mas comandos e parâmetros de CLI não funcionarão.", - "infillAndScaling": "Gerencie os métodos de preenchimento (usados em áreas mascaradas ou apagadas do canvas) e a escala (útil para tamanhos de caixa delimitadora pequenos).", - "imageToImage": "Image to Image carrega qualquer imagem como inicial, que é então usada para gerar uma nova junto com o prompt. Quanto maior o valor, mais a imagem resultante mudará. Valores de 0.0 a 1.0 são possíveis, a faixa recomendada é de 0.25 a 0.75", - "variations": "Experimente uma variação com um valor entre 0,1 e 1,0 para mudar o resultado para uma determinada semente. Variações interessantes da semente estão entre 0,1 e 0,3." - } - } -} diff --git a/invokeai/frontend/web/dist/locales/ro.json b/invokeai/frontend/web/dist/locales/ro.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/invokeai/frontend/web/dist/locales/ro.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/invokeai/frontend/web/dist/locales/ru.json b/invokeai/frontend/web/dist/locales/ru.json deleted file mode 100644 index 808db9e803..0000000000 --- a/invokeai/frontend/web/dist/locales/ru.json +++ /dev/null @@ -1,779 +0,0 @@ -{ - "common": { - "hotkeysLabel": "Горячие клавиши", - "languagePickerLabel": "Язык", - "reportBugLabel": "Сообщить об ошибке", - "settingsLabel": "Настройки", - "img2img": "Изображение в изображение (img2img)", - "unifiedCanvas": "Единый холст", - "nodes": "Редактор рабочего процесса", - "langRussian": "Русский", - "nodesDesc": "Cистема генерации изображений на основе нодов (узлов) уже разрабатывается. Следите за новостями об этой замечательной функции.", - "postProcessing": "Постобработка", - "postProcessDesc1": "Invoke AI предлагает широкий спектр функций постобработки. Увеличение изображения (upscale) и восстановление лиц уже доступны в интерфейсе. Получите доступ к ним из меню 'Дополнительные параметры' на вкладках 'Текст в изображение' и 'Изображение в изображение'. Обрабатывайте изображения напрямую, используя кнопки действий с изображениями над текущим изображением или в режиме просмотра.", - "postProcessDesc2": "В ближайшее время будет выпущен специальный интерфейс для более продвинутых процессов постобработки.", - "postProcessDesc3": "Интерфейс командной строки Invoke AI предлагает различные другие функции, включая Embiggen.", - "training": "Обучение", - "trainingDesc1": "Специальный интерфейс для обучения собственных моделей с использованием Textual Inversion и Dreambooth.", - "trainingDesc2": "InvokeAI уже поддерживает обучение моделей с помощью TI, через интерфейс командной строки.", - "upload": "Загрузить", - "close": "Закрыть", - "load": "Загрузить", - "statusConnected": "Подключен", - "statusDisconnected": "Отключен", - "statusError": "Ошибка", - "statusPreparing": "Подготовка", - "statusProcessingCanceled": "Обработка прервана", - "statusProcessingComplete": "Обработка завершена", - "statusGenerating": "Генерация", - "statusGeneratingTextToImage": "Создаем изображение из текста", - "statusGeneratingImageToImage": "Создаем изображение из изображения", - "statusGeneratingInpainting": "Дополняем внутри", - "statusGeneratingOutpainting": "Дорисовываем снаружи", - "statusGenerationComplete": "Генерация завершена", - "statusIterationComplete": "Итерация завершена", - "statusSavingImage": "Сохранение изображения", - "statusRestoringFaces": "Восстановление лиц", - "statusRestoringFacesGFPGAN": "Восстановление лиц (GFPGAN)", - "statusRestoringFacesCodeFormer": "Восстановление лиц (CodeFormer)", - "statusUpscaling": "Увеличение", - "statusUpscalingESRGAN": "Увеличение (ESRGAN)", - "statusLoadingModel": "Загрузка модели", - "statusModelChanged": "Модель изменена", - "githubLabel": "Github", - "discordLabel": "Discord", - "statusMergingModels": "Слияние моделей", - "statusModelConverted": "Модель сконвертирована", - "statusMergedModels": "Модели объединены", - "loading": "Загрузка", - "loadingInvokeAI": "Загрузка Invoke AI", - "back": "Назад", - "statusConvertingModel": "Конвертация модели", - "cancel": "Отменить", - "accept": "Принять", - "langUkranian": "Украинский", - "langEnglish": "Английский", - "postprocessing": "Постобработка", - "langArabic": "Арабский", - "langSpanish": "Испанский", - "langSimplifiedChinese": "Китайский (упрощенный)", - "langDutch": "Нидерландский", - "langFrench": "Французский", - "langGerman": "Немецкий", - "langHebrew": "Иврит", - "langItalian": "Итальянский", - "langJapanese": "Японский", - "langKorean": "Корейский", - "langPolish": "Польский", - "langPortuguese": "Португальский", - "txt2img": "Текст в изображение (txt2img)", - "langBrPortuguese": "Португальский (Бразилия)", - "linear": "Линейная обработка", - "dontAskMeAgain": "Больше не спрашивать", - "areYouSure": "Вы уверены?", - "random": "Случайное", - "generate": "Сгенерировать", - "openInNewTab": "Открыть в новой вкладке", - "imagePrompt": "Запрос", - "communityLabel": "Сообщество", - "lightMode": "Светлая тема", - "batch": "Пакетный менеджер", - "modelManager": "Менеджер моделей", - "darkMode": "Темная тема", - "nodeEditor": "Редактор Нодов (Узлов)", - "controlNet": "Controlnet", - "advanced": "Расширенные" - }, - "gallery": { - "generations": "Генерации", - "showGenerations": "Показывать генерации", - "uploads": "Загрузки", - "showUploads": "Показывать загрузки", - "galleryImageSize": "Размер изображений", - "galleryImageResetSize": "Размер по умолчанию", - "gallerySettings": "Настройка галереи", - "maintainAspectRatio": "Сохранять пропорции", - "autoSwitchNewImages": "Автоматически выбирать новые", - "singleColumnLayout": "Одна колонка", - "allImagesLoaded": "Все изображения загружены", - "loadMore": "Показать больше", - "noImagesInGallery": "Изображений нет", - "deleteImagePermanent": "Удаленные изображения невозможно восстановить.", - "deleteImageBin": "Удаленные изображения будут отправлены в корзину вашей операционной системы.", - "deleteImage": "Удалить изображение", - "images": "Изображения", - "assets": "Ресурсы", - "autoAssignBoardOnClick": "Авто-назначение доски по клику" - }, - "hotkeys": { - "keyboardShortcuts": "Горячие клавиши", - "appHotkeys": "Горячие клавиши приложения", - "generalHotkeys": "Общие горячие клавиши", - "galleryHotkeys": "Горячие клавиши галереи", - "unifiedCanvasHotkeys": "Горячие клавиши Единого холста", - "invoke": { - "title": "Invoke", - "desc": "Сгенерировать изображение" - }, - "cancel": { - "title": "Отменить", - "desc": "Отменить генерацию изображения" - }, - "focusPrompt": { - "title": "Переключиться на ввод запроса", - "desc": "Переключение на область ввода запроса" - }, - "toggleOptions": { - "title": "Показать/скрыть параметры", - "desc": "Открывать и закрывать панель параметров" - }, - "pinOptions": { - "title": "Закрепить параметры", - "desc": "Закрепить панель параметров" - }, - "toggleViewer": { - "title": "Показать просмотр", - "desc": "Открывать и закрывать просмотрщик изображений" - }, - "toggleGallery": { - "title": "Показать галерею", - "desc": "Открывать и закрывать ящик галереи" - }, - "maximizeWorkSpace": { - "title": "Максимизировать рабочее пространство", - "desc": "Скрыть панели и максимизировать рабочую область" - }, - "changeTabs": { - "title": "Переключить вкладку", - "desc": "Переключиться на другую рабочую область" - }, - "consoleToggle": { - "title": "Показать консоль", - "desc": "Открывать и закрывать консоль" - }, - "setPrompt": { - "title": "Использовать запрос", - "desc": "Использовать запрос из текущего изображения" - }, - "setSeed": { - "title": "Использовать сид", - "desc": "Использовать сид текущего изображения" - }, - "setParameters": { - "title": "Использовать все параметры", - "desc": "Использовать все параметры текущего изображения" - }, - "restoreFaces": { - "title": "Восстановить лица", - "desc": "Восстановить лица на текущем изображении" - }, - "upscale": { - "title": "Увеличение", - "desc": "Увеличить текущеее изображение" - }, - "showInfo": { - "title": "Показать метаданные", - "desc": "Показать метаданные из текущего изображения" - }, - "sendToImageToImage": { - "title": "Отправить в img2img", - "desc": "Отправить текущее изображение в Image To Image" - }, - "deleteImage": { - "title": "Удалить изображение", - "desc": "Удалить текущее изображение" - }, - "closePanels": { - "title": "Закрыть панели", - "desc": "Закрывает открытые панели" - }, - "previousImage": { - "title": "Предыдущее изображение", - "desc": "Отображать предыдущее изображение в галерее" - }, - "nextImage": { - "title": "Следующее изображение", - "desc": "Отображение следующего изображения в галерее" - }, - "toggleGalleryPin": { - "title": "Закрепить галерею", - "desc": "Закрепляет и открепляет галерею" - }, - "increaseGalleryThumbSize": { - "title": "Увеличить размер миниатюр галереи", - "desc": "Увеличивает размер миниатюр галереи" - }, - "decreaseGalleryThumbSize": { - "title": "Уменьшает размер миниатюр галереи", - "desc": "Уменьшает размер миниатюр галереи" - }, - "selectBrush": { - "title": "Выбрать кисть", - "desc": "Выбирает кисть для холста" - }, - "selectEraser": { - "title": "Выбрать ластик", - "desc": "Выбирает ластик для холста" - }, - "decreaseBrushSize": { - "title": "Уменьшить размер кисти", - "desc": "Уменьшает размер кисти/ластика холста" - }, - "increaseBrushSize": { - "title": "Увеличить размер кисти", - "desc": "Увеличивает размер кисти/ластика холста" - }, - "decreaseBrushOpacity": { - "title": "Уменьшить непрозрачность кисти", - "desc": "Уменьшает непрозрачность кисти холста" - }, - "increaseBrushOpacity": { - "title": "Увеличить непрозрачность кисти", - "desc": "Увеличивает непрозрачность кисти холста" - }, - "moveTool": { - "title": "Инструмент перемещения", - "desc": "Позволяет перемещаться по холсту" - }, - "fillBoundingBox": { - "title": "Заполнить ограничивающую рамку", - "desc": "Заполняет ограничивающую рамку цветом кисти" - }, - "eraseBoundingBox": { - "title": "Стереть ограничивающую рамку", - "desc": "Стирает область ограничивающей рамки" - }, - "colorPicker": { - "title": "Выбрать цвет", - "desc": "Выбирает средство выбора цвета холста" - }, - "toggleSnap": { - "title": "Включить привязку", - "desc": "Включает/выключает привязку к сетке" - }, - "quickToggleMove": { - "title": "Быстрое переключение перемещения", - "desc": "Временно переключает режим перемещения" - }, - "toggleLayer": { - "title": "Переключить слой", - "desc": "Переключение маски/базового слоя" - }, - "clearMask": { - "title": "Очистить маску", - "desc": "Очистить всю маску" - }, - "hideMask": { - "title": "Скрыть маску", - "desc": "Скрывает/показывает маску" - }, - "showHideBoundingBox": { - "title": "Показать/скрыть ограничивающую рамку", - "desc": "Переключить видимость ограничивающей рамки" - }, - "mergeVisible": { - "title": "Объединить видимые", - "desc": "Объединить все видимые слои холста" - }, - "saveToGallery": { - "title": "Сохранить в галерею", - "desc": "Сохранить текущий холст в галерею" - }, - "copyToClipboard": { - "title": "Копировать в буфер обмена", - "desc": "Копировать текущий холст в буфер обмена" - }, - "downloadImage": { - "title": "Скачать изображение", - "desc": "Скачать содержимое холста" - }, - "undoStroke": { - "title": "Отменить кисть", - "desc": "Отменить мазок кисти" - }, - "redoStroke": { - "title": "Повторить кисть", - "desc": "Повторить мазок кисти" - }, - "resetView": { - "title": "Вид по умолчанию", - "desc": "Сбросить вид холста" - }, - "previousStagingImage": { - "title": "Предыдущее изображение", - "desc": "Предыдущая область изображения" - }, - "nextStagingImage": { - "title": "Следующее изображение", - "desc": "Следующая область изображения" - }, - "acceptStagingImage": { - "title": "Принять изображение", - "desc": "Принять текущее изображение" - }, - "addNodes": { - "desc": "Открывает меню добавления узла", - "title": "Добавление узлов" - }, - "nodesHotkeys": "Горячие клавиши узлов" - }, - "modelManager": { - "modelManager": "Менеджер моделей", - "model": "Модель", - "modelAdded": "Модель добавлена", - "modelUpdated": "Модель обновлена", - "modelEntryDeleted": "Запись о модели удалена", - "cannotUseSpaces": "Нельзя использовать пробелы", - "addNew": "Добавить новую", - "addNewModel": "Добавить новую модель", - "addManually": "Добавить вручную", - "manual": "Ручное", - "name": "Название", - "nameValidationMsg": "Введите название модели", - "description": "Описание", - "descriptionValidationMsg": "Введите описание модели", - "config": "Файл конфигурации", - "configValidationMsg": "Путь до файла конфигурации.", - "modelLocation": "Расположение модели", - "modelLocationValidationMsg": "Путь до файла с моделью.", - "vaeLocation": "Расположение VAE", - "vaeLocationValidationMsg": "Путь до файла VAE.", - "width": "Ширина", - "widthValidationMsg": "Исходная ширина изображений модели.", - "height": "Высота", - "heightValidationMsg": "Исходная высота изображений модели.", - "addModel": "Добавить модель", - "updateModel": "Обновить модель", - "availableModels": "Доступные модели", - "search": "Искать", - "load": "Загрузить", - "active": "активна", - "notLoaded": "не загружена", - "cached": "кэширована", - "checkpointFolder": "Папка с моделями", - "clearCheckpointFolder": "Очистить папку с моделями", - "findModels": "Найти модели", - "scanAgain": "Сканировать снова", - "modelsFound": "Найденные модели", - "selectFolder": "Выбрать папку", - "selected": "Выбраны", - "selectAll": "Выбрать все", - "deselectAll": "Снять выделение", - "showExisting": "Показывать добавленные", - "addSelected": "Добавить выбранные", - "modelExists": "Модель уже добавлена", - "selectAndAdd": "Выберите и добавьте модели из списка", - "noModelsFound": "Модели не найдены", - "delete": "Удалить", - "deleteModel": "Удалить модель", - "deleteConfig": "Удалить конфигурацию", - "deleteMsg1": "Вы точно хотите удалить модель из InvokeAI?", - "deleteMsg2": "Это приведет К УДАЛЕНИЮ модели С ДИСКА, если она находится в корневой папке Invoke. Если вы используете пользовательское расположение, то модель НЕ будет удалена с диска.", - "repoIDValidationMsg": "Онлайн-репозиторий модели", - "convertToDiffusersHelpText5": "Пожалуйста, убедитесь, что у вас достаточно места на диске. Модели обычно занимают 2–7 Гб.", - "invokeAIFolder": "Каталог InvokeAI", - "ignoreMismatch": "Игнорировать несоответствия между выбранными моделями", - "addCheckpointModel": "Добавить модель Checkpoint/Safetensor", - "formMessageDiffusersModelLocationDesc": "Укажите хотя бы одно.", - "convertToDiffusersHelpText3": "Ваш файл контрольной точки НА ДИСКЕ будет УДАЛЕН, если он находится в корневой папке InvokeAI. Если он находится в пользовательском расположении, то он НЕ будет удален.", - "vaeRepoID": "ID репозитория VAE", - "mergedModelName": "Название объединенной модели", - "checkpointModels": "Checkpoints", - "allModels": "Все модели", - "addDiffuserModel": "Добавить Diffusers", - "repo_id": "ID репозитория", - "formMessageDiffusersVAELocationDesc": "Если не указано, InvokeAI будет искать файл VAE рядом с моделью.", - "convert": "Преобразовать", - "convertToDiffusers": "Преобразовать в Diffusers", - "convertToDiffusersHelpText1": "Модель будет преобразована в формат 🧨 Diffusers.", - "convertToDiffusersHelpText4": "Это единоразовое действие. Оно может занять 30—60 секунд в зависимости от характеристик вашего компьютера.", - "convertToDiffusersHelpText6": "Вы хотите преобразовать эту модель?", - "statusConverting": "Преобразование", - "modelConverted": "Модель преобразована", - "invokeRoot": "Каталог InvokeAI", - "modelsMerged": "Модели объединены", - "mergeModels": "Объединить модели", - "scanForModels": "Просканировать модели", - "sigmoid": "Сигмоид", - "formMessageDiffusersModelLocation": "Расположение Diffusers-модели", - "modelThree": "Модель 3", - "modelMergeHeaderHelp2": "Только Diffusers-модели доступны для объединения. Если вы хотите объединить checkpoint-модели, сначала преобразуйте их в Diffusers.", - "pickModelType": "Выбрать тип модели", - "formMessageDiffusersVAELocation": "Расположение VAE", - "v1": "v1", - "convertToDiffusersSaveLocation": "Путь сохранения", - "customSaveLocation": "Пользовательский путь сохранения", - "alpha": "Альфа", - "diffusersModels": "Diffusers", - "customConfig": "Пользовательский конфиг", - "pathToCustomConfig": "Путь к пользовательскому конфигу", - "inpainting": "v1 Inpainting", - "sameFolder": "В ту же папку", - "modelOne": "Модель 1", - "mergedModelCustomSaveLocation": "Пользовательский путь", - "none": "пусто", - "addDifference": "Добавить разницу", - "vaeRepoIDValidationMsg": "Онлайн репозиторий VAE", - "convertToDiffusersHelpText2": "Этот процесс заменит вашу запись в Model Manager на версию той же модели в Diffusers.", - "custom": "Пользовательский", - "modelTwo": "Модель 2", - "mergedModelSaveLocation": "Путь сохранения", - "merge": "Объединить", - "interpolationType": "Тип интерполяции", - "modelMergeInterpAddDifferenceHelp": "В этом режиме Модель 3 сначала вычитается из Модели 2. Результирующая версия смешивается с Моделью 1 с установленным выше коэффициентом Альфа.", - "modelMergeHeaderHelp1": "Вы можете объединить до трех разных моделей, чтобы создать смешанную, соответствующую вашим потребностям.", - "modelMergeAlphaHelp": "Альфа влияет на силу смешивания моделей. Более низкие значения альфа приводят к меньшему влиянию второй модели.", - "inverseSigmoid": "Обратный Сигмоид", - "weightedSum": "Взвешенная сумма", - "safetensorModels": "SafeTensors", - "v2_768": "v2 (768px)", - "v2_base": "v2 (512px)", - "modelDeleted": "Модель удалена", - "importModels": "Импорт Моделей", - "variant": "Вариант", - "baseModel": "Базовая модель", - "modelsSynced": "Модели синхронизированы", - "modelSyncFailed": "Не удалось синхронизировать модели", - "vae": "VAE", - "modelDeleteFailed": "Не удалось удалить модель", - "noCustomLocationProvided": "Пользовательское местоположение не указано", - "convertingModelBegin": "Конвертация модели. Пожалуйста, подождите.", - "settings": "Настройки", - "selectModel": "Выберите модель", - "syncModels": "Синхронизация моделей", - "syncModelsDesc": "Если ваши модели не синхронизированы с серверной частью, вы можете обновить их, используя эту опцию. Обычно это удобно в тех случаях, когда вы вручную обновляете свой файл \"models.yaml\" или добавляете модели в корневую папку InvokeAI после загрузки приложения.", - "modelUpdateFailed": "Не удалось обновить модель", - "modelConversionFailed": "Не удалось сконвертировать модель", - "modelsMergeFailed": "Не удалось выполнить слияние моделей", - "loraModels": "LoRAs", - "onnxModels": "Onnx", - "oliveModels": "Olives" - }, - "parameters": { - "images": "Изображения", - "steps": "Шаги", - "cfgScale": "Уровень CFG", - "width": "Ширина", - "height": "Высота", - "seed": "Сид", - "randomizeSeed": "Случайный сид", - "shuffle": "Обновить сид", - "noiseThreshold": "Порог шума", - "perlinNoise": "Шум Перлина", - "variations": "Вариации", - "variationAmount": "Кол-во вариаций", - "seedWeights": "Вес сида", - "faceRestoration": "Восстановление лиц", - "restoreFaces": "Восстановить лица", - "type": "Тип", - "strength": "Сила", - "upscaling": "Увеличение", - "upscale": "Увеличить", - "upscaleImage": "Увеличить изображение", - "scale": "Масштаб", - "otherOptions": "Другие параметры", - "seamlessTiling": "Бесшовный узор", - "hiresOptim": "Оптимизация High Res", - "imageFit": "Уместить изображение", - "codeformerFidelity": "Точность", - "scaleBeforeProcessing": "Масштабировать", - "scaledWidth": "Масштаб Ш", - "scaledHeight": "Масштаб В", - "infillMethod": "Способ заполнения", - "tileSize": "Размер области", - "boundingBoxHeader": "Ограничивающая рамка", - "seamCorrectionHeader": "Настройка шва", - "infillScalingHeader": "Заполнение и масштабирование", - "img2imgStrength": "Сила обработки img2img", - "toggleLoopback": "Зациклить обработку", - "sendTo": "Отправить", - "sendToImg2Img": "Отправить в img2img", - "sendToUnifiedCanvas": "Отправить на Единый холст", - "copyImageToLink": "Скопировать ссылку", - "downloadImage": "Скачать", - "openInViewer": "Открыть в просмотрщике", - "closeViewer": "Закрыть просмотрщик", - "usePrompt": "Использовать запрос", - "useSeed": "Использовать сид", - "useAll": "Использовать все", - "useInitImg": "Использовать как исходное", - "info": "Метаданные", - "initialImage": "Исходное изображение", - "showOptionsPanel": "Показать панель настроек", - "vSymmetryStep": "Шаг верт. симметрии", - "cancel": { - "immediate": "Отменить немедленно", - "schedule": "Отменить после текущей итерации", - "isScheduled": "Отмена", - "setType": "Установить тип отмены" - }, - "general": "Основное", - "hiresStrength": "Сила High Res", - "symmetry": "Симметрия", - "hSymmetryStep": "Шаг гор. симметрии", - "hidePreview": "Скрыть предпросмотр", - "imageToImage": "Изображение в изображение", - "denoisingStrength": "Сила шумоподавления", - "copyImage": "Скопировать изображение", - "showPreview": "Показать предпросмотр", - "noiseSettings": "Шум", - "seamlessXAxis": "Ось X", - "seamlessYAxis": "Ось Y", - "scheduler": "Планировщик", - "boundingBoxWidth": "Ширина ограничивающей рамки", - "boundingBoxHeight": "Высота ограничивающей рамки", - "positivePromptPlaceholder": "Запрос", - "negativePromptPlaceholder": "Исключающий запрос", - "controlNetControlMode": "Режим управления", - "clipSkip": "CLIP Пропуск", - "aspectRatio": "Соотношение", - "maskAdjustmentsHeader": "Настройка маски", - "maskBlur": "Размытие", - "maskBlurMethod": "Метод размытия", - "seamLowThreshold": "Низкий", - "seamHighThreshold": "Высокий", - "coherenceSteps": "Шагов", - "coherencePassHeader": "Порог Coherence", - "coherenceStrength": "Сила", - "compositingSettingsHeader": "Настройки компоновки" - }, - "settings": { - "models": "Модели", - "displayInProgress": "Показывать процесс генерации", - "saveSteps": "Сохранять каждые n щагов", - "confirmOnDelete": "Подтверждать удаление", - "displayHelpIcons": "Показывать значки подсказок", - "enableImageDebugging": "Включить отладку", - "resetWebUI": "Сброс настроек Web UI", - "resetWebUIDesc1": "Сброс настроек веб-интерфейса удаляет только локальный кэш браузера с вашими изображениями и настройками. Он не удаляет изображения с диска.", - "resetWebUIDesc2": "Если изображения не отображаются в галерее или не работает что-то еще, пожалуйста, попробуйте сбросить настройки, прежде чем сообщать о проблеме на GitHub.", - "resetComplete": "Настройки веб-интерфейса были сброшены.", - "useSlidersForAll": "Использовать ползунки для всех параметров", - "consoleLogLevel": "Уровень логирования", - "shouldLogToConsole": "Логи в консоль", - "developer": "Разработчик", - "general": "Основное", - "showProgressInViewer": "Показывать процесс генерации в Просмотрщике", - "antialiasProgressImages": "Сглаживать предпоказ процесса генерации", - "generation": "Поколение", - "ui": "Пользовательский интерфейс", - "favoriteSchedulers": "Избранные планировщики", - "favoriteSchedulersPlaceholder": "Нет избранных планировщиков", - "enableNodesEditor": "Включить редактор узлов", - "experimental": "Экспериментальные", - "beta": "Бета", - "alternateCanvasLayout": "Альтернативный слой холста", - "showAdvancedOptions": "Показать доп. параметры", - "autoChangeDimensions": "Обновить Ш/В на стандартные для модели при изменении" - }, - "toast": { - "tempFoldersEmptied": "Временная папка очищена", - "uploadFailed": "Загрузка не удалась", - "uploadFailedUnableToLoadDesc": "Невозможно загрузить файл", - "downloadImageStarted": "Скачивание изображения началось", - "imageCopied": "Изображение скопировано", - "imageLinkCopied": "Ссылка на изображение скопирована", - "imageNotLoaded": "Изображение не загружено", - "imageNotLoadedDesc": "Не удалось найти изображение", - "imageSavedToGallery": "Изображение сохранено в галерею", - "canvasMerged": "Холст объединен", - "sentToImageToImage": "Отправить в img2img", - "sentToUnifiedCanvas": "Отправлено на Единый холст", - "parametersSet": "Параметры заданы", - "parametersNotSet": "Параметры не заданы", - "parametersNotSetDesc": "Не найдены метаданные изображения.", - "parametersFailed": "Проблема с загрузкой параметров", - "parametersFailedDesc": "Невозможно загрузить исходное изображение.", - "seedSet": "Сид задан", - "seedNotSet": "Сид не задан", - "seedNotSetDesc": "Не удалось найти сид для изображения.", - "promptSet": "Запрос задан", - "promptNotSet": "Запрос не задан", - "promptNotSetDesc": "Не удалось найти запрос для изображения.", - "upscalingFailed": "Увеличение не удалось", - "faceRestoreFailed": "Восстановление лиц не удалось", - "metadataLoadFailed": "Не удалось загрузить метаданные", - "initialImageSet": "Исходное изображение задано", - "initialImageNotSet": "Исходное изображение не задано", - "initialImageNotSetDesc": "Не получилось загрузить исходное изображение", - "serverError": "Ошибка сервера", - "disconnected": "Отключено от сервера", - "connected": "Подключено к серверу", - "canceled": "Обработка отменена", - "problemCopyingImageLink": "Не удалось скопировать ссылку на изображение", - "uploadFailedInvalidUploadDesc": "Должно быть одно изображение в формате PNG или JPEG", - "parameterNotSet": "Параметр не задан", - "parameterSet": "Параметр задан", - "nodesLoaded": "Узлы загружены", - "problemCopyingImage": "Не удается скопировать изображение", - "nodesLoadedFailed": "Не удалось загрузить Узлы", - "nodesCleared": "Узлы очищены", - "nodesBrokenConnections": "Не удается загрузить. Некоторые соединения повреждены.", - "nodesUnrecognizedTypes": "Не удается загрузить. Граф имеет нераспознанные типы", - "nodesNotValidJSON": "Недопустимый JSON", - "nodesCorruptedGraph": "Не удается загрузить. Граф, похоже, поврежден.", - "nodesSaved": "Узлы сохранены", - "nodesNotValidGraph": "Недопустимый граф узлов InvokeAI" - }, - "tooltip": { - "feature": { - "prompt": "Это поле для текста запроса, включая объекты генерации и стилистические термины. В запрос можно включить и коэффициенты веса (значимости токена), но консольные команды и параметры не будут работать.", - "gallery": "Здесь отображаются генерации из папки outputs по мере их появления.", - "other": "Эти опции включают альтернативные режимы обработки для Invoke. 'Бесшовный узор' создаст повторяющиеся узоры на выходе. 'Высокое разрешение' это генерация в два этапа с помощью img2img: используйте эту настройку, когда хотите получить цельное изображение большего размера без артефактов.", - "seed": "Значение сида влияет на начальный шум, из которого сформируется изображение. Можно использовать уже имеющийся сид из предыдущих изображений. 'Порог шума' используется для смягчения артефактов при высоких значениях CFG (попробуйте в диапазоне 0-10), а Перлин для добавления шума Перлина в процессе генерации: оба параметра служат для большей вариативности результатов.", - "variations": "Попробуйте вариацию со значением от 0.1 до 1.0, чтобы изменить результат для заданного сида. Интересные вариации сида находятся между 0.1 и 0.3.", - "upscale": "Используйте ESRGAN, чтобы увеличить изображение сразу после генерации.", - "faceCorrection": "Коррекция лиц с помощью GFPGAN или Codeformer: алгоритм определяет лица в готовом изображении и исправляет любые дефекты. Высокие значение силы меняет изображение сильнее, в результате лица будут выглядеть привлекательнее. У Codeformer более высокая точность сохранит исходное изображение в ущерб коррекции лица.", - "imageToImage": "'Изображение в изображение' загружает любое изображение, которое затем используется для генерации вместе с запросом. Чем больше значение, тем сильнее изменится изображение в результате. Возможны значения от 0 до 1, рекомендуется диапазон .25-.75", - "boundingBox": "'Ограничительная рамка' аналогична настройкам Ширина и Высота для 'Избражения из текста' или 'Изображения в изображение'. Будет обработана только область в рамке.", - "seamCorrection": "Управление обработкой видимых швов, возникающих между изображениями на холсте.", - "infillAndScaling": "Управление методами заполнения (используется для масок или стертых областей холста) и масштабирования (полезно для малых размеров ограничивающей рамки)." - } - }, - "unifiedCanvas": { - "layer": "Слой", - "base": "Базовый", - "mask": "Маска", - "maskingOptions": "Параметры маски", - "enableMask": "Включить маску", - "preserveMaskedArea": "Сохранять маскируемую область", - "clearMask": "Очистить маску", - "brush": "Кисть", - "eraser": "Ластик", - "fillBoundingBox": "Заполнить ограничивающую рамку", - "eraseBoundingBox": "Стереть ограничивающую рамку", - "colorPicker": "Пипетка", - "brushOptions": "Параметры кисти", - "brushSize": "Размер", - "move": "Переместить", - "resetView": "Сбросить вид", - "mergeVisible": "Объединить видимые", - "saveToGallery": "Сохранить в галерею", - "copyToClipboard": "Копировать в буфер обмена", - "downloadAsImage": "Скачать как изображение", - "undo": "Отменить", - "redo": "Повторить", - "clearCanvas": "Очистить холст", - "canvasSettings": "Настройки холста", - "showIntermediates": "Показывать процесс", - "showGrid": "Показать сетку", - "snapToGrid": "Привязать к сетке", - "darkenOutsideSelection": "Затемнить холст снаружи", - "autoSaveToGallery": "Автосохранение в галерее", - "saveBoxRegionOnly": "Сохранять только выделение", - "limitStrokesToBox": "Ограничить штрихи выделением", - "showCanvasDebugInfo": "Показать доп. информацию о холсте", - "clearCanvasHistory": "Очистить историю холста", - "clearHistory": "Очистить историю", - "clearCanvasHistoryMessage": "Очистка истории холста оставляет текущий холст нетронутым, но удаляет историю отмен и повторов.", - "clearCanvasHistoryConfirm": "Вы уверены, что хотите очистить историю холста?", - "emptyTempImageFolder": "Очистить временную папку", - "emptyFolder": "Очистить папку", - "emptyTempImagesFolderMessage": "Очищение папки временных изображений также полностью сбрасывает холст, включая всю историю отмены/повтора, размещаемые изображения и базовый слой холста.", - "emptyTempImagesFolderConfirm": "Вы уверены, что хотите очистить временную папку?", - "activeLayer": "Активный слой", - "canvasScale": "Масштаб холста", - "boundingBox": "Ограничивающая рамка", - "scaledBoundingBox": "Масштабирование рамки", - "boundingBoxPosition": "Позиция ограничивающей рамки", - "canvasDimensions": "Размеры холста", - "canvasPosition": "Положение холста", - "cursorPosition": "Положение курсора", - "previous": "Предыдущее", - "next": "Следующее", - "accept": "Принять", - "showHide": "Показать/Скрыть", - "discardAll": "Отменить все", - "betaClear": "Очистить", - "betaDarkenOutside": "Затемнить снаружи", - "betaLimitToBox": "Ограничить выделением", - "betaPreserveMasked": "Сохранять маскируемую область", - "antialiasing": "Не удалось скопировать ссылку на изображение" - }, - "accessibility": { - "modelSelect": "Выбор модели", - "uploadImage": "Загрузить изображение", - "nextImage": "Следующее изображение", - "previousImage": "Предыдущее изображение", - "zoomIn": "Приблизить", - "zoomOut": "Отдалить", - "rotateClockwise": "Повернуть по часовой стрелке", - "rotateCounterClockwise": "Повернуть против часовой стрелки", - "flipVertically": "Перевернуть вертикально", - "flipHorizontally": "Отразить горизонтально", - "toggleAutoscroll": "Включить автопрокрутку", - "toggleLogViewer": "Показать или скрыть просмотрщик логов", - "showOptionsPanel": "Показать боковую панель", - "invokeProgressBar": "Индикатор выполнения", - "reset": "Сброс", - "modifyConfig": "Изменить конфиг", - "useThisParameter": "Использовать этот параметр", - "copyMetadataJson": "Скопировать метаданные JSON", - "exitViewer": "Закрыть просмотрщик", - "menu": "Меню" - }, - "ui": { - "showProgressImages": "Показывать промежуточный итог", - "hideProgressImages": "Не показывать промежуточный итог", - "swapSizes": "Поменять местами размеры", - "lockRatio": "Зафиксировать пропорции" - }, - "nodes": { - "zoomInNodes": "Увеличьте масштаб", - "zoomOutNodes": "Уменьшите масштаб", - "fitViewportNodes": "Уместить вид", - "hideGraphNodes": "Скрыть оверлей графа", - "showGraphNodes": "Показать оверлей графа", - "showLegendNodes": "Показать тип поля", - "hideMinimapnodes": "Скрыть миникарту", - "hideLegendNodes": "Скрыть тип поля", - "showMinimapnodes": "Показать миникарту", - "loadWorkflow": "Загрузить рабочий процесс", - "resetWorkflowDesc2": "Сброс рабочего процесса очистит все узлы, ребра и детали рабочего процесса.", - "resetWorkflow": "Сбросить рабочий процесс", - "resetWorkflowDesc": "Вы уверены, что хотите сбросить этот рабочий процесс?", - "reloadNodeTemplates": "Перезагрузить шаблоны узлов", - "downloadWorkflow": "Скачать JSON рабочего процесса" - }, - "controlnet": { - "amult": "a_mult", - "contentShuffleDescription": "Перетасовывает содержимое изображения", - "bgth": "bg_th", - "contentShuffle": "Перетасовка содержимого", - "beginEndStepPercent": "Процент начала/конца шага", - "duplicate": "Дублировать", - "balanced": "Сбалансированный", - "f": "F", - "depthMidasDescription": "Генерация карты глубины с использованием Midas", - "control": "Контроль", - "coarse": "Грубость обработки", - "crop": "Обрезка", - "depthMidas": "Глубина (Midas)", - "enableControlnet": "Включить ControlNet", - "detectResolution": "Определить разрешение", - "controlMode": "Режим контроля", - "cannyDescription": "Детектор границ Canny", - "depthZoe": "Глубина (Zoe)", - "autoConfigure": "Автонастройка процессора", - "delete": "Удалить", - "canny": "Canny", - "depthZoeDescription": "Генерация карты глубины с использованием Zoe" - }, - "boards": { - "autoAddBoard": "Авто добавление Доски", - "topMessage": "Эта доска содержит изображения, используемые в следующих функциях:", - "move": "Перемещение", - "menuItemAutoAdd": "Авто добавление на эту доску", - "myBoard": "Моя Доска", - "searchBoard": "Поиск Доски...", - "noMatching": "Нет подходящих Досок", - "selectBoard": "Выбрать Доску", - "cancel": "Отменить", - "addBoard": "Добавить Доску", - "bottomMessage": "Удаление этой доски и ее изображений приведет к сбросу всех функций, использующихся их в данный момент.", - "uncategorized": "Без категории", - "changeBoard": "Изменить Доску", - "loading": "Загрузка...", - "clearSearch": "Очистить поиск" - } -} diff --git a/invokeai/frontend/web/dist/locales/sv.json b/invokeai/frontend/web/dist/locales/sv.json deleted file mode 100644 index eef46c4513..0000000000 --- a/invokeai/frontend/web/dist/locales/sv.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "accessibility": { - "copyMetadataJson": "Kopiera metadata JSON", - "zoomIn": "Zooma in", - "exitViewer": "Avslutningsvisare", - "modelSelect": "Välj modell", - "uploadImage": "Ladda upp bild", - "invokeProgressBar": "Invoke förloppsmätare", - "nextImage": "Nästa bild", - "toggleAutoscroll": "Växla automatisk rullning", - "flipHorizontally": "Vänd vågrätt", - "flipVertically": "Vänd lodrätt", - "zoomOut": "Zooma ut", - "toggleLogViewer": "Växla logvisare", - "reset": "Starta om", - "previousImage": "Föregående bild", - "useThisParameter": "Använd denna parametern", - "rotateCounterClockwise": "Rotera moturs", - "rotateClockwise": "Rotera medurs", - "modifyConfig": "Ändra konfiguration", - "showOptionsPanel": "Visa inställningspanelen" - }, - "common": { - "hotkeysLabel": "Snabbtangenter", - "reportBugLabel": "Rapportera bugg", - "githubLabel": "Github", - "discordLabel": "Discord", - "settingsLabel": "Inställningar", - "langEnglish": "Engelska", - "langDutch": "Nederländska", - "langFrench": "Franska", - "langGerman": "Tyska", - "langItalian": "Italienska", - "langArabic": "العربية", - "langHebrew": "עברית", - "langPolish": "Polski", - "langPortuguese": "Português", - "langBrPortuguese": "Português do Brasil", - "langSimplifiedChinese": "简体中文", - "langJapanese": "日本語", - "langKorean": "한국어", - "langRussian": "Русский", - "unifiedCanvas": "Förenad kanvas", - "nodesDesc": "Ett nodbaserat system för bildgenerering är under utveckling. Håll utkik för uppdateringar om denna fantastiska funktion.", - "langUkranian": "Украї́нська", - "langSpanish": "Español", - "postProcessDesc2": "Ett dedikerat användargränssnitt kommer snart att släppas för att underlätta mer avancerade arbetsflöden av efterbehandling.", - "trainingDesc1": "Ett dedikerat arbetsflöde för träning av dina egna inbäddningar och kontrollpunkter genom Textual Inversion eller Dreambooth från webbgränssnittet.", - "trainingDesc2": "InvokeAI stöder redan träning av anpassade inbäddningar med hjälp av Textual Inversion genom huvudscriptet.", - "upload": "Ladda upp", - "close": "Stäng", - "cancel": "Avbryt", - "accept": "Acceptera", - "statusDisconnected": "Frånkopplad", - "statusGeneratingTextToImage": "Genererar text till bild", - "statusGeneratingImageToImage": "Genererar Bild till bild", - "statusGeneratingInpainting": "Genererar Måla i", - "statusGenerationComplete": "Generering klar", - "statusModelConverted": "Modell konverterad", - "statusMergingModels": "Sammanfogar modeller", - "loading": "Laddar", - "loadingInvokeAI": "Laddar Invoke AI", - "statusRestoringFaces": "Återskapar ansikten", - "languagePickerLabel": "Språkväljare", - "txt2img": "Text till bild", - "nodes": "Noder", - "img2img": "Bild till bild", - "postprocessing": "Efterbehandling", - "postProcessing": "Efterbehandling", - "load": "Ladda", - "training": "Träning", - "postProcessDesc1": "Invoke AI erbjuder ett brett utbud av efterbehandlingsfunktioner. Uppskalning och ansiktsåterställning finns redan tillgängligt i webbgränssnittet. Du kommer åt dem ifrån Avancerade inställningar-menyn under Bild till bild-fliken. Du kan också behandla bilder direkt genom att använda knappen bildåtgärder ovanför nuvarande bild eller i bildvisaren.", - "postProcessDesc3": "Invoke AI's kommandotolk erbjuder många olika funktioner, bland annat \"Förstora\".", - "statusGenerating": "Genererar", - "statusError": "Fel", - "back": "Bakåt", - "statusConnected": "Ansluten", - "statusPreparing": "Förbereder", - "statusProcessingCanceled": "Bearbetning avbruten", - "statusProcessingComplete": "Bearbetning färdig", - "statusGeneratingOutpainting": "Genererar Fyll ut", - "statusIterationComplete": "Itterering klar", - "statusSavingImage": "Sparar bild", - "statusRestoringFacesGFPGAN": "Återskapar ansikten (GFPGAN)", - "statusRestoringFacesCodeFormer": "Återskapar ansikten (CodeFormer)", - "statusUpscaling": "Skala upp", - "statusUpscalingESRGAN": "Uppskalning (ESRGAN)", - "statusModelChanged": "Modell ändrad", - "statusLoadingModel": "Laddar modell", - "statusConvertingModel": "Konverterar modell", - "statusMergedModels": "Modeller sammanfogade" - }, - "gallery": { - "generations": "Generationer", - "showGenerations": "Visa generationer", - "uploads": "Uppladdningar", - "showUploads": "Visa uppladdningar", - "galleryImageSize": "Bildstorlek", - "allImagesLoaded": "Alla bilder laddade", - "loadMore": "Ladda mer", - "galleryImageResetSize": "Återställ storlek", - "gallerySettings": "Galleriinställningar", - "maintainAspectRatio": "Behåll bildförhållande", - "noImagesInGallery": "Inga bilder i galleriet", - "autoSwitchNewImages": "Ändra automatiskt till nya bilder", - "singleColumnLayout": "Enkolumnslayout" - }, - "hotkeys": { - "generalHotkeys": "Allmänna snabbtangenter", - "galleryHotkeys": "Gallerisnabbtangenter", - "unifiedCanvasHotkeys": "Snabbtangenter för sammanslagskanvas", - "invoke": { - "title": "Anropa", - "desc": "Genererar en bild" - }, - "cancel": { - "title": "Avbryt", - "desc": "Avbryt bildgenerering" - }, - "focusPrompt": { - "desc": "Fokusera området för promptinmatning", - "title": "Fokusprompt" - }, - "pinOptions": { - "desc": "Nåla fast alternativpanelen", - "title": "Nåla fast alternativ" - }, - "toggleOptions": { - "title": "Växla inställningar", - "desc": "Öppna och stäng alternativpanelen" - }, - "toggleViewer": { - "title": "Växla visaren", - "desc": "Öppna och stäng bildvisaren" - }, - "toggleGallery": { - "title": "Växla galleri", - "desc": "Öppna eller stäng galleribyrån" - }, - "maximizeWorkSpace": { - "title": "Maximera arbetsyta", - "desc": "Stäng paneler och maximera arbetsyta" - }, - "changeTabs": { - "title": "Växla flik", - "desc": "Byt till en annan arbetsyta" - }, - "consoleToggle": { - "title": "Växla konsol", - "desc": "Öppna och stäng konsol" - }, - "setSeed": { - "desc": "Använd seed för nuvarande bild", - "title": "välj seed" - }, - "setParameters": { - "title": "Välj parametrar", - "desc": "Använd alla parametrar från nuvarande bild" - }, - "setPrompt": { - "desc": "Använd prompt för nuvarande bild", - "title": "Välj prompt" - }, - "restoreFaces": { - "title": "Återskapa ansikten", - "desc": "Återskapa nuvarande bild" - }, - "upscale": { - "title": "Skala upp", - "desc": "Skala upp nuvarande bild" - }, - "showInfo": { - "title": "Visa info", - "desc": "Visa metadata för nuvarande bild" - }, - "sendToImageToImage": { - "title": "Skicka till Bild till bild", - "desc": "Skicka nuvarande bild till Bild till bild" - }, - "deleteImage": { - "title": "Radera bild", - "desc": "Radera nuvarande bild" - }, - "closePanels": { - "title": "Stäng paneler", - "desc": "Stäng öppna paneler" - }, - "previousImage": { - "title": "Föregående bild", - "desc": "Visa föregående bild" - }, - "nextImage": { - "title": "Nästa bild", - "desc": "Visa nästa bild" - }, - "toggleGalleryPin": { - "title": "Växla gallerinål", - "desc": "Nålar fast eller nålar av galleriet i gränssnittet" - }, - "increaseGalleryThumbSize": { - "title": "Förstora galleriets bildstorlek", - "desc": "Förstora miniatyrbildernas storlek" - }, - "decreaseGalleryThumbSize": { - "title": "Minska gelleriets bildstorlek", - "desc": "Minska miniatyrbildernas storlek i galleriet" - }, - "decreaseBrushSize": { - "desc": "Förminska storleken på kanvas- pensel eller suddgummi", - "title": "Minska penselstorlek" - }, - "increaseBrushSize": { - "title": "Öka penselstorlek", - "desc": "Öka stoleken på kanvas- pensel eller suddgummi" - }, - "increaseBrushOpacity": { - "title": "Öka penselns opacitet", - "desc": "Öka opaciteten för kanvaspensel" - }, - "decreaseBrushOpacity": { - "desc": "Minska kanvaspenselns opacitet", - "title": "Minska penselns opacitet" - }, - "moveTool": { - "title": "Flytta", - "desc": "Tillåt kanvasnavigation" - }, - "fillBoundingBox": { - "title": "Fyll ram", - "desc": "Fyller ramen med pensels färg" - }, - "keyboardShortcuts": "Snabbtangenter", - "appHotkeys": "Appsnabbtangenter", - "selectBrush": { - "desc": "Välj kanvaspensel", - "title": "Välj pensel" - }, - "selectEraser": { - "desc": "Välj kanvassuddgummi", - "title": "Välj suddgummi" - }, - "eraseBoundingBox": { - "title": "Ta bort ram" - } - } -} diff --git a/invokeai/frontend/web/dist/locales/tr.json b/invokeai/frontend/web/dist/locales/tr.json deleted file mode 100644 index 0c222eecf7..0000000000 --- a/invokeai/frontend/web/dist/locales/tr.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "accessibility": { - "invokeProgressBar": "Invoke ilerleme durumu", - "nextImage": "Sonraki Resim", - "useThisParameter": "Kullanıcı parametreleri", - "copyMetadataJson": "Metadata verilerini kopyala (JSON)", - "exitViewer": "Görüntüleme Modundan Çık", - "zoomIn": "Yakınlaştır", - "zoomOut": "Uzaklaştır", - "rotateCounterClockwise": "Döndür (Saat yönünün tersine)", - "rotateClockwise": "Döndür (Saat yönünde)", - "flipHorizontally": "Yatay Çevir", - "flipVertically": "Dikey Çevir", - "modifyConfig": "Ayarları Değiştir", - "toggleAutoscroll": "Otomatik kaydırmayı aç/kapat", - "toggleLogViewer": "Günlük Görüntüleyici Aç/Kapa", - "showOptionsPanel": "Ayarlar Panelini Göster", - "modelSelect": "Model Seçin", - "reset": "Sıfırla", - "uploadImage": "Resim Yükle", - "previousImage": "Önceki Resim", - "menu": "Menü" - }, - "common": { - "hotkeysLabel": "Kısayol Tuşları", - "languagePickerLabel": "Dil Seçimi", - "reportBugLabel": "Hata Bildir", - "githubLabel": "Github", - "discordLabel": "Discord", - "settingsLabel": "Ayarlar", - "langArabic": "Arapça", - "langEnglish": "İngilizce", - "langDutch": "Hollandaca", - "langFrench": "Fransızca", - "langGerman": "Almanca", - "langItalian": "İtalyanca", - "langJapanese": "Japonca", - "langPolish": "Lehçe", - "langPortuguese": "Portekizce", - "langBrPortuguese": "Portekizcr (Brezilya)", - "langRussian": "Rusça", - "langSimplifiedChinese": "Çince (Basit)", - "langUkranian": "Ukraynaca", - "langSpanish": "İspanyolca", - "txt2img": "Metinden Resime", - "img2img": "Resimden Metine", - "linear": "Çizgisel", - "nodes": "Düğümler", - "postprocessing": "İşlem Sonrası", - "postProcessing": "İşlem Sonrası", - "postProcessDesc2": "Daha gelişmiş özellikler için ve iş akışını kolaylaştırmak için özel bir kullanıcı arayüzü çok yakında yayınlanacaktır.", - "postProcessDesc3": "Invoke AI komut satırı arayüzü, bir çok yeni özellik sunmaktadır.", - "langKorean": "Korece", - "unifiedCanvas": "Akıllı Tuval", - "nodesDesc": "Görüntülerin oluşturulmasında hazırladığımız yeni bir sistem geliştirme aşamasındadır. Bu harika özellikler ve çok daha fazlası için bizi takip etmeye devam edin.", - "postProcessDesc1": "Invoke AI son kullanıcıya yönelik bir çok özellik sunar. Görüntü kalitesi yükseltme, yüz restorasyonu WebUI üzerinden kullanılabilir. Metinden resime ve resimden metne araçlarına gelişmiş seçenekler menüsünden ulaşabilirsiniz. İsterseniz mevcut görüntü ekranının üzerindeki veya görüntüleyicideki görüntüyü doğrudan düzenleyebilirsiniz." - } -} diff --git a/invokeai/frontend/web/dist/locales/uk.json b/invokeai/frontend/web/dist/locales/uk.json deleted file mode 100644 index a85faee727..0000000000 --- a/invokeai/frontend/web/dist/locales/uk.json +++ /dev/null @@ -1,619 +0,0 @@ -{ - "common": { - "hotkeysLabel": "Гарячi клавіші", - "languagePickerLabel": "Мова", - "reportBugLabel": "Повідомити про помилку", - "settingsLabel": "Налаштування", - "img2img": "Зображення із зображення (img2img)", - "unifiedCanvas": "Універсальне полотно", - "nodes": "Вузли", - "langUkranian": "Украї́нська", - "nodesDesc": "Система генерації зображень на основі нодів (вузлів) вже розробляється. Слідкуйте за новинами про цю чудову функцію.", - "postProcessing": "Постобробка", - "postProcessDesc1": "Invoke AI пропонує широкий спектр функцій постобробки. Збільшення зображення (upscale) та відновлення облич вже доступні в інтерфейсі. Отримайте доступ до них з меню 'Додаткові параметри' на вкладках 'Зображення із тексту' та 'Зображення із зображення'. Обробляйте зображення безпосередньо, використовуючи кнопки дій із зображеннями над поточним зображенням або в режимі перегляду.", - "postProcessDesc2": "Найближчим часом буде випущено спеціальний інтерфейс для більш сучасних процесів постобробки.", - "postProcessDesc3": "Інтерфейс командного рядка Invoke AI пропонує різні інші функції, включаючи збільшення Embiggen.", - "training": "Навчання", - "trainingDesc1": "Спеціальний інтерфейс для навчання власних моделей з використанням Textual Inversion та Dreambooth.", - "trainingDesc2": "InvokeAI вже підтримує навчання моделей за допомогою TI, через інтерфейс командного рядка.", - "upload": "Завантажити", - "close": "Закрити", - "load": "Завантажити", - "statusConnected": "Підключено", - "statusDisconnected": "Відключено", - "statusError": "Помилка", - "statusPreparing": "Підготування", - "statusProcessingCanceled": "Обробка перервана", - "statusProcessingComplete": "Обробка завершена", - "statusGenerating": "Генерація", - "statusGeneratingTextToImage": "Генерація зображення із тексту", - "statusGeneratingImageToImage": "Генерація зображення із зображення", - "statusGeneratingInpainting": "Домальовка всередині", - "statusGeneratingOutpainting": "Домальовка зовні", - "statusGenerationComplete": "Генерація завершена", - "statusIterationComplete": "Iтерація завершена", - "statusSavingImage": "Збереження зображення", - "statusRestoringFaces": "Відновлення облич", - "statusRestoringFacesGFPGAN": "Відновлення облич (GFPGAN)", - "statusRestoringFacesCodeFormer": "Відновлення облич (CodeFormer)", - "statusUpscaling": "Збільшення", - "statusUpscalingESRGAN": "Збільшення (ESRGAN)", - "statusLoadingModel": "Завантаження моделі", - "statusModelChanged": "Модель змінено", - "cancel": "Скасувати", - "accept": "Підтвердити", - "back": "Назад", - "postprocessing": "Постобробка", - "statusModelConverted": "Модель сконвертована", - "statusMergingModels": "Злиття моделей", - "loading": "Завантаження", - "loadingInvokeAI": "Завантаження Invoke AI", - "langHebrew": "Іврит", - "langKorean": "Корейська", - "langPortuguese": "Португальська", - "langArabic": "Арабська", - "langSimplifiedChinese": "Китайська (спрощена)", - "langSpanish": "Іспанська", - "langEnglish": "Англійська", - "langGerman": "Німецька", - "langItalian": "Італійська", - "langJapanese": "Японська", - "langPolish": "Польська", - "langBrPortuguese": "Португальська (Бразилія)", - "langRussian": "Російська", - "githubLabel": "Github", - "txt2img": "Текст в зображення (txt2img)", - "discordLabel": "Discord", - "langDutch": "Голландська", - "langFrench": "Французька", - "statusMergedModels": "Моделі об'єднані", - "statusConvertingModel": "Конвертація моделі", - "linear": "Лінійна обробка" - }, - "gallery": { - "generations": "Генерації", - "showGenerations": "Показувати генерації", - "uploads": "Завантаження", - "showUploads": "Показувати завантаження", - "galleryImageSize": "Розмір зображень", - "galleryImageResetSize": "Аатоматичний розмір", - "gallerySettings": "Налаштування галереї", - "maintainAspectRatio": "Зберігати пропорції", - "autoSwitchNewImages": "Автоматично вибирати нові", - "singleColumnLayout": "Одна колонка", - "allImagesLoaded": "Всі зображення завантажені", - "loadMore": "Завантажити більше", - "noImagesInGallery": "Зображень немає" - }, - "hotkeys": { - "keyboardShortcuts": "Клавіатурні скорочення", - "appHotkeys": "Гарячі клавіші програми", - "generalHotkeys": "Загальні гарячі клавіші", - "galleryHotkeys": "Гарячі клавіші галереї", - "unifiedCanvasHotkeys": "Гарячі клавіші універсального полотна", - "invoke": { - "title": "Invoke", - "desc": "Згенерувати зображення" - }, - "cancel": { - "title": "Скасувати", - "desc": "Скасувати генерацію зображення" - }, - "focusPrompt": { - "title": "Переключитися на введення запиту", - "desc": "Перемикання на область введення запиту" - }, - "toggleOptions": { - "title": "Показати/приховати параметри", - "desc": "Відкривати і закривати панель параметрів" - }, - "pinOptions": { - "title": "Закріпити параметри", - "desc": "Закріпити панель параметрів" - }, - "toggleViewer": { - "title": "Показати перегляд", - "desc": "Відкривати і закривати переглядач зображень" - }, - "toggleGallery": { - "title": "Показати галерею", - "desc": "Відкривати і закривати скриньку галереї" - }, - "maximizeWorkSpace": { - "title": "Максимізувати робочий простір", - "desc": "Приховати панелі і максимізувати робочу область" - }, - "changeTabs": { - "title": "Переключити вкладку", - "desc": "Переключитися на іншу робочу область" - }, - "consoleToggle": { - "title": "Показати консоль", - "desc": "Відкривати і закривати консоль" - }, - "setPrompt": { - "title": "Використовувати запит", - "desc": "Використати запит із поточного зображення" - }, - "setSeed": { - "title": "Використовувати сід", - "desc": "Використовувати сід поточного зображення" - }, - "setParameters": { - "title": "Використовувати всі параметри", - "desc": "Використовувати всі параметри поточного зображення" - }, - "restoreFaces": { - "title": "Відновити обличчя", - "desc": "Відновити обличчя на поточному зображенні" - }, - "upscale": { - "title": "Збільшення", - "desc": "Збільшити поточне зображення" - }, - "showInfo": { - "title": "Показати метадані", - "desc": "Показати метадані з поточного зображення" - }, - "sendToImageToImage": { - "title": "Відправити в img2img", - "desc": "Надіслати поточне зображення в Image To Image" - }, - "deleteImage": { - "title": "Видалити зображення", - "desc": "Видалити поточне зображення" - }, - "closePanels": { - "title": "Закрити панелі", - "desc": "Закриває відкриті панелі" - }, - "previousImage": { - "title": "Попереднє зображення", - "desc": "Відображати попереднє зображення в галереї" - }, - "nextImage": { - "title": "Наступне зображення", - "desc": "Відображення наступного зображення в галереї" - }, - "toggleGalleryPin": { - "title": "Закріпити галерею", - "desc": "Закріплює і відкріплює галерею" - }, - "increaseGalleryThumbSize": { - "title": "Збільшити розмір мініатюр галереї", - "desc": "Збільшує розмір мініатюр галереї" - }, - "decreaseGalleryThumbSize": { - "title": "Зменшує розмір мініатюр галереї", - "desc": "Зменшує розмір мініатюр галереї" - }, - "selectBrush": { - "title": "Вибрати пензель", - "desc": "Вибирає пензель для полотна" - }, - "selectEraser": { - "title": "Вибрати ластик", - "desc": "Вибирає ластик для полотна" - }, - "decreaseBrushSize": { - "title": "Зменшити розмір пензля", - "desc": "Зменшує розмір пензля/ластика полотна" - }, - "increaseBrushSize": { - "title": "Збільшити розмір пензля", - "desc": "Збільшує розмір пензля/ластика полотна" - }, - "decreaseBrushOpacity": { - "title": "Зменшити непрозорість пензля", - "desc": "Зменшує непрозорість пензля полотна" - }, - "increaseBrushOpacity": { - "title": "Збільшити непрозорість пензля", - "desc": "Збільшує непрозорість пензля полотна" - }, - "moveTool": { - "title": "Інструмент переміщення", - "desc": "Дозволяє переміщатися по полотну" - }, - "fillBoundingBox": { - "title": "Заповнити обмежувальну рамку", - "desc": "Заповнює обмежувальну рамку кольором пензля" - }, - "eraseBoundingBox": { - "title": "Стерти обмежувальну рамку", - "desc": "Стирає область обмежувальної рамки" - }, - "colorPicker": { - "title": "Вибрати колір", - "desc": "Вибирає засіб вибору кольору полотна" - }, - "toggleSnap": { - "title": "Увімкнути прив'язку", - "desc": "Вмикає/вимикає прив'язку до сітки" - }, - "quickToggleMove": { - "title": "Швидке перемикання переміщення", - "desc": "Тимчасово перемикає режим переміщення" - }, - "toggleLayer": { - "title": "Переключити шар", - "desc": "Перемикання маски/базового шару" - }, - "clearMask": { - "title": "Очистити маску", - "desc": "Очистити всю маску" - }, - "hideMask": { - "title": "Приховати маску", - "desc": "Приховує/показує маску" - }, - "showHideBoundingBox": { - "title": "Показати/приховати обмежувальну рамку", - "desc": "Переключити видимість обмежувальної рамки" - }, - "mergeVisible": { - "title": "Об'єднати видимі", - "desc": "Об'єднати всі видимі шари полотна" - }, - "saveToGallery": { - "title": "Зберегти в галерею", - "desc": "Зберегти поточне полотно в галерею" - }, - "copyToClipboard": { - "title": "Копіювати в буфер обміну", - "desc": "Копіювати поточне полотно в буфер обміну" - }, - "downloadImage": { - "title": "Завантажити зображення", - "desc": "Завантажити вміст полотна" - }, - "undoStroke": { - "title": "Скасувати пензель", - "desc": "Скасувати мазок пензля" - }, - "redoStroke": { - "title": "Повторити мазок пензля", - "desc": "Повторити мазок пензля" - }, - "resetView": { - "title": "Вид за замовчуванням", - "desc": "Скинути вид полотна" - }, - "previousStagingImage": { - "title": "Попереднє зображення", - "desc": "Попереднє зображення" - }, - "nextStagingImage": { - "title": "Наступне зображення", - "desc": "Наступне зображення" - }, - "acceptStagingImage": { - "title": "Прийняти зображення", - "desc": "Прийняти поточне зображення" - } - }, - "modelManager": { - "modelManager": "Менеджер моделей", - "model": "Модель", - "modelAdded": "Модель додана", - "modelUpdated": "Модель оновлена", - "modelEntryDeleted": "Запис про модель видалено", - "cannotUseSpaces": "Не можна використовувати пробіли", - "addNew": "Додати нову", - "addNewModel": "Додати нову модель", - "addManually": "Додати вручну", - "manual": "Ручне", - "name": "Назва", - "nameValidationMsg": "Введіть назву моделі", - "description": "Опис", - "descriptionValidationMsg": "Введіть опис моделі", - "config": "Файл конфігурації", - "configValidationMsg": "Шлях до файлу конфігурації.", - "modelLocation": "Розташування моделі", - "modelLocationValidationMsg": "Шлях до файлу з моделлю.", - "vaeLocation": "Розтышування VAE", - "vaeLocationValidationMsg": "Шлях до VAE.", - "width": "Ширина", - "widthValidationMsg": "Початкова ширина зображень.", - "height": "Висота", - "heightValidationMsg": "Початкова висота зображень.", - "addModel": "Додати модель", - "updateModel": "Оновити модель", - "availableModels": "Доступні моделі", - "search": "Шукати", - "load": "Завантажити", - "active": "активна", - "notLoaded": "не завантажена", - "cached": "кешована", - "checkpointFolder": "Папка з моделями", - "clearCheckpointFolder": "Очистити папку з моделями", - "findModels": "Знайти моделі", - "scanAgain": "Сканувати знову", - "modelsFound": "Знайдені моделі", - "selectFolder": "Обрати папку", - "selected": "Обрані", - "selectAll": "Обрати всі", - "deselectAll": "Зняти выділення", - "showExisting": "Показувати додані", - "addSelected": "Додати обрані", - "modelExists": "Модель вже додана", - "selectAndAdd": "Оберіть і додайте моделі із списку", - "noModelsFound": "Моделі не знайдені", - "delete": "Видалити", - "deleteModel": "Видалити модель", - "deleteConfig": "Видалити конфігурацію", - "deleteMsg1": "Ви точно хочете видалити модель із InvokeAI?", - "deleteMsg2": "Це не призведе до видалення файлу моделі з диску. Позніше ви можете додати його знову.", - "allModels": "Усі моделі", - "diffusersModels": "Diffusers", - "scanForModels": "Сканувати моделі", - "convert": "Конвертувати", - "convertToDiffusers": "Конвертувати в Diffusers", - "formMessageDiffusersVAELocationDesc": "Якщо не надано, InvokeAI буде шукати файл VAE в розташуванні моделі, вказаній вище.", - "convertToDiffusersHelpText3": "Файл моделі на диску НЕ буде видалено або змінено. Ви можете знову додати його в Model Manager, якщо потрібно.", - "customConfig": "Користувальницький конфіг", - "invokeRoot": "Каталог InvokeAI", - "custom": "Користувальницький", - "modelTwo": "Модель 2", - "modelThree": "Модель 3", - "mergedModelName": "Назва об'єднаної моделі", - "alpha": "Альфа", - "interpolationType": "Тип інтерполяції", - "mergedModelSaveLocation": "Шлях збереження", - "mergedModelCustomSaveLocation": "Користувальницький шлях", - "invokeAIFolder": "Каталог InvokeAI", - "ignoreMismatch": "Ігнорувати невідповідності між вибраними моделями", - "modelMergeHeaderHelp2": "Тільки Diffusers-моделі доступні для об'єднання. Якщо ви хочете об'єднати checkpoint-моделі, спочатку перетворіть їх на Diffusers.", - "checkpointModels": "Checkpoints", - "repo_id": "ID репозиторію", - "v2_base": "v2 (512px)", - "repoIDValidationMsg": "Онлайн-репозиторій моделі", - "formMessageDiffusersModelLocationDesc": "Вкажіть хоча б одне.", - "formMessageDiffusersModelLocation": "Шлях до Diffusers-моделі", - "v2_768": "v2 (768px)", - "formMessageDiffusersVAELocation": "Шлях до VAE", - "convertToDiffusersHelpText5": "Переконайтеся, що у вас достатньо місця на диску. Моделі зазвичай займають від 4 до 7 Гб.", - "convertToDiffusersSaveLocation": "Шлях збереження", - "v1": "v1", - "convertToDiffusersHelpText6": "Ви хочете перетворити цю модель?", - "inpainting": "v1 Inpainting", - "modelConverted": "Модель перетворено", - "sameFolder": "У ту ж папку", - "statusConverting": "Перетворення", - "merge": "Об'єднати", - "mergeModels": "Об'єднати моделі", - "modelOne": "Модель 1", - "sigmoid": "Сігмоїд", - "weightedSum": "Зважена сума", - "none": "пусто", - "addDifference": "Додати різницю", - "pickModelType": "Вибрати тип моделі", - "convertToDiffusersHelpText4": "Це одноразова дія. Вона може зайняти від 30 до 60 секунд в залежності від характеристик вашого комп'ютера.", - "pathToCustomConfig": "Шлях до конфігу користувача", - "safetensorModels": "SafeTensors", - "addCheckpointModel": "Додати модель Checkpoint/Safetensor", - "addDiffuserModel": "Додати Diffusers", - "vaeRepoID": "ID репозиторію VAE", - "vaeRepoIDValidationMsg": "Онлайн-репозиторій VAE", - "modelMergeInterpAddDifferenceHelp": "У цьому режимі Модель 3 спочатку віднімається з Моделі 2. Результуюча версія змішується з Моделью 1 із встановленим вище коефіцієнтом Альфа.", - "customSaveLocation": "Користувальницький шлях збереження", - "modelMergeAlphaHelp": "Альфа впливає силу змішування моделей. Нижчі значення альфа призводять до меншого впливу другої моделі.", - "convertToDiffusersHelpText1": "Ця модель буде конвертована в формат 🧨 Diffusers.", - "convertToDiffusersHelpText2": "Цей процес замінить ваш запис в Model Manager на версію тієї ж моделі в Diffusers.", - "modelsMerged": "Моделі об'єднані", - "modelMergeHeaderHelp1": "Ви можете об'єднати до трьох різних моделей, щоб створити змішану, що відповідає вашим потребам.", - "inverseSigmoid": "Зворотній Сігмоїд" - }, - "parameters": { - "images": "Зображення", - "steps": "Кроки", - "cfgScale": "Рівень CFG", - "width": "Ширина", - "height": "Висота", - "seed": "Сід", - "randomizeSeed": "Випадковий сид", - "shuffle": "Оновити", - "noiseThreshold": "Поріг шуму", - "perlinNoise": "Шум Перліна", - "variations": "Варіації", - "variationAmount": "Кількість варіацій", - "seedWeights": "Вага сіду", - "faceRestoration": "Відновлення облич", - "restoreFaces": "Відновити обличчя", - "type": "Тип", - "strength": "Сила", - "upscaling": "Збільшення", - "upscale": "Збільшити", - "upscaleImage": "Збільшити зображення", - "scale": "Масштаб", - "otherOptions": "інші параметри", - "seamlessTiling": "Безшовний узор", - "hiresOptim": "Оптимізація High Res", - "imageFit": "Вмістити зображення", - "codeformerFidelity": "Точність", - "scaleBeforeProcessing": "Масштабувати", - "scaledWidth": "Масштаб Ш", - "scaledHeight": "Масштаб В", - "infillMethod": "Засіб заповнення", - "tileSize": "Розмір області", - "boundingBoxHeader": "Обмежуюча рамка", - "seamCorrectionHeader": "Налаштування шву", - "infillScalingHeader": "Заповнення і масштабування", - "img2imgStrength": "Сила обробки img2img", - "toggleLoopback": "Зациклити обробку", - "sendTo": "Надіслати", - "sendToImg2Img": "Надіслати у img2img", - "sendToUnifiedCanvas": "Надіслати на полотно", - "copyImageToLink": "Скопіювати посилання", - "downloadImage": "Завантажити", - "openInViewer": "Відкрити у переглядачі", - "closeViewer": "Закрити переглядач", - "usePrompt": "Використати запит", - "useSeed": "Використати сід", - "useAll": "Використати все", - "useInitImg": "Використати як початкове", - "info": "Метадані", - "initialImage": "Початкове зображення", - "showOptionsPanel": "Показати панель налаштувань", - "general": "Основне", - "cancel": { - "immediate": "Скасувати негайно", - "schedule": "Скасувати після поточної ітерації", - "isScheduled": "Відміна", - "setType": "Встановити тип скасування" - }, - "vSymmetryStep": "Крок верт. симетрії", - "hiresStrength": "Сила High Res", - "hidePreview": "Сховати попередній перегляд", - "showPreview": "Показати попередній перегляд", - "imageToImage": "Зображення до зображення", - "denoisingStrength": "Сила шумоподавлення", - "copyImage": "Копіювати зображення", - "symmetry": "Симетрія", - "hSymmetryStep": "Крок гор. симетрії" - }, - "settings": { - "models": "Моделі", - "displayInProgress": "Показувати процес генерації", - "saveSteps": "Зберігати кожні n кроків", - "confirmOnDelete": "Підтверджувати видалення", - "displayHelpIcons": "Показувати значки підказок", - "enableImageDebugging": "Увімкнути налагодження", - "resetWebUI": "Повернути початкові", - "resetWebUIDesc1": "Скидання настройок веб-інтерфейсу видаляє лише локальний кеш браузера з вашими зображеннями та налаштуваннями. Це не призводить до видалення зображень з диску.", - "resetWebUIDesc2": "Якщо зображення не відображаються в галереї або не працює ще щось, спробуйте скинути налаштування, перш ніж повідомляти про проблему на GitHub.", - "resetComplete": "Інтерфейс скинуто. Оновіть цю сторінку.", - "useSlidersForAll": "Використовувати повзунки для всіх параметрів" - }, - "toast": { - "tempFoldersEmptied": "Тимчасова папка очищена", - "uploadFailed": "Не вдалося завантажити", - "uploadFailedUnableToLoadDesc": "Неможливо завантажити файл", - "downloadImageStarted": "Завантаження зображення почалося", - "imageCopied": "Зображення скопійоване", - "imageLinkCopied": "Посилання на зображення скопійовано", - "imageNotLoaded": "Зображення не завантажено", - "imageNotLoadedDesc": "Не знайдено зображення для надсилання до img2img", - "imageSavedToGallery": "Зображення збережено в галерею", - "canvasMerged": "Полотно об'єднане", - "sentToImageToImage": "Надіслати до img2img", - "sentToUnifiedCanvas": "Надіслати на полотно", - "parametersSet": "Параметри задані", - "parametersNotSet": "Параметри не задані", - "parametersNotSetDesc": "Не знайдені метадані цього зображення.", - "parametersFailed": "Проблема із завантаженням параметрів", - "parametersFailedDesc": "Неможливо завантажити початкове зображення.", - "seedSet": "Сід заданий", - "seedNotSet": "Сід не заданий", - "seedNotSetDesc": "Не вдалося знайти сід для зображення.", - "promptSet": "Запит заданий", - "promptNotSet": "Запит не заданий", - "promptNotSetDesc": "Не вдалося знайти запит для зображення.", - "upscalingFailed": "Збільшення не вдалося", - "faceRestoreFailed": "Відновлення облич не вдалося", - "metadataLoadFailed": "Не вдалося завантажити метадані", - "initialImageSet": "Початкове зображення задане", - "initialImageNotSet": "Початкове зображення не задане", - "initialImageNotSetDesc": "Не вдалося завантажити початкове зображення", - "serverError": "Помилка сервера", - "disconnected": "Відключено від сервера", - "connected": "Підключено до сервера", - "canceled": "Обробку скасовано" - }, - "tooltip": { - "feature": { - "prompt": "Це поле для тексту запиту, включаючи об'єкти генерації та стилістичні терміни. У запит можна включити і коефіцієнти ваги (значущості токена), але консольні команди та параметри не працюватимуть.", - "gallery": "Тут відображаються генерації з папки outputs у міру їх появи.", - "other": "Ці опції включають альтернативні режими обробки для Invoke. 'Безшовний узор' створить на виході узори, що повторюються. 'Висока роздільна здатність' - це генерація у два етапи за допомогою img2img: використовуйте це налаштування, коли хочете отримати цільне зображення більшого розміру без артефактів.", - "seed": "Значення сіду впливає на початковий шум, з якого сформується зображення. Можна використовувати вже наявний сід із попередніх зображень. 'Поріг шуму' використовується для пом'якшення артефактів при високих значеннях CFG (спробуйте в діапазоні 0-10), а 'Перлін' - для додавання шуму Перліна в процесі генерації: обидва параметри служать для більшої варіативності результатів.", - "variations": "Спробуйте варіацію зі значенням від 0.1 до 1.0, щоб змінити результат для заданого сиду. Цікаві варіації сиду знаходяться між 0.1 і 0.3.", - "upscale": "Використовуйте ESRGAN, щоб збільшити зображення відразу після генерації.", - "faceCorrection": "Корекція облич за допомогою GFPGAN або Codeformer: алгоритм визначає обличчя у готовому зображенні та виправляє будь-які дефекти. Високі значення сили змінюють зображення сильніше, в результаті обличчя будуть виглядати привабливіше. У Codeformer більш висока точність збереже вихідне зображення на шкоду корекції обличчя.", - "imageToImage": "'Зображення до зображення' завантажує будь-яке зображення, яке потім використовується для генерації разом із запитом. Чим більше значення, тим сильніше зміниться зображення в результаті. Можливі значення від 0 до 1, рекомендується діапазон 0.25-0.75", - "boundingBox": "'Обмежуюча рамка' аналогічна налаштуванням 'Ширина' і 'Висота' для 'Зображення з тексту' або 'Зображення до зображення'. Буде оброблена тільки область у рамці.", - "seamCorrection": "Керування обробкою видимих швів, що виникають між зображеннями на полотні.", - "infillAndScaling": "Керування методами заповнення (використовується для масок або стертих частин полотна) та масштабування (корисно для малих розмірів обмежуючої рамки)." - } - }, - "unifiedCanvas": { - "layer": "Шар", - "base": "Базовий", - "mask": "Маска", - "maskingOptions": "Параметри маски", - "enableMask": "Увiмкнути маску", - "preserveMaskedArea": "Зберiгати замасковану область", - "clearMask": "Очистити маску", - "brush": "Пензель", - "eraser": "Гумка", - "fillBoundingBox": "Заповнити обмежуючу рамку", - "eraseBoundingBox": "Стерти обмежуючу рамку", - "colorPicker": "Пiпетка", - "brushOptions": "Параметри пензля", - "brushSize": "Розмiр", - "move": "Перемiстити", - "resetView": "Скинути вигляд", - "mergeVisible": "Об'єднати видимi", - "saveToGallery": "Зберегти до галереї", - "copyToClipboard": "Копiювати до буферу обмiну", - "downloadAsImage": "Завантажити як зображення", - "undo": "Вiдмiнити", - "redo": "Повторити", - "clearCanvas": "Очистити полотно", - "canvasSettings": "Налаштування полотна", - "showIntermediates": "Показувати процес", - "showGrid": "Показувати сiтку", - "snapToGrid": "Прив'язати до сітки", - "darkenOutsideSelection": "Затемнити полотно зовні", - "autoSaveToGallery": "Автозбереження до галереї", - "saveBoxRegionOnly": "Зберiгати тiльки видiлення", - "limitStrokesToBox": "Обмежити штрихи виділенням", - "showCanvasDebugInfo": "Показати дод. інформацію про полотно", - "clearCanvasHistory": "Очистити iсторiю полотна", - "clearHistory": "Очистити iсторiю", - "clearCanvasHistoryMessage": "Очищення історії полотна залишає поточне полотно незайманим, але видаляє історію скасування та повтору.", - "clearCanvasHistoryConfirm": "Ви впевнені, що хочете очистити історію полотна?", - "emptyTempImageFolder": "Очистити тимчасову папку", - "emptyFolder": "Очистити папку", - "emptyTempImagesFolderMessage": "Очищення папки тимчасових зображень також повністю скидає полотно, включаючи всю історію скасування/повтору, зображення та базовий шар полотна, що розміщуються.", - "emptyTempImagesFolderConfirm": "Ви впевнені, що хочете очистити тимчасову папку?", - "activeLayer": "Активний шар", - "canvasScale": "Масштаб полотна", - "boundingBox": "Обмежуюча рамка", - "scaledBoundingBox": "Масштабування рамки", - "boundingBoxPosition": "Позиція обмежуючої рамки", - "canvasDimensions": "Разміри полотна", - "canvasPosition": "Розташування полотна", - "cursorPosition": "Розташування курсора", - "previous": "Попереднє", - "next": "Наступне", - "accept": "Приняти", - "showHide": "Показати/Сховати", - "discardAll": "Відмінити все", - "betaClear": "Очистити", - "betaDarkenOutside": "Затемнити зовні", - "betaLimitToBox": "Обмежити виділенням", - "betaPreserveMasked": "Зберiгати замасковану область" - }, - "accessibility": { - "nextImage": "Наступне зображення", - "modelSelect": "Вибір моделі", - "invokeProgressBar": "Індикатор виконання", - "reset": "Скинути", - "uploadImage": "Завантажити зображення", - "useThisParameter": "Використовувати цей параметр", - "exitViewer": "Вийти з переглядача", - "zoomIn": "Збільшити", - "zoomOut": "Зменшити", - "rotateCounterClockwise": "Обертати проти годинникової стрілки", - "rotateClockwise": "Обертати за годинниковою стрілкою", - "toggleAutoscroll": "Увімкнути автопрокручування", - "toggleLogViewer": "Показати або приховати переглядач журналів", - "previousImage": "Попереднє зображення", - "copyMetadataJson": "Скопіювати метадані JSON", - "flipVertically": "Перевернути по вертикалі", - "flipHorizontally": "Відобразити по горизонталі", - "showOptionsPanel": "Показати опції", - "modifyConfig": "Змінити конфігурацію", - "menu": "Меню" - } -} diff --git a/invokeai/frontend/web/dist/locales/vi.json b/invokeai/frontend/web/dist/locales/vi.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/invokeai/frontend/web/dist/locales/vi.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/invokeai/frontend/web/dist/locales/zh_CN.json b/invokeai/frontend/web/dist/locales/zh_CN.json deleted file mode 100644 index 130fdfb182..0000000000 --- a/invokeai/frontend/web/dist/locales/zh_CN.json +++ /dev/null @@ -1,1519 +0,0 @@ -{ - "common": { - "hotkeysLabel": "快捷键", - "languagePickerLabel": "语言", - "reportBugLabel": "反馈错误", - "settingsLabel": "设置", - "img2img": "图生图", - "unifiedCanvas": "统一画布", - "nodes": "工作流编辑器", - "langSimplifiedChinese": "简体中文", - "nodesDesc": "一个基于节点的图像生成系统目前正在开发中。请持续关注关于这一功能的更新。", - "postProcessing": "后期处理", - "postProcessDesc1": "Invoke AI 提供各种各样的后期处理功能。图像放大和面部修复在网页界面中已经可用。你可以从文生图和图生图页面的高级选项菜单中访问它们。你也可以直接使用图像显示上方或查看器中的图像操作按钮处理图像。", - "postProcessDesc2": "一个专门的界面将很快发布,新的界面能够处理更复杂的后期处理流程。", - "postProcessDesc3": "Invoke AI 命令行界面提供例如 Embiggen 的各种其他功能。", - "training": "训练", - "trainingDesc1": "一个专门用于从 Web UI 使用 Textual Inversion 和 Dreambooth 训练自己的 Embedding 和 checkpoint 的工作流。", - "trainingDesc2": "InvokeAI 已经支持使用主脚本中的 Textual Inversion 来训练自定义 embeddouring。", - "upload": "上传", - "close": "关闭", - "load": "加载", - "statusConnected": "已连接", - "statusDisconnected": "未连接", - "statusError": "错误", - "statusPreparing": "准备中", - "statusProcessingCanceled": "处理已取消", - "statusProcessingComplete": "处理完成", - "statusGenerating": "生成中", - "statusGeneratingTextToImage": "文生图生成中", - "statusGeneratingImageToImage": "图生图生成中", - "statusGeneratingInpainting": "(Inpainting) 内补生成中", - "statusGeneratingOutpainting": "(Outpainting) 外扩生成中", - "statusGenerationComplete": "生成完成", - "statusIterationComplete": "迭代完成", - "statusSavingImage": "图像保存中", - "statusRestoringFaces": "面部修复中", - "statusRestoringFacesGFPGAN": "面部修复中 (GFPGAN)", - "statusRestoringFacesCodeFormer": "面部修复中 (CodeFormer)", - "statusUpscaling": "放大中", - "statusUpscalingESRGAN": "放大中 (ESRGAN)", - "statusLoadingModel": "模型加载中", - "statusModelChanged": "模型已切换", - "accept": "同意", - "cancel": "取消", - "dontAskMeAgain": "不要再次询问", - "areYouSure": "你确认吗?", - "imagePrompt": "图片提示词", - "langKorean": "朝鲜语", - "langPortuguese": "葡萄牙语", - "random": "随机", - "generate": "生成", - "openInNewTab": "在新的标签页打开", - "langUkranian": "乌克兰语", - "back": "返回", - "statusMergedModels": "模型已合并", - "statusConvertingModel": "转换模型中", - "statusModelConverted": "模型转换完成", - "statusMergingModels": "合并模型", - "githubLabel": "GitHub", - "discordLabel": "Discord", - "langPolish": "波兰语", - "langBrPortuguese": "葡萄牙语(巴西)", - "langDutch": "荷兰语", - "langFrench": "法语", - "langRussian": "俄语", - "langGerman": "德语", - "langHebrew": "希伯来语", - "langItalian": "意大利语", - "langJapanese": "日语", - "langSpanish": "西班牙语", - "langEnglish": "英语", - "langArabic": "阿拉伯语", - "txt2img": "文生图", - "postprocessing": "后期处理", - "loading": "加载中", - "loadingInvokeAI": "Invoke AI 加载中", - "linear": "线性的", - "batch": "批次管理器", - "communityLabel": "社区", - "modelManager": "模型管理器", - "nodeEditor": "节点编辑器", - "statusProcessing": "处理中", - "imageFailedToLoad": "无法加载图像", - "lightMode": "浅色模式", - "learnMore": "了解更多", - "darkMode": "深色模式", - "advanced": "高级", - "t2iAdapter": "T2I Adapter", - "ipAdapter": "IP Adapter", - "controlAdapter": "Control Adapter", - "controlNet": "ControlNet", - "on": "开", - "auto": "自动" - }, - "gallery": { - "generations": "生成的图像", - "showGenerations": "显示生成的图像", - "uploads": "上传的图像", - "showUploads": "显示上传的图像", - "galleryImageSize": "预览大小", - "galleryImageResetSize": "重置预览大小", - "gallerySettings": "预览设置", - "maintainAspectRatio": "保持纵横比", - "autoSwitchNewImages": "自动切换到新图像", - "singleColumnLayout": "单列布局", - "allImagesLoaded": "所有图像已加载", - "loadMore": "加载更多", - "noImagesInGallery": "无图像可用于显示", - "deleteImage": "删除图片", - "deleteImageBin": "被删除的图片会发送到你操作系统的回收站。", - "deleteImagePermanent": "删除的图片无法被恢复。", - "images": "图片", - "assets": "素材", - "autoAssignBoardOnClick": "点击后自动分配面板", - "featuresWillReset": "如果您删除该图像,这些功能会立即被重置。", - "loading": "加载中", - "unableToLoad": "无法加载图库", - "currentlyInUse": "该图像目前在以下功能中使用:", - "copy": "复制", - "download": "下载", - "setCurrentImage": "设为当前图像", - "preparingDownload": "准备下载", - "preparingDownloadFailed": "准备下载时出现问题", - "downloadSelection": "下载所选内容" - }, - "hotkeys": { - "keyboardShortcuts": "键盘快捷键", - "appHotkeys": "应用快捷键", - "generalHotkeys": "一般快捷键", - "galleryHotkeys": "图库快捷键", - "unifiedCanvasHotkeys": "统一画布快捷键", - "invoke": { - "title": "Invoke", - "desc": "生成图像" - }, - "cancel": { - "title": "取消", - "desc": "取消图像生成" - }, - "focusPrompt": { - "title": "打开提示词框", - "desc": "打开提示词文本框" - }, - "toggleOptions": { - "title": "切换选项卡", - "desc": "打开或关闭选项浮窗" - }, - "pinOptions": { - "title": "常开选项卡", - "desc": "保持选项浮窗常开" - }, - "toggleViewer": { - "title": "切换图像查看器", - "desc": "打开或关闭图像查看器" - }, - "toggleGallery": { - "title": "切换图库", - "desc": "打开或关闭图库" - }, - "maximizeWorkSpace": { - "title": "工作区最大化", - "desc": "关闭所有浮窗,将工作区域最大化" - }, - "changeTabs": { - "title": "切换选项卡", - "desc": "切换到另一个工作区" - }, - "consoleToggle": { - "title": "切换命令行", - "desc": "打开或关闭命令行" - }, - "setPrompt": { - "title": "使用当前提示词", - "desc": "使用当前图像的提示词" - }, - "setSeed": { - "title": "使用种子", - "desc": "使用当前图像的种子" - }, - "setParameters": { - "title": "使用当前参数", - "desc": "使用当前图像的所有参数" - }, - "restoreFaces": { - "title": "面部修复", - "desc": "对当前图像进行面部修复" - }, - "upscale": { - "title": "放大", - "desc": "对当前图像进行放大" - }, - "showInfo": { - "title": "显示信息", - "desc": "显示当前图像的元数据" - }, - "sendToImageToImage": { - "title": "发送到图生图", - "desc": "发送当前图像到图生图" - }, - "deleteImage": { - "title": "删除图像", - "desc": "删除当前图像" - }, - "closePanels": { - "title": "关闭浮窗", - "desc": "关闭目前打开的浮窗" - }, - "previousImage": { - "title": "上一张图像", - "desc": "显示图库中的上一张图像" - }, - "nextImage": { - "title": "下一张图像", - "desc": "显示图库中的下一张图像" - }, - "toggleGalleryPin": { - "title": "切换图库常开", - "desc": "开关图库在界面中的常开模式" - }, - "increaseGalleryThumbSize": { - "title": "增大预览尺寸", - "desc": "增大图库中预览的尺寸" - }, - "decreaseGalleryThumbSize": { - "title": "缩小预览尺寸", - "desc": "缩小图库中预览的尺寸" - }, - "selectBrush": { - "title": "选择刷子", - "desc": "选择统一画布上的刷子" - }, - "selectEraser": { - "title": "选择橡皮擦", - "desc": "选择统一画布上的橡皮擦" - }, - "decreaseBrushSize": { - "title": "减小刷子大小", - "desc": "减小统一画布上的刷子或橡皮擦的大小" - }, - "increaseBrushSize": { - "title": "增大刷子大小", - "desc": "增大统一画布上的刷子或橡皮擦的大小" - }, - "decreaseBrushOpacity": { - "title": "减小刷子不透明度", - "desc": "减小统一画布上的刷子的不透明度" - }, - "increaseBrushOpacity": { - "title": "增大刷子不透明度", - "desc": "增大统一画布上的刷子的不透明度" - }, - "moveTool": { - "title": "移动工具", - "desc": "画布允许导航" - }, - "fillBoundingBox": { - "title": "填充选择区域", - "desc": "在选择区域中填充刷子颜色" - }, - "eraseBoundingBox": { - "title": "擦除选择框", - "desc": "将选择区域擦除" - }, - "colorPicker": { - "title": "选择颜色拾取工具", - "desc": "选择画布颜色拾取工具" - }, - "toggleSnap": { - "title": "切换网格对齐", - "desc": "打开或关闭网格对齐" - }, - "quickToggleMove": { - "title": "快速切换移动模式", - "desc": "临时性地切换移动模式" - }, - "toggleLayer": { - "title": "切换图层", - "desc": "切换遮罩/基础层的选择" - }, - "clearMask": { - "title": "清除遮罩", - "desc": "清除整个遮罩" - }, - "hideMask": { - "title": "隐藏遮罩", - "desc": "隐藏或显示遮罩" - }, - "showHideBoundingBox": { - "title": "显示/隐藏框选区", - "desc": "切换框选区的的显示状态" - }, - "mergeVisible": { - "title": "合并可见层", - "desc": "将画板上可见层合并" - }, - "saveToGallery": { - "title": "保存至图库", - "desc": "将画布当前内容保存至图库" - }, - "copyToClipboard": { - "title": "复制到剪贴板", - "desc": "将画板当前内容复制到剪贴板" - }, - "downloadImage": { - "title": "下载图像", - "desc": "下载画板当前内容" - }, - "undoStroke": { - "title": "撤销画笔", - "desc": "撤销上一笔刷子的动作" - }, - "redoStroke": { - "title": "重做画笔", - "desc": "重做上一笔刷子的动作" - }, - "resetView": { - "title": "重置视图", - "desc": "重置画布视图" - }, - "previousStagingImage": { - "title": "上一张暂存图像", - "desc": "上一张暂存区中的图像" - }, - "nextStagingImage": { - "title": "下一张暂存图像", - "desc": "下一张暂存区中的图像" - }, - "acceptStagingImage": { - "title": "接受暂存图像", - "desc": "接受当前暂存区中的图像" - }, - "nodesHotkeys": "节点快捷键", - "addNodes": { - "title": "添加节点", - "desc": "打开添加节点菜单" - } - }, - "modelManager": { - "modelManager": "模型管理器", - "model": "模型", - "modelAdded": "已添加模型", - "modelUpdated": "模型已更新", - "modelEntryDeleted": "模型已删除", - "cannotUseSpaces": "不能使用空格", - "addNew": "添加", - "addNewModel": "添加新模型", - "addManually": "手动添加", - "manual": "手动", - "name": "名称", - "nameValidationMsg": "输入模型的名称", - "description": "描述", - "descriptionValidationMsg": "添加模型的描述", - "config": "配置", - "configValidationMsg": "模型配置文件的路径。", - "modelLocation": "模型位置", - "modelLocationValidationMsg": "提供 Diffusers 模型文件的本地存储路径", - "vaeLocation": "VAE 位置", - "vaeLocationValidationMsg": "VAE 文件的路径。", - "width": "宽度", - "widthValidationMsg": "模型的默认宽度。", - "height": "高度", - "heightValidationMsg": "模型的默认高度。", - "addModel": "添加模型", - "updateModel": "更新模型", - "availableModels": "可用模型", - "search": "检索", - "load": "加载", - "active": "活跃", - "notLoaded": "未加载", - "cached": "缓存", - "checkpointFolder": "模型检查点文件夹", - "clearCheckpointFolder": "清除 Checkpoint 模型文件夹", - "findModels": "寻找模型", - "modelsFound": "找到的模型", - "selectFolder": "选择文件夹", - "selected": "已选择", - "selectAll": "全选", - "deselectAll": "取消选择所有", - "showExisting": "显示已存在", - "addSelected": "添加选择", - "modelExists": "模型已存在", - "delete": "删除", - "deleteModel": "删除模型", - "deleteConfig": "删除配置", - "deleteMsg1": "您确定要将该模型从 InvokeAI 删除吗?", - "deleteMsg2": "磁盘中放置在 InvokeAI 根文件夹的 checkpoint 文件会被删除。若你正在使用自定义目录,则不会从磁盘中删除他们。", - "convertToDiffusersHelpText1": "模型会被转换成 🧨 Diffusers 格式。", - "convertToDiffusersHelpText2": "这个过程会替换你的模型管理器的入口中相同 Diffusers 版本的模型。", - "mergedModelSaveLocation": "保存路径", - "mergedModelCustomSaveLocation": "自定义路径", - "checkpointModels": "Checkpoints", - "formMessageDiffusersVAELocation": "VAE 路径", - "convertToDiffusersHelpText4": "这是一次性的处理过程。根据你电脑的配置不同耗时 30 - 60 秒。", - "convertToDiffusersHelpText6": "你希望转换这个模型吗?", - "interpolationType": "插值类型", - "modelTwo": "模型 2", - "modelThree": "模型 3", - "v2_768": "v2 (768px)", - "mergedModelName": "合并的模型名称", - "allModels": "全部模型", - "convertToDiffusers": "转换为 Diffusers", - "formMessageDiffusersModelLocation": "Diffusers 模型路径", - "custom": "自定义", - "formMessageDiffusersVAELocationDesc": "如果没有特别指定,InvokeAI 会从上面指定的模型路径中寻找 VAE 文件。", - "safetensorModels": "SafeTensors", - "modelsMerged": "模型合并完成", - "mergeModels": "合并模型", - "modelOne": "模型 1", - "diffusersModels": "Diffusers", - "scanForModels": "扫描模型", - "repo_id": "项目 ID", - "repoIDValidationMsg": "你的模型的在线项目地址", - "v1": "v1", - "invokeRoot": "InvokeAI 文件夹", - "inpainting": "v1 Inpainting", - "customSaveLocation": "自定义保存路径", - "scanAgain": "重新扫描", - "customConfig": "个性化配置", - "pathToCustomConfig": "个性化配置路径", - "modelConverted": "模型已转换", - "statusConverting": "转换中", - "sameFolder": "相同文件夹", - "invokeAIFolder": "Invoke AI 文件夹", - "ignoreMismatch": "忽略所选模型之间的不匹配", - "modelMergeHeaderHelp1": "您可以合并最多三种不同的模型,以创建符合您需求的混合模型。", - "modelMergeHeaderHelp2": "只有扩散器(Diffusers)可以用于模型合并。如果您想要合并一个检查点模型,请先将其转换为扩散器。", - "addCheckpointModel": "添加 Checkpoint / Safetensor 模型", - "addDiffuserModel": "添加 Diffusers 模型", - "vaeRepoID": "VAE 项目 ID", - "vaeRepoIDValidationMsg": "VAE 模型在线仓库地址", - "selectAndAdd": "选择下表中的模型并添加", - "noModelsFound": "未有找到模型", - "formMessageDiffusersModelLocationDesc": "请至少输入一个。", - "convertToDiffusersSaveLocation": "保存路径", - "convertToDiffusersHelpText3": "磁盘中放置在 InvokeAI 根文件夹的 checkpoint 文件会被删除. 若位于自定义目录, 则不会受影响.", - "v2_base": "v2 (512px)", - "convertToDiffusersHelpText5": "请确认你有足够的磁盘空间,模型大小通常在 2 GB - 7 GB 之间。", - "convert": "转换", - "merge": "合并", - "pickModelType": "选择模型类型", - "addDifference": "增加差异", - "none": "无", - "inverseSigmoid": "反 Sigmoid 函数", - "weightedSum": "加权求和", - "modelMergeAlphaHelp": "Alpha 参数控制模型的混合强度。较低的 Alpha 值会导致第二个模型的影响减弱。", - "sigmoid": "Sigmoid 函数", - "modelMergeInterpAddDifferenceHelp": "在这种模式下,首先从模型 2 中减去模型 3,得到的版本再用上述的 Alpha 值与模型1进行混合。", - "modelsSynced": "模型已同步", - "modelSyncFailed": "模型同步失败", - "modelDeleteFailed": "模型删除失败", - "syncModelsDesc": "如果您的模型与后端不同步,您可以使用此选项刷新它们。便于您在应用程序启动的情况下手动更新 models.yaml 文件或将模型添加到 InvokeAI 根文件夹。", - "selectModel": "选择模型", - "importModels": "导入模型", - "settings": "设置", - "syncModels": "同步模型", - "noCustomLocationProvided": "未提供自定义路径", - "modelDeleted": "模型已删除", - "modelUpdateFailed": "模型更新失败", - "modelConversionFailed": "模型转换失败", - "modelsMergeFailed": "模型融合失败", - "baseModel": "基底模型", - "convertingModelBegin": "模型转换中. 请稍候.", - "noModels": "未找到模型", - "predictionType": "预测类型(适用于 Stable Diffusion 2.x 模型和部分 Stable Diffusion 1.x 模型)", - "quickAdd": "快速添加", - "simpleModelDesc": "提供一个指向本地 Diffusers 模型的路径,本地 checkpoint / safetensors 模型或一个HuggingFace 项目 ID,又或者一个 checkpoint/diffusers 模型链接。", - "advanced": "高级", - "useCustomConfig": "使用自定义配置", - "closeAdvanced": "关闭高级", - "modelType": "模型类别", - "customConfigFileLocation": "自定义配置文件目录", - "variant": "变体", - "onnxModels": "Onnx", - "vae": "VAE", - "oliveModels": "Olive", - "loraModels": "LoRA", - "alpha": "Alpha", - "vaePrecision": "VAE 精度" - }, - "parameters": { - "images": "图像", - "steps": "步数", - "cfgScale": "CFG 等级", - "width": "宽度", - "height": "高度", - "seed": "种子", - "randomizeSeed": "随机化种子", - "shuffle": "随机生成种子", - "noiseThreshold": "噪声阈值", - "perlinNoise": "Perlin 噪声", - "variations": "变种", - "variationAmount": "变种数量", - "seedWeights": "种子权重", - "faceRestoration": "面部修复", - "restoreFaces": "修复面部", - "type": "种类", - "strength": "强度", - "upscaling": "放大", - "upscale": "放大 (Shift + U)", - "upscaleImage": "放大图像", - "scale": "等级", - "otherOptions": "其他选项", - "seamlessTiling": "无缝拼贴", - "hiresOptim": "高分辨率优化", - "imageFit": "使生成图像长宽适配初始图像", - "codeformerFidelity": "保真度", - "scaleBeforeProcessing": "处理前缩放", - "scaledWidth": "缩放宽度", - "scaledHeight": "缩放长度", - "infillMethod": "填充方法", - "tileSize": "方格尺寸", - "boundingBoxHeader": "选择区域", - "seamCorrectionHeader": "接缝修正", - "infillScalingHeader": "内填充和缩放", - "img2imgStrength": "图生图强度", - "toggleLoopback": "切换环回", - "sendTo": "发送到", - "sendToImg2Img": "发送到图生图", - "sendToUnifiedCanvas": "发送到统一画布", - "copyImageToLink": "复制图像链接", - "downloadImage": "下载图像", - "openInViewer": "在查看器中打开", - "closeViewer": "关闭查看器", - "usePrompt": "使用提示", - "useSeed": "使用种子", - "useAll": "使用所有参数", - "useInitImg": "使用初始图像", - "info": "信息", - "initialImage": "初始图像", - "showOptionsPanel": "显示侧栏浮窗 (O 或 T)", - "seamlessYAxis": "Y 轴", - "seamlessXAxis": "X 轴", - "boundingBoxWidth": "边界框宽度", - "boundingBoxHeight": "边界框高度", - "denoisingStrength": "去噪强度", - "vSymmetryStep": "纵向对称步数", - "cancel": { - "immediate": "立即取消", - "isScheduled": "取消中", - "schedule": "当前迭代后取消", - "setType": "设定取消类型", - "cancel": "取消" - }, - "copyImage": "复制图片", - "showPreview": "显示预览", - "symmetry": "对称性", - "positivePromptPlaceholder": "正向提示词", - "negativePromptPlaceholder": "负向提示词", - "scheduler": "调度器", - "general": "通用", - "hiresStrength": "高分辨强度", - "hidePreview": "隐藏预览", - "hSymmetryStep": "横向对称步数", - "imageToImage": "图生图", - "noiseSettings": "噪音", - "controlNetControlMode": "控制模式", - "maskAdjustmentsHeader": "遮罩调整", - "maskBlur": "模糊", - "maskBlurMethod": "模糊方式", - "aspectRatio": "纵横比", - "seamLowThreshold": "降低", - "seamHighThreshold": "提升", - "invoke": { - "noNodesInGraph": "节点图中无节点", - "noModelSelected": "无已选中的模型", - "invoke": "调用", - "systemBusy": "系统繁忙", - "noInitialImageSelected": "无选中的初始图像", - "missingInputForField": "{{nodeLabel}} -> {{fieldLabel}} 缺失输入", - "unableToInvoke": "无法调用", - "systemDisconnected": "系统已断开连接", - "missingNodeTemplate": "缺失节点模板", - "missingFieldTemplate": "缺失模板", - "addingImagesTo": "添加图像到", - "noPrompts": "没有已生成的提示词", - "readyToInvoke": "准备调用", - "noControlImageForControlAdapter": "有 #{{number}} 个 Control Adapter 缺失控制图像", - "noModelForControlAdapter": "有 #{{number}} 个 Control Adapter 没有选择模型。", - "incompatibleBaseModelForControlAdapter": "有 #{{number}} 个 Control Adapter 模型与主模型不匹配。" - }, - "patchmatchDownScaleSize": "缩小", - "coherenceSteps": "步数", - "clipSkip": "CLIP 跳过层", - "compositingSettingsHeader": "合成设置", - "useCpuNoise": "使用 CPU 噪声", - "coherenceStrength": "强度", - "enableNoiseSettings": "启用噪声设置", - "coherenceMode": "模式", - "cpuNoise": "CPU 噪声", - "gpuNoise": "GPU 噪声", - "clipSkipWithLayerCount": "CLIP 跳过 {{layerCount}} 层", - "coherencePassHeader": "一致性层", - "manualSeed": "手动设定种子", - "imageActions": "图像操作", - "randomSeed": "随机种子", - "iterations": "迭代数", - "isAllowedToUpscale": { - "useX2Model": "图像太大,无法使用 x4 模型,使用 x2 模型作为替代", - "tooLarge": "图像太大无法进行放大,请选择更小的图像" - }, - "iterationsWithCount_other": "{{count}} 次迭代生成", - "seamlessX&Y": "无缝 X & Y", - "aspectRatioFree": "自由", - "seamlessX": "无缝 X", - "seamlessY": "无缝 Y" - }, - "settings": { - "models": "模型", - "displayInProgress": "显示处理中的图像", - "saveSteps": "每n步保存图像", - "confirmOnDelete": "删除时确认", - "displayHelpIcons": "显示帮助按钮", - "enableImageDebugging": "开启图像调试", - "resetWebUI": "重置网页界面", - "resetWebUIDesc1": "重置网页只会重置浏览器中缓存的图像和设置,不会删除任何图像。", - "resetWebUIDesc2": "如果图像没有显示在图库中,或者其他东西不工作,请在GitHub上提交问题之前尝试重置。", - "resetComplete": "网页界面已重置。", - "showProgressInViewer": "在查看器中展示过程图片", - "antialiasProgressImages": "对过程图像应用抗锯齿", - "generation": "生成", - "ui": "用户界面", - "useSlidersForAll": "对所有参数使用滑动条设置", - "general": "通用", - "consoleLogLevel": "日志等级", - "shouldLogToConsole": "终端日志", - "developer": "开发者", - "alternateCanvasLayout": "切换统一画布布局", - "enableNodesEditor": "启用节点编辑器", - "favoriteSchedulersPlaceholder": "没有偏好的采样算法", - "showAdvancedOptions": "显示进阶选项", - "favoriteSchedulers": "采样算法偏好", - "autoChangeDimensions": "更改时将宽/高更新为模型默认值", - "experimental": "实验性", - "beta": "Beta", - "clearIntermediates": "清除中间产物", - "clearIntermediatesDesc3": "您图库中的图像不会被删除。", - "clearIntermediatesDesc2": "中间产物图像是生成过程中产生的副产品,与图库中的结果图像不同。清除中间产物可释放磁盘空间。", - "intermediatesCleared_other": "已清除 {{count}} 个中间产物", - "clearIntermediatesDesc1": "清除中间产物会重置您的画布和 ControlNet 状态。", - "intermediatesClearedFailed": "清除中间产物时出现问题", - "clearIntermediatesWithCount_other": "清除 {{count}} 个中间产物", - "clearIntermediatesDisabled": "队列为空才能清理中间产物" - }, - "toast": { - "tempFoldersEmptied": "临时文件夹已清空", - "uploadFailed": "上传失败", - "uploadFailedUnableToLoadDesc": "无法加载文件", - "downloadImageStarted": "图像已开始下载", - "imageCopied": "图像已复制", - "imageLinkCopied": "图像链接已复制", - "imageNotLoaded": "没有加载图像", - "imageNotLoadedDesc": "找不到图片", - "imageSavedToGallery": "图像已保存到图库", - "canvasMerged": "画布已合并", - "sentToImageToImage": "已发送到图生图", - "sentToUnifiedCanvas": "已发送到统一画布", - "parametersSet": "参数已设定", - "parametersNotSet": "参数未设定", - "parametersNotSetDesc": "此图像不存在元数据。", - "parametersFailed": "加载参数失败", - "parametersFailedDesc": "加载初始图像失败。", - "seedSet": "种子已设定", - "seedNotSet": "种子未设定", - "seedNotSetDesc": "无法找到该图像的种子。", - "promptSet": "提示词已设定", - "promptNotSet": "提示词未设定", - "promptNotSetDesc": "无法找到该图像的提示词。", - "upscalingFailed": "放大失败", - "faceRestoreFailed": "面部修复失败", - "metadataLoadFailed": "加载元数据失败", - "initialImageSet": "初始图像已设定", - "initialImageNotSet": "初始图像未设定", - "initialImageNotSetDesc": "无法加载初始图像", - "problemCopyingImageLink": "无法复制图片链接", - "uploadFailedInvalidUploadDesc": "必须是单张的 PNG 或 JPEG 图片", - "disconnected": "服务器断开", - "connected": "服务器连接", - "parameterSet": "参数已设定", - "parameterNotSet": "参数未设定", - "serverError": "服务器错误", - "canceled": "处理取消", - "nodesLoaded": "节点已加载", - "nodesSaved": "节点已保存", - "problemCopyingImage": "无法复制图像", - "nodesCorruptedGraph": "无法加载。节点图似乎已损坏。", - "nodesBrokenConnections": "无法加载。部分连接已断开。", - "nodesUnrecognizedTypes": "无法加载。节点图有无法识别的节点类型", - "nodesNotValidJSON": "无效的 JSON", - "nodesNotValidGraph": "无效的 InvokeAi 节点图", - "nodesCleared": "节点已清空", - "nodesLoadedFailed": "节点图加载失败", - "modelAddedSimple": "已添加模型", - "modelAdded": "已添加模型: {{modelName}}", - "imageSavingFailed": "图像保存失败", - "canvasSentControlnetAssets": "画布已发送到 ControlNet & 素材", - "problemCopyingCanvasDesc": "无法导出基础层", - "loadedWithWarnings": "已加载带有警告的工作流", - "setInitialImage": "设为初始图像", - "canvasCopiedClipboard": "画布已复制到剪贴板", - "setControlImage": "设为控制图像", - "setNodeField": "设为节点字段", - "problemSavingMask": "保存遮罩时出现问题", - "problemSavingCanvasDesc": "无法导出基础层", - "maskSavedAssets": "遮罩已保存到素材", - "modelAddFailed": "模型添加失败", - "problemDownloadingCanvas": "下载画布时出现问题", - "problemMergingCanvas": "合并画布时出现问题", - "setCanvasInitialImage": "设为画布初始图像", - "imageUploaded": "图像已上传", - "addedToBoard": "已添加到面板", - "workflowLoaded": "工作流已加载", - "problemImportingMaskDesc": "无法导出遮罩", - "problemCopyingCanvas": "复制画布时出现问题", - "problemSavingCanvas": "保存画布时出现问题", - "canvasDownloaded": "画布已下载", - "setIPAdapterImage": "设为 IP Adapter 图像", - "problemMergingCanvasDesc": "无法导出基础层", - "problemDownloadingCanvasDesc": "无法导出基础层", - "problemSavingMaskDesc": "无法导出遮罩", - "imageSaved": "图像已保存", - "maskSentControlnetAssets": "遮罩已发送到 ControlNet & 素材", - "canvasSavedGallery": "画布已保存到图库", - "imageUploadFailed": "图像上传失败", - "problemImportingMask": "导入遮罩时出现问题", - "baseModelChangedCleared_other": "基础模型已更改, 已清除或禁用 {{count}} 个不兼容的子模型" - }, - "unifiedCanvas": { - "layer": "图层", - "base": "基础层", - "mask": "遮罩", - "maskingOptions": "遮罩选项", - "enableMask": "启用遮罩", - "preserveMaskedArea": "保留遮罩区域", - "clearMask": "清除遮罩", - "brush": "刷子", - "eraser": "橡皮擦", - "fillBoundingBox": "填充选择区域", - "eraseBoundingBox": "取消选择区域", - "colorPicker": "颜色提取", - "brushOptions": "刷子选项", - "brushSize": "大小", - "move": "移动", - "resetView": "重置视图", - "mergeVisible": "合并可见层", - "saveToGallery": "保存至图库", - "copyToClipboard": "复制到剪贴板", - "downloadAsImage": "下载图像", - "undo": "撤销", - "redo": "重做", - "clearCanvas": "清除画布", - "canvasSettings": "画布设置", - "showIntermediates": "显示中间产物", - "showGrid": "显示网格", - "snapToGrid": "切换网格对齐", - "darkenOutsideSelection": "暗化外部区域", - "autoSaveToGallery": "自动保存至图库", - "saveBoxRegionOnly": "只保存框内区域", - "limitStrokesToBox": "限制画笔在框内", - "showCanvasDebugInfo": "显示附加画布信息", - "clearCanvasHistory": "清除画布历史", - "clearHistory": "清除历史", - "clearCanvasHistoryMessage": "清除画布历史不会影响当前画布,但会不可撤销地清除所有撤销/重做历史。", - "clearCanvasHistoryConfirm": "确认清除所有画布历史?", - "emptyTempImageFolder": "清除临时文件夹", - "emptyFolder": "清除文件夹", - "emptyTempImagesFolderMessage": "清空临时图像文件夹会完全重置统一画布。这包括所有的撤销/重做历史、暂存区的图像和画布基础层。", - "emptyTempImagesFolderConfirm": "确认清除临时文件夹?", - "activeLayer": "活跃图层", - "canvasScale": "画布缩放", - "boundingBox": "选择区域", - "scaledBoundingBox": "缩放选择区域", - "boundingBoxPosition": "选择区域位置", - "canvasDimensions": "画布长宽", - "canvasPosition": "画布位置", - "cursorPosition": "光标位置", - "previous": "上一张", - "next": "下一张", - "accept": "接受", - "showHide": "显示 / 隐藏", - "discardAll": "放弃所有", - "betaClear": "清除", - "betaDarkenOutside": "暗化外部区域", - "betaLimitToBox": "限制在框内", - "betaPreserveMasked": "保留遮罩层", - "antialiasing": "抗锯齿", - "showResultsOn": "显示结果 (开)", - "showResultsOff": "显示结果 (关)" - }, - "accessibility": { - "modelSelect": "模型选择", - "invokeProgressBar": "Invoke 进度条", - "reset": "重置", - "nextImage": "下一张图片", - "useThisParameter": "使用此参数", - "uploadImage": "上传图片", - "previousImage": "上一张图片", - "copyMetadataJson": "复制 JSON 元数据", - "exitViewer": "退出查看器", - "zoomIn": "放大", - "zoomOut": "缩小", - "rotateCounterClockwise": "逆时针旋转", - "rotateClockwise": "顺时针旋转", - "flipHorizontally": "水平翻转", - "flipVertically": "垂直翻转", - "showOptionsPanel": "显示侧栏浮窗", - "toggleLogViewer": "切换日志查看器", - "modifyConfig": "修改配置", - "toggleAutoscroll": "切换自动缩放", - "menu": "菜单", - "showGalleryPanel": "显示图库浮窗", - "loadMore": "加载更多" - }, - "ui": { - "showProgressImages": "显示处理中的图片", - "hideProgressImages": "隐藏处理中的图片", - "swapSizes": "XY 尺寸互换", - "lockRatio": "锁定纵横比" - }, - "tooltip": { - "feature": { - "prompt": "这是提示词区域。提示词包括生成对象和风格术语。您也可以在提示词中添加权重(Token 的重要性),但命令行命令和参数不起作用。", - "imageToImage": "图生图模式加载任何图像作为初始图像,然后与提示词一起用于生成新图像。值越高,结果图像的变化就越大。可能的值为 0.0 到 1.0,建议的范围是 0.25 到 0.75", - "upscale": "使用 ESRGAN 可以在图片生成后立即放大图片。", - "variations": "尝试将变化值设置在 0.1 到 1.0 之间,以更改给定种子的结果。种子的变化在 0.1 到 0.3 之间会很有趣。", - "boundingBox": "边界框的高和宽的设定对文生图和图生图模式是一样的,只有边界框中的区域会被处理。", - "other": "这些选项将为 Invoke 启用替代处理模式。 \"无缝拼贴\" 将在输出中创建重复图案。\"高分辨率\" 是通过图生图进行两步生成:当您想要更大、更连贯且不带伪影的图像时,请使用此设置。这将比通常的文生图需要更长的时间。", - "faceCorrection": "使用 GFPGAN 或 Codeformer 进行人脸校正:该算法会检测图像中的人脸并纠正任何缺陷。较高的值将更改图像,并产生更有吸引力的人脸。在保留较高保真度的情况下使用 Codeformer 将导致更强的人脸校正,同时也会保留原始图像。", - "gallery": "图片库展示输出文件夹中的图片,设置和文件一起储存,可以通过内容菜单访问。", - "seed": "种子值影响形成图像的初始噪声。您可以使用以前图像中已存在的种子。 “噪声阈值”用于减轻在高 CFG 等级(尝试 0 - 10 范围)下的伪像,并使用 Perlin 在生成过程中添加 Perlin 噪声:这两者都可以为您的输出添加变化。", - "seamCorrection": "控制在画布上生成的图像之间出现的可见接缝的处理方式。", - "infillAndScaling": "管理填充方法(用于画布的遮罩或擦除区域)和缩放(对于较小的边界框大小非常有用)。" - } - }, - "nodes": { - "zoomInNodes": "放大", - "resetWorkflowDesc": "是否确定要清空节点图?", - "resetWorkflow": "清空节点图", - "loadWorkflow": "读取节点图", - "zoomOutNodes": "缩小", - "resetWorkflowDesc2": "重置节点图将清除所有节点、边际和节点图详情.", - "reloadNodeTemplates": "重载节点模板", - "hideGraphNodes": "隐藏节点图信息", - "fitViewportNodes": "自适应视图", - "showMinimapnodes": "显示缩略图", - "hideMinimapnodes": "隐藏缩略图", - "showLegendNodes": "显示字段类型图例", - "hideLegendNodes": "隐藏字段类型图例", - "showGraphNodes": "显示节点图信息", - "downloadWorkflow": "下载节点图 JSON", - "workflowDescription": "简述", - "versionUnknown": " 未知版本", - "noNodeSelected": "无选中的节点", - "addNode": "添加节点", - "unableToValidateWorkflow": "无法验证工作流", - "noOutputRecorded": "无已记录输出", - "updateApp": "升级 App", - "colorCodeEdgesHelp": "根据连接区域对边缘编码颜色", - "workflowContact": "联系", - "animatedEdges": "边缘动效", - "nodeTemplate": "节点模板", - "pickOne": "选择一个", - "unableToLoadWorkflow": "无法验证工作流", - "snapToGrid": "对齐网格", - "noFieldsLinearview": "线性视图中未添加任何字段", - "nodeSearch": "检索节点", - "version": "版本", - "validateConnections": "验证连接和节点图", - "inputMayOnlyHaveOneConnection": "输入仅能有一个连接", - "notes": "注释", - "nodeOutputs": "节点输出", - "currentImageDescription": "在节点编辑器中显示当前图像", - "validateConnectionsHelp": "防止建立无效连接和调用无效节点图", - "problemSettingTitle": "设定标题时出现问题", - "noConnectionInProgress": "没有正在进行的连接", - "workflowVersion": "版本", - "noConnectionData": "无连接数据", - "fieldTypesMustMatch": "类型必须匹配", - "workflow": "工作流", - "unkownInvocation": "未知调用类型", - "animatedEdgesHelp": "为选中边缘和其连接的选中节点的边缘添加动画", - "unknownTemplate": "未知模板", - "removeLinearView": "从线性视图中移除", - "workflowTags": "标签", - "fullyContainNodesHelp": "节点必须完全位于选择框中才能被选中", - "workflowValidation": "工作流验证错误", - "noMatchingNodes": "无相匹配的节点", - "executionStateInProgress": "处理中", - "noFieldType": "无字段类型", - "executionStateError": "错误", - "executionStateCompleted": "已完成", - "workflowAuthor": "作者", - "currentImage": "当前图像", - "workflowName": "名称", - "cannotConnectInputToInput": "无法将输入连接到输入", - "workflowNotes": "注释", - "cannotConnectOutputToOutput": "无法将输出连接到输出", - "connectionWouldCreateCycle": "连接将创建一个循环", - "cannotConnectToSelf": "无法连接自己", - "notesDescription": "添加有关您的工作流的注释", - "unknownField": "未知", - "colorCodeEdges": "边缘颜色编码", - "unknownNode": "未知节点", - "addNodeToolTip": "添加节点 (Shift+A, Space)", - "loadingNodes": "加载节点中...", - "snapToGridHelp": "移动时将节点与网格对齐", - "workflowSettings": "工作流编辑器设置", - "booleanPolymorphicDescription": "一个布尔值合集。", - "scheduler": "调度器", - "inputField": "输入", - "controlFieldDescription": "节点间传递的控制信息。", - "skippingUnknownOutputType": "跳过未知类型的输出", - "latentsFieldDescription": "Latents 可以在节点间传递。", - "denoiseMaskFieldDescription": "去噪遮罩可以在节点间传递", - "missingTemplate": "缺失模板", - "outputSchemaNotFound": "未找到输出模式", - "latentsPolymorphicDescription": "Latents 可以在节点间传递。", - "colorFieldDescription": "一种 RGBA 颜色。", - "mainModelField": "模型", - "unhandledInputProperty": "未处理的输入属性", - "maybeIncompatible": "可能与已安装的不兼容", - "collectionDescription": "待办事项", - "skippingReservedFieldType": "跳过保留类型", - "booleanCollectionDescription": "一个布尔值合集。", - "sDXLMainModelFieldDescription": "SDXL 模型。", - "boardField": "面板", - "problemReadingWorkflow": "从图像读取工作流时出现问题", - "sourceNode": "源节点", - "nodeOpacity": "节点不透明度", - "collectionItemDescription": "待办事项", - "integerDescription": "整数是没有与小数点的数字。", - "outputField": "输出", - "skipped": "跳过", - "updateNode": "更新节点", - "sDXLRefinerModelFieldDescription": "待办事项", - "imagePolymorphicDescription": "一个图像合集。", - "doesNotExist": "不存在", - "unableToParseNode": "无法解析节点", - "controlCollection": "控制合集", - "collectionItem": "项目合集", - "controlCollectionDescription": "节点间传递的控制信息。", - "skippedReservedInput": "跳过保留的输入", - "outputFields": "输出", - "edge": "边缘", - "inputNode": "输入节点", - "enumDescription": "枚举 (Enums) 可能是多个选项的一个数值。", - "loRAModelFieldDescription": "待办事项", - "imageField": "图像", - "skippedReservedOutput": "跳过保留的输出", - "noWorkflow": "无工作流", - "colorCollectionDescription": "待办事项", - "colorPolymorphicDescription": "一个颜色合集。", - "sDXLMainModelField": "SDXL 模型", - "denoiseMaskField": "去噪遮罩", - "schedulerDescription": "待办事项", - "missingCanvaInitImage": "缺失画布初始图像", - "clipFieldDescription": "词元分析器和文本编码器的子模型。", - "noImageFoundState": "状态中未发现初始图像", - "nodeType": "节点类型", - "fullyContainNodes": "完全包含节点来进行选择", - "noOutputSchemaName": "在 ref 对象中找不到输出模式名称", - "vaeModelFieldDescription": "待办事项", - "skippingInputNoTemplate": "跳过无模板的输入", - "missingCanvaInitMaskImages": "缺失初始化画布和遮罩图像", - "problemReadingMetadata": "从图像读取元数据时出现问题", - "oNNXModelField": "ONNX 模型", - "node": "节点", - "skippingUnknownInputType": "跳过未知类型的输入", - "booleanDescription": "布尔值为真或为假。", - "collection": "合集", - "invalidOutputSchema": "无效的输出模式", - "boardFieldDescription": "图库面板", - "floatDescription": "浮点数是带小数点的数字。", - "unhandledOutputProperty": "未处理的输出属性", - "string": "字符串", - "inputFields": "输入", - "uNetFieldDescription": "UNet 子模型。", - "mismatchedVersion": "不匹配的版本", - "vaeFieldDescription": "Vae 子模型。", - "imageFieldDescription": "图像可以在节点间传递。", - "outputNode": "输出节点", - "mainModelFieldDescription": "待办事项", - "sDXLRefinerModelField": "Refiner 模型", - "unableToParseEdge": "无法解析边缘", - "latentsCollectionDescription": "Latents 可以在节点间传递。", - "oNNXModelFieldDescription": "ONNX 模型。", - "cannotDuplicateConnection": "无法创建重复的连接", - "ipAdapterModel": "IP-Adapter 模型", - "ipAdapterDescription": "图像提示词自适应 (IP-Adapter)。", - "ipAdapterModelDescription": "IP-Adapter 模型", - "floatCollectionDescription": "一个浮点数合集。", - "enum": "Enum (枚举)", - "integerPolymorphicDescription": "一个整数值合集。", - "float": "浮点", - "integer": "整数", - "colorField": "颜色", - "stringCollectionDescription": "一个字符串合集。", - "stringCollection": "字符串合集", - "uNetField": "UNet", - "integerCollection": "整数合集", - "vaeModelField": "VAE", - "integerCollectionDescription": "一个整数值合集。", - "clipField": "Clip", - "stringDescription": "字符串是指文本。", - "colorCollection": "一个颜色合集。", - "boolean": "布尔值", - "stringPolymorphicDescription": "一个字符串合集。", - "controlField": "控制信息", - "floatPolymorphicDescription": "一个浮点数合集。", - "vaeField": "Vae", - "floatCollection": "浮点合集", - "booleanCollection": "布尔值合集", - "imageCollectionDescription": "一个图像合集。", - "loRAModelField": "LoRA", - "imageCollection": "图像合集", - "ipAdapterPolymorphicDescription": "一个 IP-Adapters Collection 合集。", - "ipAdapterCollection": "IP-Adapters 合集", - "conditioningCollection": "条件合集", - "ipAdapterPolymorphic": "IP-Adapters 多态", - "conditioningCollectionDescription": "条件可以在节点间传递。", - "colorPolymorphic": "颜色多态", - "conditioningPolymorphic": "条件多态", - "latentsCollection": "Latents 合集", - "stringPolymorphic": "字符多态", - "conditioningPolymorphicDescription": "条件可以在节点间传递。", - "imagePolymorphic": "图像多态", - "floatPolymorphic": "浮点多态", - "ipAdapterCollectionDescription": "一个 IP-Adapters Collection 合集。", - "ipAdapter": "IP-Adapter", - "booleanPolymorphic": "布尔多态", - "conditioningFieldDescription": "条件可以在节点间传递。", - "integerPolymorphic": "整数多态", - "latentsPolymorphic": "Latents 多态", - "conditioningField": "条件", - "latentsField": "Latents" - }, - "controlnet": { - "resize": "直接缩放", - "showAdvanced": "显示高级", - "contentShuffleDescription": "随机打乱图像内容", - "importImageFromCanvas": "从画布导入图像", - "lineartDescription": "将图像转换为线稿", - "importMaskFromCanvas": "从画布导入遮罩", - "hideAdvanced": "隐藏高级", - "ipAdapterModel": "Adapter 模型", - "resetControlImage": "重置控制图像", - "beginEndStepPercent": "开始 / 结束步数百分比", - "mlsdDescription": "简洁的分割线段(直线)检测器", - "duplicate": "复制", - "balanced": "平衡", - "prompt": "Prompt (提示词控制)", - "depthMidasDescription": "使用 Midas 生成深度图", - "openPoseDescription": "使用 Openpose 进行人体姿态估计", - "resizeMode": "缩放模式", - "weight": "权重", - "selectModel": "选择一个模型", - "crop": "裁剪", - "processor": "处理器", - "none": "无", - "incompatibleBaseModel": "不兼容的基础模型:", - "enableControlnet": "启用 ControlNet", - "detectResolution": "检测分辨率", - "pidiDescription": "像素差分 (PIDI) 图像处理", - "controlMode": "控制模式", - "fill": "填充", - "cannyDescription": "Canny 边缘检测", - "colorMapDescription": "从图像生成一张颜色图", - "imageResolution": "图像分辨率", - "autoConfigure": "自动配置处理器", - "normalBaeDescription": "法线 BAE 处理", - "noneDescription": "不应用任何处理", - "saveControlImage": "保存控制图像", - "toggleControlNet": "开关此 ControlNet", - "delete": "删除", - "colorMapTileSize": "分块大小", - "ipAdapterImageFallback": "无已选择的 IP Adapter 图像", - "mediapipeFaceDescription": "使用 Mediapipe 检测面部", - "depthZoeDescription": "使用 Zoe 生成深度图", - "hedDescription": "整体嵌套边缘检测", - "setControlImageDimensions": "设定控制图像尺寸宽/高为", - "resetIPAdapterImage": "重置 IP Adapter 图像", - "handAndFace": "手部和面部", - "enableIPAdapter": "启用 IP Adapter", - "amult": "角度倍率 (a_mult)", - "bgth": "背景移除阈值 (bg_th)", - "lineartAnimeDescription": "动漫风格线稿处理", - "minConfidence": "最小置信度", - "lowThreshold": "弱判断阈值", - "highThreshold": "强判断阈值", - "addT2IAdapter": "添加 $t(common.t2iAdapter)", - "controlNetEnabledT2IDisabled": "$t(common.controlNet) 已启用, $t(common.t2iAdapter) 已禁用", - "t2iEnabledControlNetDisabled": "$t(common.t2iAdapter) 已启用, $t(common.controlNet) 已禁用", - "addControlNet": "添加 $t(common.controlNet)", - "controlNetT2IMutexDesc": "$t(common.controlNet) 和 $t(common.t2iAdapter) 目前不支持同时启用。", - "addIPAdapter": "添加 $t(common.ipAdapter)", - "safe": "保守模式", - "scribble": "草绘 (scribble)", - "maxFaces": "最大面部数", - "pidi": "PIDI", - "normalBae": "Normal BAE", - "hed": "HED", - "contentShuffle": "Content Shuffle", - "f": "F", - "h": "H", - "controlnet": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.controlNet))", - "control": "Control (普通控制)", - "coarse": "Coarse", - "depthMidas": "Depth (Midas)", - "w": "W", - "ip_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.ipAdapter))", - "mediapipeFace": "Mediapipe Face", - "mlsd": "M-LSD", - "lineart": "Lineart", - "t2i_adapter": "$t(controlnet.controlAdapter_one) #{{number}} ($t(common.t2iAdapter))", - "megaControl": "Mega Control (超级控制)", - "depthZoe": "Depth (Zoe)", - "colorMap": "Color", - "openPose": "Openpose", - "controlAdapter_other": "Control Adapters", - "lineartAnime": "Lineart Anime", - "canny": "Canny" - }, - "queue": { - "status": "状态", - "cancelTooltip": "取消当前项目", - "queueEmpty": "队列为空", - "pauseSucceeded": "处理器已暂停", - "in_progress": "处理中", - "queueFront": "添加到队列前", - "completed": "已完成", - "queueBack": "添加到队列", - "cancelFailed": "取消项目时出现问题", - "pauseFailed": "暂停处理器时出现问题", - "clearFailed": "清除队列时出现问题", - "clearSucceeded": "队列已清除", - "pause": "暂停", - "cancelSucceeded": "项目已取消", - "queue": "队列", - "batch": "批处理", - "clearQueueAlertDialog": "清除队列时会立即取消所有处理中的项目并且会完全清除队列。", - "pending": "待定", - "completedIn": "完成于", - "resumeFailed": "恢复处理器时出现问题", - "clear": "清除", - "prune": "修剪", - "total": "总计", - "canceled": "已取消", - "pruneFailed": "修剪队列时出现问题", - "cancelBatchSucceeded": "批处理已取消", - "clearTooltip": "取消并清除所有项目", - "current": "当前", - "pauseTooltip": "暂停处理器", - "failed": "已失败", - "cancelItem": "取消项目", - "next": "下一个", - "cancelBatch": "取消批处理", - "cancel": "取消", - "resumeSucceeded": "处理器已恢复", - "resumeTooltip": "恢复处理器", - "resume": "恢复", - "cancelBatchFailed": "取消批处理时出现问题", - "clearQueueAlertDialog2": "您确定要清除队列吗?", - "item": "项目", - "pruneSucceeded": "从队列修剪 {{item_count}} 个已完成的项目", - "notReady": "无法排队", - "batchFailedToQueue": "批次加入队列失败", - "batchValues": "批次数", - "queueCountPrediction": "添加 {{predicted}} 到队列", - "batchQueued": "加入队列的批次", - "queuedCount": "{{pending}} 待处理", - "front": "前", - "pruneTooltip": "修剪 {{item_count}} 个已完成的项目", - "batchQueuedDesc_other": "在队列的 {{direction}} 中添加了 {{count}} 个会话", - "graphQueued": "节点图已加入队列", - "back": "后", - "session": "会话", - "queueTotal": "总计 {{total}}", - "enqueueing": "队列中的批次", - "queueMaxExceeded": "超出最大值 {{max_queue_size}},将跳过 {{skip}}", - "graphFailedToQueue": "节点图加入队列失败" - }, - "sdxl": { - "refinerStart": "Refiner 开始作用时机", - "selectAModel": "选择一个模型", - "scheduler": "调度器", - "cfgScale": "CFG 等级", - "negStylePrompt": "负向样式提示词", - "noModelsAvailable": "无可用模型", - "negAestheticScore": "负向美学评分", - "useRefiner": "启用 Refiner", - "denoisingStrength": "去噪强度", - "refinermodel": "Refiner 模型", - "posAestheticScore": "正向美学评分", - "concatPromptStyle": "连接提示词 & 样式", - "loading": "加载中...", - "steps": "步数", - "posStylePrompt": "正向样式提示词", - "refiner": "Refiner" - }, - "metadata": { - "positivePrompt": "正向提示词", - "negativePrompt": "负向提示词", - "generationMode": "生成模式", - "Threshold": "噪声阈值", - "metadata": "元数据", - "strength": "图生图强度", - "seed": "种子", - "imageDetails": "图像详细信息", - "perlin": "Perlin 噪声", - "model": "模型", - "noImageDetails": "未找到图像详细信息", - "hiresFix": "高分辨率优化", - "cfgScale": "CFG 等级", - "initImage": "初始图像", - "height": "高度", - "variations": "(成对/第二)种子权重", - "noMetaData": "未找到元数据", - "width": "宽度", - "createdBy": "创建者是", - "workflow": "工作流", - "steps": "步数", - "scheduler": "调度器", - "seamless": "无缝", - "fit": "图生图匹配", - "recallParameters": "召回参数", - "noRecallParameters": "未找到要召回的参数", - "vae": "VAE" - }, - "models": { - "noMatchingModels": "无相匹配的模型", - "loading": "加载中", - "noMatchingLoRAs": "无相匹配的 LoRA", - "noLoRAsAvailable": "无可用 LoRA", - "noModelsAvailable": "无可用模型", - "selectModel": "选择一个模型", - "selectLoRA": "选择一个 LoRA", - "noRefinerModelsInstalled": "无已安装的 SDXL Refiner 模型", - "noLoRAsInstalled": "无已安装的 LoRA" - }, - "boards": { - "autoAddBoard": "自动添加面板", - "topMessage": "该面板包含的图像正使用以下功能:", - "move": "移动", - "menuItemAutoAdd": "自动添加到该面板", - "myBoard": "我的面板", - "searchBoard": "检索面板...", - "noMatching": "没有相匹配的面板", - "selectBoard": "选择一个面板", - "cancel": "取消", - "addBoard": "添加面板", - "bottomMessage": "删除该面板并且将其对应的图像将重置当前使用该面板的所有功能。", - "uncategorized": "未分类", - "changeBoard": "更改面板", - "loading": "加载中...", - "clearSearch": "清除检索", - "downloadBoard": "下载面板" - }, - "embedding": { - "noMatchingEmbedding": "不匹配的 Embedding", - "addEmbedding": "添加 Embedding", - "incompatibleModel": "不兼容的基础模型:" - }, - "dynamicPrompts": { - "seedBehaviour": { - "perPromptDesc": "每次生成图像使用不同的种子", - "perIterationLabel": "每次迭代的种子", - "perIterationDesc": "每次迭代使用不同的种子", - "perPromptLabel": "每张图像的种子", - "label": "种子行为" - }, - "enableDynamicPrompts": "启用动态提示词", - "combinatorial": "组合生成", - "maxPrompts": "最大提示词数", - "dynamicPrompts": "动态提示词", - "promptsWithCount_other": "{{count}} 个提示词" - }, - "popovers": { - "compositingMaskAdjustments": { - "heading": "遮罩调整", - "paragraphs": [ - "调整遮罩。" - ] - }, - "paramRatio": { - "heading": "纵横比", - "paragraphs": [ - "生成图像的尺寸纵横比。", - "图像尺寸(单位:像素)建议 SD 1.5 模型使用等效 512x512 的尺寸,SDXL 模型使用等效 1024x1024 的尺寸。" - ] - }, - "compositingCoherenceSteps": { - "heading": "步数", - "paragraphs": [ - "一致性层中使用的去噪步数。", - "与主参数中的步数相同。" - ] - }, - "compositingBlur": { - "heading": "模糊", - "paragraphs": [ - "遮罩模糊半径。" - ] - }, - "noiseUseCPU": { - "heading": "使用 CPU 噪声", - "paragraphs": [ - "选择由 CPU 或 GPU 生成噪声。", - "启用 CPU 噪声后,特定的种子将会在不同的设备上产生下相同的图像。", - "启用 CPU 噪声不会对性能造成影响。" - ] - }, - "paramVAEPrecision": { - "heading": "VAE 精度", - "paragraphs": [ - "VAE 编解码过程种使用的精度。FP16/半精度以微小的图像变化为代价提高效率。" - ] - }, - "compositingCoherenceMode": { - "heading": "模式", - "paragraphs": [ - "一致性层模式。" - ] - }, - "controlNetResizeMode": { - "heading": "缩放模式", - "paragraphs": [ - "ControlNet 输入图像适应输出图像大小的方法。" - ] - }, - "clipSkip": { - "paragraphs": [ - "选择要跳过 CLIP 模型多少层。", - "部分模型跳过特定数值的层时效果会更好。", - "较高的数值通常会导致图像细节更少。" - ], - "heading": "CLIP 跳过层" - }, - "paramModel": { - "heading": "模型", - "paragraphs": [ - "用于去噪过程的模型。", - "不同的模型一般会通过接受训练来专门产生特定的美学内容和结果。" - ] - }, - "paramIterations": { - "heading": "迭代数", - "paragraphs": [ - "生成图像的数量。", - "若启用动态提示词,每种提示词都会生成这么多次。" - ] - }, - "compositingCoherencePass": { - "heading": "一致性层", - "paragraphs": [ - "第二轮去噪有助于合成内补/外扩图像。" - ] - }, - "compositingStrength": { - "heading": "强度", - "paragraphs": [ - "一致性层使用的去噪强度。", - "去噪强度与图生图的参数相同。" - ] - }, - "paramNegativeConditioning": { - "paragraphs": [ - "生成过程会避免生成负向提示词中的概念。使用此选项来使输出排除部分质量或对象。", - "支持 Compel 语法 和 embeddings。" - ], - "heading": "负向提示词" - }, - "compositingBlurMethod": { - "heading": "模糊方式", - "paragraphs": [ - "应用于遮罩区域的模糊方法。" - ] - }, - "paramScheduler": { - "heading": "调度器", - "paragraphs": [ - "调度器 (采样器) 定义如何在图像迭代过程中添加噪声,或者定义如何根据一个模型的输出来更新采样。" - ] - }, - "controlNetWeight": { - "heading": "权重", - "paragraphs": [ - "ControlNet 对生成图像的影响强度。" - ] - }, - "paramCFGScale": { - "heading": "CFG 等级", - "paragraphs": [ - "控制提示词对生成过程的影响程度。" - ] - }, - "paramSteps": { - "heading": "步数", - "paragraphs": [ - "每次生成迭代执行的步数。", - "通常情况下步数越多结果越好,但需要更多生成时间。" - ] - }, - "paramPositiveConditioning": { - "heading": "正向提示词", - "paragraphs": [ - "引导生成过程。您可以使用任何单词或短语。", - "Compel 语法、动态提示词语法和 embeddings。" - ] - }, - "lora": { - "heading": "LoRA 权重", - "paragraphs": [ - "更高的 LoRA 权重会对最终图像产生更大的影响。" - ] - }, - "infillMethod": { - "heading": "填充方法", - "paragraphs": [ - "填充选定区域的方式。" - ] - }, - "controlNetBeginEnd": { - "heading": "开始 / 结束步数百分比", - "paragraphs": [ - "去噪过程中在哪部分步数应用 ControlNet。", - "在组合处理开始阶段应用 ControlNet,且在引导细节生成的结束阶段应用 ControlNet。" - ] - }, - "scaleBeforeProcessing": { - "heading": "处理前缩放", - "paragraphs": [ - "生成图像前将所选区域缩放为最适合模型的大小。" - ] - }, - "paramDenoisingStrength": { - "heading": "去噪强度", - "paragraphs": [ - "为输入图像添加的噪声量。", - "输入 0 会导致结果图像和输入完全相同,输入 1 则会生成全新的图像。" - ] - }, - "paramSeed": { - "heading": "种子", - "paragraphs": [ - "控制用于生成的起始噪声。", - "禁用 “随机种子” 来以相同设置生成相同的结果。" - ] - }, - "controlNetControlMode": { - "heading": "控制模式", - "paragraphs": [ - "给提示词或 ControlNet 增加更大的权重。" - ] - }, - "dynamicPrompts": { - "paragraphs": [ - "动态提示词可将单个提示词解析为多个。", - "基本语法示例:\"a {red|green|blue} ball\"。这会产生三种提示词:\"a red ball\", \"a green ball\" 和 \"a blue ball\"。", - "可以在单个提示词中多次使用该语法,但务必请使用最大提示词设置来控制生成的提示词数量。" - ], - "heading": "动态提示词" - }, - "paramVAE": { - "paragraphs": [ - "用于将 AI 输出转换成最终图像的模型。" - ], - "heading": "VAE" - }, - "dynamicPromptsSeedBehaviour": { - "paragraphs": [ - "控制生成提示词时种子的使用方式。", - "每次迭代过程都会使用一个唯一的种子。使用本选项来探索单个种子的提示词变化。", - "例如,如果你有 5 种提示词,则生成的每个图像都会使用相同种子。", - "为每张图像使用独立的唯一种子。这可以提供更多变化。" - ], - "heading": "种子行为" - }, - "dynamicPromptsMaxPrompts": { - "heading": "最大提示词数量", - "paragraphs": [ - "限制动态提示词可生成的提示词数量。" - ] - }, - "controlNet": { - "paragraphs": [ - "ControlNet 为生成过程提供引导,为生成具有受控构图、结构、样式的图像提供帮助,具体的功能由所选的模型决定。" - ], - "heading": "ControlNet" - } - }, - "invocationCache": { - "disable": "禁用", - "misses": "缓存未中", - "enableFailed": "启用调用缓存时出现问题", - "invocationCache": "调用缓存", - "clearSucceeded": "调用缓存已清除", - "enableSucceeded": "调用缓存已启用", - "clearFailed": "清除调用缓存时出现问题", - "hits": "缓存命中", - "disableSucceeded": "调用缓存已禁用", - "disableFailed": "禁用调用缓存时出现问题", - "enable": "启用", - "clear": "清除", - "maxCacheSize": "最大缓存大小", - "cacheSize": "缓存大小" - }, - "hrf": { - "enableHrf": "启用高分辨率修复", - "upscaleMethod": "放大方法", - "enableHrfTooltip": "使用较低的分辨率进行初始生成,放大到基础分辨率后进行图生图。", - "metadata": { - "strength": "高分辨率修复强度", - "enabled": "高分辨率修复已启用", - "method": "高分辨率修复方法" - }, - "hrf": "高分辨率修复", - "hrfStrength": "高分辨率修复强度", - "strengthTooltip": "值越低细节越少,但可以减少部分潜在的伪影。" - } -} diff --git a/invokeai/frontend/web/dist/locales/zh_Hant.json b/invokeai/frontend/web/dist/locales/zh_Hant.json deleted file mode 100644 index fe51856117..0000000000 --- a/invokeai/frontend/web/dist/locales/zh_Hant.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "common": { - "nodes": "節點", - "img2img": "圖片轉圖片", - "langSimplifiedChinese": "簡體中文", - "statusError": "錯誤", - "statusDisconnected": "已中斷連線", - "statusConnected": "已連線", - "back": "返回", - "load": "載入", - "close": "關閉", - "langEnglish": "英語", - "settingsLabel": "設定", - "upload": "上傳", - "langArabic": "阿拉伯語", - "discordLabel": "Discord", - "nodesDesc": "使用Node生成圖像的系統正在開發中。敬請期待有關於這項功能的更新。", - "reportBugLabel": "回報錯誤", - "githubLabel": "GitHub", - "langKorean": "韓語", - "langPortuguese": "葡萄牙語", - "hotkeysLabel": "快捷鍵", - "languagePickerLabel": "切換語言", - "langDutch": "荷蘭語", - "langFrench": "法語", - "langGerman": "德語", - "langItalian": "義大利語", - "langJapanese": "日語", - "langPolish": "波蘭語", - "langBrPortuguese": "巴西葡萄牙語", - "langRussian": "俄語", - "langSpanish": "西班牙語", - "unifiedCanvas": "統一畫布", - "cancel": "取消", - "langHebrew": "希伯來語", - "txt2img": "文字轉圖片" - }, - "accessibility": { - "modelSelect": "選擇模型", - "invokeProgressBar": "Invoke 進度條", - "uploadImage": "上傳圖片", - "reset": "重設", - "nextImage": "下一張圖片", - "previousImage": "上一張圖片", - "flipHorizontally": "水平翻轉", - "useThisParameter": "使用此參數", - "zoomIn": "放大", - "zoomOut": "縮小", - "flipVertically": "垂直翻轉", - "modifyConfig": "修改配置", - "menu": "選單" - } -} diff --git a/tests/test_path.py b/tests/test_path.py index 4c502acdcc..2f2e3779c7 100644 --- a/tests/test_path.py +++ b/tests/test_path.py @@ -10,7 +10,6 @@ from PIL import Image import invokeai.app.assets.images as image_assets import invokeai.configs as configs -import invokeai.frontend.web.dist as frontend class ConfigsTestCase(unittest.TestCase): @@ -21,20 +20,11 @@ class ConfigsTestCase(unittest.TestCase): configs_path = pathlib.Path(configs.__path__[0]) return configs_path - def get_frontend_path(self) -> pathlib.Path: - """Get the path of the frontend dist folder""" - return pathlib.Path(frontend.__path__[0]) - def test_configs_path(self): """Test that the configs path is correct""" TEST_PATH = str(self.get_configs_path()) assert TEST_PATH.endswith(str(osp.join("invokeai", "configs"))) - def test_frontend_path(self): - """Test that the frontend path is correct""" - FRONTEND_PATH = str(self.get_frontend_path()) - assert FRONTEND_PATH.endswith(osp.join("invokeai", "frontend", "web", "dist")) - def test_caution_img(self): """Verify the caution image""" caution_img = Image.open(osp.join(image_assets.__path__[0], "caution.png"))