diff --git a/.github/workflows/lint-frontend.yml b/.github/workflows/lint-frontend.yml index 68fcc9eaef..3954962d0c 100644 --- a/.github/workflows/lint-frontend.yml +++ b/.github/workflows/lint-frontend.yml @@ -23,7 +23,7 @@ jobs: node-version: '18' - uses: actions/checkout@v3 - run: 'yarn install --frozen-lockfile' - - run: 'yarn tsc' - - run: 'yarn run madge' - - run: 'yarn run lint --max-warnings=0' - - run: 'yarn run prettier --check' + - run: 'yarn run lint:tsc' + - run: 'yarn run lint:madge' + - run: 'yarn run lint:eslint' + - run: 'yarn run lint:prettier' diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index 1cbf891423..135579e4fc 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -941,7 +941,7 @@ class ModelManager(object): "openai/clip-vit-large-patch14/models--openai--clip-vit-large-patch14" ), ] - legacy_locations.extend(list(Path(models_dir,"diffusers").glob('*'))) + legacy_locations.extend(list(global_cache_dir("diffusers").glob('*'))) legacy_layout = False for model in legacy_locations: @@ -950,9 +950,17 @@ class ModelManager(object): return print( - "** Old model directory layout (< v3.0) detected. Reorganizing." + """ +>> ALERT: +>> The location of your previously-installed diffusers models needs to move from +>> invokeai/models/diffusers to invokeai/models/hub due to a change introduced by +>> diffusers version 0.14. InvokeAI will now move all models from the "diffusers" directory +>> into "hub" and then remove the diffusers directory. This is a quick, safe, one-time +>> operation. However if you have customized either of these directories and need to +>> make adjustments, please press ctrl-C now to abort and relaunch InvokeAI when you are ready. +>> Otherwise press to continue.""" ) - print("** This is a quick one-time operation.") + input('continue> ') # transformer files get moved into the hub directory if cls._is_huggingface_hub_directory_present(): @@ -971,7 +979,10 @@ class ModelManager(object): if dest.is_symlink(): print(f"** Found symlink at {dest.name}. Not migrating.") elif dest.exists(): - rmtree(source) + if source.is_dir(): + rmtree(source) + else: + source.unlink() else: move(source, dest) diff --git a/invokeai/frontend/web/.eslintignore b/invokeai/frontend/web/.eslintignore index 0836b8ba21..99d8bab48c 100644 --- a/invokeai/frontend/web/.eslintignore +++ b/invokeai/frontend/web/.eslintignore @@ -3,3 +3,6 @@ dist/ node_modules/ patches/ stats.html +index.html +.yarn/ +*.scss diff --git a/invokeai/frontend/web/.eslintrc.js b/invokeai/frontend/web/.eslintrc.js index 73a11d5c95..489d3cfdff 100644 --- a/invokeai/frontend/web/.eslintrc.js +++ b/invokeai/frontend/web/.eslintrc.js @@ -30,7 +30,10 @@ module.exports = { radix: 'error', 'space-before-blocks': 'error', 'import/prefer-default-export': 'off', - '@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '_+' }], + '@typescript-eslint/no-unused-vars': [ + 'warn', + { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }, + ], 'prettier/prettier': ['error', { endOfLine: 'auto' }], }, settings: { diff --git a/invokeai/frontend/web/.husky/pre-commit b/invokeai/frontend/web/.husky/pre-commit index f5a410bda9..f89f3ad735 100755 --- a/invokeai/frontend/web/.husky/pre-commit +++ b/invokeai/frontend/web/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -cd invokeai/frontend/ && npm run lint-staged +cd invokeai/frontend/web/ && npm run lint-staged diff --git a/invokeai/frontend/web/.prettierignore b/invokeai/frontend/web/.prettierignore index 0836b8ba21..905f177fde 100644 --- a/invokeai/frontend/web/.prettierignore +++ b/invokeai/frontend/web/.prettierignore @@ -3,3 +3,4 @@ dist/ node_modules/ patches/ stats.html +.yarn/ diff --git a/invokeai/frontend/web/.prettierrc.js b/invokeai/frontend/web/.prettierrc.js index 8d8d1cb49e..bffbd08257 100644 --- a/invokeai/frontend/web/.prettierrc.js +++ b/invokeai/frontend/web/.prettierrc.js @@ -3,6 +3,7 @@ module.exports = { tabWidth: 2, semi: true, singleQuote: true, + endOfLine: 'auto', overrides: [ { files: ['public/locales/*.json'], diff --git a/invokeai/frontend/web/__init__.py b/invokeai/frontend/web/__init__.py deleted file mode 100644 index 010129ece2..0000000000 --- a/invokeai/frontend/web/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -''' -Initialization file for invokeai.frontend.web -''' diff --git a/invokeai/frontend/web/dist/assets/App-06f6cac1.css b/invokeai/frontend/web/dist/assets/App-06f6cac1.css new file mode 100644 index 0000000000..d5ee537736 --- /dev/null +++ b/invokeai/frontend/web/dist/assets/App-06f6cac1.css @@ -0,0 +1 @@ +.ltr-image-gallery-css-transition-enter{transform:translate(150%)}.ltr-image-gallery-css-transition-enter-active{transform:translate(0);transition:all .12s ease-out}.ltr-image-gallery-css-transition-exit{transform:translate(0)}.ltr-image-gallery-css-transition-exit-active{transform:translate(150%);transition:all .12s ease-out}.rtl-image-gallery-css-transition-enter{transform:translate(-150%)}.rtl-image-gallery-css-transition-enter-active{transform:translate(0);transition:all .12s ease-out}.rtl-image-gallery-css-transition-exit{transform:translate(0)}.rtl-image-gallery-css-transition-exit-active{transform:translate(-150%);transition:all .12s ease-out}.ltr-parameters-panel-transition-enter{transform:translate(-150%)}.ltr-parameters-panel-transition-enter-active{transform:translate(0);transition:all .12s ease-out}.ltr-parameters-panel-transition-exit{transform:translate(0)}.ltr-parameters-panel-transition-exit-active{transform:translate(-150%);transition:all .12s ease-out}.rtl-parameters-panel-transition-enter{transform:translate(150%)}.rtl-parameters-panel-transition-enter-active{transform:translate(0);transition:all .12s ease-out}.rtl-parameters-panel-transition-exit{transform:translate(0)}.rtl-parameters-panel-transition-exit-active{transform:translate(150%);transition:all .12s ease-out} diff --git a/invokeai/frontend/web/dist/assets/App-1d2bdf6d.js b/invokeai/frontend/web/dist/assets/App-1d2bdf6d.js new file mode 100644 index 0000000000..b992684878 --- /dev/null +++ b/invokeai/frontend/web/dist/assets/App-1d2bdf6d.js @@ -0,0 +1,188 @@ +import{r as x,f as he,j as l,u as AS,c as oe,a as Ae,b as Pe,w as os,d as fn,o as At,S as Qf,e as mo,g as Ye,h as Dr,k as Jo,i as yc,_ as Ql,l as zS,m as RS,R as ke,n as Av,p as NS,q as Kd,s as ei,t as k1,v as j1,x as FS,y as LS,z as te,A as E1,B as P1,C as bc,D as is,F as B,E as Z,T as Ce,G as BS,H as Hl,I as Zl,J as Qd,K as Zd,L as Jd,U as HS,M as I1,N as M1,O as WS,P as T1,Q as _1,V as VS,W as D1,X as O1,Y as Ho,Z as kn,$ as A1,a0 as as,a1 as US,a2 as $S,a3 as z1,a4 as on,a5 as GS,a6 as vl,a7 as Sc,a8 as qS,a9 as zv,aa as Lo,ab as YS,ac as XS,ad as Da,ae as gl,af as KS,ag as QS,ah as ZS,ai as JS,aj as eC,ak as R1,al as N1,am as ef,an as tf,ao as F1,ap as nf,aq as rf,ar as Rv,as as L1,at as B1,au as H1,av as Wl,aw as Vl,ax as tC,ay as of,az as W1,aA as nC,aB as dd,aC as Nv,aD as V1,aE as U1,aF as af,aG as Wo,aH as rC,aI as oC,aJ as Fv,aK as Lv,aL as iC,aM as aC,aN as sC,aO as $1,aP as G1,aQ as lC,aR as cC,aS as Bv,aT as uC,aU as Hv,aV as dC,aW as fC,aX as hC,aY as pC,aZ as mC,a_ as vC,a$ as gC,b0 as xC,b1 as Wv,b2 as Ul,b3 as yC,b4 as bC,b5 as qa,b6 as Jl,b7 as q1,b8 as ec,b9 as SC,ba as CC,bb as xr,bc as Y1,bd as Zf,be as ss,bf as wC,bg as kC,bh as jC,bi as Sr,bj as X1,bk as EC,bl as PC,bm as K1,bn as IC,bo as MC,bp as TC,bq as _C,br as DC,bs as OC,bt as AC,bu as zC,bv as RC,bw as Vv,bx as NC,by as FC,bz as LC,bA as BC,bB as HC,bC as WC,bD as fd,bE as Na,bF as xl,bG as Uv,bH as hd,bI as pd,bJ as yl,bK as $v,bL as sf,bM as VC,bN as UC,bO as $C,bP as GC,bQ as qC,bR as YC,bS as XC,bT as bl,bU as md,bV as Sl,bW as nr,bX as KC,bY as QC,bZ as Q1,b_ as tc,b$ as Jf,c0 as Z1,c1 as J1,c2 as e2,c3 as ZC,c4 as t2,c5 as n2,c6 as r2,c7 as o2,c8 as i2,c9 as Wi,ca as Vi,cb as a2,cc as s2,cd as l2,ce as c2,cf as u2,cg as JC,ch as e3,ci as Gv,cj as Cl,ck as t3,cl as qv,cm as Yv,cn as Xv,co as Kv,cp as vd,cq as d2,cr as n3,cs as ls,ct as Qv,cu as r3,cv as o3,cw as i3,cx as Vo,cy as f2,cz as Zv,cA as a3,cB as s3,cC as l3,cD as c3,cE as u3,cF as d3,cG as f3,cH as h3,cI as p3,cJ as m3,cK as v3,cL as g3}from"./index-bcc89564.js";import{I as Jt,u as x3,c as y3,a as Et,b as Ut,A as oa,m as Wr,d as Ui,e as ti,P as eh,f as b3,C as S3,g as O,h as Y,n as h2}from"./scrollbar-2bd1868c.js";function th(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 nc="NOT_FOUND";function C3(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:nc},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function w3(e,t){var n=[];function r(u){var f=n.findIndex(function(p){return t(u,p.key)});if(f>-1){var h=n[f];return f>0&&(n.splice(f,1),n.unshift(h)),h.value}return nc}function o(u,f){r(u)===nc&&(n.unshift({key:u,value:f}),n.length>e&&n.pop())}function s(){return n}function c(){n=[]}return{get:r,put:o,getEntries:s,clear:c}}var k3=function(t,n){return t===n};function j3(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,s=0;s1?t-1:0),r=1;rperformance.now():()=>Date.now(),m2=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_3()),p2);function D3(e){let t=[],n=[],r=0,o=!1,s=!1;const c=new WeakSet,u={schedule:(f,h=!1,p=!1)=>{const g=p&&o,y=g?t:n;return h&&c.add(f),y.indexOf(f)===-1&&(y.push(f),g&&o&&(r=t.length)),f},cancel:f=>{const h=n.indexOf(f);h!==-1&&n.splice(h,1),c.delete(f)},process:f=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let h=0;h(e[t]=D3(()=>Ya=!0),e),{}),A3=cs.reduce((e,t)=>{const n=Cc[t];return e[t]=(r,o=!1,s=!1)=>(Ya||N3(),n.schedule(r,o,s)),e},{}),z3=cs.reduce((e,t)=>(e[t]=Cc[t].cancel,e),{});cs.reduce((e,t)=>(e[t]=()=>Cc[t].process($i),e),{});const R3=e=>Cc[e].process($i),v2=e=>{Ya=!1,$i.delta=lf?p2:Math.max(Math.min(e-$i.timestamp,O3),1),$i.timestamp=e,cf=!0,cs.forEach(R3),cf=!1,Ya&&(lf=!1,m2(v2))},N3=()=>{Ya=!0,lf=!0,cf||m2(v2)},Jv=()=>$i;var vr=function(){return vr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&s[s.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]0)&&!(o=r.next()).done;)s.push(o.value)}catch(u){c={error:u}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return s}function uf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;rl.jsx(Jt,{ref:f,viewBox:t,...o,...u,children:s.length?s:l.jsx("path",{fill:"currentColor",d:n})}));return c.displayName=r,c}function us(e){const{theme:t}=AS(),n=x3();return x.useMemo(()=>y3(t.direction,{...n,...e}),[e,t.direction,n])}var F3=Object.defineProperty,L3=(e,t,n)=>t in e?F3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rt=(e,t,n)=>(L3(e,typeof t!="symbol"?t+"":t,n),n);function tg(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 B3=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function ng(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function rg(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var df=typeof window<"u"?x.useLayoutEffect:x.useEffect,rc=e=>e,H3=class{constructor(){Rt(this,"descendants",new Map),Rt(this,"register",e=>{if(e!=null)return B3(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Rt(this,"unregister",e=>{this.descendants.delete(e);const t=tg(Array.from(this.descendants.keys()));this.assignIndex(t)}),Rt(this,"destroy",()=>{this.descendants.clear()}),Rt(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Rt(this,"count",()=>this.descendants.size),Rt(this,"enabledCount",()=>this.enabledValues().length),Rt(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Rt(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Rt(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Rt(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Rt(this,"first",()=>this.item(0)),Rt(this,"firstEnabled",()=>this.enabledItem(0)),Rt(this,"last",()=>this.item(this.descendants.size-1)),Rt(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Rt(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Rt(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Rt(this,"next",(e,t=!0)=>{const n=ng(e,this.count(),t);return this.item(n)}),Rt(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=ng(r,this.enabledCount(),t);return this.enabledItem(o)}),Rt(this,"prev",(e,t=!0)=>{const n=rg(e,this.count()-1,t);return this.item(n)}),Rt(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=rg(r,this.enabledCount()-1,t);return this.enabledItem(o)}),Rt(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=tg(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 W3(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 ct(...e){return t=>{e.forEach(n=>{W3(n,t)})}}function V3(...e){return x.useMemo(()=>ct(...e),e)}function U3(){const e=x.useRef(new H3);return df(()=>()=>e.current.destroy()),e.current}var[$3,x2]=Et({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function G3(e){const t=x2(),[n,r]=x.useState(-1),o=x.useRef(null);df(()=>()=>{o.current&&t.unregister(o.current)},[]),df(()=>{if(!o.current)return;const c=Number(o.current.dataset.index);n!=c&&!Number.isNaN(c)&&r(c)});const s=rc(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:ct(s,o)}}function rh(){return[rc($3),()=>rc(x2()),()=>U3(),o=>G3(o)]}var[q3,wc]=Et({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Y3,oh]=Et({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[X3,MF,K3,Q3]=rh(),zi=he(function(t,n){const{getButtonProps:r}=oh(),o=r(t,n),c={display:"flex",alignItems:"center",width:"100%",outline:0,...wc().button};return l.jsx(oe.button,{...o,className:Ae("chakra-accordion__button",t.className),__css:c})});zi.displayName="AccordionButton";function ih(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(y,S)=>y!==S}=e,s=Ut(r),c=Ut(o),[u,f]=x.useState(n),h=t!==void 0,p=h?t:u,g=Ut(y=>{const C=typeof y=="function"?y(p):y;c(p,C)&&(h||f(C),s(C))},[h,s,p,c]);return[p,g]}function Z3(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:s,...c}=e;tw(e),nw(e);const u=K3(),[f,h]=x.useState(-1);x.useEffect(()=>()=>{h(-1)},[]);const[p,g]=ih({value:r,defaultValue(){return o?n??[]:n??-1},onChange:t});return{index:p,setIndex:g,htmlProps:c,getAccordionItemProps:S=>{let C=!1;return S!==null&&(C=Array.isArray(p)?p.includes(S):p===S),{isOpen:C,onChange:k=>{if(S!==null)if(o&&Array.isArray(p)){const j=k?p.concat(S):p.filter(M=>M!==S);g(j)}else k?g(S):s&&g(-1)}}},focusedIndex:f,setFocusedIndex:h,descendants:u}}var[J3,ah]=Et({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function ew(e){const{isDisabled:t,isFocusable:n,id:r,...o}=e,{getAccordionItemProps:s,setFocusedIndex:c}=ah(),u=x.useRef(null),f=x.useId(),h=r??f,p=`accordion-button-${h}`,g=`accordion-panel-${h}`;rw(e);const{register:y,index:S,descendants:C}=Q3({disabled:t&&!n}),{isOpen:w,onChange:k}=s(S===-1?null:S);ow({isOpen:w,isDisabled:t});const j=()=>{k==null||k(!0)},M=()=>{k==null||k(!1)},P=x.useCallback(()=>{k==null||k(!w),c(S)},[S,c,w,k]),I=x.useCallback(z=>{const F={ArrowDown:()=>{const L=C.nextEnabled(S);L==null||L.node.focus()},ArrowUp:()=>{const L=C.prevEnabled(S);L==null||L.node.focus()},Home:()=>{const L=C.firstEnabled();L==null||L.node.focus()},End:()=>{const L=C.lastEnabled();L==null||L.node.focus()}}[z.key];F&&(z.preventDefault(),F(z))},[C,S]),T=x.useCallback(()=>{c(S)},[c,S]),D=x.useCallback(function(V={},F=null){return{...V,type:"button",ref:ct(y,u,F),id:p,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:Pe(V.onClick,P),onFocus:Pe(V.onFocus,T),onKeyDown:Pe(V.onKeyDown,I)}},[p,t,w,P,T,I,g,y]),_=x.useCallback(function(V={},F=null){return{...V,ref:F,role:"region",id:g,"aria-labelledby":p,hidden:!w}},[p,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:j,onClose:M,getButtonProps:D,getPanelProps:_,htmlProps:o}}function tw(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;os({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function nw(e){os({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 rw(e){os({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 ow(e){os({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Ri(e){const{isOpen:t,isDisabled:n}=oh(),{reduceMotion:r}=ah(),o=Ae("chakra-accordion__icon",e.className),s=wc(),c={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return l.jsx(Jt,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:c,...e,children:l.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Ri.displayName="AccordionIcon";var Ni=he(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...c}=ew(t),f={...wc().container,overflowAnchor:"none"},h=x.useMemo(()=>c,[c]);return l.jsx(Y3,{value:h,children:l.jsx(oe.div,{ref:n,...s,className:Ae("chakra-accordion__item",o),__css:f,children:typeof r=="function"?r({isExpanded:!!c.isOpen,isDisabled:!!c.isDisabled}):r})})});Ni.displayName="AccordionItem";var Fi={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Uo={enter:{duration:.2,ease:Fi.easeOut},exit:{duration:.1,ease:Fi.easeIn}},Or={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})},iw=e=>e!=null&&parseInt(e.toString(),10)>0,og={exit:{height:{duration:.2,ease:Fi.ease},opacity:{duration:.3,ease:Fi.ease}},enter:{height:{duration:.3,ease:Fi.ease},opacity:{duration:.4,ease:Fi.ease}}},aw={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:iw(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:Or.exit(og.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:Or.enter(og.enter,o)}}},y2=x.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:c="auto",style:u,className:f,transition:h,transitionEnd:p,...g}=e,[y,S]=x.useState(!1);x.useEffect(()=>{const M=setTimeout(()=>{S(!0)});return()=>clearTimeout(M)},[]),os({condition:Boolean(s>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const C=parseFloat(s.toString())>0,w={startingHeight:s,endingHeight:c,animateOpacity:o,transition:y?h:{enter:{duration:0}},transitionEnd:{enter:p==null?void 0:p.enter,exit:r?p==null?void 0:p.exit:{...p==null?void 0:p.exit,display:C?"block":"none"}}},k=r?n:!0,j=n||r?"enter":"exit";return l.jsx(oa,{initial:!1,custom:w,children:k&&l.jsx(Wr.div,{ref:t,...g,className:Ae("chakra-collapse",f),style:{overflow:"hidden",display:"block",...u},custom:w,variants:aw,initial:r?"exit":!1,animate:j,exit:"exit"})})});y2.displayName="Collapse";var sw={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Or.enter(Uo.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:Or.exit(Uo.exit,n),transitionEnd:t==null?void 0:t.exit}}},b2={initial:"exit",animate:"enter",exit:"exit",variants:sw},lw=x.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:c,transitionEnd:u,delay:f,...h}=t,p=o||r?"enter":"exit",g=r?o&&r:!0,y={transition:c,transitionEnd:u,delay:f};return l.jsx(oa,{custom:y,children:g&&l.jsx(Wr.div,{ref:n,className:Ae("chakra-fade",s),custom:y,...b2,animate:p,...h})})});lw.displayName="Fade";var cw={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:Or.exit(Uo.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:Or.enter(Uo.enter,n),transitionEnd:e==null?void 0:e.enter}}},S2={initial:"exit",animate:"enter",exit:"exit",variants:cw},uw=x.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,initialScale:c=.95,className:u,transition:f,transitionEnd:h,delay:p,...g}=t,y=r?o&&r:!0,S=o||r?"enter":"exit",C={initialScale:c,reverse:s,transition:f,transitionEnd:h,delay:p};return l.jsx(oa,{custom:C,children:y&&l.jsx(Wr.div,{ref:n,className:Ae("chakra-offset-slide",u),...S2,animate:S,custom:C,...g})})});uw.displayName="ScaleFade";var dw={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:Or.exit(Uo.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:Or.enter(Uo.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:s})=>{var c;const u={x:t,y:e};return{opacity:0,transition:(c=n==null?void 0:n.exit)!=null?c:Or.exit(Uo.exit,s),...o?{...u,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...u,...r==null?void 0:r.exit}}}}},ff={initial:"initial",animate:"enter",exit:"exit",variants:dw},fw=x.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,className:c,offsetX:u=0,offsetY:f=8,transition:h,transitionEnd:p,delay:g,...y}=t,S=r?o&&r:!0,C=o||r?"enter":"exit",w={offsetX:u,offsetY:f,reverse:s,transition:h,transitionEnd:p,delay:g};return l.jsx(oa,{custom:w,children:S&&l.jsx(Wr.div,{ref:n,className:Ae("chakra-offset-slide",c),custom:w,...ff,animate:C,...y})})});fw.displayName="SlideFade";var Li=he(function(t,n){const{className:r,motionProps:o,...s}=t,{reduceMotion:c}=ah(),{getPanelProps:u,isOpen:f}=oh(),h=u(s,n),p=Ae("chakra-accordion__panel",r),g=wc();c||delete h.hidden;const y=l.jsx(oe.div,{...h,__css:g.panel,className:p});return c?y:l.jsx(y2,{in:f,...o,children:y})});Li.displayName="AccordionPanel";var sh=he(function({children:t,reduceMotion:n,...r},o){const s=fn("Accordion",r),c=At(r),{htmlProps:u,descendants:f,...h}=Z3(c),p=x.useMemo(()=>({...h,reduceMotion:!!n}),[h,n]);return l.jsx(X3,{value:f,children:l.jsx(J3,{value:p,children:l.jsx(q3,{value:s,children:l.jsx(oe.div,{ref:o,...u,className:Ae("chakra-accordion",r.className),__css:s.root,children:t})})})})});sh.displayName="Accordion";var hf=he(function(t,n){const{htmlWidth:r,htmlHeight:o,alt:s,...c}=t;return l.jsx("img",{width:r,height:o,ref:n,alt:s,...c})});hf.displayName="NativeImage";function hw(e){const{loading:t,src:n,srcSet:r,onLoad:o,onError:s,crossOrigin:c,sizes:u,ignoreFallback:f}=e,[h,p]=x.useState("pending");x.useEffect(()=>{p(n?"loading":"pending")},[n]);const g=x.useRef(),y=x.useCallback(()=>{if(!n)return;S();const C=new Image;C.src=n,c&&(C.crossOrigin=c),r&&(C.srcset=r),u&&(C.sizes=u),t&&(C.loading=t),C.onload=w=>{S(),p("loaded"),o==null||o(w)},C.onerror=w=>{S(),p("failed"),s==null||s(w)},g.current=C},[n,c,r,u,o,s,t]),S=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return Ui(()=>{if(!f)return h==="loading"&&y(),()=>{S()}},[h,y,f]),f?"loaded":h}var pw=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function mw(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var ds=he(function(t,n){const{fallbackSrc:r,fallback:o,src:s,srcSet:c,align:u,fit:f,loading:h,ignoreFallback:p,crossOrigin:g,fallbackStrategy:y="beforeLoadOrError",referrerPolicy:S,...C}=t,w=r!==void 0||o!==void 0,k=h!=null||p||!w,j=hw({...t,ignoreFallback:k}),M=pw(j,y),P={ref:n,objectFit:f,objectPosition:u,...k?C:mw(C,["onError","onLoad"])};return M?o||l.jsx(oe.img,{as:hf,className:"chakra-image__placeholder",src:r,...P}):l.jsx(oe.img,{as:hf,src:s,srcSet:c,crossOrigin:g,loading:h,referrerPolicy:S,className:"chakra-image",...P})});ds.displayName="Image";function lh(e){return x.Children.toArray(e).filter(t=>x.isValidElement(t))}var[vw,gw]=Et({strict:!1,name:"ButtonGroupContext"}),xw={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}}},yw={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},en=he(function(t,n){const{size:r,colorScheme:o,variant:s,className:c,spacing:u="0.5rem",isAttached:f,isDisabled:h,orientation:p="horizontal",...g}=t,y=Ae("chakra-button__group",c),S=x.useMemo(()=>({size:r,colorScheme:o,variant:s,isDisabled:h}),[r,o,s,h]);let C={display:"inline-flex",...f?xw[p]:yw[p](u)};const w=p==="vertical";return l.jsx(vw,{value:S,children:l.jsx(oe.div,{ref:n,role:"group",__css:C,className:y,"data-attached":f?"":void 0,"data-orientation":p,flexDir:w?"column":void 0,...g})})});en.displayName="ButtonGroup";function bw(e){const[t,n]=x.useState(!e);return{ref:x.useCallback(s=>{s&&n(s.tagName==="BUTTON")},[]),type:t?"button":void 0}}function pf(e){const{children:t,className:n,...r}=e,o=x.isValidElement(t)?x.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,s=Ae("chakra-button__icon",n);return l.jsx(oe.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:s,children:o})}pf.displayName="ButtonIcon";function oc(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=l.jsx(Qf,{color:"currentColor",width:"1em",height:"1em"}),className:s,__css:c,...u}=e,f=Ae("chakra-button__spinner",s),h=n==="start"?"marginEnd":"marginStart",p=x.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[h]:t?r:0,fontSize:"1em",lineHeight:"normal",...c}),[c,t,h,r]);return l.jsx(oe.div,{className:f,...u,__css:p,children:o})}oc.displayName="ButtonSpinner";var ni=he((e,t)=>{const n=gw(),r=mo("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:s,isActive:c,children:u,leftIcon:f,rightIcon:h,loadingText:p,iconSpacing:g="0.5rem",type:y,spinner:S,spinnerPlacement:C="start",className:w,as:k,...j}=At(e),M=x.useMemo(()=>{const D={...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:D}}},[r,n]),{ref:P,type:I}=bw(k),T={rightIcon:h,leftIcon:f,iconSpacing:g,children:u};return l.jsxs(oe.button,{ref:V3(t,P),as:k,type:y??I,"data-active":Ye(c),"data-loading":Ye(s),__css:M,className:Ae("chakra-button",w),...j,disabled:o||s,children:[s&&C==="start"&&l.jsx(oc,{className:"chakra-button__spinner--start",label:p,placement:"start",spacing:g,children:S}),s?p||l.jsx(oe.span,{opacity:0,children:l.jsx(ig,{...T})}):l.jsx(ig,{...T}),s&&C==="end"&&l.jsx(oc,{className:"chakra-button__spinner--end",label:p,placement:"end",spacing:g,children:S})]})});ni.displayName="Button";function ig(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return l.jsxs(l.Fragment,{children:[t&&l.jsx(pf,{marginEnd:o,children:t}),r,n&&l.jsx(pf,{marginStart:o,children:n})]})}var co=he((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":s,...c}=e,u=n||r,f=x.isValidElement(u)?x.cloneElement(u,{"aria-hidden":!0,focusable:!1}):null;return l.jsx(ni,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":s,...c,children:f})});co.displayName="IconButton";var[TF,Sw]=Et({name:"CheckboxGroupContext",strict:!1});function Cw(e){return l.jsx(oe.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:l.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function ww(e){return l.jsx(oe.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:l.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function kw(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?ww:Cw;return n||t?l.jsx(oe.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:l.jsx(o,{...r})}):null}var[jw,C2]=Et({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Ew,ri]=Et({strict:!1,name:"FormControlContext"});function Pw(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:s,...c}=e,u=x.useId(),f=t||`field-${u}`,h=`${f}-label`,p=`${f}-feedback`,g=`${f}-helptext`,[y,S]=x.useState(!1),[C,w]=x.useState(!1),[k,j]=x.useState(!1),M=x.useCallback((_={},z=null)=>({id:g,..._,ref:ct(z,V=>{V&&w(!0)})}),[g]),P=x.useCallback((_={},z=null)=>{var V,F;return{..._,ref:z,"data-focus":Ye(k),"data-disabled":Ye(o),"data-invalid":Ye(r),"data-readonly":Ye(s),id:(V=_.id)!=null?V:h,htmlFor:(F=_.htmlFor)!=null?F:f}},[f,o,k,r,s,h]),I=x.useCallback((_={},z=null)=>({id:p,..._,ref:ct(z,V=>{V&&S(!0)}),"aria-live":"polite"}),[p]),T=x.useCallback((_={},z=null)=>({..._,...c,ref:z,role:"group"}),[c]),D=x.useCallback((_={},z=null)=>({..._,ref:z,role:"presentation","aria-hidden":!0,children:_.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!s,isDisabled:!!o,isFocused:!!k,onFocus:()=>j(!0),onBlur:()=>j(!1),hasFeedbackText:y,setHasFeedbackText:S,hasHelpText:C,setHasHelpText:w,id:f,labelId:h,feedbackId:p,helpTextId:g,htmlProps:c,getHelpTextProps:M,getErrorMessageProps:I,getRootProps:T,getLabelProps:P,getRequiredIndicatorProps:D}}var rt=he(function(t,n){const r=fn("Form",t),o=At(t),{getRootProps:s,htmlProps:c,...u}=Pw(o),f=Ae("chakra-form-control",t.className);return l.jsx(Ew,{value:u,children:l.jsx(jw,{value:r,children:l.jsx(oe.div,{...s({},n),className:f,__css:r.container})})})});rt.displayName="FormControl";var wt=he(function(t,n){const r=ri(),o=C2(),s=Ae("chakra-form__helper-text",t.className);return l.jsx(oe.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:s})});wt.displayName="FormHelperText";var[Iw,Mw]=Et({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kt=he((e,t)=>{const n=fn("FormError",e),r=At(e),o=ri();return o!=null&&o.isInvalid?l.jsx(Iw,{value:n,children:l.jsx(oe.div,{...o==null?void 0:o.getErrorMessageProps(r,t),className:Ae("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})}):null});kt.displayName="FormErrorMessage";var Tw=he((e,t)=>{const n=Mw(),r=ri();if(!(r!=null&&r.isInvalid))return null;const o=Ae("chakra-form__error-icon",e.className);return l.jsx(Jt,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:o,children:l.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"})})});Tw.displayName="FormErrorIcon";var st=he(function(t,n){var r;const o=mo("FormLabel",t),s=At(t),{className:c,children:u,requiredIndicator:f=l.jsx(w2,{}),optionalIndicator:h=null,...p}=s,g=ri(),y=(r=g==null?void 0:g.getLabelProps(p,n))!=null?r:{ref:n,...p};return l.jsxs(oe.label,{...y,className:Ae("chakra-form__label",s.className),__css:{display:"block",textAlign:"start",...o},children:[u,g!=null&&g.isRequired?f:h]})});st.displayName="FormLabel";var w2=he(function(t,n){const r=ri(),o=C2();if(!(r!=null&&r.isRequired))return null;const s=Ae("chakra-form__required-indicator",t.className);return l.jsx(oe.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:s})});w2.displayName="RequiredIndicator";function ch(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...s}=uh(e);return{...s,disabled:t,readOnly:r,required:o,"aria-invalid":Dr(n),"aria-required":Dr(o),"aria-readonly":Dr(r)}}function uh(e){var t,n,r;const o=ri(),{id:s,disabled:c,readOnly:u,required:f,isRequired:h,isInvalid:p,isReadOnly:g,isDisabled:y,onFocus:S,onBlur:C,...w}=e,k=e["aria-describedby"]?[e["aria-describedby"]]:[];return o!=null&&o.hasFeedbackText&&(o!=null&&o.isInvalid)&&k.push(o.feedbackId),o!=null&&o.hasHelpText&&k.push(o.helpTextId),{...w,"aria-describedby":k.join(" ")||void 0,id:s??(o==null?void 0:o.id),isDisabled:(t=c??y)!=null?t:o==null?void 0:o.isDisabled,isReadOnly:(n=u??g)!=null?n:o==null?void 0:o.isReadOnly,isRequired:(r=f??h)!=null?r:o==null?void 0:o.isRequired,isInvalid:p??(o==null?void 0:o.isInvalid),onFocus:Pe(o==null?void 0:o.onFocus,S),onBlur:Pe(o==null?void 0:o.onBlur,C)}}var _w={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},ag=!1,fs=null,Xo=!1,mf=!1,vf=new Set;function dh(e,t){vf.forEach(n=>n(e,t))}var Dw=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ow(e){return!(e.metaKey||!Dw&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function sg(e){Xo=!0,Ow(e)&&(fs="keyboard",dh("keyboard",e))}function ji(e){if(fs="pointer",e.type==="mousedown"||e.type==="pointerdown"){Xo=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;dh("pointer",e)}}function Aw(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function zw(e){Aw(e)&&(Xo=!0,fs="virtual")}function Rw(e){e.target===window||e.target===document||(!Xo&&!mf&&(fs="virtual",dh("virtual",e)),Xo=!1,mf=!1)}function Nw(){Xo=!1,mf=!0}function lg(){return fs!=="pointer"}function Fw(){if(typeof window>"u"||ag)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Xo=!0,e.apply(this,n)},document.addEventListener("keydown",sg,!0),document.addEventListener("keyup",sg,!0),document.addEventListener("click",zw,!0),window.addEventListener("focus",Rw,!0),window.addEventListener("blur",Nw,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",ji,!0),document.addEventListener("pointermove",ji,!0),document.addEventListener("pointerup",ji,!0)):(document.addEventListener("mousedown",ji,!0),document.addEventListener("mousemove",ji,!0),document.addEventListener("mouseup",ji,!0)),ag=!0}function k2(e){Fw(),e(lg());const t=()=>e(lg());return vf.add(t),()=>{vf.delete(t)}}function Lw(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function j2(e={}){const t=uh(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:s,id:c,onBlur:u,onFocus:f,"aria-describedby":h}=t,{defaultChecked:p,isChecked:g,isFocusable:y,onChange:S,isIndeterminate:C,name:w,value:k,tabIndex:j=void 0,"aria-label":M,"aria-labelledby":P,"aria-invalid":I,...T}=e,D=Lw(T,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),_=Ut(S),z=Ut(u),V=Ut(f),[F,L]=x.useState(!1),[X,$]=x.useState(!1),[Q,re]=x.useState(!1),[ie,U]=x.useState(!1);x.useEffect(()=>k2(L),[]);const K=x.useRef(null),[ne,ce]=x.useState(!0),[Re,ze]=x.useState(!!p),Me=g!==void 0,J=Me?g:Re,ue=x.useCallback(ge=>{if(r||n){ge.preventDefault();return}Me||ze(J?ge.target.checked:C?!0:ge.target.checked),_==null||_(ge)},[r,n,J,Me,C,_]);Ui(()=>{K.current&&(K.current.indeterminate=Boolean(C))},[C]),ti(()=>{n&&$(!1)},[n,$]),Ui(()=>{const ge=K.current;ge!=null&&ge.form&&(ge.form.onreset=()=>{ze(!!p)})},[]);const Ie=n&&!y,Be=x.useCallback(ge=>{ge.key===" "&&U(!0)},[U]),Ne=x.useCallback(ge=>{ge.key===" "&&U(!1)},[U]);Ui(()=>{if(!K.current)return;K.current.checked!==J&&ze(K.current.checked)},[K.current]);const Ge=x.useCallback((ge={},Te=null)=>{const et=Ve=>{X&&Ve.preventDefault(),U(!0)};return{...ge,ref:Te,"data-active":Ye(ie),"data-hover":Ye(Q),"data-checked":Ye(J),"data-focus":Ye(X),"data-focus-visible":Ye(X&&F),"data-indeterminate":Ye(C),"data-disabled":Ye(n),"data-invalid":Ye(s),"data-readonly":Ye(r),"aria-hidden":!0,onMouseDown:Pe(ge.onMouseDown,et),onMouseUp:Pe(ge.onMouseUp,()=>U(!1)),onMouseEnter:Pe(ge.onMouseEnter,()=>re(!0)),onMouseLeave:Pe(ge.onMouseLeave,()=>re(!1))}},[ie,J,n,X,F,Q,C,s,r]),Qe=x.useCallback((ge={},Te=null)=>({...D,...ge,ref:ct(Te,et=>{et&&ce(et.tagName==="LABEL")}),onClick:Pe(ge.onClick,()=>{var et;ne||((et=K.current)==null||et.click(),requestAnimationFrame(()=>{var Ve;(Ve=K.current)==null||Ve.focus()}))}),"data-disabled":Ye(n),"data-checked":Ye(J),"data-invalid":Ye(s)}),[D,n,J,s,ne]),ve=x.useCallback((ge={},Te=null)=>({...ge,ref:ct(K,Te),type:"checkbox",name:w,value:k,id:c,tabIndex:j,onChange:Pe(ge.onChange,ue),onBlur:Pe(ge.onBlur,z,()=>$(!1)),onFocus:Pe(ge.onFocus,V,()=>$(!0)),onKeyDown:Pe(ge.onKeyDown,Be),onKeyUp:Pe(ge.onKeyUp,Ne),required:o,checked:J,disabled:Ie,readOnly:r,"aria-label":M,"aria-labelledby":P,"aria-invalid":I?Boolean(I):s,"aria-describedby":h,"aria-disabled":n,style:_w}),[w,k,c,ue,z,V,Be,Ne,o,J,Ie,r,M,P,I,s,h,n,j]),_e=x.useCallback((ge={},Te=null)=>({...ge,ref:Te,onMouseDown:Pe(ge.onMouseDown,cg),onTouchStart:Pe(ge.onTouchStart,cg),"data-disabled":Ye(n),"data-checked":Ye(J),"data-invalid":Ye(s)}),[J,n,s]);return{state:{isInvalid:s,isFocused:X,isChecked:J,isActive:ie,isHovered:Q,isIndeterminate:C,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:Qe,getCheckboxProps:Ge,getInputProps:ve,getLabelProps:_e,htmlProps:D}}function cg(e){e.preventDefault(),e.stopPropagation()}var Bw={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Hw={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Ww=Jo({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Vw=Jo({from:{opacity:0},to:{opacity:1}}),Uw=Jo({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),E2=he(function(t,n){const r=Sw(),o={...r,...t},s=fn("Checkbox",o),c=At(t),{spacing:u="0.5rem",className:f,children:h,iconColor:p,iconSize:g,icon:y=l.jsx(kw,{}),isChecked:S,isDisabled:C=r==null?void 0:r.isDisabled,onChange:w,inputProps:k,...j}=c;let M=S;r!=null&&r.value&&c.value&&(M=r.value.includes(c.value));let P=w;r!=null&&r.onChange&&c.value&&(P=yc(r.onChange,w));const{state:I,getInputProps:T,getCheckboxProps:D,getLabelProps:_,getRootProps:z}=j2({...j,isDisabled:C,isChecked:M,onChange:P}),V=x.useMemo(()=>({animation:I.isIndeterminate?`${Vw} 20ms linear, ${Uw} 200ms linear`:`${Ww} 200ms linear`,fontSize:g,color:p,...s.icon}),[p,g,,I.isIndeterminate,s.icon]),F=x.cloneElement(y,{__css:V,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return l.jsxs(oe.label,{__css:{...Hw,...s.container},className:Ae("chakra-checkbox",f),...z(),children:[l.jsx("input",{className:"chakra-checkbox__input",...T(k,n)}),l.jsx(oe.span,{__css:{...Bw,...s.control},className:"chakra-checkbox__control",...D(),children:F}),h&&l.jsx(oe.span,{className:"chakra-checkbox__label",..._(),__css:{marginStart:u,...s.label},children:h})]})});E2.displayName="Checkbox";function $w(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function fh(e,t){let n=$w(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function gf(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 ug(e,t,n){return(e-t)*100/(n-t)}function Gw(e,t,n){return(n-t)*e+t}function dg(e,t,n){const r=Math.round((e-t)/n)*n+t,o=gf(n);return fh(r,o)}function $l(e,t,n){return e==null?e:(n{var F;return r==null?"":(F=gd(r,s,n))!=null?F:""}),y=typeof o<"u",S=y?o:p,C=P2(no(S),s),w=n??C,k=x.useCallback(F=>{F!==S&&(y||g(F.toString()),h==null||h(F.toString(),no(F)))},[h,y,S]),j=x.useCallback(F=>{let L=F;return f&&(L=$l(L,c,u)),fh(L,w)},[w,f,u,c]),M=x.useCallback((F=s)=>{let L;S===""?L=no(F):L=no(S)+F,L=j(L),k(L)},[j,s,k,S]),P=x.useCallback((F=s)=>{let L;S===""?L=no(-F):L=no(S)-F,L=j(L),k(L)},[j,s,k,S]),I=x.useCallback(()=>{var F;let L;r==null?L="":L=(F=gd(r,s,n))!=null?F:c,k(L)},[r,n,s,k,c]),T=x.useCallback(F=>{var L;const X=(L=gd(F,s,w))!=null?L:c;k(X)},[w,s,k,c]),D=no(S);return{isOutOfRange:D>u||D{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 Yw(e){return"current"in e}var I2=()=>typeof window<"u";function Xw(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var Kw=e=>I2()&&e.test(navigator.vendor),Qw=e=>I2()&&e.test(Xw()),Zw=()=>Qw(/mac|iphone|ipad|ipod/i),Jw=()=>Zw()&&Kw(/apple/i);function e5(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var s,c;return(c=(s=t.current)==null?void 0:s.ownerDocument)!=null?c:document};$o(o,"pointerdown",s=>{if(!Jw()||!r)return;const c=s.target,f=(n??[t]).some(h=>{const p=Yw(h)?h.current:h;return(p==null?void 0:p.contains(c))||p===c});o().activeElement!==c&&f&&(s.preventDefault(),c.focus())})}var lt={},t5={get exports(){return lt},set exports(e){lt=e}},n5="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",r5=n5,o5=r5;function M2(){}function T2(){}T2.resetWarningCache=M2;var i5=function(){function e(r,o,s,c,u,f){if(f!==o5){var h=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 h.name="Invariant Violation",h}}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:T2,resetWarningCache:M2};return n.PropTypes=n,n};t5.exports=i5();var xf="data-focus-lock",_2="data-focus-lock-disabled",a5="data-no-focus-lock",s5="data-autofocus-inside",l5="data-no-autofocus";function c5(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function u5(e,t){var n=x.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 D2(e,t){return u5(t||null,function(n){return e.forEach(function(r){return c5(r,n)})})}var xd={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function O2(e){return e}function A2(e,t){t===void 0&&(t=O2);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,r);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(s){for(r=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(u){return s(u)},filter:function(){return n}}},assignMedium:function(s){r=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(s),c=n}var f=function(){var p=c;c=[],p.forEach(s)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(p){c.push(p),h()},filter:function(p){return c=c.filter(p),n}}}};return o}function hh(e,t){return t===void 0&&(t=O2),A2(e,t)}function z2(e){e===void 0&&(e={});var t=A2(null);return t.options=vr({async:!0,ssr:!1},e),t}var R2=function(e){var t=e.sideCar,n=g2(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,vr({},n))};R2.isSideCarExport=!0;function d5(e,t){return e.useMedium(t),R2}var N2=hh({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),F2=hh(),f5=hh(),h5=z2({async:!0}),p5=[],ph=x.forwardRef(function(t,n){var r,o=x.useState(),s=o[0],c=o[1],u=x.useRef(),f=x.useRef(!1),h=x.useRef(null),p=t.children,g=t.disabled,y=t.noFocusGuards,S=t.persistentFocus,C=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var k=t.group,j=t.className,M=t.whiteList,P=t.hasPositiveIndices,I=t.shards,T=I===void 0?p5:I,D=t.as,_=D===void 0?"div":D,z=t.lockProps,V=z===void 0?{}:z,F=t.sideCar,L=t.returnFocus,X=t.focusOptions,$=t.onActivation,Q=t.onDeactivation,re=x.useState({}),ie=re[0],U=x.useCallback(function(){h.current=h.current||document&&document.activeElement,u.current&&$&&$(u.current),f.current=!0},[$]),K=x.useCallback(function(){f.current=!1,Q&&Q(u.current)},[Q]);x.useEffect(function(){g||(h.current=null)},[]);var ne=x.useCallback(function(Be){var Ne=h.current;if(Ne&&Ne.focus){var Ge=typeof L=="function"?L(Ne):L;if(Ge){var Qe=typeof Ge=="object"?Ge:void 0;h.current=null,Be?Promise.resolve().then(function(){return Ne.focus(Qe)}):Ne.focus(Qe)}}},[L]),ce=x.useCallback(function(Be){f.current&&N2.useMedium(Be)},[]),Re=F2.useMedium,ze=x.useCallback(function(Be){u.current!==Be&&(u.current=Be,c(Be))},[]),Me=Ql((r={},r[_2]=g&&"disabled",r[xf]=k,r),V),J=y!==!0,ue=J&&y!=="tail",Ie=D2([n,ze]);return x.createElement(x.Fragment,null,J&&[x.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:g?-1:0,style:xd}),P?x.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:g?-1:1,style:xd}):null],!g&&x.createElement(F,{id:ie,sideCar:h5,observed:s,disabled:g,persistentFocus:S,crossFrame:C,autoFocus:w,whiteList:M,shards:T,onActivation:U,onDeactivation:K,returnFocus:ne,focusOptions:X}),x.createElement(_,Ql({ref:Ie},Me,{className:j,onBlur:Re,onFocus:ce}),p),ue&&x.createElement("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:xd}))});ph.propTypes={};ph.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const L2=ph;function mh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zS(e,t)}function m5(e,t){function n(r){return r.displayName||r.name||"Component"}return function(o){var s=[],c;function u(){c=e(s.map(function(h){return h.props})),t(c)}var f=function(h){mh(p,h);function p(){return h.apply(this,arguments)||this}p.peek=function(){return c};var g=p.prototype;return g.componentDidMount=function(){s.push(this),u()},g.componentDidUpdate=function(){u()},g.componentWillUnmount=function(){var S=s.indexOf(this);s.splice(S,1),u()},g.render=function(){return ke.createElement(o,this.props)},p}(x.PureComponent);return RS(f,"displayName","SideEffect("+n(o)+")"),f}}var wr=function(e){for(var t=Array(e.length),n=0;n=0}).sort(w5)},k5=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],gh=k5.join(","),j5="".concat(gh,", [data-focus-guard]"),X2=function(e,t){return wr((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?j5:gh)?[r]:[],X2(r))},[])},E5=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?kc([e.contentDocument.body],t):[e]},kc=function(e,t){return e.reduce(function(n,r){var o,s=X2(r,t),c=(o=[]).concat.apply(o,s.map(function(u){return E5(u,t)}));return n.concat(c,r.parentNode?wr(r.parentNode.querySelectorAll(gh)).filter(function(u){return u===r}):[])},[])},P5=function(e){var t=e.querySelectorAll("[".concat(s5,"]"));return wr(t).map(function(n){return kc([n])}).reduce(function(n,r){return n.concat(r)},[])},xh=function(e,t){return wr(e).filter(function(n){return V2(t,n)}).filter(function(n){return b5(n)})},fg=function(e,t){return t===void 0&&(t=new Map),wr(e).filter(function(n){return U2(t,n)})},yf=function(e,t,n){return Y2(xh(kc(e,n),t),!0,n)},hg=function(e,t){return Y2(xh(kc(e),t),!1)},I5=function(e,t){return xh(P5(e),t)},Gi=function(e,t){return e.shadowRoot?Gi(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:wr(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?Gi(o,t):!1}return Gi(n,t)})},M5=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(c,u){return!t.has(u)})},K2=function(e){return e.parentNode?K2(e.parentNode):e},yh=function(e){var t=ic(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(xf);return n.push.apply(n,o?M5(wr(K2(r).querySelectorAll("[".concat(xf,'="').concat(o,'"]:not([').concat(_2,'="disabled"])')))):[r]),n},[])},T5=function(e){try{return e()}catch{return}},Xa=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Xa(t.shadowRoot):t instanceof HTMLIFrameElement&&T5(function(){return t.contentWindow.document})?Xa(t.contentWindow.document):t}},_5=function(e,t){return e===t},D5=function(e,t){return Boolean(wr(e.querySelectorAll("iframe")).some(function(n){return _5(n,t)}))},Q2=function(e,t){return t===void 0&&(t=Xa(B2(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:yh(e).some(function(n){return Gi(n,t)||D5(n,t)})},O5=function(e){e===void 0&&(e=document);var t=Xa(e);return t?wr(e.querySelectorAll("[".concat(a5,"]"))).some(function(n){return Gi(n,t)}):!1},A5=function(e,t){return t.filter(q2).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},bh=function(e,t){return q2(e)&&e.name?A5(e,t):e},z5=function(e){var t=new Set;return e.forEach(function(n){return t.add(bh(n,e))}),e.filter(function(n){return t.has(n)})},pg=function(e){return e[0]&&e.length>1?bh(e[0],e):e[0]},mg=function(e,t){return e.length>1?e.indexOf(bh(e[t],e)):t},Z2="NEW_FOCUS",R5=function(e,t,n,r){var o=e.length,s=e[0],c=e[o-1],u=vh(n);if(!(n&&e.indexOf(n)>=0)){var f=n!==void 0?t.indexOf(n):-1,h=r?t.indexOf(r):f,p=r?e.indexOf(r):-1,g=f-h,y=t.indexOf(s),S=t.indexOf(c),C=z5(t),w=n!==void 0?C.indexOf(n):-1,k=w-(r?C.indexOf(r):f),j=mg(e,0),M=mg(e,o-1);if(f===-1||p===-1)return Z2;if(!g&&p>=0)return p;if(f<=y&&u&&Math.abs(g)>1)return M;if(f>=S&&u&&Math.abs(g)>1)return j;if(g&&Math.abs(k)>1)return p;if(f<=y)return M;if(f>S)return j;if(g)return Math.abs(g)>1?p:(o+p+g)%o}},N5=function(e){return function(t){var n,r=(n=$2(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},F5=function(e,t,n){var r=e.map(function(s){var c=s.node;return c}),o=fg(r.filter(N5(n)));return o&&o.length?pg(o):pg(fg(t))},bf=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&bf(e.parentNode.host||e.parentNode,t),t},yd=function(e,t){for(var n=bf(e),r=bf(t),o=0;o=0)return s}return!1},J2=function(e,t,n){var r=ic(e),o=ic(t),s=r[0],c=!1;return o.filter(Boolean).forEach(function(u){c=yd(c||u,u)||c,n.filter(Boolean).forEach(function(f){var h=yd(s,f);h&&(!c||Gi(h,c)?c=h:c=yd(h,c))})}),c},L5=function(e,t){return e.reduce(function(n,r){return n.concat(I5(r,t))},[])},B5=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(C5)},H5=function(e,t){var n=Xa(ic(e).length>0?document:B2(e).ownerDocument),r=yh(e).filter(ac),o=J2(n||e,e,r),s=new Map,c=hg(r,s),u=yf(r,s).filter(function(S){var C=S.node;return ac(C)});if(!(!u[0]&&(u=c,!u[0]))){var f=hg([o],s).map(function(S){var C=S.node;return C}),h=B5(f,u),p=h.map(function(S){var C=S.node;return C}),g=R5(p,f,n,t);if(g===Z2){var y=F5(c,p,L5(r,s));if(y)return{node:y};console.warn("focus-lock: cannot find any node to move focus into");return}return g===void 0?g:h[g]}},W5=function(e){var t=yh(e).filter(ac),n=J2(e,e,t),r=new Map,o=yf([n],r,!0),s=yf(t,r).filter(function(c){var u=c.node;return ac(u)}).map(function(c){var u=c.node;return u});return o.map(function(c){var u=c.node,f=c.index;return{node:u,index:f,lockItem:s.indexOf(u)>=0,guard:vh(u)}})},V5=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},bd=0,Sd=!1,ex=function(e,t,n){n===void 0&&(n={});var r=H5(e,t);if(!Sd&&r){if(bd>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Sd=!0,setTimeout(function(){Sd=!1},1);return}bd++,V5(r.node,n.focusOptions),bd--}};function tx(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var U5=function(){return document&&document.activeElement===document.body},$5=function(){return U5()||O5()},qi=null,Bi=null,Yi=null,Ka=!1,G5=function(){return!0},q5=function(t){return(qi.whiteList||G5)(t)},Y5=function(t,n){Yi={observerNode:t,portaledElement:n}},X5=function(t){return Yi&&Yi.portaledElement===t};function vg(e,t,n,r){var o=null,s=e;do{var c=r[s];if(c.guard)c.node.dataset.focusAutoGuard&&(o=c);else if(c.lockItem){if(s!==e)return;o=null}else break}while((s+=n)!==t);o&&(o.node.tabIndex=0)}var K5=function(t){return t&&"current"in t?t.current:t},Q5=function(t){return t?Boolean(Ka):Ka==="meanwhile"},Z5=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},J5=function(t,n){return n.some(function(r){return Z5(t,r,r)})},sc=function(){var t=!1;if(qi){var n=qi,r=n.observed,o=n.persistentFocus,s=n.autoFocus,c=n.shards,u=n.crossFrame,f=n.focusOptions,h=r||Yi&&Yi.portaledElement,p=document&&document.activeElement;if(h){var g=[h].concat(c.map(K5).filter(Boolean));if((!p||q5(p))&&(o||Q5(u)||!$5()||!Bi&&s)&&(h&&!(Q2(g)||p&&J5(p,g)||X5(p))&&(document&&!Bi&&p&&!s?(p.blur&&p.blur(),document.body.focus()):(t=ex(g,Bi,{focusOptions:f}),Yi={})),Ka=!1,Bi=document&&document.activeElement),document){var y=document&&document.activeElement,S=W5(g),C=S.map(function(w){var k=w.node;return k}).indexOf(y);C>-1&&(S.filter(function(w){var k=w.guard,j=w.node;return k&&j.dataset.focusAutoGuard}).forEach(function(w){var k=w.node;return k.removeAttribute("tabIndex")}),vg(C,S.length,1,S),vg(C,-1,-1,S))}}}return t},nx=function(t){sc()&&t&&(t.stopPropagation(),t.preventDefault())},Sh=function(){return tx(sc)},e6=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||Y5(r,n)},t6=function(){return null},rx=function(){Ka="just",setTimeout(function(){Ka="meanwhile"},0)},n6=function(){document.addEventListener("focusin",nx),document.addEventListener("focusout",Sh),window.addEventListener("blur",rx)},r6=function(){document.removeEventListener("focusin",nx),document.removeEventListener("focusout",Sh),window.removeEventListener("blur",rx)};function o6(e){return e.filter(function(t){var n=t.disabled;return!n})}function i6(e){var t=e.slice(-1)[0];t&&!qi&&n6();var n=qi,r=n&&t&&t.id===n.id;qi=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var s=o.id;return s===n.id}).length||n.returnFocus(!t)),t?(Bi=null,(!r||n.observed!==t.observed)&&t.onActivation(),sc(),tx(sc)):(r6(),Bi=null)}N2.assignSyncMedium(e6);F2.assignMedium(Sh);f5.assignMedium(function(e){return e({moveFocusInside:ex,focusInside:Q2})});const a6=m5(o6,i6)(t6);var ox=x.forwardRef(function(t,n){return x.createElement(L2,Ql({sideCar:a6,ref:n},t))}),ix=L2.propTypes||{};ix.sideCar;th(ix,["sideCar"]);ox.propTypes={};const gg=ox;function ax(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function sx(e){var t;if(!ax(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function s6(e){var t,n;return(n=(t=lx(e))==null?void 0:t.defaultView)!=null?n:window}function lx(e){return ax(e)?e.ownerDocument:document}function l6(e){return lx(e).activeElement}var cx=e=>e.hasAttribute("tabindex"),c6=e=>cx(e)&&e.tabIndex===-1;function u6(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function ux(e){return e.parentElement&&ux(e.parentElement)?!0:e.hidden}function d6(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function dx(e){if(!sx(e)||ux(e)||u6(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]():d6(e)?!0:cx(e)}function f6(e){return e?sx(e)&&dx(e)&&!c6(e):!1}var h6=["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]"],p6=h6.join(),m6=e=>e.offsetWidth>0&&e.offsetHeight>0;function fx(e){const t=Array.from(e.querySelectorAll(p6));return t.unshift(e),t.filter(n=>dx(n)&&m6(n))}var xg,v6=(xg=gg.default)!=null?xg:gg,hx=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:s,isDisabled:c,autoFocus:u,persistentFocus:f,lockFocusAcrossFrames:h}=e,p=x.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&fx(r.current).length===0&&requestAnimationFrame(()=>{var C;(C=r.current)==null||C.focus()})},[t,r]),g=x.useCallback(()=>{var S;(S=n==null?void 0:n.current)==null||S.focus()},[n]),y=o&&!n;return l.jsx(v6,{crossFrame:h,persistentFocus:f,autoFocus:u,disabled:c,onActivation:p,onDeactivation:g,returnFocus:y,children:s})};hx.displayName="FocusLock";var g6=T3?x.useLayoutEffect:x.useEffect;function Sf(e,t=[]){const n=x.useRef(e);return g6(()=>{n.current=e}),x.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function x6(e,t,n,r){const o=Sf(t);return x.useEffect(()=>{var s;const c=(s=Av(n))!=null?s:document;if(t)return c.addEventListener(e,o,r),()=>{c.removeEventListener(e,o,r)}},[e,n,r,o,t]),()=>{var s;((s=Av(n))!=null?s:document).removeEventListener(e,o,r)}}function y6(e,t){const n=x.useId();return x.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function b6(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function uo(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=Sf(n),c=Sf(t),[u,f]=x.useState(e.defaultIsOpen||!1),[h,p]=b6(r,u),g=y6(o,"disclosure"),y=x.useCallback(()=>{h||f(!1),c==null||c()},[h,c]),S=x.useCallback(()=>{h||f(!0),s==null||s()},[h,s]),C=x.useCallback(()=>{(p?y:S)()},[p,S,y]);return{isOpen:!!p,onOpen:S,onClose:y,onToggle:C,isControlled:h,getButtonProps:(w={})=>({...w,"aria-expanded":p,"aria-controls":g,onClick:NS(w.onClick,C)}),getDisclosureProps:(w={})=>({...w,hidden:!p,id:g})}}var Ch=he(function(t,n){const{htmlSize:r,...o}=t,s=fn("Input",o),c=At(o),u=ch(c),f=Ae("chakra-input",t.className);return l.jsx(oe.input,{size:r,...u,__css:s.field,ref:n,className:f})});Ch.displayName="Input";Ch.id="Input";var[S6,px]=Et({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),wh=he(function(t,n){const r=fn("List",t),{children:o,styleType:s="none",stylePosition:c,spacing:u,...f}=At(t),h=lh(o),g=u?{["& > *:not(style) ~ *:not(style)"]:{mt:u}}:{};return l.jsx(S6,{value:r,children:l.jsx(oe.ul,{ref:n,listStyleType:s,listStylePosition:c,role:"list",__css:{...r.container,...g},...f,children:h})})});wh.displayName="List";var C6=he((e,t)=>{const{as:n,...r}=e;return l.jsx(wh,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});C6.displayName="OrderedList";var mx=he(function(t,n){const{as:r,...o}=t;return l.jsx(wh,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});mx.displayName="UnorderedList";var Fa=he(function(t,n){const r=px();return l.jsx(oe.li,{ref:n,...t,__css:r.item})});Fa.displayName="ListItem";var w6=he(function(t,n){const r=px();return l.jsx(Jt,{ref:n,role:"presentation",...t,__css:r.icon})});w6.displayName="ListIcon";var $n=he(function(t,n){const{templateAreas:r,gap:o,rowGap:s,columnGap:c,column:u,row:f,autoFlow:h,autoRows:p,templateRows:g,autoColumns:y,templateColumns:S,...C}=t,w={display:"grid",gridTemplateAreas:r,gridGap:o,gridRowGap:s,gridColumnGap:c,gridAutoColumns:y,gridColumn:u,gridRow:f,gridAutoFlow:h,gridAutoRows:p,gridTemplateRows:g,gridTemplateColumns:S};return l.jsx(oe.div,{ref:n,__css:w,...C})});$n.displayName="Grid";function vx(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Kd(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var jc=oe("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});jc.displayName="Spacer";var gx=e=>l.jsx(oe.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});gx.displayName="StackItem";var Cf="& > *:not(style) ~ *:not(style)";function k6(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[Cf]:vx(n,o=>r[o])}}function j6(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{"&":vx(n,o=>r[o])}}var kh=he((e,t)=>{const{isInline:n,direction:r,align:o,justify:s,spacing:c="0.5rem",wrap:u,children:f,divider:h,className:p,shouldWrapChildren:g,...y}=e,S=n?"row":r??"column",C=x.useMemo(()=>k6({direction:S,spacing:c}),[S,c]),w=x.useMemo(()=>j6({spacing:c,direction:S}),[c,S]),k=!!h,j=!g&&!k,M=x.useMemo(()=>{const I=lh(f);return j?I:I.map((T,D)=>{const _=typeof T.key<"u"?T.key:D,z=D+1===I.length,F=g?l.jsx(gx,{children:T},_):T;if(!k)return F;const L=x.cloneElement(h,{__css:w}),X=z?null:L;return l.jsxs(x.Fragment,{children:[F,X]},_)})},[h,w,k,j,g,f]),P=Ae("chakra-stack",p);return l.jsx(oe.div,{ref:t,display:"flex",alignItems:o,justifyContent:s,flexDirection:C.flexDirection,flexWrap:u,className:P,__css:k?{}:{[Cf]:C[Cf]},...y,children:M})});kh.displayName="Stack";var Le=he((e,t)=>l.jsx(kh,{align:"center",...e,direction:"column",ref:t}));Le.displayName="VStack";var sa=he((e,t)=>l.jsx(kh,{align:"center",...e,direction:"row",ref:t}));sa.displayName="HStack";var Vn=he(function(t,n){const r=mo("Heading",t),{className:o,...s}=At(t);return l.jsx(oe.h2,{ref:n,className:Ae("chakra-heading",t.className),...s,__css:r})});Vn.displayName="Heading";var We=oe("div");We.displayName="Box";var xx=he(function(t,n){const{size:r,centerContent:o=!0,...s}=t,c=o?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return l.jsx(We,{ref:n,boxSize:r,__css:{...c,flexShrink:0,flexGrow:0},...s})});xx.displayName="Square";var E6=he(function(t,n){const{size:r,...o}=t;return l.jsx(xx,{size:r,ref:n,borderRadius:"9999px",...o})});E6.displayName="Circle";var Go=he(function(t,n){const r=mo("Link",t),{className:o,isExternal:s,...c}=At(t);return l.jsx(oe.a,{target:s?"_blank":void 0,rel:s?"noopener":void 0,ref:n,className:Ae("chakra-link",o),...c,__css:r})});Go.displayName="Link";var yx=he(function(t,n){const r=mo("Badge",t),{className:o,...s}=At(t);return l.jsx(oe.span,{ref:n,className:Ae("chakra-badge",t.className),...s,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});yx.displayName="Badge";var bx=oe("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});bx.displayName="Center";var P6={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};he(function(t,n){const{axis:r="both",...o}=t;return l.jsx(oe.div,{ref:n,__css:P6[r],...o,position:"absolute"})});var Sx=he(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:s,borderRightWidth:c,borderWidth:u,borderStyle:f,borderColor:h,...p}=mo("Divider",t),{className:g,orientation:y="horizontal",__css:S,...C}=At(t),w={vertical:{borderLeftWidth:r||c||u||"1px",height:"100%"},horizontal:{borderBottomWidth:o||s||u||"1px",width:"100%"}};return l.jsx(oe.hr,{ref:n,"aria-orientation":y,...C,__css:{...p,border:"0",borderColor:h,borderStyle:f,...w[y],...S},className:Ae("chakra-divider",g)})});Sx.displayName="Divider";function I6(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function M6(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,o]=x.useState([]),s=x.useRef(),c=()=>{s.current&&(clearTimeout(s.current),s.current=null)},u=()=>{c(),s.current=setTimeout(()=>{o([]),s.current=null},t)};x.useEffect(()=>c,[]);function f(h){return p=>{if(p.key==="Backspace"){const g=[...r];g.pop(),o(g);return}if(I6(p)){const g=r.concat(p.key);n(p)&&(p.preventDefault(),p.stopPropagation()),o(g),h(g.join("")),u()}}}return f}function T6(e,t,n,r){if(t==null)return r;if(!r)return e.find(c=>n(c).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 _6(){const e=x.useRef(new Map),t=e.current,n=x.useCallback((o,s,c,u)=>{e.current.set(c,{type:s,el:o,options:u}),o.addEventListener(s,c,u)},[]),r=x.useCallback((o,s,c,u)=>{o.removeEventListener(s,c,u),e.current.delete(c)},[]);return x.useEffect(()=>()=>{t.forEach((o,s)=>{r(o.el,o.type,s,o.options)})},[r,t]),{add:n,remove:r}}function Cd(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Cx(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:s=!0,onMouseDown:c,onMouseUp:u,onClick:f,onKeyDown:h,onKeyUp:p,tabIndex:g,onMouseOver:y,onMouseLeave:S,...C}=e,[w,k]=x.useState(!0),[j,M]=x.useState(!1),P=_6(),I=U=>{U&&U.tagName!=="BUTTON"&&k(!1)},T=w?g:g||0,D=n&&!r,_=x.useCallback(U=>{if(n){U.stopPropagation(),U.preventDefault();return}U.currentTarget.focus(),f==null||f(U)},[n,f]),z=x.useCallback(U=>{j&&Cd(U)&&(U.preventDefault(),U.stopPropagation(),M(!1),P.remove(document,"keyup",z,!1))},[j,P]),V=x.useCallback(U=>{if(h==null||h(U),n||U.defaultPrevented||U.metaKey||!Cd(U.nativeEvent)||w)return;const K=o&&U.key==="Enter";s&&U.key===" "&&(U.preventDefault(),M(!0)),K&&(U.preventDefault(),U.currentTarget.click()),P.add(document,"keyup",z,!1)},[n,w,h,o,s,P,z]),F=x.useCallback(U=>{if(p==null||p(U),n||U.defaultPrevented||U.metaKey||!Cd(U.nativeEvent)||w)return;s&&U.key===" "&&(U.preventDefault(),M(!1),U.currentTarget.click())},[s,w,n,p]),L=x.useCallback(U=>{U.button===0&&(M(!1),P.remove(document,"mouseup",L,!1))},[P]),X=x.useCallback(U=>{if(U.button!==0)return;if(n){U.stopPropagation(),U.preventDefault();return}w||M(!0),U.currentTarget.focus({preventScroll:!0}),P.add(document,"mouseup",L,!1),c==null||c(U)},[n,w,c,P,L]),$=x.useCallback(U=>{U.button===0&&(w||M(!1),u==null||u(U))},[u,w]),Q=x.useCallback(U=>{if(n){U.preventDefault();return}y==null||y(U)},[n,y]),re=x.useCallback(U=>{j&&(U.preventDefault(),M(!1)),S==null||S(U)},[j,S]),ie=ct(t,I);return w?{...C,ref:ie,type:"button","aria-disabled":D?void 0:n,disabled:D,onClick:_,onMouseDown:c,onMouseUp:u,onKeyUp:p,onKeyDown:h,onMouseOver:y,onMouseLeave:S}:{...C,ref:ie,role:"button","data-active":Ye(j),"aria-disabled":n?"true":void 0,tabIndex:D?void 0:T,onClick:_,onMouseDown:X,onMouseUp:$,onKeyUp:F,onKeyDown:V,onMouseOver:Q,onMouseLeave:re}}function D6(e){const t=e.current;if(!t)return!1;const n=l6(t);return!n||t.contains(n)?!1:!!f6(n)}function wx(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,s=n&&!r;ti(()=>{if(!s||D6(e))return;const c=(o==null?void 0:o.current)||e.current;c&&requestAnimationFrame(()=>{c.focus()})},[s,e,o])}var O6={preventScroll:!0,shouldFocus:!1};function A6(e,t=O6){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:s}=t,c=z6(e)?e.current:e,u=o&&s,f=x.useRef(u),h=x.useRef(s);Ui(()=>{!h.current&&s&&(f.current=u),h.current=s},[s,u]);const p=x.useCallback(()=>{if(!(!s||!c||!f.current)&&(f.current=!1,!c.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=fx(c);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[s,r,c,n]);ti(()=>{p()},[p]),$o(c,"transitionend",p)}function z6(e){return"current"in e}var Ei=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Vt={arrowShadowColor:Ei("--popper-arrow-shadow-color"),arrowSize:Ei("--popper-arrow-size","8px"),arrowSizeHalf:Ei("--popper-arrow-size-half"),arrowBg:Ei("--popper-arrow-bg"),transformOrigin:Ei("--popper-transform-origin"),arrowOffset:Ei("--popper-arrow-offset")};function R6(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var N6={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"},F6=e=>N6[e],yg={scroll:!0,resize:!0};function L6(e){let t;return typeof e=="object"?t={enabled:!0,options:{...yg,...e}}:t={enabled:e,options:yg},t}var B6={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`}},H6={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{bg(e)},effect:({state:e})=>()=>{bg(e)}},bg=e=>{e.elements.popper.style.setProperty(Vt.transformOrigin.var,F6(e.placement))},W6={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{V6(e)}},V6=e=>{var t;if(!e.placement)return;const n=U6(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Vt.arrowSize.varRef,height:Vt.arrowSize.varRef,zIndex:-1});const r={[Vt.arrowSizeHalf.var]:`calc(${Vt.arrowSize.varRef} / 2)`,[Vt.arrowOffset.var]:`calc(${Vt.arrowSizeHalf.varRef} * -1)`};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},U6=e=>{if(e.startsWith("top"))return{property:"bottom",value:Vt.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Vt.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Vt.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Vt.arrowOffset.varRef}},$6={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{Sg(e)},effect:({state:e})=>()=>{Sg(e)}},Sg=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=R6(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:Vt.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},G6={"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"}},q6={"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 Y6(e,t="ltr"){var n,r;const o=((n=G6[e])==null?void 0:n[t])||e;return t==="ltr"?o:(r=q6[e])!=null?r:o}var Pn="top",Gn="bottom",qn="right",In="left",jh="auto",hs=[Pn,Gn,qn,In],Xi="start",Qa="end",X6="clippingParents",kx="viewport",Oa="popper",K6="reference",Cg=hs.reduce(function(e,t){return e.concat([t+"-"+Xi,t+"-"+Qa])},[]),jx=[].concat(hs,[jh]).reduce(function(e,t){return e.concat([t,t+"-"+Xi,t+"-"+Qa])},[]),Q6="beforeRead",Z6="read",J6="afterRead",ek="beforeMain",tk="main",nk="afterMain",rk="beforeWrite",ok="write",ik="afterWrite",ak=[Q6,Z6,J6,ek,tk,nk,rk,ok,ik];function Cr(e){return e?(e.nodeName||"").toLowerCase():null}function Yn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ko(e){var t=Yn(e).Element;return e instanceof t||e instanceof Element}function Un(e){var t=Yn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Eh(e){if(typeof ShadowRoot>"u")return!1;var t=Yn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function sk(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];!Un(s)||!Cr(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(c){var u=o[c];u===!1?s.removeAttribute(c):s.setAttribute(c,u===!0?"":u)}))})}function lk(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]||{},c=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=c.reduce(function(f,h){return f[h]="",f},{});!Un(o)||!Cr(o)||(Object.assign(o.style,u),Object.keys(s).forEach(function(f){o.removeAttribute(f)}))})}}const ck={name:"applyStyles",enabled:!0,phase:"write",fn:sk,effect:lk,requires:["computeStyles"]};function yr(e){return e.split("-")[0]}var qo=Math.max,lc=Math.min,Ki=Math.round;function wf(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Ex(){return!/^((?!chrome|android).)*safari/i.test(wf())}function Qi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&Un(e)&&(o=e.offsetWidth>0&&Ki(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Ki(r.height)/e.offsetHeight||1);var c=Ko(e)?Yn(e):window,u=c.visualViewport,f=!Ex()&&n,h=(r.left+(f&&u?u.offsetLeft:0))/o,p=(r.top+(f&&u?u.offsetTop:0))/s,g=r.width/o,y=r.height/s;return{width:g,height:y,top:p,right:h+g,bottom:p+y,left:h,x:h,y:p}}function Ph(e){var t=Qi(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 Px(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Eh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ar(e){return Yn(e).getComputedStyle(e)}function uk(e){return["table","td","th"].indexOf(Cr(e))>=0}function vo(e){return((Ko(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ec(e){return Cr(e)==="html"?e:e.assignedSlot||e.parentNode||(Eh(e)?e.host:null)||vo(e)}function wg(e){return!Un(e)||Ar(e).position==="fixed"?null:e.offsetParent}function dk(e){var t=/firefox/i.test(wf()),n=/Trident/i.test(wf());if(n&&Un(e)){var r=Ar(e);if(r.position==="fixed")return null}var o=Ec(e);for(Eh(o)&&(o=o.host);Un(o)&&["html","body"].indexOf(Cr(o))<0;){var s=Ar(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 ps(e){for(var t=Yn(e),n=wg(e);n&&uk(n)&&Ar(n).position==="static";)n=wg(n);return n&&(Cr(n)==="html"||Cr(n)==="body"&&Ar(n).position==="static")?t:n||dk(e)||t}function Ih(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ha(e,t,n){return qo(e,lc(t,n))}function fk(e,t,n){var r=Ha(e,t,n);return r>n?n:r}function Ix(){return{top:0,right:0,bottom:0,left:0}}function Mx(e){return Object.assign({},Ix(),e)}function Tx(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var hk=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Mx(typeof t!="number"?t:Tx(t,hs))};function pk(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,c=n.modifiersData.popperOffsets,u=yr(n.placement),f=Ih(u),h=[In,qn].indexOf(u)>=0,p=h?"height":"width";if(!(!s||!c)){var g=hk(o.padding,n),y=Ph(s),S=f==="y"?Pn:In,C=f==="y"?Gn:qn,w=n.rects.reference[p]+n.rects.reference[f]-c[f]-n.rects.popper[p],k=c[f]-n.rects.reference[f],j=ps(s),M=j?f==="y"?j.clientHeight||0:j.clientWidth||0:0,P=w/2-k/2,I=g[S],T=M-y[p]-g[C],D=M/2-y[p]/2+P,_=Ha(I,D,T),z=f;n.modifiersData[r]=(t={},t[z]=_,t.centerOffset=_-D,t)}}function mk(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)||Px(t.elements.popper,o)&&(t.elements.arrow=o))}const vk={name:"arrow",enabled:!0,phase:"main",fn:pk,effect:mk,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Zi(e){return e.split("-")[1]}var gk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xk(e){var t=e.x,n=e.y,r=window,o=r.devicePixelRatio||1;return{x:Ki(t*o)/o||0,y:Ki(n*o)/o||0}}function kg(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,c=e.offsets,u=e.position,f=e.gpuAcceleration,h=e.adaptive,p=e.roundOffsets,g=e.isFixed,y=c.x,S=y===void 0?0:y,C=c.y,w=C===void 0?0:C,k=typeof p=="function"?p({x:S,y:w}):{x:S,y:w};S=k.x,w=k.y;var j=c.hasOwnProperty("x"),M=c.hasOwnProperty("y"),P=In,I=Pn,T=window;if(h){var D=ps(n),_="clientHeight",z="clientWidth";if(D===Yn(n)&&(D=vo(n),Ar(D).position!=="static"&&u==="absolute"&&(_="scrollHeight",z="scrollWidth")),D=D,o===Pn||(o===In||o===qn)&&s===Qa){I=Gn;var V=g&&D===T&&T.visualViewport?T.visualViewport.height:D[_];w-=V-r.height,w*=f?1:-1}if(o===In||(o===Pn||o===Gn)&&s===Qa){P=qn;var F=g&&D===T&&T.visualViewport?T.visualViewport.width:D[z];S-=F-r.width,S*=f?1:-1}}var L=Object.assign({position:u},h&&gk),X=p===!0?xk({x:S,y:w}):{x:S,y:w};if(S=X.x,w=X.y,f){var $;return Object.assign({},L,($={},$[I]=M?"0":"",$[P]=j?"0":"",$.transform=(T.devicePixelRatio||1)<=1?"translate("+S+"px, "+w+"px)":"translate3d("+S+"px, "+w+"px, 0)",$))}return Object.assign({},L,(t={},t[I]=M?w+"px":"",t[P]=j?S+"px":"",t.transform="",t))}function yk(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,c=s===void 0?!0:s,u=n.roundOffsets,f=u===void 0?!0:u,h={placement:yr(t.placement),variation:Zi(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,kg(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,kg(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const bk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yk,data:{}};var wl={passive:!0};function Sk(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,c=r.resize,u=c===void 0?!0:c,f=Yn(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&h.forEach(function(p){p.addEventListener("scroll",n.update,wl)}),u&&f.addEventListener("resize",n.update,wl),function(){s&&h.forEach(function(p){p.removeEventListener("scroll",n.update,wl)}),u&&f.removeEventListener("resize",n.update,wl)}}const Ck={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Sk,data:{}};var wk={left:"right",right:"left",bottom:"top",top:"bottom"};function Gl(e){return e.replace(/left|right|bottom|top/g,function(t){return wk[t]})}var kk={start:"end",end:"start"};function jg(e){return e.replace(/start|end/g,function(t){return kk[t]})}function Mh(e){var t=Yn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Th(e){return Qi(vo(e)).left+Mh(e).scrollLeft}function jk(e,t){var n=Yn(e),r=vo(e),o=n.visualViewport,s=r.clientWidth,c=r.clientHeight,u=0,f=0;if(o){s=o.width,c=o.height;var h=Ex();(h||!h&&t==="fixed")&&(u=o.offsetLeft,f=o.offsetTop)}return{width:s,height:c,x:u+Th(e),y:f}}function Ek(e){var t,n=vo(e),r=Mh(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=qo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),c=qo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+Th(e),f=-r.scrollTop;return Ar(o||n).direction==="rtl"&&(u+=qo(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:c,x:u,y:f}}function _h(e){var t=Ar(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function _x(e){return["html","body","#document"].indexOf(Cr(e))>=0?e.ownerDocument.body:Un(e)&&_h(e)?e:_x(Ec(e))}function Wa(e,t){var n;t===void 0&&(t=[]);var r=_x(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Yn(r),c=o?[s].concat(s.visualViewport||[],_h(r)?r:[]):r,u=t.concat(c);return o?u:u.concat(Wa(Ec(c)))}function kf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Pk(e,t){var n=Qi(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 Eg(e,t,n){return t===kx?kf(jk(e,n)):Ko(t)?Pk(t,n):kf(Ek(vo(e)))}function Ik(e){var t=Wa(Ec(e)),n=["absolute","fixed"].indexOf(Ar(e).position)>=0,r=n&&Un(e)?ps(e):e;return Ko(r)?t.filter(function(o){return Ko(o)&&Px(o,r)&&Cr(o)!=="body"}):[]}function Mk(e,t,n,r){var o=t==="clippingParents"?Ik(e):[].concat(t),s=[].concat(o,[n]),c=s[0],u=s.reduce(function(f,h){var p=Eg(e,h,r);return f.top=qo(p.top,f.top),f.right=lc(p.right,f.right),f.bottom=lc(p.bottom,f.bottom),f.left=qo(p.left,f.left),f},Eg(e,c,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Dx(e){var t=e.reference,n=e.element,r=e.placement,o=r?yr(r):null,s=r?Zi(r):null,c=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,f;switch(o){case Pn:f={x:c,y:t.y-n.height};break;case Gn:f={x:c,y:t.y+t.height};break;case qn:f={x:t.x+t.width,y:u};break;case In:f={x:t.x-n.width,y:u};break;default:f={x:t.x,y:t.y}}var h=o?Ih(o):null;if(h!=null){var p=h==="y"?"height":"width";switch(s){case Xi:f[h]=f[h]-(t[p]/2-n[p]/2);break;case Qa:f[h]=f[h]+(t[p]/2-n[p]/2);break}}return f}function Za(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,c=s===void 0?e.strategy:s,u=n.boundary,f=u===void 0?X6:u,h=n.rootBoundary,p=h===void 0?kx:h,g=n.elementContext,y=g===void 0?Oa:g,S=n.altBoundary,C=S===void 0?!1:S,w=n.padding,k=w===void 0?0:w,j=Mx(typeof k!="number"?k:Tx(k,hs)),M=y===Oa?K6:Oa,P=e.rects.popper,I=e.elements[C?M:y],T=Mk(Ko(I)?I:I.contextElement||vo(e.elements.popper),f,p,c),D=Qi(e.elements.reference),_=Dx({reference:D,element:P,strategy:"absolute",placement:o}),z=kf(Object.assign({},P,_)),V=y===Oa?z:D,F={top:T.top-V.top+j.top,bottom:V.bottom-T.bottom+j.bottom,left:T.left-V.left+j.left,right:V.right-T.right+j.right},L=e.modifiersData.offset;if(y===Oa&&L){var X=L[o];Object.keys(F).forEach(function($){var Q=[qn,Gn].indexOf($)>=0?1:-1,re=[Pn,Gn].indexOf($)>=0?"y":"x";F[$]+=X[re]*Q})}return F}function Tk(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,c=n.padding,u=n.flipVariations,f=n.allowedAutoPlacements,h=f===void 0?jx:f,p=Zi(r),g=p?u?Cg:Cg.filter(function(C){return Zi(C)===p}):hs,y=g.filter(function(C){return h.indexOf(C)>=0});y.length===0&&(y=g);var S=y.reduce(function(C,w){return C[w]=Za(e,{placement:w,boundary:o,rootBoundary:s,padding:c})[yr(w)],C},{});return Object.keys(S).sort(function(C,w){return S[C]-S[w]})}function _k(e){if(yr(e)===jh)return[];var t=Gl(e);return[jg(e),t,jg(t)]}function Dk(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,c=n.altAxis,u=c===void 0?!0:c,f=n.fallbackPlacements,h=n.padding,p=n.boundary,g=n.rootBoundary,y=n.altBoundary,S=n.flipVariations,C=S===void 0?!0:S,w=n.allowedAutoPlacements,k=t.options.placement,j=yr(k),M=j===k,P=f||(M||!C?[Gl(k)]:_k(k)),I=[k].concat(P).reduce(function(J,ue){return J.concat(yr(ue)===jh?Tk(t,{placement:ue,boundary:p,rootBoundary:g,padding:h,flipVariations:C,allowedAutoPlacements:w}):ue)},[]),T=t.rects.reference,D=t.rects.popper,_=new Map,z=!0,V=I[0],F=0;F=0,re=Q?"width":"height",ie=Za(t,{placement:L,boundary:p,rootBoundary:g,altBoundary:y,padding:h}),U=Q?$?qn:In:$?Gn:Pn;T[re]>D[re]&&(U=Gl(U));var K=Gl(U),ne=[];if(s&&ne.push(ie[X]<=0),u&&ne.push(ie[U]<=0,ie[K]<=0),ne.every(function(J){return J})){V=L,z=!1;break}_.set(L,ne)}if(z)for(var ce=C?3:1,Re=function(ue){var Ie=I.find(function(Be){var Ne=_.get(Be);if(Ne)return Ne.slice(0,ue).every(function(Ge){return Ge})});if(Ie)return V=Ie,"break"},ze=ce;ze>0;ze--){var Me=Re(ze);if(Me==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Ok={name:"flip",enabled:!0,phase:"main",fn:Dk,requiresIfExists:["offset"],data:{_skip:!1}};function Pg(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 Ig(e){return[Pn,qn,Gn,In].some(function(t){return e[t]>=0})}function Ak(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,c=Za(t,{elementContext:"reference"}),u=Za(t,{altBoundary:!0}),f=Pg(c,r),h=Pg(u,o,s),p=Ig(f),g=Ig(h);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:h,isReferenceHidden:p,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":g})}const zk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ak};function Rk(e,t,n){var r=yr(e),o=[In,Pn].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=s[0],u=s[1];return c=c||0,u=(u||0)*o,[In,qn].indexOf(r)>=0?{x:u,y:c}:{x:c,y:u}}function Nk(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,c=jx.reduce(function(p,g){return p[g]=Rk(g,t.rects,s),p},{}),u=c[t.placement],f=u.x,h=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=c}const Fk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Nk};function Lk(e){var t=e.state,n=e.name;t.modifiersData[n]=Dx({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Bk={name:"popperOffsets",enabled:!0,phase:"read",fn:Lk,data:{}};function Hk(e){return e==="x"?"y":"x"}function Wk(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,c=n.altAxis,u=c===void 0?!1:c,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.padding,y=n.tether,S=y===void 0?!0:y,C=n.tetherOffset,w=C===void 0?0:C,k=Za(t,{boundary:f,rootBoundary:h,padding:g,altBoundary:p}),j=yr(t.placement),M=Zi(t.placement),P=!M,I=Ih(j),T=Hk(I),D=t.modifiersData.popperOffsets,_=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,F=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,X={x:0,y:0};if(D){if(s){var $,Q=I==="y"?Pn:In,re=I==="y"?Gn:qn,ie=I==="y"?"height":"width",U=D[I],K=U+k[Q],ne=U-k[re],ce=S?-z[ie]/2:0,Re=M===Xi?_[ie]:z[ie],ze=M===Xi?-z[ie]:-_[ie],Me=t.elements.arrow,J=S&&Me?Ph(Me):{width:0,height:0},ue=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ix(),Ie=ue[Q],Be=ue[re],Ne=Ha(0,_[ie],J[ie]),Ge=P?_[ie]/2-ce-Ne-Ie-F.mainAxis:Re-Ne-Ie-F.mainAxis,Qe=P?-_[ie]/2+ce+Ne+Be+F.mainAxis:ze+Ne+Be+F.mainAxis,ve=t.elements.arrow&&ps(t.elements.arrow),_e=ve?I==="y"?ve.clientTop||0:ve.clientLeft||0:0,qe=($=L==null?void 0:L[I])!=null?$:0,ge=U+Ge-qe-_e,Te=U+Qe-qe,et=Ha(S?lc(K,ge):K,U,S?qo(ne,Te):ne);D[I]=et,X[I]=et-U}if(u){var Ve,vt=I==="x"?Pn:In,Nt=I==="x"?Gn:qn,N=D[T],de=T==="y"?"height":"width",xe=N+k[vt],je=N-k[Nt],q=[Pn,In].indexOf(j)!==-1,se=(Ve=L==null?void 0:L[T])!=null?Ve:0,Fe=q?xe:N-_[de]-z[de]-se+F.altAxis,Ze=q?N+_[de]+z[de]-se-F.altAxis:je,ee=S&&q?fk(Fe,N,Ze):Ha(S?Fe:xe,N,S?Ze:je);D[T]=ee,X[T]=ee-N}t.modifiersData[r]=X}}const Vk={name:"preventOverflow",enabled:!0,phase:"main",fn:Wk,requiresIfExists:["offset"]};function Uk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function $k(e){return e===Yn(e)||!Un(e)?Mh(e):Uk(e)}function Gk(e){var t=e.getBoundingClientRect(),n=Ki(t.width)/e.offsetWidth||1,r=Ki(t.height)/e.offsetHeight||1;return n!==1||r!==1}function qk(e,t,n){n===void 0&&(n=!1);var r=Un(t),o=Un(t)&&Gk(t),s=vo(t),c=Qi(e,o,n),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(r||!r&&!n)&&((Cr(t)!=="body"||_h(s))&&(u=$k(t)),Un(t)?(f=Qi(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):s&&(f.x=Th(s))),{x:c.left+u.scrollLeft-f.x,y:c.top+u.scrollTop-f.y,width:c.width,height:c.height}}function Yk(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 c=[].concat(s.requires||[],s.requiresIfExists||[]);c.forEach(function(u){if(!n.has(u)){var f=t.get(u);f&&o(f)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function Xk(e){var t=Yk(e);return ak.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Kk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qk(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 Mg={placement:"bottom",modifiers:[],strategy:"absolute"};function Tg(){for(var e=arguments.length,t=new Array(e),n=0;n{}),P=x.useCallback(()=>{var F;!t||!C.current||!w.current||((F=M.current)==null||F.call(M),k.current=ej(C.current,w.current,{placement:j,modifiers:[$6,W6,H6,{...B6,enabled:!!y},{name:"eventListeners",...L6(c)},{name:"arrow",options:{padding:s}},{name:"offset",options:{offset:u??[0,f]}},{name:"flip",enabled:!!h,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:p}},...n??[]],strategy:o}),k.current.forceUpdate(),M.current=k.current.destroy)},[j,t,n,y,c,s,u,f,h,g,p,o]);x.useEffect(()=>()=>{var F;!C.current&&!w.current&&((F=k.current)==null||F.destroy(),k.current=null)},[]);const I=x.useCallback(F=>{C.current=F,P()},[P]),T=x.useCallback((F={},L=null)=>({...F,ref:ct(I,L)}),[I]),D=x.useCallback(F=>{w.current=F,P()},[P]),_=x.useCallback((F={},L=null)=>({...F,ref:ct(D,L),style:{...F.style,position:o,minWidth:y?void 0:"max-content",inset:"0 auto auto 0"}}),[o,D,y]),z=x.useCallback((F={},L=null)=>{const{size:X,shadowColor:$,bg:Q,style:re,...ie}=F;return{...ie,ref:L,"data-popper-arrow":"",style:tj(F)}},[]),V=x.useCallback((F={},L=null)=>({...F,ref:L,"data-popper-arrow-inner":""}),[]);return{update(){var F;(F=k.current)==null||F.update()},forceUpdate(){var F;(F=k.current)==null||F.forceUpdate()},transformOrigin:Vt.transformOrigin.varRef,referenceRef:I,popperRef:D,getPopperProps:_,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:T}}function tj(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 Oh(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=Ut(n),c=Ut(t),[u,f]=x.useState(e.defaultIsOpen||!1),h=r!==void 0?r:u,p=r!==void 0,g=x.useId(),y=o??`disclosure-${g}`,S=x.useCallback(()=>{p||f(!1),c==null||c()},[p,c]),C=x.useCallback(()=>{p||f(!0),s==null||s()},[p,s]),w=x.useCallback(()=>{h?S():C()},[h,C,S]);function k(M={}){return{...M,"aria-expanded":h,"aria-controls":y,onClick(P){var I;(I=M.onClick)==null||I.call(M,P),w()}}}function j(M={}){return{...M,hidden:!h,id:y}}return{isOpen:h,onOpen:C,onClose:S,onToggle:w,isControlled:p,getButtonProps:k,getDisclosureProps:j}}function nj(e){const{ref:t,handler:n,enabled:r=!0}=e,o=Ut(n),c=x.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;x.useEffect(()=>{if(!r)return;const u=g=>{wd(g,t)&&(c.isPointerDown=!0)},f=g=>{if(c.ignoreEmulatedMouseEvents){c.ignoreEmulatedMouseEvents=!1;return}c.isPointerDown&&n&&wd(g,t)&&(c.isPointerDown=!1,o(g))},h=g=>{c.ignoreEmulatedMouseEvents=!0,n&&c.isPointerDown&&wd(g,t)&&(c.isPointerDown=!1,o(g))},p=Ox(t.current);return p.addEventListener("mousedown",u,!0),p.addEventListener("mouseup",f,!0),p.addEventListener("touchstart",u,!0),p.addEventListener("touchend",h,!0),()=>{p.removeEventListener("mousedown",u,!0),p.removeEventListener("mouseup",f,!0),p.removeEventListener("touchstart",u,!0),p.removeEventListener("touchend",h,!0)}},[n,t,o,c,r])}function wd(e,t){var n;const r=e.target;return e.button>0||r&&!Ox(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function Ox(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function Ax(e){const{isOpen:t,ref:n}=e,[r,o]=x.useState(t),[s,c]=x.useState(!1);return x.useEffect(()=>{s||(o(t),c(!0))},[t,s,r]),$o(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var f;const h=s6(n.current),p=new h.CustomEvent("animationend",{bubbles:!0});(f=n.current)==null||f.dispatchEvent(p)}}}function Ah(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}var[rj,oj,ij,aj]=rh(),[sj,ms]=Et({strict:!1,name:"MenuContext"});function lj(e,...t){const n=x.useId(),r=e||n;return x.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}function zx(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function _g(e){return zx(e).activeElement===e}function cj(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:s=!0,isLazy:c,isOpen:u,defaultIsOpen:f,onClose:h,onOpen:p,placement:g="bottom-start",lazyBehavior:y="unmount",direction:S,computePositionOnMount:C=!1,...w}=e,k=x.useRef(null),j=x.useRef(null),M=ij(),P=x.useCallback(()=>{requestAnimationFrame(()=>{var Me;(Me=k.current)==null||Me.focus({preventScroll:!1})})},[]),I=x.useCallback(()=>{const Me=setTimeout(()=>{var J;if(o)(J=o.current)==null||J.focus();else{const ue=M.firstEnabled();ue&&$(ue.index)}});K.current.add(Me)},[M,o]),T=x.useCallback(()=>{const Me=setTimeout(()=>{const J=M.lastEnabled();J&&$(J.index)});K.current.add(Me)},[M]),D=x.useCallback(()=>{p==null||p(),s?I():P()},[s,I,P,p]),{isOpen:_,onOpen:z,onClose:V,onToggle:F}=Oh({isOpen:u,defaultIsOpen:f,onClose:h,onOpen:D});nj({enabled:_&&r,ref:k,handler:Me=>{var J;(J=j.current)!=null&&J.contains(Me.target)||V()}});const L=Dh({...w,enabled:_||C,placement:g,direction:S}),[X,$]=x.useState(-1);ti(()=>{_||$(-1)},[_]),wx(k,{focusRef:j,visible:_,shouldFocus:!0});const Q=Ax({isOpen:_,ref:k}),[re,ie]=lj(t,"menu-button","menu-list"),U=x.useCallback(()=>{z(),P()},[z,P]),K=x.useRef(new Set([]));vj(()=>{K.current.forEach(Me=>clearTimeout(Me)),K.current.clear()});const ne=x.useCallback(()=>{z(),I()},[I,z]),ce=x.useCallback(()=>{z(),T()},[z,T]),Re=x.useCallback(()=>{var Me,J;const ue=zx(k.current),Ie=(Me=k.current)==null?void 0:Me.contains(ue.activeElement);if(!(_&&!Ie))return;const Ne=(J=M.item(X))==null?void 0:J.node;Ne==null||Ne.focus()},[_,X,M]),ze=x.useRef(null);return{openAndFocusMenu:U,openAndFocusFirstItem:ne,openAndFocusLastItem:ce,onTransitionEnd:Re,unstable__animationState:Q,descendants:M,popper:L,buttonId:re,menuId:ie,forceUpdate:L.forceUpdate,orientation:"vertical",isOpen:_,onToggle:F,onOpen:z,onClose:V,menuRef:k,buttonRef:j,focusedIndex:X,closeOnSelect:n,closeOnBlur:r,autoSelect:s,setFocusedIndex:$,isLazy:c,lazyBehavior:y,initialFocusRef:o,rafId:ze}}function uj(e={},t=null){const n=ms(),{onToggle:r,popper:o,openAndFocusFirstItem:s,openAndFocusLastItem:c}=n,u=x.useCallback(f=>{const h=f.key,g={Enter:s,ArrowDown:s,ArrowUp:c}[h];g&&(f.preventDefault(),f.stopPropagation(),g(f))},[s,c]);return{...e,ref:ct(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":Ye(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:Pe(e.onClick,r),onKeyDown:Pe(e.onKeyDown,u)}}function jf(e){var t;return pj(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function dj(e={},t=null){const n=ms();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:o,menuRef:s,isOpen:c,onClose:u,menuId:f,isLazy:h,lazyBehavior:p,unstable__animationState:g}=n,y=oj(),S=M6({preventDefault:j=>j.key!==" "&&jf(j.target)}),C=x.useCallback(j=>{const M=j.key,I={Tab:D=>D.preventDefault(),Escape:u,ArrowDown:()=>{const D=y.nextEnabled(r);D&&o(D.index)},ArrowUp:()=>{const D=y.prevEnabled(r);D&&o(D.index)}}[M];if(I){j.preventDefault(),I(j);return}const T=S(D=>{const _=T6(y.values(),D,z=>{var V,F;return(F=(V=z==null?void 0:z.node)==null?void 0:V.textContent)!=null?F:""},y.item(r));if(_){const z=y.indexOf(_.node);o(z)}});jf(j.target)&&T(j)},[y,r,S,u,o]),w=x.useRef(!1);c&&(w.current=!0);const k=Ah({wasSelected:w.current,enabled:h,mode:p,isSelected:g.present});return{...e,ref:ct(s,t),children:k?e.children:null,tabIndex:-1,role:"menu",id:f,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:Pe(e.onKeyDown,C)}}function fj(e={}){const{popper:t,isOpen:n}=ms();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function hj(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:s,onFocus:c,isDisabled:u,isFocusable:f,closeOnSelect:h,type:p,...g}=e,y=ms(),{setFocusedIndex:S,focusedIndex:C,closeOnSelect:w,onClose:k,menuRef:j,isOpen:M,menuId:P,rafId:I}=y,T=x.useRef(null),D=`${P}-menuitem-${x.useId()}`,{index:_,register:z}=aj({disabled:u&&!f}),V=x.useCallback(U=>{n==null||n(U),!u&&S(_)},[S,_,u,n]),F=x.useCallback(U=>{r==null||r(U),T.current&&!_g(T.current)&&V(U)},[V,r]),L=x.useCallback(U=>{o==null||o(U),!u&&S(-1)},[S,u,o]),X=x.useCallback(U=>{s==null||s(U),jf(U.currentTarget)&&(h??w)&&k()},[k,s,w,h]),$=x.useCallback(U=>{c==null||c(U),S(_)},[S,c,_]),Q=_===C,re=u&&!f;ti(()=>{M&&(Q&&!re&&T.current?(I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{var U;(U=T.current)==null||U.focus(),I.current=null})):j.current&&!_g(j.current)&&j.current.focus())},[Q,re,j,M]);const ie=Cx({onClick:X,onFocus:$,onMouseEnter:V,onMouseMove:F,onMouseLeave:L,ref:ct(z,T,t),isDisabled:u,isFocusable:f});return{...g,...ie,type:p??ie.type,id:D,role:"menuitem",tabIndex:Q?0:-1}}function pj(e){var t;if(!mj(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function mj(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function vj(e,t=[]){return x.useEffect(()=>()=>e(),t)}var[gj,Pc]=Et({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),zh=e=>{const{children:t}=e,n=fn("Menu",e),r=At(e),{direction:o}=ei(),{descendants:s,...c}=cj({...r,direction:o}),u=x.useMemo(()=>c,[c]),{isOpen:f,onClose:h,forceUpdate:p}=u;return l.jsx(rj,{value:s,children:l.jsx(sj,{value:u,children:l.jsx(gj,{value:n,children:k1(t,{isOpen:f,onClose:h,forceUpdate:p})})})})};zh.displayName="Menu";var Rx=he((e,t)=>{const n=Pc();return l.jsx(oe.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});Rx.displayName="MenuCommand";var xj=he((e,t)=>{const{type:n,...r}=e,o=Pc(),s=r.as||n?n??void 0:"button",c=x.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 l.jsx(oe.button,{ref:t,type:s,...r,__css:c})}),Nx=e=>{const{className:t,children:n,...r}=e,o=x.Children.only(n),s=x.isValidElement(o)?x.cloneElement(o,{focusable:"false","aria-hidden":!0,className:Ae("chakra-menu__icon",o.props.className)}):null,c=Ae("chakra-menu__icon-wrapper",t);return l.jsx(oe.span,{className:c,...r,__css:{flexShrink:0},children:s})};Nx.displayName="MenuIcon";var pr=he((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:o,commandSpacing:s="0.75rem",children:c,...u}=e,f=hj(u,t),p=n||o?l.jsx("span",{style:{pointerEvents:"none",flex:1},children:c}):c;return l.jsxs(xj,{...f,className:Ae("chakra-menu__menuitem",f.className),children:[n&&l.jsx(Nx,{fontSize:"0.8em",marginEnd:r,children:n}),p,o&&l.jsx(Rx,{marginStart:s,children:o})]})});pr.displayName="MenuItem";var yj={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"}}},bj=oe(Wr.div),Rh=he(function(t,n){var r,o;const{rootProps:s,motionProps:c,...u}=t,{isOpen:f,onTransitionEnd:h,unstable__animationState:p}=ms(),g=dj(u,n),y=fj(s),S=Pc();return l.jsx(oe.div,{...y,__css:{zIndex:(o=t.zIndex)!=null?o:(r=S.list)==null?void 0:r.zIndex},children:l.jsx(bj,{variants:yj,initial:!1,animate:f?"enter":"exit",__css:{outline:0,...S.list},...c,className:Ae("chakra-menu__menu-list",g.className),...g,onUpdate:h,onAnimationComplete:yc(p.onComplete,g.onAnimationComplete)})})});Rh.displayName="MenuList";var Sj=he((e,t)=>{const n=Pc();return l.jsx(oe.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),Nh=he((e,t)=>{const{children:n,as:r,...o}=e,s=uj(o,t),c=r||Sj;return l.jsx(c,{...s,className:Ae("chakra-menu__menu-button",e.className),children:l.jsx(oe.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});Nh.displayName="MenuButton";var Cj={slideInBottom:{...ff,custom:{offsetY:16,reverse:!0}},slideInRight:{...ff,custom:{offsetX:16,reverse:!0}},scale:{...S2,custom:{initialScale:.95,reverse:!0}},none:{}},wj=oe(Wr.section),kj=e=>Cj[e||"none"],Fx=x.forwardRef((e,t)=>{const{preset:n,motionProps:r=kj(n),...o}=e;return l.jsx(wj,{ref:t,...r,...o})});Fx.displayName="ModalTransition";var jj=Object.defineProperty,Ej=(e,t,n)=>t in e?jj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pj=(e,t,n)=>(Ej(e,typeof t!="symbol"?t+"":t,n),n),Ij=class{constructor(){Pj(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}},Ef=new Ij;function Lx(e,t){const[n,r]=x.useState(0);return x.useEffect(()=>{const o=e.current;if(o){if(t){const s=Ef.add(o);r(s)}return()=>{Ef.remove(o),r(0)}}},[t,e]),n}var Mj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Pi=new WeakMap,kl=new WeakMap,jl={},kd=0,Bx=function(e){return e&&(e.host||Bx(e.parentNode))},Tj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Bx(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},_j=function(e,t,n,r){var o=Tj(t,Array.isArray(e)?e:[e]);jl[n]||(jl[n]=new WeakMap);var s=jl[n],c=[],u=new Set,f=new Set(o),h=function(g){!g||u.has(g)||(u.add(g),h(g.parentNode))};o.forEach(h);var p=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(y){if(u.has(y))p(y);else{var S=y.getAttribute(r),C=S!==null&&S!=="false",w=(Pi.get(y)||0)+1,k=(s.get(y)||0)+1;Pi.set(y,w),s.set(y,k),c.push(y),w===1&&C&&kl.set(y,!0),k===1&&y.setAttribute(n,"true"),C||y.setAttribute(r,"true")}})};return p(t),u.clear(),kd++,function(){c.forEach(function(g){var y=Pi.get(g)-1,S=s.get(g)-1;Pi.set(g,y),s.set(g,S),y||(kl.has(g)||g.removeAttribute(r),kl.delete(g)),S||g.removeAttribute(n)}),kd--,kd||(Pi=new WeakMap,Pi=new WeakMap,kl=new WeakMap,jl={})}},Dj=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Mj(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),_j(r,o,n,"aria-hidden")):function(){return null}};function Oj(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:s=!0,useInert:c=!0,onOverlayClick:u,onEsc:f}=e,h=x.useRef(null),p=x.useRef(null),[g,y,S]=zj(r,"chakra-modal","chakra-modal--header","chakra-modal--body");Aj(h,t&&c),Lx(h,t);const C=x.useRef(null),w=x.useCallback(z=>{C.current=z.target},[]),k=x.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),s&&(n==null||n()),f==null||f())},[s,n,f]),[j,M]=x.useState(!1),[P,I]=x.useState(!1),T=x.useCallback((z={},V=null)=>({role:"dialog",...z,ref:ct(V,h),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":j?y:void 0,"aria-describedby":P?S:void 0,onClick:Pe(z.onClick,F=>F.stopPropagation())}),[S,P,g,y,j]),D=x.useCallback(z=>{z.stopPropagation(),C.current===z.target&&Ef.isTopModal(h.current)&&(o&&(n==null||n()),u==null||u())},[n,o,u]),_=x.useCallback((z={},V=null)=>({...z,ref:ct(V,p),onClick:Pe(z.onClick,D),onKeyDown:Pe(z.onKeyDown,k),onMouseDown:Pe(z.onMouseDown,w)}),[k,w,D]);return{isOpen:t,onClose:n,headerId:y,bodyId:S,setBodyMounted:I,setHeaderMounted:M,dialogRef:h,overlayRef:p,getDialogProps:T,getDialogContainerProps:_}}function Aj(e,t){const n=e.current;x.useEffect(()=>{if(!(!e.current||!t))return Dj(e.current)},[t,e,n])}function zj(e,...t){const n=x.useId(),r=e||n;return x.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}var[Rj,la]=Et({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Nj,Qo]=Et({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),fo=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:c,finalFocusRef:u,returnFocusOnClose:f,blockScrollOnMount:h,allowPinchZoom:p,preserveScrollBarGap:g,motionPreset:y,lockFocusAcrossFrames:S,onCloseComplete:C}=t,w=fn("Modal",t),j={...Oj(t),autoFocus:o,trapFocus:s,initialFocusRef:c,finalFocusRef:u,returnFocusOnClose:f,blockScrollOnMount:h,allowPinchZoom:p,preserveScrollBarGap:g,motionPreset:y,lockFocusAcrossFrames:S};return l.jsx(Nj,{value:j,children:l.jsx(Rj,{value:w,children:l.jsx(oa,{onExitComplete:C,children:j.isOpen&&l.jsx(eh,{...n,children:r})})})})};fo.displayName="Modal";var ql="right-scroll-bar-position",Yl="width-before-scroll-bar",Fj="with-scroll-bars-hidden",Lj="--removed-body-scroll-bar-size",Hx=z2(),jd=function(){},Ic=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:jd,onWheelCapture:jd,onTouchMoveCapture:jd}),o=r[0],s=r[1],c=e.forwardProps,u=e.children,f=e.className,h=e.removeScrollBar,p=e.enabled,g=e.shards,y=e.sideCar,S=e.noIsolation,C=e.inert,w=e.allowPinchZoom,k=e.as,j=k===void 0?"div":k,M=g2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=y,I=D2([n,t]),T=vr(vr({},M),o);return x.createElement(x.Fragment,null,p&&x.createElement(P,{sideCar:Hx,removeScrollBar:h,shards:g,noIsolation:S,inert:C,setCallbacks:s,allowPinchZoom:!!w,lockRef:n}),c?x.cloneElement(x.Children.only(u),vr(vr({},T),{ref:I})):x.createElement(j,vr({},T,{className:f,ref:I}),u))});Ic.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ic.classNames={fullWidth:Yl,zeroRight:ql};var Dg,Bj=function(){if(Dg)return Dg;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Hj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bj();return t&&e.setAttribute("nonce",t),e}function Wj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Uj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Hj())&&(Wj(t,n),Vj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$j=function(){var e=Uj();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Wx=function(){var e=$j(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gj={left:0,top:0,right:0,gap:0},Ed=function(e){return parseInt(e||"",10)||0},qj=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[Ed(n),Ed(r),Ed(o)]},Yj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gj;var t=qj(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])}},Xj=Wx(),Kj=function(e,t,n,r){var o=e.left,s=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),` + .`.concat(Fj,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(u,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(s,`px; + padding-right: `).concat(c,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(u,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(ql,` { + right: `).concat(u,"px ").concat(r,`; + } + + .`).concat(Yl,` { + margin-right: `).concat(u,"px ").concat(r,`; + } + + .`).concat(ql," .").concat(ql,` { + right: 0 `).concat(r,`; + } + + .`).concat(Yl," .").concat(Yl,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(Lj,": ").concat(u,`px; + } +`)},Qj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=x.useMemo(function(){return Yj(o)},[o]);return x.createElement(Xj,{styles:Kj(s,!t,o,n?"":"!important")})},Pf=!1;if(typeof window<"u")try{var El=Object.defineProperty({},"passive",{get:function(){return Pf=!0,!0}});window.addEventListener("test",El,El),window.removeEventListener("test",El,El)}catch{Pf=!1}var Ii=Pf?{passive:!1}:!1,Zj=function(e){return e.tagName==="TEXTAREA"},Vx=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zj(e)&&n[t]==="visible")},Jj=function(e){return Vx(e,"overflowY")},eE=function(e){return Vx(e,"overflowX")},Og=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Ux(e,n);if(r){var o=$x(e,n),s=o[1],c=o[2];if(s>c)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},tE=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},nE=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ux=function(e,t){return e==="v"?Jj(t):eE(t)},$x=function(e,t){return e==="v"?tE(t):nE(t)},rE=function(e,t){return e==="h"&&t==="rtl"?-1:1},oE=function(e,t,n,r,o){var s=rE(e,window.getComputedStyle(t).direction),c=s*r,u=n.target,f=t.contains(u),h=!1,p=c>0,g=0,y=0;do{var S=$x(e,u),C=S[0],w=S[1],k=S[2],j=w-k-s*C;(C||j)&&Ux(e,u)&&(g+=j,y+=C),u=u.parentNode}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(p&&(o&&g===0||!o&&c>g)||!p&&(o&&y===0||!o&&-c>y))&&(h=!0),h},Pl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ag=function(e){return[e.deltaX,e.deltaY]},zg=function(e){return e&&"current"in e?e.current:e},iE=function(e,t){return e[0]===t[0]&&e[1]===t[1]},aE=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},sE=0,Mi=[];function lE(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(sE++)[0],s=x.useState(function(){return Wx()})[0],c=x.useRef(e);x.useEffect(function(){c.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=uf([e.lockRef.current],(e.shards||[]).map(zg),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=x.useCallback(function(w,k){if("touches"in w&&w.touches.length===2)return!c.current.allowPinchZoom;var j=Pl(w),M=n.current,P="deltaX"in w?w.deltaX:M[0]-j[0],I="deltaY"in w?w.deltaY:M[1]-j[1],T,D=w.target,_=Math.abs(P)>Math.abs(I)?"h":"v";if("touches"in w&&_==="h"&&D.type==="range")return!1;var z=Og(_,D);if(!z)return!0;if(z?T=_:(T=_==="v"?"h":"v",z=Og(_,D)),!z)return!1;if(!r.current&&"changedTouches"in w&&(P||I)&&(r.current=T),!T)return!0;var V=r.current||T;return oE(V,k,w,V==="h"?P:I,!0)},[]),f=x.useCallback(function(w){var k=w;if(!(!Mi.length||Mi[Mi.length-1]!==s)){var j="deltaY"in k?Ag(k):Pl(k),M=t.current.filter(function(T){return T.name===k.type&&T.target===k.target&&iE(T.delta,j)})[0];if(M&&M.should){k.cancelable&&k.preventDefault();return}if(!M){var P=(c.current.shards||[]).map(zg).filter(Boolean).filter(function(T){return T.contains(k.target)}),I=P.length>0?u(k,P[0]):!c.current.noIsolation;I&&k.cancelable&&k.preventDefault()}}},[]),h=x.useCallback(function(w,k,j,M){var P={name:w,delta:k,target:j,should:M};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(I){return I!==P})},1)},[]),p=x.useCallback(function(w){n.current=Pl(w),r.current=void 0},[]),g=x.useCallback(function(w){h(w.type,Ag(w),w.target,u(w,e.lockRef.current))},[]),y=x.useCallback(function(w){h(w.type,Pl(w),w.target,u(w,e.lockRef.current))},[]);x.useEffect(function(){return Mi.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:y}),document.addEventListener("wheel",f,Ii),document.addEventListener("touchmove",f,Ii),document.addEventListener("touchstart",p,Ii),function(){Mi=Mi.filter(function(w){return w!==s}),document.removeEventListener("wheel",f,Ii),document.removeEventListener("touchmove",f,Ii),document.removeEventListener("touchstart",p,Ii)}},[]);var S=e.removeScrollBar,C=e.inert;return x.createElement(x.Fragment,null,C?x.createElement(s,{styles:aE(o)}):null,S?x.createElement(Qj,{gapMode:"margin"}):null)}const cE=d5(Hx,lE);var Gx=x.forwardRef(function(e,t){return x.createElement(Ic,vr({},e,{ref:t,sideCar:cE}))});Gx.classNames=Ic.classNames;const uE=Gx;function dE(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:c,finalFocusRef:u,returnFocusOnClose:f,preserveScrollBarGap:h,lockFocusAcrossFrames:p,isOpen:g}=Qo(),[y,S]=b3();x.useEffect(()=>{!y&&S&&setTimeout(S)},[y,S]);const C=Lx(r,g);return l.jsx(hx,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:u,restoreFocus:f,contentRef:r,lockFocusAcrossFrames:p,children:l.jsx(uE,{removeScrollBar:!h,allowPinchZoom:c,enabled:C===1&&s,forwardProps:!0,children:e.children})})}var ho=he((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...c}=e,{getDialogProps:u,getDialogContainerProps:f}=Qo(),h=u(c,t),p=f(o),g=Ae("chakra-modal__content",n),y=la(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...y.dialog},C={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...y.dialogContainer},{motionPreset:w}=Qo();return l.jsx(dE,{children:l.jsx(oe.div,{...p,className:"chakra-modal__content-container",tabIndex:-1,__css:C,children:l.jsx(Fx,{preset:w,motionProps:s,className:g,...h,__css:S,children:r})})})});ho.displayName="ModalContent";function qx(e){const{leastDestructiveRef:t,...n}=e;return l.jsx(fo,{...n,initialFocusRef:t})}var Yx=he((e,t)=>l.jsx(ho,{ref:t,role:"alertdialog",...e})),zr=he((e,t)=>{const{className:n,...r}=e,o=Ae("chakra-modal__footer",n),c={display:"flex",alignItems:"center",justifyContent:"flex-end",...la().footer};return l.jsx(oe.footer,{ref:t,...r,__css:c,className:o})});zr.displayName="ModalFooter";var Rr=he((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:s}=Qo();x.useEffect(()=>(s(!0),()=>s(!1)),[s]);const c=Ae("chakra-modal__header",n),f={flex:0,...la().header};return l.jsx(oe.header,{ref:t,className:c,id:o,...r,__css:f})});Rr.displayName="ModalHeader";var fE=oe(Wr.div),Nr=he((e,t)=>{const{className:n,transition:r,motionProps:o,...s}=e,c=Ae("chakra-modal__overlay",n),f={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...la().overlay},{motionPreset:h}=Qo(),g=o||(h==="none"?{}:b2);return l.jsx(fE,{...g,__css:f,ref:t,className:c,...s})});Nr.displayName="ModalOverlay";var Fr=he((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:s}=Qo();x.useEffect(()=>(s(!0),()=>s(!1)),[s]);const c=Ae("chakra-modal__body",n),u=la();return l.jsx(oe.div,{ref:t,className:c,id:o,...r,__css:u.body})});Fr.displayName="ModalBody";var ca=he((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:s}=Qo(),c=Ae("chakra-modal__close-btn",r),u=la();return l.jsx(S3,{ref:t,__css:u.closeButton,className:c,onClick:Pe(n,f=>{f.stopPropagation(),s()}),...o})});ca.displayName="ModalCloseButton";var hE=e=>l.jsx(Jt,{viewBox:"0 0 24 24",...e,children:l.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"})}),pE=e=>l.jsx(Jt,{viewBox:"0 0 24 24",...e,children:l.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 Rg(e,t,n,r){x.useEffect(()=>{var o;if(!e.current||!r)return;const s=(o=e.current.ownerDocument.defaultView)!=null?o:window,c=Array.isArray(t)?t:[t],u=new s.MutationObserver(f=>{for(const h of f)h.type==="attributes"&&h.attributeName&&c.includes(h.attributeName)&&n(h)});return u.observe(e.current,{attributes:!0,attributeFilter:c}),()=>u.disconnect()})}function mE(e,t){const n=Ut(e);x.useEffect(()=>{let r=null;const o=()=>n();return t!==null&&(r=window.setInterval(o,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var vE=50,Ng=300;function gE(e,t){const[n,r]=x.useState(!1),[o,s]=x.useState(null),[c,u]=x.useState(!0),f=x.useRef(null),h=()=>clearTimeout(f.current);mE(()=>{o==="increment"&&e(),o==="decrement"&&t()},n?vE:null);const p=x.useCallback(()=>{c&&e(),f.current=setTimeout(()=>{u(!1),r(!0),s("increment")},Ng)},[e,c]),g=x.useCallback(()=>{c&&t(),f.current=setTimeout(()=>{u(!1),r(!0),s("decrement")},Ng)},[t,c]),y=x.useCallback(()=>{u(!0),r(!1),h()},[]);return x.useEffect(()=>()=>h(),[]),{up:p,down:g,stop:y,isSpinning:n}}var xE=/^[Ee0-9+\-.]$/;function yE(e){return xE.test(e)}function bE(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 SE(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,step:c=1,isReadOnly:u,isDisabled:f,isRequired:h,isInvalid:p,pattern:g="[0-9]*(.[0-9]+)?",inputMode:y="decimal",allowMouseWheel:S,id:C,onChange:w,precision:k,name:j,"aria-describedby":M,"aria-label":P,"aria-labelledby":I,onFocus:T,onBlur:D,onInvalid:_,getAriaValueText:z,isValidCharacter:V,format:F,parse:L,...X}=e,$=Ut(T),Q=Ut(D),re=Ut(_),ie=Ut(V??yE),U=Ut(z),K=qw(e),{update:ne,increment:ce,decrement:Re}=K,[ze,Me]=x.useState(!1),J=!(u||f),ue=x.useRef(null),Ie=x.useRef(null),Be=x.useRef(null),Ne=x.useRef(null),Ge=x.useCallback(ee=>ee.split("").filter(ie).join(""),[ie]),Qe=x.useCallback(ee=>{var He;return(He=L==null?void 0:L(ee))!=null?He:ee},[L]),ve=x.useCallback(ee=>{var He;return((He=F==null?void 0:F(ee))!=null?He:ee).toString()},[F]);ti(()=>{(K.valueAsNumber>s||K.valueAsNumber{if(!ue.current)return;if(ue.current.value!=K.value){const He=Qe(ue.current.value);K.setValue(Ge(He))}},[Qe,Ge]);const _e=x.useCallback((ee=c)=>{J&&ce(ee)},[ce,J,c]),qe=x.useCallback((ee=c)=>{J&&Re(ee)},[Re,J,c]),ge=gE(_e,qe);Rg(Be,"disabled",ge.stop,ge.isSpinning),Rg(Ne,"disabled",ge.stop,ge.isSpinning);const Te=x.useCallback(ee=>{if(ee.nativeEvent.isComposing)return;const nt=Qe(ee.currentTarget.value);ne(Ge(nt)),Ie.current={start:ee.currentTarget.selectionStart,end:ee.currentTarget.selectionEnd}},[ne,Ge,Qe]),et=x.useCallback(ee=>{var He,nt,Ft;$==null||$(ee),Ie.current&&(ee.target.selectionStart=(nt=Ie.current.start)!=null?nt:(He=ee.currentTarget.value)==null?void 0:He.length,ee.currentTarget.selectionEnd=(Ft=Ie.current.end)!=null?Ft:ee.currentTarget.selectionStart)},[$]),Ve=x.useCallback(ee=>{if(ee.nativeEvent.isComposing)return;bE(ee,ie)||ee.preventDefault();const He=vt(ee)*c,nt=ee.key,pe={ArrowUp:()=>_e(He),ArrowDown:()=>qe(He),Home:()=>ne(o),End:()=>ne(s)}[nt];pe&&(ee.preventDefault(),pe(ee))},[ie,c,_e,qe,ne,o,s]),vt=ee=>{let He=1;return(ee.metaKey||ee.ctrlKey)&&(He=.1),ee.shiftKey&&(He=10),He},Nt=x.useMemo(()=>{const ee=U==null?void 0:U(K.value);if(ee!=null)return ee;const He=K.value.toString();return He||void 0},[K.value,U]),N=x.useCallback(()=>{let ee=K.value;if(K.value==="")return;/^[eE]/.test(K.value.toString())?K.setValue(""):(K.valueAsNumbers&&(ee=s),K.cast(ee))},[K,s,o]),de=x.useCallback(()=>{Me(!1),n&&N()},[n,Me,N]),xe=x.useCallback(()=>{t&&requestAnimationFrame(()=>{var ee;(ee=ue.current)==null||ee.focus()})},[t]),je=x.useCallback(ee=>{ee.preventDefault(),ge.up(),xe()},[xe,ge]),q=x.useCallback(ee=>{ee.preventDefault(),ge.down(),xe()},[xe,ge]);$o(()=>ue.current,"wheel",ee=>{var He,nt;const pe=((nt=(He=ue.current)==null?void 0:He.ownerDocument)!=null?nt:document).activeElement===ue.current;if(!S||!pe)return;ee.preventDefault();const De=vt(ee)*c,hn=Math.sign(ee.deltaY);hn===-1?_e(De):hn===1&&qe(De)},{passive:!1});const se=x.useCallback((ee={},He=null)=>{const nt=f||r&&K.isAtMax;return{...ee,ref:ct(He,Be),role:"button",tabIndex:-1,onPointerDown:Pe(ee.onPointerDown,Ft=>{Ft.button!==0||nt||je(Ft)}),onPointerLeave:Pe(ee.onPointerLeave,ge.stop),onPointerUp:Pe(ee.onPointerUp,ge.stop),disabled:nt,"aria-disabled":Dr(nt)}},[K.isAtMax,r,je,ge.stop,f]),Fe=x.useCallback((ee={},He=null)=>{const nt=f||r&&K.isAtMin;return{...ee,ref:ct(He,Ne),role:"button",tabIndex:-1,onPointerDown:Pe(ee.onPointerDown,Ft=>{Ft.button!==0||nt||q(Ft)}),onPointerLeave:Pe(ee.onPointerLeave,ge.stop),onPointerUp:Pe(ee.onPointerUp,ge.stop),disabled:nt,"aria-disabled":Dr(nt)}},[K.isAtMin,r,q,ge.stop,f]),Ze=x.useCallback((ee={},He=null)=>{var nt,Ft,pe,De;return{name:j,inputMode:y,type:"text",pattern:g,"aria-labelledby":I,"aria-label":P,"aria-describedby":M,id:C,disabled:f,...ee,readOnly:(nt=ee.readOnly)!=null?nt:u,"aria-readonly":(Ft=ee.readOnly)!=null?Ft:u,"aria-required":(pe=ee.required)!=null?pe:h,required:(De=ee.required)!=null?De:h,ref:ct(ue,He),value:ve(K.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":Number.isNaN(K.valueAsNumber)?void 0:K.valueAsNumber,"aria-invalid":Dr(p??K.isOutOfRange),"aria-valuetext":Nt,autoComplete:"off",autoCorrect:"off",onChange:Pe(ee.onChange,Te),onKeyDown:Pe(ee.onKeyDown,Ve),onFocus:Pe(ee.onFocus,et,()=>Me(!0)),onBlur:Pe(ee.onBlur,Q,de)}},[j,y,g,I,P,ve,M,C,f,h,u,p,K.value,K.valueAsNumber,K.isOutOfRange,o,s,Nt,Te,Ve,et,Q,de]);return{value:ve(K.value),valueAsNumber:K.valueAsNumber,isFocused:ze,isDisabled:f,isReadOnly:u,getIncrementButtonProps:se,getDecrementButtonProps:Fe,getInputProps:Ze,htmlProps:X}}var[CE,Mc]=Et({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[wE,Fh]=Et({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Lh=he(function(t,n){const r=fn("NumberInput",t),o=At(t),s=uh(o),{htmlProps:c,...u}=SE(s),f=x.useMemo(()=>u,[u]);return l.jsx(wE,{value:f,children:l.jsx(CE,{value:r,children:l.jsx(oe.div,{...c,ref:n,className:Ae("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});Lh.displayName="NumberInput";var Bh=he(function(t,n){const r=Mc();return l.jsx(oe.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}})});Bh.displayName="NumberInputStepper";var Hh=he(function(t,n){const{getInputProps:r}=Fh(),o=r(t,n),s=Mc();return l.jsx(oe.input,{...o,className:Ae("chakra-numberinput__field",t.className),__css:{width:"100%",...s.field}})});Hh.displayName="NumberInputField";var Xx=oe("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Wh=he(function(t,n){var r;const o=Mc(),{getDecrementButtonProps:s}=Fh(),c=s(t,n);return l.jsx(Xx,{...c,__css:o.stepper,children:(r=t.children)!=null?r:l.jsx(hE,{})})});Wh.displayName="NumberDecrementStepper";var Vh=he(function(t,n){var r;const{getIncrementButtonProps:o}=Fh(),s=o(t,n),c=Mc();return l.jsx(Xx,{...s,__css:c.stepper,children:(r=t.children)!=null?r:l.jsx(pE,{})})});Vh.displayName="NumberIncrementStepper";var[kE,vs]=Et({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[jE,Uh]=Et({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `});function $h(e){const t=x.Children.only(e.children),{getTriggerProps:n}=vs();return x.cloneElement(t,n(t.props,t.ref))}$h.displayName="PopoverTrigger";var Ti={click:"click",hover:"hover"};function EE(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:s=!0,autoFocus:c=!0,arrowSize:u,arrowShadowColor:f,trigger:h=Ti.click,openDelay:p=200,closeDelay:g=200,isLazy:y,lazyBehavior:S="unmount",computePositionOnMount:C,...w}=e,{isOpen:k,onClose:j,onOpen:M,onToggle:P}=Oh(e),I=x.useRef(null),T=x.useRef(null),D=x.useRef(null),_=x.useRef(!1),z=x.useRef(!1);k&&(z.current=!0);const[V,F]=x.useState(!1),[L,X]=x.useState(!1),$=x.useId(),Q=o??$,[re,ie,U,K]=["popover-trigger","popover-content","popover-header","popover-body"].map(Te=>`${Te}-${Q}`),{referenceRef:ne,getArrowProps:ce,getPopperProps:Re,getArrowInnerProps:ze,forceUpdate:Me}=Dh({...w,enabled:k||!!C}),J=Ax({isOpen:k,ref:D});e5({enabled:k,ref:T}),wx(D,{focusRef:T,visible:k,shouldFocus:s&&h===Ti.click}),A6(D,{focusRef:r,visible:k,shouldFocus:c&&h===Ti.click});const ue=Ah({wasSelected:z.current,enabled:y,mode:S,isSelected:J.present}),Ie=x.useCallback((Te={},et=null)=>{const Ve={...Te,style:{...Te.style,transformOrigin:Vt.transformOrigin.varRef,[Vt.arrowSize.var]:u?`${u}px`:void 0,[Vt.arrowShadowColor.var]:f},ref:ct(D,et),children:ue?Te.children:null,id:ie,tabIndex:-1,role:"dialog",onKeyDown:Pe(Te.onKeyDown,vt=>{n&&vt.key==="Escape"&&j()}),onBlur:Pe(Te.onBlur,vt=>{const Nt=Fg(vt),N=Pd(D.current,Nt),de=Pd(T.current,Nt);k&&t&&(!N&&!de)&&j()}),"aria-labelledby":V?U:void 0,"aria-describedby":L?K:void 0};return h===Ti.hover&&(Ve.role="tooltip",Ve.onMouseEnter=Pe(Te.onMouseEnter,()=>{_.current=!0}),Ve.onMouseLeave=Pe(Te.onMouseLeave,vt=>{vt.nativeEvent.relatedTarget!==null&&(_.current=!1,setTimeout(()=>j(),g))})),Ve},[ue,ie,V,U,L,K,h,n,j,k,t,g,f,u]),Be=x.useCallback((Te={},et=null)=>Re({...Te,style:{visibility:k?"visible":"hidden",...Te.style}},et),[k,Re]),Ne=x.useCallback((Te,et=null)=>({...Te,ref:ct(et,I,ne)}),[I,ne]),Ge=x.useRef(),Qe=x.useRef(),ve=x.useCallback(Te=>{I.current==null&&ne(Te)},[ne]),_e=x.useCallback((Te={},et=null)=>{const Ve={...Te,ref:ct(T,et,ve),id:re,"aria-haspopup":"dialog","aria-expanded":k,"aria-controls":ie};return h===Ti.click&&(Ve.onClick=Pe(Te.onClick,P)),h===Ti.hover&&(Ve.onFocus=Pe(Te.onFocus,()=>{Ge.current===void 0&&M()}),Ve.onBlur=Pe(Te.onBlur,vt=>{const Nt=Fg(vt),N=!Pd(D.current,Nt);k&&t&&N&&j()}),Ve.onKeyDown=Pe(Te.onKeyDown,vt=>{vt.key==="Escape"&&j()}),Ve.onMouseEnter=Pe(Te.onMouseEnter,()=>{_.current=!0,Ge.current=window.setTimeout(()=>M(),p)}),Ve.onMouseLeave=Pe(Te.onMouseLeave,()=>{_.current=!1,Ge.current&&(clearTimeout(Ge.current),Ge.current=void 0),Qe.current=window.setTimeout(()=>{_.current===!1&&j()},g)})),Ve},[re,k,ie,h,ve,P,M,t,j,p,g]);x.useEffect(()=>()=>{Ge.current&&clearTimeout(Ge.current),Qe.current&&clearTimeout(Qe.current)},[]);const qe=x.useCallback((Te={},et=null)=>({...Te,id:U,ref:ct(et,Ve=>{F(!!Ve)})}),[U]),ge=x.useCallback((Te={},et=null)=>({...Te,id:K,ref:ct(et,Ve=>{X(!!Ve)})}),[K]);return{forceUpdate:Me,isOpen:k,onAnimationComplete:J.onComplete,onClose:j,getAnchorProps:Ne,getArrowProps:ce,getArrowInnerProps:ze,getPopoverPositionerProps:Be,getPopoverProps:Ie,getTriggerProps:_e,getHeaderProps:qe,getBodyProps:ge}}function Pd(e,t){return e===t||(e==null?void 0:e.contains(t))}function Fg(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:n}function Gh(e){const t=fn("Popover",e),{children:n,...r}=At(e),o=ei(),s=EE({...r,direction:o.direction});return l.jsx(kE,{value:s,children:l.jsx(jE,{value:t,children:k1(n,{isOpen:s.isOpen,onClose:s.onClose,forceUpdate:s.forceUpdate})})})}Gh.displayName="Popover";function qh(e){var t;const{bg:n,bgColor:r,backgroundColor:o,shadow:s,boxShadow:c}=e,{getArrowProps:u,getArrowInnerProps:f}=vs(),h=Uh(),p=(t=n??r)!=null?t:o,g=s??c;return l.jsx(oe.div,{...u(),className:"chakra-popover__arrow-positioner",children:l.jsx(oe.div,{className:Ae("chakra-popover__arrow",e.className),...f(e),__css:{"--popper-arrow-bg":p?`colors.${p}, ${p}`:void 0,"--popper-arrow-shadow":g?`shadows.${g}, ${g}`:void 0,...h.arrow}})})}qh.displayName="PopoverArrow";var Kx=he(function(t,n){const{getBodyProps:r}=vs(),o=Uh();return l.jsx(oe.div,{...r(t,n),className:Ae("chakra-popover__body",t.className),__css:o.body})});Kx.displayName="PopoverBody";function PE(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var IE={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]}}},ME=oe(Wr.section),Qx=he(function(t,n){const{variants:r=IE,...o}=t,{isOpen:s}=vs();return l.jsx(ME,{ref:n,variants:PE(r),initial:!1,animate:s?"enter":"exit",...o})});Qx.displayName="PopoverTransition";var Yh=he(function(t,n){const{rootProps:r,motionProps:o,...s}=t,{getPopoverProps:c,getPopoverPositionerProps:u,onAnimationComplete:f}=vs(),h=Uh(),p={position:"relative",display:"flex",flexDirection:"column",...h.content};return l.jsx(oe.div,{...u(r),__css:h.popper,className:"chakra-popover__popper",children:l.jsx(Qx,{...o,...c(s,n),onAnimationComplete:yc(f,s.onAnimationComplete),className:Ae("chakra-popover__content",t.className),__css:p})})});Yh.displayName="PopoverContent";function TE(e,t,n){return(e-t)*100/(n-t)}Jo({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}});Jo({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});var _E=Jo({"0%":{left:"-40%"},"100%":{left:"100%"}}),DE=Jo({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function OE(e){const{value:t=0,min:n,max:r,valueText:o,getValueText:s,isIndeterminate:c,role:u="progressbar"}=e,f=TE(t,n,r);return{bind:{"data-indeterminate":c?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":c?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof s=="function"?s(t,f):o})(),role:u},percent:f,value:t}}var[AE,zE]=Et({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),RE=he((e,t)=>{const{min:n,max:r,value:o,isIndeterminate:s,role:c,...u}=e,f=OE({value:o,min:n,max:r,isIndeterminate:s,role:c}),p={height:"100%",...zE().filledTrack};return l.jsx(oe.div,{ref:t,style:{width:`${f.percent}%`,...u.style},...f.bind,...u,__css:p})}),Zx=he((e,t)=>{var n;const{value:r,min:o=0,max:s=100,hasStripe:c,isAnimated:u,children:f,borderRadius:h,isIndeterminate:p,"aria-label":g,"aria-labelledby":y,"aria-valuetext":S,title:C,role:w,...k}=At(e),j=fn("Progress",e),M=h??((n=j.track)==null?void 0:n.borderRadius),P={animation:`${DE} 1s linear infinite`},D={...!p&&c&&u&&P,...p&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${_E} 1s ease infinite normal none running`}},_={overflow:"hidden",position:"relative",...j.track};return l.jsx(oe.div,{ref:t,borderRadius:M,__css:_,...k,children:l.jsxs(AE,{value:j,children:[l.jsx(RE,{"aria-label":g,"aria-labelledby":y,"aria-valuetext":S,min:o,max:s,value:r,isIndeterminate:p,css:D,borderRadius:M,title:C,role:w}),f]})})});Zx.displayName="Progress";function NE(e){return e&&Kd(e)&&Kd(e.target)}function FE(e={}){const{onChange:t,value:n,defaultValue:r,name:o,isDisabled:s,isFocusable:c,isNative:u,...f}=e,[h,p]=x.useState(r||""),g=typeof n<"u",y=g?n:h,S=x.useRef(null),C=x.useCallback(()=>{const T=S.current;if(!T)return;let D="input:not(:disabled):checked";const _=T.querySelector(D);if(_){_.focus();return}D="input:not(:disabled)";const z=T.querySelector(D);z==null||z.focus()},[]),k=`radio-${x.useId()}`,j=o||k,M=x.useCallback(T=>{const D=NE(T)?T.target.value:T;g||p(D),t==null||t(String(D))},[t,g]),P=x.useCallback((T={},D=null)=>({...T,ref:ct(D,S),role:"radiogroup"}),[]),I=x.useCallback((T={},D=null)=>({...T,ref:D,name:j,[u?"checked":"isChecked"]:y!=null?T.value===y:void 0,onChange(z){M(z)},"data-radiogroup":!0}),[u,j,M,y]);return{getRootProps:P,getRadioProps:I,name:j,ref:S,focus:C,setValue:p,value:y,onChange:M,isDisabled:s,isFocusable:c,htmlProps:f}}var[LE,Jx]=Et({name:"RadioGroupContext",strict:!1}),Ja=he((e,t)=>{const{colorScheme:n,size:r,variant:o,children:s,className:c,isDisabled:u,isFocusable:f,...h}=e,{value:p,onChange:g,getRootProps:y,name:S,htmlProps:C}=FE(h),w=x.useMemo(()=>({name:S,size:r,onChange:g,colorScheme:n,value:p,variant:o,isDisabled:u,isFocusable:f}),[S,r,g,n,p,o,u,f]);return l.jsx(LE,{value:w,children:l.jsx(oe.div,{...y(C,t),className:Ae("chakra-radio-group",c),children:s})})});Ja.displayName="RadioGroup";var BE={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function HE(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:o,isReadOnly:s,isRequired:c,onChange:u,isInvalid:f,name:h,value:p,id:g,"data-radiogroup":y,"aria-describedby":S,...C}=e,w=`radio-${x.useId()}`,k=ri(),M=!!Jx()||!!y;let I=!!k&&!M?k.id:w;I=g??I;const T=o??(k==null?void 0:k.isDisabled),D=s??(k==null?void 0:k.isReadOnly),_=c??(k==null?void 0:k.isRequired),z=f??(k==null?void 0:k.isInvalid),[V,F]=x.useState(!1),[L,X]=x.useState(!1),[$,Q]=x.useState(!1),[re,ie]=x.useState(!1),[U,K]=x.useState(Boolean(t)),ne=typeof n<"u",ce=ne?n:U;x.useEffect(()=>k2(F),[]);const Re=x.useCallback(ve=>{if(D||T){ve.preventDefault();return}ne||K(ve.target.checked),u==null||u(ve)},[ne,T,D,u]),ze=x.useCallback(ve=>{ve.key===" "&&ie(!0)},[ie]),Me=x.useCallback(ve=>{ve.key===" "&&ie(!1)},[ie]),J=x.useCallback((ve={},_e=null)=>({...ve,ref:_e,"data-active":Ye(re),"data-hover":Ye($),"data-disabled":Ye(T),"data-invalid":Ye(z),"data-checked":Ye(ce),"data-focus":Ye(L),"data-focus-visible":Ye(L&&V),"data-readonly":Ye(D),"aria-hidden":!0,onMouseDown:Pe(ve.onMouseDown,()=>ie(!0)),onMouseUp:Pe(ve.onMouseUp,()=>ie(!1)),onMouseEnter:Pe(ve.onMouseEnter,()=>Q(!0)),onMouseLeave:Pe(ve.onMouseLeave,()=>Q(!1))}),[re,$,T,z,ce,L,D,V]),{onFocus:ue,onBlur:Ie}=k??{},Be=x.useCallback((ve={},_e=null)=>{const qe=T&&!r;return{...ve,id:I,ref:_e,type:"radio",name:h,value:p,onChange:Pe(ve.onChange,Re),onBlur:Pe(Ie,ve.onBlur,()=>X(!1)),onFocus:Pe(ue,ve.onFocus,()=>X(!0)),onKeyDown:Pe(ve.onKeyDown,ze),onKeyUp:Pe(ve.onKeyUp,Me),checked:ce,disabled:qe,readOnly:D,required:_,"aria-invalid":Dr(z),"aria-disabled":Dr(qe),"aria-required":Dr(_),"data-readonly":Ye(D),"aria-describedby":S,style:BE}},[T,r,I,h,p,Re,Ie,ue,ze,Me,ce,D,_,z,S]);return{state:{isInvalid:z,isFocused:L,isChecked:ce,isActive:re,isHovered:$,isDisabled:T,isReadOnly:D,isRequired:_},getCheckboxProps:J,getInputProps:Be,getLabelProps:(ve={},_e=null)=>({...ve,ref:_e,onMouseDown:Pe(ve.onMouseDown,Lg),onTouchStart:Pe(ve.onTouchStart,Lg),"data-disabled":Ye(T),"data-checked":Ye(ce),"data-invalid":Ye(z)}),getRootProps:(ve,_e=null)=>({...ve,ref:_e,"data-disabled":Ye(T),"data-checked":Ye(ce),"data-invalid":Ye(z)}),htmlProps:C}}function Lg(e){e.preventDefault(),e.stopPropagation()}function WE(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 jn=he((e,t)=>{var n;const r=Jx(),{onChange:o,value:s}=e,c=fn("Radio",{...r,...e}),u=At(e),{spacing:f="0.5rem",children:h,isDisabled:p=r==null?void 0:r.isDisabled,isFocusable:g=r==null?void 0:r.isFocusable,inputProps:y,...S}=u;let C=e.isChecked;(r==null?void 0:r.value)!=null&&s!=null&&(C=r.value===s);let w=o;r!=null&&r.onChange&&s!=null&&(w=yc(r.onChange,o));const k=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:j,getCheckboxProps:M,getLabelProps:P,getRootProps:I,htmlProps:T}=HE({...S,isChecked:C,isFocusable:g,isDisabled:p,onChange:w,name:k}),[D,_]=WE(T,j1),z=M(_),V=j(y,t),F=P(),L=Object.assign({},D,I()),X={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...c.container},$={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...c.control},Q={userSelect:"none",marginStart:f,...c.label};return l.jsxs(oe.label,{className:"chakra-radio",...L,__css:X,children:[l.jsx("input",{className:"chakra-radio__input",...V}),l.jsx(oe.span,{className:"chakra-radio__control",...z,__css:$}),h&&l.jsx(oe.span,{className:"chakra-radio__label",...F,__css:Q,children:h})]})});jn.displayName="Radio";var ey=he(function(t,n){const{children:r,placeholder:o,className:s,...c}=t;return l.jsxs(oe.select,{...c,ref:n,className:Ae("chakra-select",s),children:[o&&l.jsx("option",{value:"",children:o}),r]})});ey.displayName="SelectField";function VE(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 ty=he((e,t)=>{var n;const r=fn("Select",e),{rootProps:o,placeholder:s,icon:c,color:u,height:f,h,minH:p,minHeight:g,iconColor:y,iconSize:S,...C}=At(e),[w,k]=VE(C,j1),j=ch(k),M={width:"100%",height:"fit-content",position:"relative",color:u},P={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return l.jsxs(oe.div,{className:"chakra-select__wrapper",__css:M,...w,...o,children:[l.jsx(ey,{ref:t,height:h??f,minH:p??g,placeholder:s,...j,__css:P,children:e.children}),l.jsx(ny,{"data-disabled":Ye(j.disabled),...(y||u)&&{color:y||u},__css:r.icon,...S&&{fontSize:S},children:c})]})});ty.displayName="Select";var UE=e=>l.jsx("svg",{viewBox:"0 0 24 24",...e,children:l.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),$E=oe("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),ny=e=>{const{children:t=l.jsx(UE,{}),...n}=e,r=x.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return l.jsx($E,{...n,className:"chakra-select__icon-wrapper",children:x.isValidElement(t)?r:null})};ny.displayName="SelectIcon";var _i=e=>e?"":void 0,Id=e=>e?!0:void 0,gs=(...e)=>e.filter(Boolean).join(" ");function Md(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Il(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Xl={width:0,height:0},Ml=e=>e||Xl;function GE(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:o}=e,s=w=>{var k;const j=(k=r[w])!=null?k:Xl;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Il({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${j.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${j.width/2}px)`}})}},c=t==="vertical"?r.reduce((w,k)=>Ml(w).height>Ml(k).height?w:k,Xl):r.reduce((w,k)=>Ml(w).width>Ml(k).width?w:k,Xl),u={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Il({orientation:t,vertical:c?{paddingLeft:c.width/2,paddingRight:c.width/2}:{},horizontal:c?{paddingTop:c.height/2,paddingBottom:c.height/2}:{}})},f={position:"absolute",...Il({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},h=n.length===1,p=[0,o?100-n[0]:n[0]],g=h?p:n;let y=g[0];!h&&o&&(y=100-y);const S=Math.abs(g[g.length-1]-g[0]),C={...f,...Il({orientation:t,vertical:o?{height:`${S}%`,top:`${y}%`}:{height:`${S}%`,bottom:`${y}%`},horizontal:o?{width:`${S}%`,right:`${y}%`}:{width:`${S}%`,left:`${y}%`}})};return{trackStyle:f,innerTrackStyle:C,rootStyle:u,getThumbStyle:s}}function qE(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function YE(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function XE(e){const t=QE(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function ry(e){return!!e.touches}function KE(e){return ry(e)&&e.touches.length>1}function QE(e){var t;return(t=e.view)!=null?t:window}function ZE(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function JE(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function oy(e,t="page"){return ry(e)?ZE(e,t):JE(e,t)}function e7(e){return t=>{const n=XE(t);(!n||n&&t.button===0)&&e(t)}}function t7(e,t=!1){function n(o){e(o,{point:oy(o)})}return t?e7(n):n}function Kl(e,t,n,r){return YE(e,t,t7(n,t==="pointerdown"),r)}var n7=Object.defineProperty,r7=(e,t,n)=>t in e?n7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tr=(e,t,n)=>(r7(e,typeof t!="symbol"?t+"":t,n),n),o7=class{constructor(e,t,n){tr(this,"history",[]),tr(this,"startEvent",null),tr(this,"lastEvent",null),tr(this,"lastEventInfo",null),tr(this,"handlers",{}),tr(this,"removeListeners",()=>{}),tr(this,"threshold",3),tr(this,"win"),tr(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const u=Td(this.lastEventInfo,this.history),f=this.startEvent!==null,h=l7(u.offset,{x:0,y:0})>=this.threshold;if(!f&&!h)return;const{timestamp:p}=Jv();this.history.push({...u.point,timestamp:p});const{onStart:g,onMove:y}=this.handlers;f||(g==null||g(this.lastEvent,u),this.startEvent=this.lastEvent),y==null||y(this.lastEvent,u)}),tr(this,"onPointerMove",(u,f)=>{this.lastEvent=u,this.lastEventInfo=f,A3.update(this.updatePoint,!0)}),tr(this,"onPointerUp",(u,f)=>{const h=Td(f,this.history),{onEnd:p,onSessionEnd:g}=this.handlers;g==null||g(u,h),this.end(),!(!p||!this.startEvent)&&(p==null||p(u,h))});var r;if(this.win=(r=e.view)!=null?r:window,KE(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const o={point:oy(e)},{timestamp:s}=Jv();this.history=[{...o.point,timestamp:s}];const{onSessionStart:c}=t;c==null||c(e,Td(o,this.history)),this.removeListeners=s7(Kl(this.win,"pointermove",this.onPointerMove),Kl(this.win,"pointerup",this.onPointerUp),Kl(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),z3.update(this.updatePoint)}};function Bg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Td(e,t){return{point:e.point,delta:Bg(e.point,t[t.length-1]),offset:Bg(e.point,t[0]),velocity:a7(t,.1)}}var i7=e=>e*1e3;function a7(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>i7(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 c={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function s7(...e){return t=>e.reduce((n,r)=>r(n),t)}function _d(e,t){return Math.abs(e-t)}function Hg(e){return"x"in e&&"y"in e}function l7(e,t){if(typeof e=="number"&&typeof t=="number")return _d(e,t);if(Hg(e)&&Hg(t)){const n=_d(e.x,t.x),r=_d(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function iy(e){const t=x.useRef(null);return t.current=e,t}function c7(e,t){const{onPan:n,onPanStart:r,onPanEnd:o,onPanSessionStart:s,onPanSessionEnd:c,threshold:u}=t,f=Boolean(n||r||o||s||c),h=x.useRef(null),p=iy({onSessionStart:s,onSessionEnd:c,onStart:r,onMove:n,onEnd(g,y){h.current=null,o==null||o(g,y)}});x.useEffect(()=>{var g;(g=h.current)==null||g.updateHandlers(p.current)}),x.useEffect(()=>{const g=e.current;if(!g||!f)return;function y(S){h.current=new o7(S,p.current,u)}return Kl(g,"pointerdown",y)},[e,f,p,u]),x.useEffect(()=>()=>{var g;(g=h.current)==null||g.end(),h.current=null},[])}function u7(e,t){var n;if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const r=(n=e.ownerDocument.defaultView)!=null?n:window,o=new r.ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const[c]=s;let u,f;if("borderBoxSize"in c){const h=c.borderBoxSize,p=Array.isArray(h)?h[0]:h;u=p.inlineSize,f=p.blockSize}else u=e.offsetWidth,f=e.offsetHeight;t({width:u,height:f})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}var d7=Boolean(globalThis==null?void 0:globalThis.document)?x.useLayoutEffect:x.useEffect;function f7(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 h7({getNodes:e,observeMutation:t=!0}){const[n,r]=x.useState([]),[o,s]=x.useState(0);return d7(()=>{const c=e(),u=c.map((f,h)=>u7(f,p=>{r(g=>[...g.slice(0,h),p,...g.slice(h+1)])}));if(t){const f=c[0];u.push(f7(f,()=>{s(h=>h+1)}))}return()=>{u.forEach(f=>{f==null||f()})}},[o]),n}function p7(e){return typeof e=="object"&&e!==null&&"current"in e}function m7(e){const[t]=h7({observeMutation:!1,getNodes(){return[p7(e)?e.current:e]}});return t}function v7(e){var t;const{min:n=0,max:r=100,onChange:o,value:s,defaultValue:c,isReversed:u,direction:f="ltr",orientation:h="horizontal",id:p,isDisabled:g,isReadOnly:y,onChangeStart:S,onChangeEnd:C,step:w=1,getAriaValueText:k,"aria-valuetext":j,"aria-label":M,"aria-labelledby":P,name:I,focusThumbOnChange:T=!0,...D}=e,_=Ut(S),z=Ut(C),V=Ut(k),F=qE({isReversed:u,direction:f,orientation:h}),[L,X]=ih({value:s,defaultValue:c??x7(n,r),onChange:o}),[$,Q]=x.useState(!1),[re,ie]=x.useState(!1),U=!(g||y),K=(r-n)/10,ne=w||(r-n)/100,ce=$l(L,n,r),Re=r-ce+n,Me=ug(F?Re:ce,n,r),J=h==="vertical",ue=iy({min:n,max:r,step:w,isDisabled:g,value:ce,isInteractive:U,isReversed:F,isVertical:J,eventSource:null,focusThumbOnChange:T,orientation:h}),Ie=x.useRef(null),Be=x.useRef(null),Ne=x.useRef(null),Ge=x.useId(),Qe=p??Ge,[ve,_e]=[`slider-thumb-${Qe}`,`slider-track-${Qe}`],qe=x.useCallback(pe=>{var De,hn;if(!Ie.current)return;const $t=ue.current;$t.eventSource="pointer";const pn=Ie.current.getBoundingClientRect(),{clientX:or,clientY:bo}=(hn=(De=pe.touches)==null?void 0:De[0])!=null?hn:pe,da=J?pn.bottom-bo:or-pn.left,Kc=J?pn.height:pn.width;let fa=da/Kc;F&&(fa=1-fa);let So=Gw(fa,$t.min,$t.max);return $t.step&&(So=parseFloat(dg(So,$t.min,$t.step))),So=$l(So,$t.min,$t.max),So},[J,F,ue]),ge=x.useCallback(pe=>{const De=ue.current;De.isInteractive&&(pe=parseFloat(dg(pe,De.min,ne)),pe=$l(pe,De.min,De.max),X(pe))},[ne,X,ue]),Te=x.useMemo(()=>({stepUp(pe=ne){const De=F?ce-pe:ce+pe;ge(De)},stepDown(pe=ne){const De=F?ce+pe:ce-pe;ge(De)},reset(){ge(c||0)},stepTo(pe){ge(pe)}}),[ge,F,ce,ne,c]),et=x.useCallback(pe=>{const De=ue.current,$t={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(K),PageDown:()=>Te.stepDown(K),Home:()=>ge(De.min),End:()=>ge(De.max)}[pe.key];$t&&(pe.preventDefault(),pe.stopPropagation(),$t(pe),De.eventSource="keyboard")},[Te,ge,K,ue]),Ve=(t=V==null?void 0:V(ce))!=null?t:j,vt=m7(Be),{getThumbStyle:Nt,rootStyle:N,trackStyle:de,innerTrackStyle:xe}=x.useMemo(()=>{const pe=ue.current,De=vt??{width:0,height:0};return GE({isReversed:F,orientation:pe.orientation,thumbRects:[De],thumbPercents:[Me]})},[F,vt,Me,ue]),je=x.useCallback(()=>{ue.current.focusThumbOnChange&&setTimeout(()=>{var De;return(De=Be.current)==null?void 0:De.focus()})},[ue]);ti(()=>{const pe=ue.current;je(),pe.eventSource==="keyboard"&&(z==null||z(pe.value))},[ce,z]);function q(pe){const De=qe(pe);De!=null&&De!==ue.current.value&&X(De)}c7(Ne,{onPanSessionStart(pe){const De=ue.current;De.isInteractive&&(Q(!0),je(),q(pe),_==null||_(De.value))},onPanSessionEnd(){const pe=ue.current;pe.isInteractive&&(Q(!1),z==null||z(pe.value))},onPan(pe){ue.current.isInteractive&&q(pe)}});const se=x.useCallback((pe={},De=null)=>({...pe,...D,ref:ct(De,Ne),tabIndex:-1,"aria-disabled":Id(g),"data-focused":_i(re),style:{...pe.style,...N}}),[D,g,re,N]),Fe=x.useCallback((pe={},De=null)=>({...pe,ref:ct(De,Ie),id:_e,"data-disabled":_i(g),style:{...pe.style,...de}}),[g,_e,de]),Ze=x.useCallback((pe={},De=null)=>({...pe,ref:De,style:{...pe.style,...xe}}),[xe]),ee=x.useCallback((pe={},De=null)=>({...pe,ref:ct(De,Be),role:"slider",tabIndex:U?0:void 0,id:ve,"data-active":_i($),"aria-valuetext":Ve,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":ce,"aria-orientation":h,"aria-disabled":Id(g),"aria-readonly":Id(y),"aria-label":M,"aria-labelledby":M?void 0:P,style:{...pe.style,...Nt(0)},onKeyDown:Md(pe.onKeyDown,et),onFocus:Md(pe.onFocus,()=>ie(!0)),onBlur:Md(pe.onBlur,()=>ie(!1))}),[U,ve,$,Ve,n,r,ce,h,g,y,M,P,Nt,et]),He=x.useCallback((pe,De=null)=>{const hn=!(pe.valuer),$t=ce>=pe.value,pn=ug(pe.value,n,r),or={position:"absolute",pointerEvents:"none",...g7({orientation:h,vertical:{bottom:F?`${100-pn}%`:`${pn}%`},horizontal:{left:F?`${100-pn}%`:`${pn}%`}})};return{...pe,ref:De,role:"presentation","aria-hidden":!0,"data-disabled":_i(g),"data-invalid":_i(!hn),"data-highlighted":_i($t),style:{...pe.style,...or}}},[g,F,r,n,h,ce]),nt=x.useCallback((pe={},De=null)=>({...pe,ref:De,type:"hidden",value:ce,name:I}),[I,ce]);return{state:{value:ce,isFocused:re,isDragging:$},actions:Te,getRootProps:se,getTrackProps:Fe,getInnerTrackProps:Ze,getThumbProps:ee,getMarkerProps:He,getInputProps:nt}}function g7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function x7(e,t){return t"}),[b7,_c]=Et({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),ay=he((e,t)=>{const n={orientation:"horizontal",...e},r=fn("Slider",n),o=At(n),{direction:s}=ei();o.direction=s;const{getInputProps:c,getRootProps:u,...f}=v7(o),h=u(),p=c({},t);return l.jsx(y7,{value:f,children:l.jsx(b7,{value:r,children:l.jsxs(oe.div,{...h,className:gs("chakra-slider",n.className),__css:r.container,children:[n.children,l.jsx("input",{...p})]})})})});ay.displayName="Slider";var sy=he((e,t)=>{const{getThumbProps:n}=Tc(),r=_c(),o=n(e,t);return l.jsx(oe.div,{...o,className:gs("chakra-slider__thumb",e.className),__css:r.thumb})});sy.displayName="SliderThumb";var ly=he((e,t)=>{const{getTrackProps:n}=Tc(),r=_c(),o=n(e,t);return l.jsx(oe.div,{...o,className:gs("chakra-slider__track",e.className),__css:r.track})});ly.displayName="SliderTrack";var cy=he((e,t)=>{const{getInnerTrackProps:n}=Tc(),r=_c(),o=n(e,t);return l.jsx(oe.div,{...o,className:gs("chakra-slider__filled-track",e.className),__css:r.filledTrack})});cy.displayName="SliderFilledTrack";var If=he((e,t)=>{const{getMarkerProps:n}=Tc(),r=_c(),o=n(e,t);return l.jsx(oe.div,{...o,className:gs("chakra-slider__marker",e.className),__css:r.mark})});If.displayName="SliderMark";var uy=he(function(t,n){const r=fn("Switch",t),{spacing:o="0.5rem",children:s,...c}=At(t),{state:u,getInputProps:f,getCheckboxProps:h,getRootProps:p,getLabelProps:g}=j2(c),y=x.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),S=x.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),C=x.useMemo(()=>({userSelect:"none",marginStart:o,...r.label}),[o,r.label]);return l.jsxs(oe.label,{...p(),className:Ae("chakra-switch",t.className),__css:y,children:[l.jsx("input",{className:"chakra-switch__input",...f({},n)}),l.jsx(oe.span,{...h(),className:"chakra-switch__track",__css:S,children:l.jsx(oe.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":Ye(u.isChecked),"data-hover":Ye(u.isHovered)})}),s&&l.jsx(oe.span,{className:"chakra-switch__label",...g(),__css:C,children:s})]})});uy.displayName="Switch";var[S7,C7,w7,k7]=rh();function j7(e){var t;const{defaultIndex:n,onChange:r,index:o,isManual:s,isLazy:c,lazyBehavior:u="unmount",orientation:f="horizontal",direction:h="ltr",...p}=e,[g,y]=x.useState(n??0),[S,C]=ih({defaultValue:n??0,value:o,onChange:r});x.useEffect(()=>{o!=null&&y(o)},[o]);const w=w7(),k=x.useId();return{id:`tabs-${(t=e.id)!=null?t:k}`,selectedIndex:S,focusedIndex:g,setSelectedIndex:C,setFocusedIndex:y,isManual:s,isLazy:c,lazyBehavior:u,orientation:f,descendants:w,direction:h,htmlProps:p}}var[E7,Dc]=Et({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function P7(e){const{focusedIndex:t,orientation:n,direction:r}=Dc(),o=C7(),s=x.useCallback(c=>{const u=()=>{var M;const P=o.nextEnabled(t);P&&((M=P.node)==null||M.focus())},f=()=>{var M;const P=o.prevEnabled(t);P&&((M=P.node)==null||M.focus())},h=()=>{var M;const P=o.firstEnabled();P&&((M=P.node)==null||M.focus())},p=()=>{var M;const P=o.lastEnabled();P&&((M=P.node)==null||M.focus())},g=n==="horizontal",y=n==="vertical",S=c.key,C=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",j={[C]:()=>g&&f(),[w]:()=>g&&u(),ArrowDown:()=>y&&u(),ArrowUp:()=>y&&f(),Home:h,End:p}[S];j&&(c.preventDefault(),j(c))},[o,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:Pe(e.onKeyDown,s)}}function I7(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:o,isManual:s,id:c,setFocusedIndex:u,selectedIndex:f}=Dc(),{index:h,register:p}=k7({disabled:t&&!n}),g=h===f,y=()=>{o(h)},S=()=>{u(h),!s&&!(t&&n)&&o(h)},C=Cx({...r,ref:ct(p,e.ref),isDisabled:t,isFocusable:n,onClick:Pe(e.onClick,y)}),w="button";return{...C,id:dy(c,h),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":fy(c,h),onFocus:t?void 0:Pe(e.onFocus,S)}}var[M7,T7]=Et({});function _7(e){const t=Dc(),{id:n,selectedIndex:r}=t,s=lh(e.children).map((c,u)=>x.createElement(M7,{key:u,value:{isSelected:u===r,id:fy(n,u),tabId:dy(n,u),selectedIndex:r}},c));return{...e,children:s}}function D7(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:o}=Dc(),{isSelected:s,id:c,tabId:u}=T7(),f=x.useRef(!1);s&&(f.current=!0);const h=Ah({wasSelected:f.current,isSelected:s,enabled:r,mode:o});return{tabIndex:0,...n,children:h?t:null,role:"tabpanel","aria-labelledby":u,hidden:!s,id:c}}function dy(e,t){return`${e}--tab-${t}`}function fy(e,t){return`${e}--tabpanel-${t}`}var[O7,Oc]=Et({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),hy=he(function(t,n){const r=fn("Tabs",t),{children:o,className:s,...c}=At(t),{htmlProps:u,descendants:f,...h}=j7(c),p=x.useMemo(()=>h,[h]),{isFitted:g,...y}=u;return l.jsx(S7,{value:f,children:l.jsx(E7,{value:p,children:l.jsx(O7,{value:r,children:l.jsx(oe.div,{className:Ae("chakra-tabs",s),ref:n,...y,__css:r.root,children:o})})})})});hy.displayName="Tabs";var py=he(function(t,n){const r=P7({...t,ref:n}),s={display:"flex",...Oc().tablist};return l.jsx(oe.div,{...r,className:Ae("chakra-tabs__tablist",t.className),__css:s})});py.displayName="TabList";var my=he(function(t,n){const r=D7({...t,ref:n}),o=Oc();return l.jsx(oe.div,{outline:"0",...r,className:Ae("chakra-tabs__tab-panel",t.className),__css:o.tabpanel})});my.displayName="TabPanel";var vy=he(function(t,n){const r=_7(t),o=Oc();return l.jsx(oe.div,{...r,width:"100%",ref:n,className:Ae("chakra-tabs__tab-panels",t.className),__css:o.tabpanels})});vy.displayName="TabPanels";var gy=he(function(t,n){const r=Oc(),o=I7({...t,ref:n}),s={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return l.jsx(oe.button,{...o,className:Ae("chakra-tabs__tab",t.className),__css:s})});gy.displayName="Tab";function A7(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var z7=["h","minH","height","minHeight"],Xh=he((e,t)=>{const n=mo("Textarea",e),{className:r,rows:o,...s}=At(e),c=ch(s),u=o?A7(n,z7):n;return l.jsx(oe.textarea,{ref:t,rows:o,...c,className:Ae("chakra-textarea",r),__css:u})});Xh.displayName="Textarea";var R7={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]}}}},cc=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},Mf=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function N7(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:s,closeOnPointerDown:c=o,closeOnEsc:u=!0,onOpen:f,onClose:h,placement:p,id:g,isOpen:y,defaultIsOpen:S,arrowSize:C=10,arrowShadowColor:w,arrowPadding:k,modifiers:j,isDisabled:M,gutter:P,offset:I,direction:T,...D}=e,{isOpen:_,onOpen:z,onClose:V}=Oh({isOpen:y,defaultIsOpen:S,onOpen:f,onClose:h}),{referenceRef:F,getPopperProps:L,getArrowInnerProps:X,getArrowProps:$}=Dh({enabled:_,placement:p,arrowPadding:k,modifiers:j,gutter:P,offset:I,direction:T}),Q=x.useId(),ie=`tooltip-${g??Q}`,U=x.useRef(null),K=x.useRef(),ne=x.useCallback(()=>{K.current&&(clearTimeout(K.current),K.current=void 0)},[]),ce=x.useRef(),Re=x.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),ze=x.useCallback(()=>{Re(),V()},[V,Re]),Me=F7(U,ze),J=x.useCallback(()=>{if(!M&&!K.current){Me();const _e=Mf(U);K.current=_e.setTimeout(z,t)}},[Me,M,z,t]),ue=x.useCallback(()=>{ne();const _e=Mf(U);ce.current=_e.setTimeout(ze,n)},[n,ze,ne]),Ie=x.useCallback(()=>{_&&r&&ue()},[r,ue,_]),Be=x.useCallback(()=>{_&&c&&ue()},[c,ue,_]),Ne=x.useCallback(_e=>{_&&_e.key==="Escape"&&ue()},[_,ue]);$o(()=>cc(U),"keydown",u?Ne:void 0),$o(()=>cc(U),"scroll",()=>{_&&s&&ze()}),x.useEffect(()=>{M&&(ne(),_&&V())},[M,_,V,ne]),x.useEffect(()=>()=>{ne(),Re()},[ne,Re]),$o(()=>U.current,"pointerleave",ue);const Ge=x.useCallback((_e={},qe=null)=>({..._e,ref:ct(U,qe,F),onPointerEnter:Pe(_e.onPointerEnter,Te=>{Te.pointerType!=="touch"&&J()}),onClick:Pe(_e.onClick,Ie),onPointerDown:Pe(_e.onPointerDown,Be),onFocus:Pe(_e.onFocus,J),onBlur:Pe(_e.onBlur,ue),"aria-describedby":_?ie:void 0}),[J,ue,Be,_,ie,Ie,F]),Qe=x.useCallback((_e={},qe=null)=>L({..._e,style:{..._e.style,[Vt.arrowSize.var]:C?`${C}px`:void 0,[Vt.arrowShadowColor.var]:w}},qe),[L,C,w]),ve=x.useCallback((_e={},qe=null)=>{const ge={..._e.style,position:"relative",transformOrigin:Vt.transformOrigin.varRef};return{ref:qe,...D,..._e,id:ie,role:"tooltip",style:ge}},[D,ie]);return{isOpen:_,show:J,hide:ue,getTriggerProps:Ge,getTooltipProps:ve,getTooltipPositionerProps:Qe,getArrowProps:$,getArrowInnerProps:X}}var Dd="chakra-ui:close-tooltip";function F7(e,t){return x.useEffect(()=>{const n=cc(e);return n.addEventListener(Dd,t),()=>n.removeEventListener(Dd,t)},[t,e]),()=>{const n=cc(e),r=Mf(e);n.dispatchEvent(new r.CustomEvent(Dd))}}function L7(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function B7(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var H7=oe(Wr.div),Yt=he((e,t)=>{var n,r;const o=mo("Tooltip",e),s=At(e),c=ei(),{children:u,label:f,shouldWrapChildren:h,"aria-label":p,hasArrow:g,bg:y,portalProps:S,background:C,backgroundColor:w,bgColor:k,motionProps:j,...M}=s,P=(r=(n=C??w)!=null?n:y)!=null?r:k;if(P){o.bg=P;const L=FS(c,"colors",P);o[Vt.arrowBg.var]=L}const I=N7({...M,direction:c.direction}),T=typeof u=="string"||h;let D;if(T)D=l.jsx(oe.span,{display:"inline-block",tabIndex:0,...I.getTriggerProps(),children:u});else{const L=x.Children.only(u);D=x.cloneElement(L,I.getTriggerProps(L.props,L.ref))}const _=!!p,z=I.getTooltipProps({},t),V=_?L7(z,["role","id"]):z,F=B7(z,["role","id"]);return f?l.jsxs(l.Fragment,{children:[D,l.jsx(oa,{children:I.isOpen&&l.jsx(eh,{...S,children:l.jsx(oe.div,{...I.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:l.jsxs(H7,{variants:R7,initial:"exit",animate:"enter",exit:"exit",...j,...V,__css:o,children:[f,_&&l.jsx(oe.span,{srOnly:!0,...F,children:p}),g&&l.jsx(oe.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:l.jsx(oe.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):l.jsx(l.Fragment,{children:u})});Yt.displayName="Tooltip";const Kh=x.createContext(null);let Wg;const Qh=()=>({setOpenUploader:e=>{e&&(Wg=e)},openUploader:Wg}),Bt=be(e=>e.ui,e=>LS[e.activeTab],{memoizeOptions:{equalityCheck:te.isEqual}}),W7=be(e=>e.ui,e=>e.activeTab,{memoizeOptions:{equalityCheck:te.isEqual}}),oi=be(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:te.isEqual}}),Vg=e=>async(t,n)=>{const{imageFile:r}=e,o=n(),s=Bt(o),c=new FormData;c.append("file",r,r.name),c.append("data",JSON.stringify({kind:"init"}));const f=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:c})).json(),h={uuid:E1(),category:"user",...f};t(P1({image:h,category:"user"})),s==="unifiedCanvas"?t(bc(h)):s==="img2img"&&t(is(h))},Zh=e=>{const{children:t}=e;return l.jsx(B,{sx:{width:"100%",height:"100%",bg:"base.850"},children:t})};function V7(){const{t:e}=Z();return l.jsx(Zh,{children:l.jsxs(B,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[l.jsx(Vn,{children:e("common.nodes")}),l.jsx(Le,{maxW:"50rem",gap:4,children:l.jsx(Ce,{children:e("common.nodesDesc")})})]})})}const U7=()=>{const{t:e}=Z();return l.jsx(Zh,{children:l.jsxs(B,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[l.jsx(Vn,{children:e("common.postProcessing")}),l.jsxs(Le,{maxW:"50rem",gap:4,children:[l.jsx(Ce,{children:e("common.postProcessDesc1")}),l.jsx(Ce,{children:e("common.postProcessDesc2")}),l.jsx(Ce,{children:e("common.postProcessDesc3")})]})]})})};function $7(){const{t:e}=Z();return l.jsx(Zh,{children:l.jsxs(B,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[l.jsx(Vn,{children:e("common.training")}),l.jsxs(Le,{maxW:"50rem",gap:4,children:[l.jsx(Ce,{children:e("common.trainingDesc1")}),l.jsx(Ce,{children:e("common.trainingDesc2")})]})]})})}function G7(e){const{i18n:t}=Z(),n=localStorage.getItem("i18nextLng");ke.useEffect(()=>{e()},[e]),ke.useEffect(()=>{t.on("languageChanged",()=>{e()})},[e,t,n])}const le=he((e,t)=>{const{tooltip:n="",tooltipProps:r,isChecked:o,...s}=e;return l.jsx(Yt,{label:n,hasArrow:!0,...r,...r!=null&&r.placement?{placement:r.placement}:{placement:"top"},children:l.jsx(co,{ref:t,"aria-checked":o!==void 0?o:void 0,...s})})}),Je=he((e,t)=>{const{children:n,tooltip:r="",tooltipProps:o,isChecked:s,...c}=e;return l.jsx(Yt,{label:r,...o,children:l.jsx(ni,{ref:t,"aria-checked":s,...c,children:n})})}),rr=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:o=!0,...s}=e;return l.jsxs(Gh,{isLazy:o,...s,children:[l.jsx($h,{children:t}),l.jsxs(Yh,{children:[r&&l.jsx(qh,{}),n]})]})},Ac=be(e=>e.lightbox,e=>e,{memoizeOptions:{equalityCheck:te.isEqual}}),Mn=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:o,tooltipProps:s,...c}=e;return l.jsxs(rt,{isDisabled:n,onClick:u=>{u.stopPropagation(),u.nativeEvent.stopImmediatePropagation(),u.nativeEvent.stopPropagation(),u.nativeEvent.cancelBubble=!0},children:[t&&l.jsx(st,{children:t}),l.jsx(Yt,{label:o,...s,children:l.jsx(ty,{...c,children:r.map(u=>typeof u=="string"||typeof u=="number"?l.jsx("option",{value:u,children:u},u):l.jsx("option",{value:u.value,children:u.key},u.value))})})]})};function q7(){const e=O(o=>o.postprocessing.facetoolType),t=Y(),{t:n}=Z(),r=o=>t(Hl(o.target.value));return l.jsx(Mn,{label:n("parameters.type"),validValues:BS.concat(),value:e,onChange:r})}var xy={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ug=ke.createContext&&ke.createContext(xy),so=globalThis&&globalThis.__assign||function(){return so=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{K(o)},[o]);const ne=x.useMemo(()=>L!=null&&L.max?L.max:c,[c,L==null?void 0:L.max]),ce=J=>{f(J)},Re=J=>{J.target.value===""&&(J.target.value=String(s));const ue=te.clamp(y?Math.floor(Number(J.target.value)):Number(U),s,ne);f(ue)},ze=J=>{K(J)},Me=()=>{M&&M()};return l.jsxs(rt,{sx:j?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:4,margin:0,padding:0}:{},...D,children:[l.jsx(st,{..._,mb:-1,children:r}),l.jsxs(sa,{w:"100%",gap:2,alignItems:"center",children:[l.jsxs(ay,{"aria-label":r,value:o,min:s,max:c,step:u,onChange:ce,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...ie,children:[p&&l.jsxs(l.Fragment,{children:[l.jsx(If,{value:s,insetInlineStart:0,sx:{insetInlineStart:"unset !important"},...z,children:s}),l.jsx(If,{value:c,insetInlineEnd:0,sx:{insetInlineStart:"unset !important"},...z,children:c})]}),l.jsx(ly,{...V,children:l.jsx(cy,{})}),l.jsx(Yt,{hasArrow:!0,placement:"top",isOpen:t,label:`${o}${h}`,hidden:k,...Q,children:l.jsx(sy,{...F})})]}),g&&l.jsxs(Lh,{min:s,max:ne,step:u,value:U,onChange:ze,onBlur:Re,isDisabled:T,...L,children:[l.jsx(Hh,{readOnly:C,minWidth:S,...X}),l.jsxs(Bh,{...$,children:[l.jsx(Vh,{onClick:()=>f(Number(U))}),l.jsx(Wh,{onClick:()=>f(Number(U))})]})]}),w&&l.jsx(le,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:l.jsx(Jh,{}),onClick:Me,isDisabled:P,...re})]})]})}function t8(){const e=O(o=>o.system.isGFPGANAvailable),t=O(o=>o.postprocessing.facetoolStrength),{t:n}=Z(),r=Y();return l.jsx(ut,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.strength"),step:.05,min:0,max:1,onChange:o=>r(Zl(o)),handleReset:()=>r(Zl(.75)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}function n8(){const e=O(o=>o.system.isGFPGANAvailable),t=O(o=>o.postprocessing.codeformerFidelity),{t:n}=Z(),r=Y();return l.jsx(ut,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.codeformerFidelity"),step:.05,min:0,max:1,onChange:o=>r(Qd(o)),handleReset:()=>r(Qd(1)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}const ep=()=>{const e=O(t=>t.postprocessing.facetoolType);return l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(q7,{}),l.jsx(t8,{}),e==="codeformer"&&l.jsx(n8,{})]})};function r8(){const e=O(o=>o.system.isESRGANAvailable),t=O(o=>o.postprocessing.upscalingDenoising),{t:n}=Z(),r=Y();return l.jsx(ut,{label:n("parameters.denoisingStrength"),value:t,min:0,max:1,step:.01,onChange:o=>{r(Zd(o))},handleReset:()=>r(Zd(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function o8(){const e=O(o=>o.system.isESRGANAvailable),t=O(o=>o.postprocessing.upscalingStrength),{t:n}=Z(),r=Y();return l.jsx(ut,{label:`${n("parameters.upscale")} ${n("parameters.strength")}`,value:t,min:0,max:1,step:.05,onChange:o=>r(Jd(o)),handleReset:()=>r(Jd(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function i8(){const e=O(s=>s.system.isESRGANAvailable),t=O(s=>s.postprocessing.upscalingLevel),{t:n}=Z(),r=Y(),o=s=>r(I1(Number(s.target.value)));return l.jsx(Mn,{isDisabled:!e,label:n("parameters.scale"),value:t,onChange:o,validValues:HS})}const tp=()=>l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(i8,{}),l.jsx(r8,{}),l.jsx(o8,{})]}),np=e=>e.postprocessing,Pt=e=>e.system,a8=e=>e.system.toastQueue,Sy=be(Pt,e=>{const{model_list:t}=e,n=te.reduce(t,(r,o,s)=>(o.status==="active"&&(r=s),r),"");return{...t[n],name:n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),s8=be(Pt,e=>{const{model_list:t}=e;return te.pickBy(t,(r,o)=>{if(r.format==="diffusers")return{name:o,...r}})},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function Tf(){return Tf=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 m8=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,s=n.meta,c=n.mod,u=n.shift,f=n.ctrl,h=n.keys,p=t.key,g=t.code,y=t.ctrlKey,S=t.metaKey,C=t.shiftKey,w=t.altKey,k=oo(g),j=p.toLowerCase();if(!r){if(o===!w&&j!=="alt"||u===!C&&j!=="shift")return!1;if(c){if(!S&&!y)return!1}else if(s===!S&&j!=="meta"||f===!y&&j!=="ctrl")return!1}return h&&h.length===1&&(h.includes(j)||h.includes(k))?!0:h?u8(h):!h},v8=x.createContext(void 0),g8=function(){return x.useContext(v8)};function Ey(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&&Ey(e[r],t[r])},!0):e===t}var x8=x.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),y8=function(){return x.useContext(x8)};function b8(e){var t=x.useRef(void 0);return Ey(t.current,e)||(t.current=e),t.current}var $g=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},S8=typeof window<"u"?x.useLayoutEffect:x.useEffect;function fe(e,t,n,r){var o=x.useRef(null),s=x.useRef(!1),c=n instanceof Array?r instanceof Array?void 0:r:n,u=n instanceof Array?n:r instanceof Array?r:void 0,f=x.useCallback(t,u??[]),h=x.useRef(f);u?h.current=f:h.current=t;var p=b8(c),g=y8(),y=g.enabledScopes,S=g8();return S8(function(){if(!((p==null?void 0:p.enabled)===!1||!p8(y,p==null?void 0:p.scopes))){var C=function(M,P){var I;if(P===void 0&&(P=!1),!(h8(M)&&!jy(M,p==null?void 0:p.enableOnFormTags))){if(o.current!==null&&document.activeElement!==o.current&&!o.current.contains(document.activeElement)){$g(M);return}(I=M.target)!=null&&I.isContentEditable&&!(p!=null&&p.enableOnContentEditable)||Od(e,p==null?void 0:p.splitKey).forEach(function(T){var D,_=Ad(T,p==null?void 0:p.combinationKey);if(m8(M,_,p==null?void 0:p.ignoreModifiers)||(D=_.keys)!=null&&D.includes("*")){if(P&&s.current)return;if(d8(M,_,p==null?void 0:p.preventDefault),!f8(M,_,p==null?void 0:p.enabled)){$g(M);return}h.current(M,_),P||(s.current=!0)}})}},w=function(M){M.key!==void 0&&(wy(oo(M.code)),((p==null?void 0:p.keydown)===void 0&&(p==null?void 0:p.keyup)!==!0||p!=null&&p.keydown)&&C(M))},k=function(M){M.key!==void 0&&(ky(oo(M.code)),s.current=!1,p!=null&&p.keyup&&C(M,!0))};return(o.current||(c==null?void 0:c.document)||document).addEventListener("keyup",k),(o.current||(c==null?void 0:c.document)||document).addEventListener("keydown",w),S&&Od(e,p==null?void 0:p.splitKey).forEach(function(j){return S.addHotkey(Ad(j,p==null?void 0:p.combinationKey))}),function(){(o.current||(c==null?void 0:c.document)||document).removeEventListener("keyup",k),(o.current||(c==null?void 0:c.document)||document).removeEventListener("keydown",w),S&&Od(e,p==null?void 0:p.splitKey).forEach(function(j){return S.removeHotkey(Ad(j,p==null?void 0:p.combinationKey))})}}},[e,p,y]),o}function C8(e){return me({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function w8(e){return me({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function k8(e){return me({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function j8(e){return me({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function E8(e){return me({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function P8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function I8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function Py(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function M8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function T8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function zc(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function Iy(e){return me({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function Ji(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function My(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function _8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"}}]})(e)}function rp(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Ty(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function D8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function O8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"}}]})(e)}function _y(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function A8(e){return me({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function z8(e){return me({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function Dy(e){return me({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"}}]})(e)}function R8(e){return me({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function N8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function F8(e){return me({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function L8(e){return me({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"}}]})(e)}function Oy(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function B8(e){return me({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function H8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function Ay(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function W8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function V8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function xs(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function U8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function $8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function G8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function op(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function q8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"}}]})(e)}function Y8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function X8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function Gg(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function ip(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function K8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function ii(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Q8(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function Rc(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Z8(e){return me({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ap(e){return me({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const tt=e=>e.canvas,zt=be([tt,Bt,Pt],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),zy=e=>e.canvas.layerState.objects.find(M1),Vr=e=>e.gallery,J8=be([Vr,Ac,zt,Bt],(e,t,n,r)=>{const{categories:o,currentCategory:s,currentImageUuid:c,shouldPinGallery:u,shouldShowGallery:f,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:y,galleryWidth:S,shouldUseSingleGalleryColumn:C}=e,{isLightboxOpen:w}=t;return{currentImageUuid:c,shouldPinGallery:u,shouldShowGallery:f,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:C?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:y,images:o[s].images,areMoreImagesAvailable:o[s].areMoreImagesAvailable,currentCategory:s,galleryWidth:S,isLightboxOpen:w,isStaging:n,shouldEnableResize:!(w||r==="unifiedCanvas"&&u),shouldUseSingleGalleryColumn:C}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),e9=be([Vr,Pt,Ac,Bt],(e,t,n,r)=>({mayDeleteImage:t.isConnected&&!t.isProcessing,galleryImageObjectFit:e.galleryImageObjectFit,galleryImageMinimumWidth:e.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:e.shouldUseSingleGalleryColumn,activeTabName:r,isLightboxOpen:n.isLightboxOpen}),{memoizeOptions:{resultEqualityCheck:te.isEqual}}),En=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:o,formLabelProps:s,...c}=e;return l.jsxs(rt,{isDisabled:n,width:r,display:"flex",gap:4,alignItems:"center",justifyContent:"space-between",...o,children:[l.jsx(st,{my:1,...s,children:t}),l.jsx(uy,{...c})]})},t9=be(Pt,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),uc=he(({image:e,children:t},n)=>{const{isOpen:r,onOpen:o,onClose:s}=uo(),c=Y(),{shouldConfirmOnDelete:u,isConnected:f,isProcessing:h}=O(t9),p=x.useRef(null),g=C=>{C.stopPropagation(),u?o():y()},y=()=>{f&&!h&&e&&c(WS(e)),s()};fe("delete",()=>{u?o():y()},[e,u,f,h]);const S=C=>c(T1(!C.target.checked));return l.jsxs(l.Fragment,{children:[x.cloneElement(t,{onClick:e?g:void 0,ref:n}),l.jsx(qx,{isOpen:r,leastDestructiveRef:p,onClose:s,children:l.jsx(Nr,{children:l.jsxs(Yx,{children:[l.jsx(Rr,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),l.jsx(Fr,{children:l.jsxs(B,{direction:"column",gap:5,children:[l.jsx(Ce,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),l.jsx(En,{label:"Don't ask me again",isChecked:!u,onChange:S})]})}),l.jsxs(zr,{children:[l.jsx(Je,{ref:p,onClick:s,children:"Cancel"}),l.jsx(Je,{colorScheme:"error",onClick:y,ml:3,children:"Delete"})]})]})})})]})});uc.displayName="DeleteImageModal";const sp=()=>{const e=Y();return t=>{const n=typeof t=="string"?t:_1(t),[r,o]=VS(n);e(D1(r)),e(O1(o))}},n9=be([Pt,Vr,np,oi,Ac,Bt],(e,t,n,r,o,s)=>{const{isProcessing:c,isConnected:u,isGFPGANAvailable:f,isESRGANAvailable:h}=e,{upscalingLevel:p,facetoolStrength:g}=n,{isLightboxOpen:y}=o,{shouldShowImageDetails:S}=r,{intermediateImage:C,currentImage:w}=t;return{isProcessing:c,isConnected:u,isGFPGANAvailable:f,isESRGANAvailable:h,upscalingLevel:p,facetoolStrength:g,shouldDisableToolbarButtons:Boolean(C)||!w,currentImage:w,shouldShowImageDetails:S,activeTabName:s,isLightboxOpen:y}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),Ry=e=>{var L,X,$,Q,re,ie,U,K;const t=Y(),{isProcessing:n,isConnected:r,isGFPGANAvailable:o,isESRGANAvailable:s,upscalingLevel:c,facetoolStrength:u,shouldDisableToolbarButtons:f,shouldShowImageDetails:h,currentImage:p,isLightboxOpen:g,activeTabName:y}=O(n9),S=us(),{t:C}=Z(),w=sp(),k=()=>{p&&(g&&t(Ho(!1)),t(is(p)),t(kn("img2img")))},j=async()=>{if(!p)return;const ne=await fetch(p.url).then(Re=>Re.blob()),ce=[new ClipboardItem({[ne.type]:ne})];await navigator.clipboard.write(ce),S({title:C("toast.imageCopied"),status:"success",duration:2500,isClosable:!0})},M=()=>{navigator.clipboard.writeText(p?window.location.toString()+p.url:"").then(()=>{S({title:C("toast.imageLinkCopied"),status:"success",duration:2500,isClosable:!0})})};fe("shift+i",()=>{p?(k(),S({title:C("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):S({title:C("toast.imageNotLoaded"),description:C("toast.imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})},[p]);const P=()=>{var ne,ce;p&&(p.metadata&&t(A1(p.metadata)),((ne=p.metadata)==null?void 0:ne.image.type)==="img2img"?t(kn("img2img")):((ce=p.metadata)==null?void 0:ce.image.type)==="txt2img"&&t(kn("txt2img")))};fe("a",()=>{var ne,ce;["txt2img","img2img"].includes((ce=(ne=p==null?void 0:p.metadata)==null?void 0:ne.image)==null?void 0:ce.type)?(P(),S({title:C("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})):S({title:C("toast.parametersNotSet"),description:C("toast.parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[p]);const I=()=>{p!=null&&p.metadata&&t(as(p.metadata.image.seed))};fe("s",()=>{var ne,ce;(ce=(ne=p==null?void 0:p.metadata)==null?void 0:ne.image)!=null&&ce.seed?(I(),S({title:C("toast.seedSet"),status:"success",duration:2500,isClosable:!0})):S({title:C("toast.seedNotSet"),description:C("toast.seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[p]);const T=x.useCallback(()=>{var ne,ce,Re,ze;(ce=(ne=p==null?void 0:p.metadata)==null?void 0:ne.image)!=null&&ce.prompt&&w((ze=(Re=p==null?void 0:p.metadata)==null?void 0:Re.image)==null?void 0:ze.prompt)},[(X=(L=p==null?void 0:p.metadata)==null?void 0:L.image)==null?void 0:X.prompt,w]);fe("p",()=>{var ne,ce;(ce=(ne=p==null?void 0:p.metadata)==null?void 0:ne.image)!=null&&ce.prompt?(T(),S({title:C("toast.promptSet"),status:"success",duration:2500,isClosable:!0})):S({title:C("toast.promptNotSet"),description:C("toast.promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[p]);const D=()=>{p&&t(US(p))};fe("Shift+U",()=>{s&&!f&&r&&!n&&c?D():S({title:C("toast.upscalingFailed"),status:"error",duration:2500,isClosable:!0})},[p,s,f,r,n,c]);const _=()=>{p&&t($S(p))};fe("Shift+R",()=>{o&&!f&&r&&!n&&u?_():S({title:C("toast.faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})},[p,o,f,r,n,u]);const z=()=>t(z1(!h)),V=()=>{p&&(g&&t(Ho(!1)),t(bc(p)),t(on(!0)),y!=="unifiedCanvas"&&t(kn("unifiedCanvas")),S({title:C("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))};fe("i",()=>{p?z():S({title:C("toast.metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[p,h]);const F=()=>{t(Ho(!g))};return l.jsxs(B,{sx:{justifyContent:"center",alignItems:"center",columnGap:"0.5em"},...e,children:[l.jsxs(en,{isAttached:!0,children:[l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(le,{"aria-label":`${C("parameters.sendTo")}...`,icon:l.jsx(X8,{})}),children:l.jsxs(B,{sx:{flexDirection:"column",rowGap:2,w:52},children:[l.jsx(Je,{size:"sm",onClick:k,leftIcon:l.jsx(Gg,{}),children:C("parameters.sendToImg2Img")}),l.jsx(Je,{size:"sm",onClick:V,leftIcon:l.jsx(Gg,{}),children:C("parameters.sendToUnifiedCanvas")}),l.jsx(Je,{size:"sm",onClick:j,leftIcon:l.jsx(Ji,{}),children:C("parameters.copyImage")}),l.jsx(Je,{size:"sm",onClick:M,leftIcon:l.jsx(Ji,{}),children:C("parameters.copyImageToLink")}),l.jsx(Go,{download:!0,href:p==null?void 0:p.url,children:l.jsx(Je,{leftIcon:l.jsx(rp,{}),size:"sm",w:"100%",children:C("parameters.downloadImage")})})]})}),l.jsx(le,{icon:l.jsx(O8,{}),tooltip:g?`${C("parameters.closeViewer")} (Z)`:`${C("parameters.openInViewer")} (Z)`,"aria-label":g?`${C("parameters.closeViewer")} (Z)`:`${C("parameters.openInViewer")} (Z)`,isChecked:g,onClick:F})]}),l.jsxs(en,{isAttached:!0,children:[l.jsx(le,{icon:l.jsx(U8,{}),tooltip:`${C("parameters.usePrompt")} (P)`,"aria-label":`${C("parameters.usePrompt")} (P)`,isDisabled:!((Q=($=p==null?void 0:p.metadata)==null?void 0:$.image)!=null&&Q.prompt),onClick:T}),l.jsx(le,{icon:l.jsx(Y8,{}),tooltip:`${C("parameters.useSeed")} (S)`,"aria-label":`${C("parameters.useSeed")} (S)`,isDisabled:!((ie=(re=p==null?void 0:p.metadata)==null?void 0:re.image)!=null&&ie.seed),onClick:I}),l.jsx(le,{icon:l.jsx(M8,{}),tooltip:`${C("parameters.useAll")} (A)`,"aria-label":`${C("parameters.useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes((K=(U=p==null?void 0:p.metadata)==null?void 0:U.image)==null?void 0:K.type),onClick:P})]}),l.jsxs(en,{isAttached:!0,children:[l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(le,{icon:l.jsx(R8,{}),"aria-label":C("parameters.restoreFaces")}),children:l.jsxs(B,{sx:{flexDirection:"column",rowGap:4},children:[l.jsx(ep,{}),l.jsx(Je,{isDisabled:!o||!p||!(r&&!n)||!u,onClick:_,children:C("parameters.restoreFaces")})]})}),l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(le,{icon:l.jsx(D8,{}),"aria-label":C("parameters.upscale")}),children:l.jsxs(B,{sx:{flexDirection:"column",gap:4},children:[l.jsx(tp,{}),l.jsx(Je,{isDisabled:!s||!p||!(r&&!n)||!c,onClick:D,children:C("parameters.upscaleImage")})]})})]}),l.jsx(en,{isAttached:!0,children:l.jsx(le,{icon:l.jsx(Iy,{}),tooltip:`${C("parameters.info")} (I)`,"aria-label":`${C("parameters.info")} (I)`,isChecked:h,onClick:z})}),l.jsx(uc,{image:p,children:l.jsx(le,{icon:l.jsx(ii,{}),tooltip:`${C("parameters.deleteImage")} (Del)`,"aria-label":`${C("parameters.deleteImage")} (Del)`,isDisabled:!p||!r||n,colorScheme:"error"})})]})};var r9=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=globalThis&&globalThis.__assign||function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof s>"u"?void 0:Number(s),minHeight:typeof c>"u"?void 0:Number(c)}},u9=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Qg="__resizable_base__",Ny=function(e){a9(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var o=r.parentNode;if(!o)return null;var s=r.window.document.createElement("div");return s.style.width="100%",s.style.height="100%",s.style.position="absolute",s.style.transform="scale(0, 0)",s.style.left="0",s.style.flex="0 0 100%",s.classList?s.classList.add(Qg):s.className+=Qg,o.appendChild(s),s},r.removeBase=function(o){var s=r.parentNode;s&&s.removeChild(o)},r.ref=function(o){o&&(r.resizable=o)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||s9},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,s=this.resizable.offsetHeight,c=this.resizable.style.position;c!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:s,this.resizable.style.position=c}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(u){if(typeof n.state[u]>"u"||n.state[u]==="auto")return"auto";if(n.propsSize&&n.propsSize[u]&&n.propsSize[u].toString().endsWith("%")){if(n.state[u].toString().endsWith("%"))return n.state[u].toString();var f=n.getParentSize(),h=Number(n.state[u].toString().replace("px","")),p=h/f[u]*100;return p+"%"}return zd(n.state[u])},s=r&&typeof r.width<"u"&&!this.state.isResizing?zd(r.width):o("width"),c=r&&typeof r.height<"u"&&!this.state.isResizing?zd(r.height):o("height");return{width:s,height:c}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var s={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),s},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,s=this.state.direction,c=o&&Di("left",s),u=o&&Di("top",s),f,h;if(this.props.bounds==="parent"){var p=this.parentNode;p&&(f=c?this.resizableRight-this.parentLeft:p.offsetWidth+(this.parentLeft-this.resizableLeft),h=u?this.resizableBottom-this.parentTop:p.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(f=c?this.resizableRight:this.window.innerWidth-this.resizableLeft,h=u?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(f=c?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),h=u?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return f&&Number.isFinite(f)&&(n=n&&n"u"?10:s.width,g=typeof o.width>"u"||o.width<0?n:o.width,y=typeof s.height>"u"?10:s.height,S=typeof o.height>"u"||o.height<0?r:o.height,C=f||0,w=h||0;if(u){var k=(y-C)*this.ratio+w,j=(S-C)*this.ratio+w,M=(p-w)/this.ratio+C,P=(g-w)/this.ratio+C,I=Math.max(p,k),T=Math.min(g,j),D=Math.max(y,M),_=Math.min(S,P);n=_l(n,I,T),r=_l(r,D,_)}else n=_l(n,p,g),r=_l(r,y,S);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var s=this.resizable.getBoundingClientRect(),c=s.left,u=s.top,f=s.right,h=s.bottom;this.resizableLeft=c,this.resizableRight=f,this.resizableTop=u,this.resizableBottom=h}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,s=0;if(n.nativeEvent&&l9(n.nativeEvent)?(o=n.nativeEvent.clientX,s=n.nativeEvent.clientY):n.nativeEvent&&Dl(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,s=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var c=this.props.onResizeStart(n,r,this.resizable);if(c===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var u,f=this.window.getComputedStyle(this.resizable);if(f.flexBasis!=="auto"){var h=this.parentNode;if(h){var p=this.window.getComputedStyle(h).flexDirection;this.flexDir=p.startsWith("row")?"row":"column",u=f.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:o,y:s,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:mr(mr({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:u};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Dl(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,s=o.maxWidth,c=o.maxHeight,u=o.minWidth,f=o.minHeight,h=Dl(n)?n.touches[0].clientX:n.clientX,p=Dl(n)?n.touches[0].clientY:n.clientY,g=this.state,y=g.direction,S=g.original,C=g.width,w=g.height,k=this.getParentSize(),j=c9(k,this.window.innerWidth,this.window.innerHeight,s,c,u,f);s=j.maxWidth,c=j.maxHeight,u=j.minWidth,f=j.minHeight;var M=this.calculateNewSizeFromDirection(h,p),P=M.newHeight,I=M.newWidth,T=this.calculateNewMaxFromBoundary(s,c);this.props.snap&&this.props.snap.x&&(I=Kg(I,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(P=Kg(P,this.props.snap.y,this.props.snapGap));var D=this.calculateNewSizeFromAspectRatio(I,P,{width:T.maxWidth,height:T.maxHeight},{width:u,height:f});if(I=D.newWidth,P=D.newHeight,this.props.grid){var _=Xg(I,this.props.grid[0]),z=Xg(P,this.props.grid[1]),V=this.props.snapGap||0;I=V===0||Math.abs(_-I)<=V?_:I,P=V===0||Math.abs(z-P)<=V?z:P}var F={width:I-S.width,height:P-S.height};if(C&&typeof C=="string"){if(C.endsWith("%")){var L=I/k.width*100;I=L+"%"}else if(C.endsWith("vw")){var X=I/this.window.innerWidth*100;I=X+"vw"}else if(C.endsWith("vh")){var $=I/this.window.innerHeight*100;I=$+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var L=P/k.height*100;P=L+"%"}else if(w.endsWith("vw")){var X=P/this.window.innerWidth*100;P=X+"vw"}else if(w.endsWith("vh")){var $=P/this.window.innerHeight*100;P=$+"vh"}}var Q={width:this.createSizeForCssProperty(I,"width"),height:this.createSizeForCssProperty(P,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),GS.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,y,this.resizable,F)}},t.prototype.onMouseUp=function(n){var r=this.state,o=r.isResizing,s=r.direction,c=r.original;if(!(!o||!this.resizable)){var u={width:this.size.width-c.width,height:this.size.height-c.height};this.props.onResizeStop&&this.props.onResizeStop(n,s,this.resizable,u),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:mr(mr({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,s=r.handleStyles,c=r.handleClasses,u=r.handleWrapperStyle,f=r.handleWrapperClass,h=r.handleComponent;if(!o)return null;var p=Object.keys(o).map(function(g){return o[g]!==!1?x.createElement(i9,{key:g,direction:g,onResizeStart:n.onResizeStart,replaceStyles:s&&s[g],className:c&&c[g]},h&&h[g]?h[g]:null):null});return x.createElement("div",{className:f,style:u},p)},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(c,u){return u9.indexOf(u)!==-1||(c[u]=n.props[u]),c},{}),o=mr(mr(mr({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var s=this.props.as||"div";return x.createElement(s,mr({ref:this.ref,style:o,className:this.props.className},r),this.state.isResizing&&x.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(x.PureComponent);const pt=e=>{const{label:t,...n}=e;return l.jsx(E2,{colorScheme:"accent",...n,children:t})};function Fy(e){return me({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function Ly(e){return me({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function d9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.5 9c-.42 0-.83.04-1.24.11L1.01 3 1 10l9 2-9 2 .01 7 8.07-3.46C9.59 21.19 12.71 24 16.5 24c4.14 0 7.5-3.36 7.5-7.5S20.64 9 16.5 9zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5z"}},{tag:"path",attr:{d:"M18.27 14.03l-1.77 1.76-1.77-1.76-.7.7 1.76 1.77-1.76 1.77.7.7 1.77-1.76 1.77 1.76.7-.7-1.76-1.77 1.76-1.77z"}}]})(e)}function f9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function h9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function p9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z"}}]})(e)}function m9(e){return me({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 v9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 2v11h3v9l7-12h-4l4-8z"}}]})(e)}function Zg(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function g9(e){return me({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 x9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zM17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7l2.06.94zm-3.75.75L12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12z"}}]})(e)}function lp(e){return me({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 y9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function b9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 10l5 5 5-5z"}}]})(e)}function S9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 14l5-5 5 5z"}}]})(e)}function C9(e){return me({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}function w9(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function k9(e,t){e.classList?e.classList.add(t):w9(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Jg(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function j9(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Jg(e.className,t):e.setAttribute("class",Jg(e.className&&e.className.baseVal||"",t))}const e0={disabled:!1},By=ke.createContext(null);var Hy=function(t){return t.scrollTop},La="unmounted",zo="exited",Ro="entering",Ai="entered",_f="exiting",Ur=function(e){mh(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var c=o,u=c&&!c.isMounting?r.enter:r.appear,f;return s.appearStatus=null,r.in?u?(f=zo,s.appearStatus=Ro):f=Ai:r.unmountOnExit||r.mountOnEnter?f=La:f=zo,s.state={status:f},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var c=o.in;return c&&s.status===La?{status:zo}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var c=this.state.status;this.props.in?c!==Ro&&c!==Ai&&(s=Ro):(c===Ro||c===Ai)&&(s=_f)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,c,u;return s=c=u=o,o!=null&&typeof o!="number"&&(s=o.exit,c=o.enter,u=o.appear!==void 0?o.appear:c),{exit:s,enter:c,appear:u}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===Ro){if(this.props.unmountOnExit||this.props.mountOnEnter){var c=this.props.nodeRef?this.props.nodeRef.current:vl.findDOMNode(this);c&&Hy(c)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===zo&&this.setState({status:La})},n.performEnter=function(o){var s=this,c=this.props.enter,u=this.context?this.context.isMounting:o,f=this.props.nodeRef?[u]:[vl.findDOMNode(this),u],h=f[0],p=f[1],g=this.getTimeouts(),y=u?g.appear:g.enter;if(!o&&!c||e0.disabled){this.safeSetState({status:Ai},function(){s.props.onEntered(h)});return}this.props.onEnter(h,p),this.safeSetState({status:Ro},function(){s.props.onEntering(h,p),s.onTransitionEnd(y,function(){s.safeSetState({status:Ai},function(){s.props.onEntered(h,p)})})})},n.performExit=function(){var o=this,s=this.props.exit,c=this.getTimeouts(),u=this.props.nodeRef?void 0:vl.findDOMNode(this);if(!s||e0.disabled){this.safeSetState({status:zo},function(){o.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:_f},function(){o.props.onExiting(u),o.onTransitionEnd(c.exit,function(){o.safeSetState({status:zo},function(){o.props.onExited(u)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,c=!0;return this.nextCallback=function(u){c&&(c=!1,s.nextCallback=null,o(u))},this.nextCallback.cancel=function(){c=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var c=this.props.nodeRef?this.props.nodeRef.current:vl.findDOMNode(this),u=o==null&&!this.props.addEndListener;if(!c||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var f=this.props.nodeRef?[this.nextCallback]:[c,this.nextCallback],h=f[0],p=f[1];this.props.addEndListener(h,p)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===La)return null;var s=this.props,c=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var u=th(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ke.createElement(By.Provider,{value:null},typeof c=="function"?c(o,u):ke.cloneElement(ke.Children.only(c),u))},t}(ke.Component);Ur.contextType=By;Ur.propTypes={};function Oi(){}Ur.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Oi,onEntering:Oi,onEntered:Oi,onExit:Oi,onExiting:Oi,onExited:Oi};Ur.UNMOUNTED=La;Ur.EXITED=zo;Ur.ENTERING=Ro;Ur.ENTERED=Ai;Ur.EXITING=_f;const E9=Ur;var P9=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return k9(t,r)})},Rd=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return j9(t,r)})},cp=function(e){mh(t,e);function t(){for(var r,o=arguments.length,s=new Array(o),c=0;ce.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Vy=x.memo(e=>{const t=Y(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:o,mayDeleteImage:s,shouldUseSingleGalleryColumn:c}=O(e9),{image:u,isSelected:f}=e,{url:h,thumbnail:p,uuid:g,metadata:y}=u,[S,C]=x.useState(!1),w=us(),{direction:k}=ei(),{t:j}=Z(),M=sp(),P=()=>C(!0),I=()=>C(!1),T=()=>{var Q,re,ie,U;(re=(Q=u.metadata)==null?void 0:Q.image)!=null&&re.prompt&&M((U=(ie=u.metadata)==null?void 0:ie.image)==null?void 0:U.prompt),w({title:j("toast.promptSet"),status:"success",duration:2500,isClosable:!0})},D=()=>{u.metadata&&t(as(u.metadata.image.seed)),w({title:j("toast.seedSet"),status:"success",duration:2500,isClosable:!0})},_=()=>{t(is(u)),n!=="img2img"&&t(kn("img2img")),w({title:j("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},z=()=>{t(bc(u)),t(Sc()),n!=="unifiedCanvas"&&t(kn("unifiedCanvas")),w({title:j("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},V=()=>{y&&t(A1(y)),w({title:j("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})},F=async()=>{var Q;if((Q=y==null?void 0:y.image)!=null&&Q.init_image_path&&(await fetch(y.image.init_image_path)).ok){t(kn("img2img")),t(qS(y)),w({title:j("toast.initialImageSet"),status:"success",duration:2500,isClosable:!0});return}w({title:j("toast.initialImageNotSet"),description:j("toast.initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},L=()=>t(zv(u)),X=Q=>{Q.dataTransfer.setData("invokeai/imageUuid",g),Q.dataTransfer.effectAllowed="move"},$=()=>{t(zv(u)),t(Ho(!0))};return l.jsx(I9,{menuProps:{size:"sm",isLazy:!0},renderMenu:()=>{var Q,re,ie,U,K,ne,ce,Re;return l.jsxs(Rh,{children:[l.jsx(pr,{onClickCapture:$,children:j("parameters.openInViewer")}),l.jsx(pr,{onClickCapture:T,isDisabled:((re=(Q=u==null?void 0:u.metadata)==null?void 0:Q.image)==null?void 0:re.prompt)===void 0,children:j("parameters.usePrompt")}),l.jsx(pr,{onClickCapture:D,isDisabled:((U=(ie=u==null?void 0:u.metadata)==null?void 0:ie.image)==null?void 0:U.seed)===void 0,children:j("parameters.useSeed")}),l.jsx(pr,{onClickCapture:V,isDisabled:!["txt2img","img2img"].includes((ne=(K=u==null?void 0:u.metadata)==null?void 0:K.image)==null?void 0:ne.type),children:j("parameters.useAll")}),l.jsx(pr,{onClickCapture:F,isDisabled:((Re=(ce=u==null?void 0:u.metadata)==null?void 0:ce.image)==null?void 0:Re.type)!=="img2img",children:j("parameters.useInitImg")}),l.jsx(pr,{onClickCapture:_,children:j("parameters.sendToImg2Img")}),l.jsx(pr,{onClickCapture:z,children:j("parameters.sendToUnifiedCanvas")}),l.jsx(pr,{"data-warning":!0,children:l.jsx(uc,{image:u,children:l.jsx("p",{children:j("parameters.deleteImage")})})})]})},children:Q=>l.jsxs(We,{position:"relative",onMouseOver:P,onMouseOut:I,userSelect:"none",draggable:!0,onDragStart:X,ref:Q,sx:{padding:2,display:"flex",justifyContent:"center",transition:"transform 0.2s ease-out",_hover:{cursor:"pointer",zIndex:2},_before:{content:'""',display:"block",paddingBottom:"100%"}},children:[l.jsx(ds,{objectFit:c?"contain":r,rounded:"md",src:p||h,loading:"lazy",sx:{position:"absolute",width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",top:"50%",transform:"translate(-50%,-50%)",...k==="rtl"?{insetInlineEnd:"50%"}:{insetInlineStart:"50%"}}}),l.jsx(B,{onClick:L,sx:{position:"absolute",top:"0",insetInlineStart:"0",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},children:f&&l.jsx(Jt,{as:zc,sx:{width:"50%",height:"50%",fill:"ok.500"}})}),S&&o>=64&&l.jsx(We,{sx:{position:"absolute",top:1,insetInlineEnd:1},children:l.jsx(uc,{image:u,children:l.jsx(le,{"aria-label":j("parameters.deleteImage"),icon:l.jsx(K8,{}),size:"xs",fontSize:14,isDisabled:!s})})})]},g)})},M9);Vy.displayName="HoverableImage";const T9="0px",up="calc(70px + 1rem)",_9=4,dp=1.5,D9=`calc(100vw - ${T9})`,O9=`calc(100vh - ${dp*4}px)`,A9=`calc(100vh - ${up})`,t0=`calc(100vh - (${up} + 6rem))`,z9=`calc(100vh - (${up} + 4.4rem))`,Al="22.5rem";const R9=oe(Ny,{shouldForwardProp:e=>!["sx"].includes(e)}),zl=320,n0=40,N9={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500},training:{galleryMinWidth:200,galleryMaxWidth:500}},r0=400;function Uy(){const e=Y(),{direction:t}=ei(),{t:n}=Z(),{images:r,currentCategory:o,currentImageUuid:s,shouldPinGallery:c,shouldShowGallery:u,galleryImageMinimumWidth:f,galleryGridTemplateColumns:h,activeTabName:p,galleryImageObjectFit:g,shouldHoldGalleryOpen:y,shouldAutoSwitchToNewImages:S,areMoreImagesAvailable:C,galleryWidth:w,isLightboxOpen:k,isStaging:j,shouldEnableResize:M,shouldUseSingleGalleryColumn:P}=O(J8),{galleryMinWidth:I,galleryMaxWidth:T}=k?{galleryMinWidth:r0,galleryMaxWidth:r0}:N9[p],[D,_]=x.useState(w>=zl),[z,V]=x.useState(!1),[F,L]=x.useState(0),X=x.useRef(null),$=x.useRef(null),Q=x.useRef(null);x.useEffect(()=>{_(w>=zl)},[w]);const re=()=>{!c&&e(Lo(!0)),e(JS(!c)),e(on(!0))},ie=()=>{u?K():U()},U=()=>{e(Lo(!0)),c&&e(on(!0))},K=x.useCallback(()=>{e(Lo(!1)),e(YS(!1)),setTimeout(()=>c&&e(on(!0)),400)},[e,c]),ne=()=>{e(eC(o))},ce=J=>{e(Da(J))},Re=()=>{y||(Q.current=window.setTimeout(()=>K(),500))},ze=()=>{Q.current&&window.clearTimeout(Q.current)};fe("g",()=>{ie()},[u,c]),fe("left",()=>{e(R1())},{enabled:!j||p!=="unifiedCanvas"},[j]),fe("right",()=>{e(N1())},{enabled:!j||p!=="unifiedCanvas"},[j]),fe("shift+g",()=>{re()},[c]),fe("esc",()=>{e(Lo(!1))},{enabled:()=>!c,preventDefault:!0},[c]);const Me=32;return fe("shift+up",()=>{if(f<256){const J=te.clamp(f+Me,32,256);e(Da(J))}},[f]),fe("shift+down",()=>{if(f>32){const J=te.clamp(f-Me,32,256);e(Da(J))}},[f]),x.useEffect(()=>{function J(ue){!c&&X.current&&!X.current.contains(ue.target)&&K()}return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[K,c]),l.jsx(Wy,{nodeRef:X,in:u||y,unmountOnExit:!0,timeout:200,classNames:`${t}-image-gallery-css-transition`,children:l.jsxs(We,{className:`${t}-image-gallery-css-transition`,sx:c?{zIndex:1,insetInlineEnd:0}:{zIndex:100,position:"fixed",height:"100vh",top:0,insetInlineEnd:0},ref:X,onMouseLeave:c?void 0:Re,onMouseEnter:c?void 0:ze,onMouseOver:c?void 0:ze,children:[l.jsxs(R9,{sx:{padding:4,display:"flex",flexDirection:"column",rowGap:4,borderRadius:c?"base":0,borderInlineStartWidth:5,bg:"base.850",borderColor:"base.700"},minWidth:I,maxWidth:c?T:window.innerWidth,"data-pinned":c,handleStyles:t==="rtl"?{right:{width:"15px"}}:{left:{width:"15px"}},enable:t==="rtl"?{right:M}:{left:M},size:{width:w,height:c?"100%":"100vh"},onResizeStart:(J,ue,Ie)=>{L(Ie.clientHeight),Ie.style.height=`${Ie.clientHeight}px`,c&&(Ie.style.position="fixed",Ie.style.insetInlineEnd="1rem",V(!0))},onResizeStop:(J,ue,Ie,Be)=>{const Ne=c?te.clamp(Number(w)+Be.width,I,Number(T)):Number(w)+Be.width;e(XS(Ne)),Ie.removeAttribute("data-resize-alert"),c&&(console.log("unpin"),Ie.style.position="relative",Ie.style.removeProperty("inset-inline-end"),Ie.style.setProperty("height",c?"100%":"100vh"),V(!1),e(on(!0)))},onResize:(J,ue,Ie,Be)=>{const Ne=te.clamp(Number(w)+Be.width,I,Number(c?T:.95*window.innerWidth));Ne>=zl&&!D?_(!0):NeNe-n0&&e(Da(Ne-n0)),c&&(Ne>=T?Ie.setAttribute("data-resize-alert","true"):Ie.removeAttribute("data-resize-alert")),Ie.style.height=`${F}px`},children:[l.jsxs(B,{alignItems:"center",gap:2,justifyContent:"space-between",children:[l.jsx(en,{size:"sm",isAttached:!0,w:"max-content",justifyContent:"stretch",children:D?l.jsxs(l.Fragment,{children:[l.jsx(Je,{size:"sm",isChecked:o==="result",onClick:()=>e(gl("result")),flexGrow:1,children:n("gallery.generations")}),l.jsx(Je,{size:"sm",isChecked:o==="user",onClick:()=>e(gl("user")),flexGrow:1,children:n("gallery.uploads")})]}):l.jsxs(l.Fragment,{children:[l.jsx(le,{"aria-label":n("gallery.showGenerations"),tooltip:n("gallery.showGenerations"),isChecked:o==="result",icon:l.jsx(N8,{}),onClick:()=>e(gl("result"))}),l.jsx(le,{"aria-label":n("gallery.showUploads"),tooltip:n("gallery.showUploads"),isChecked:o==="user",icon:l.jsx(Z8,{}),onClick:()=>e(gl("user"))})]})}),l.jsxs(B,{gap:2,children:[l.jsx(rr,{triggerComponent:l.jsx(le,{size:"sm","aria-label":n("gallery.gallerySettings"),icon:l.jsx(ap,{})}),children:l.jsxs(B,{direction:"column",gap:2,children:[l.jsx(ut,{value:f,onChange:ce,min:32,max:256,hideTooltip:!0,label:n("gallery.galleryImageSize"),withReset:!0,handleReset:()=>e(Da(64))}),l.jsx(pt,{label:n("gallery.maintainAspectRatio"),isChecked:g==="contain",onChange:()=>e(KS(g==="contain"?"cover":"contain"))}),l.jsx(pt,{label:n("gallery.autoSwitchNewImages"),isChecked:S,onChange:J=>e(QS(J.target.checked))}),l.jsx(pt,{label:n("gallery.singleColumnLayout"),isChecked:P,onChange:J=>e(ZS(J.target.checked))})]})}),l.jsx(le,{size:"sm","aria-label":n("gallery.pinGallery"),tooltip:`${n("gallery.pinGallery")} (Shift+G)`,onClick:re,icon:c?l.jsx(Fy,{}):l.jsx(Ly,{})})]})]}),l.jsx(B,{direction:"column",gap:2,h:c?t0:"100vh",maxH:c?t0:"100vh",overflowY:"scroll",ref:$,sx:{...h2},children:r.length||C?l.jsxs(l.Fragment,{children:[l.jsx($n,{gap:2,style:{gridTemplateColumns:h},children:r.map(J=>{const{uuid:ue}=J,Ie=s===ue;return l.jsx(Vy,{image:J,isSelected:Ie},ue)})}),l.jsx(Je,{onClick:ne,isDisabled:!C,flexShrink:0,children:n(C?"gallery.loadMore":"gallery.allImagesLoaded")})]}):l.jsxs(B,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,padding:8,h:"100%",w:"100%",color:"base.500"},children:[l.jsx(Jt,{as:lp,sx:{w:16,h:16}}),l.jsx("p",{children:n("gallery.noImagesInGallery")})]})})]}),z&&l.jsx(We,{style:{width:`${w}px`,height:"100%"}})]})})}var F9=nh({displayName:"EditIcon",path:l.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[l.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),l.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),$y=nh({displayName:"ExternalLinkIcon",path:l.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[l.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),l.jsx("path",{d:"M15 3h6v6"}),l.jsx("path",{d:"M10 14L21 3"})]})}),L9=nh({displayName:"DeleteIcon",path:l.jsx("g",{fill:"currentColor",children:l.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"})})});function B9(e){return me({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 xt=({label:e,value:t,onClick:n,isLink:r,labelPosition:o,withCopy:s=!1})=>l.jsxs(B,{gap:2,children:[n&&l.jsx(Yt,{label:`Recall ${e}`,children:l.jsx(co,{"aria-label":"Use this parameter",icon:l.jsx(B9,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),s&&l.jsx(Yt,{label:`Copy ${e}`,children:l.jsx(co,{"aria-label":`Copy ${e}`,icon:l.jsx(Ji,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),l.jsxs(B,{direction:o?"column":"row",children:[l.jsxs(Ce,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?l.jsxs(Go,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",l.jsx($y,{mx:"2px"})]}):l.jsx(Ce,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),H9=(e,t)=>e.image.uuid===t.image.uuid,fp=x.memo(({image:e,styleClass:t})=>{var F,L;const n=Y(),r=sp();fe("esc",()=>{n(z1(!1))});const o=((F=e==null?void 0:e.metadata)==null?void 0:F.image)||{},s=e==null?void 0:e.dreamPrompt,{cfg_scale:c,fit:u,height:f,hires_fix:h,init_image_path:p,mask_image_path:g,orig_path:y,perlin:S,postprocessing:C,prompt:w,sampler:k,seamless:j,seed:M,steps:P,strength:I,threshold:T,type:D,variations:_,width:z}=o,V=JSON.stringify(e.metadata,null,2);return l.jsx(We,{className:t,sx:{position:"absolute",top:"0",width:"100%",borderRadius:"base",padding:4,overflow:"scroll",maxHeight:z9,height:"100%",zIndex:"10",backdropFilter:"blur(10px)",bg:"blackAlpha.600"},children:l.jsxs(B,{gap:1,direction:"column",width:"100%",children:[l.jsxs(B,{gap:2,children:[l.jsx(Ce,{fontWeight:"semibold",children:"File:"}),l.jsxs(Go,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,l.jsx($y,{mx:"2px"})]})]}),Object.keys(o).length>0?l.jsxs(l.Fragment,{children:[D&&l.jsx(xt,{label:"Generation type",value:D}),((L=e.metadata)==null?void 0:L.model_weights)&&l.jsx(xt,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(D)&&l.jsx(xt,{label:"Original image",value:y}),w&&l.jsx(xt,{label:"Prompt",labelPosition:"top",value:typeof w=="string"?w:_1(w),onClick:()=>r(w)}),M!==void 0&&l.jsx(xt,{label:"Seed",value:M,onClick:()=>n(as(M))}),T!==void 0&&l.jsx(xt,{label:"Noise Threshold",value:T,onClick:()=>n(ef(T))}),S!==void 0&&l.jsx(xt,{label:"Perlin Noise",value:S,onClick:()=>n(tf(S))}),k&&l.jsx(xt,{label:"Sampler",value:k,onClick:()=>n(F1(k))}),P&&l.jsx(xt,{label:"Steps",value:P,onClick:()=>n(nf(P))}),c!==void 0&&l.jsx(xt,{label:"CFG scale",value:c,onClick:()=>n(rf(c))}),_&&_.length>0&&l.jsx(xt,{label:"Seed-weight pairs",value:Rv(_),onClick:()=>n(L1(Rv(_)))}),j&&l.jsx(xt,{label:"Seamless",value:j,onClick:()=>n(B1(j))}),h&&l.jsx(xt,{label:"High Resolution Optimization",value:h,onClick:()=>n(H1(h))}),z&&l.jsx(xt,{label:"Width",value:z,onClick:()=>n(Wl(z))}),f&&l.jsx(xt,{label:"Height",value:f,onClick:()=>n(Vl(f))}),p&&l.jsx(xt,{label:"Initial image",value:p,isLink:!0,onClick:()=>n(is(p))}),g&&l.jsx(xt,{label:"Mask image",value:g,isLink:!0,onClick:()=>n(tC(g))}),D==="img2img"&&I&&l.jsx(xt,{label:"Image to image strength",value:I,onClick:()=>n(of(I))}),u&&l.jsx(xt,{label:"Image to image fit",value:u,onClick:()=>n(W1(u))}),C&&C.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(Vn,{size:"sm",children:"Postprocessing"}),C.map((X,$)=>{if(X.type==="esrgan"){const{scale:Q,strength:re,denoise_str:ie}=X;return l.jsxs(B,{pl:8,gap:1,direction:"column",children:[l.jsx(Ce,{size:"md",children:`${$+1}: Upscale (ESRGAN)`}),l.jsx(xt,{label:"Scale",value:Q,onClick:()=>n(I1(Q))}),l.jsx(xt,{label:"Strength",value:re,onClick:()=>n(Jd(re))}),ie!==void 0&&l.jsx(xt,{label:"Denoising strength",value:ie,onClick:()=>n(Zd(ie))})]},$)}else if(X.type==="gfpgan"){const{strength:Q}=X;return l.jsxs(B,{pl:8,gap:1,direction:"column",children:[l.jsx(Ce,{size:"md",children:`${$+1}: Face restoration (GFPGAN)`}),l.jsx(xt,{label:"Strength",value:Q,onClick:()=>{n(Zl(Q)),n(Hl("gfpgan"))}})]},$)}else if(X.type==="codeformer"){const{strength:Q,fidelity:re}=X;return l.jsxs(B,{pl:8,gap:1,direction:"column",children:[l.jsx(Ce,{size:"md",children:`${$+1}: Face restoration (Codeformer)`}),l.jsx(xt,{label:"Strength",value:Q,onClick:()=>{n(Zl(Q)),n(Hl("codeformer"))}}),re&&l.jsx(xt,{label:"Fidelity",value:re,onClick:()=>{n(Qd(re)),n(Hl("codeformer"))}})]},$)}})]}),s&&l.jsx(xt,{withCopy:!0,label:"Dream Prompt",value:s}),l.jsxs(B,{gap:2,direction:"column",children:[l.jsxs(B,{gap:2,children:[l.jsx(Yt,{label:"Copy metadata JSON",children:l.jsx(co,{"aria-label":"Copy metadata JSON",icon:l.jsx(Ji,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),l.jsx(Ce,{fontWeight:"semibold",children:"Metadata JSON:"})]}),l.jsx(We,{sx:{mt:0,mr:2,mb:4,ml:2,padding:4,borderRadius:"base",overflowX:"scroll",wordBreak:"break-all",bg:"whiteAlpha.100"},children:l.jsx("pre",{children:V})})]})]}):l.jsx(bx,{width:"100%",pt:10,children:l.jsx(Ce,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},H9);fp.displayName="ImageMetadataViewer";const o0={height:"100%",width:"15%",alignItems:"center",pointerEvents:"auto"},i0={color:"base.100"},W9=be(Vr,e=>{const{currentImage:t}=e,n=e.categories[t?t.category:"result"].images,r=n.findIndex(s=>{var c;return s.uuid===((c=e==null?void 0:e.currentImage)==null?void 0:c.uuid)}),o=n.length;return{isOnFirstImage:r===0,isOnLastImage:!isNaN(r)&&r===o-1}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),Gy=()=>{const e=Y(),{isOnFirstImage:t,isOnLastImage:n}=O(W9),[r,o]=x.useState(!1),s=()=>{o(!0)},c=()=>{o(!1)},u=()=>{e(R1())},f=()=>{e(N1())};return l.jsxs(B,{sx:{justifyContent:"space-between",zIndex:1,height:"100%",width:"100%",pointerEvents:"none"},children:[l.jsx($n,{sx:{...o0,justifyContent:"flex-start"},onMouseOver:s,onMouseOut:c,children:r&&!t&&l.jsx(co,{"aria-label":"Previous image",icon:l.jsx(j8,{size:64}),variant:"unstyled",onClick:u,boxSize:16,sx:i0})}),l.jsx($n,{sx:{...o0,justifyContent:"flex-end"},onMouseOver:s,onMouseOut:c,children:r&&!n&&l.jsx(co,{"aria-label":"Next image",icon:l.jsx(E8,{size:64}),variant:"unstyled",onClick:f,boxSize:16,sx:i0})})]})};var Wn=function(e,t){return Number(e.toFixed(t))},V9=function(e,t){return typeof e=="number"?e:t},Tt=function(e,t,n){n&&typeof n=="function"&&n(e,t)},U9=function(e){return-Math.cos(e*Math.PI)/2+.5},$9=function(e){return e},G9=function(e){return e*e},q9=function(e){return e*(2-e)},Y9=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},X9=function(e){return e*e*e},K9=function(e){return--e*e*e+1},Q9=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},Z9=function(e){return e*e*e*e},J9=function(e){return 1- --e*e*e*e},eP=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},tP=function(e){return e*e*e*e*e},nP=function(e){return 1+--e*e*e*e*e},rP=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},qy={easeOut:U9,linear:$9,easeInQuad:G9,easeOutQuad:q9,easeInOutQuad:Y9,easeInCubic:X9,easeOutCubic:K9,easeInOutCubic:Q9,easeInQuart:Z9,easeOutQuart:J9,easeInOutQuart:eP,easeInQuint:tP,easeOutQuint:nP,easeInOutQuint:rP},Yy=function(e){typeof e=="number"&&cancelAnimationFrame(e)},gr=function(e){e.mounted&&(Yy(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function Xy(e,t,n,r){if(e.mounted){var o=new Date().getTime(),s=1;gr(e),e.animation=function(){if(!e.mounted)return Yy(e.animation);var c=new Date().getTime()-o,u=c/n,f=qy[t],h=f(u);c>=n?(r(s),e.animation=null):e.animation&&(r(h),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function oP(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(Number.isNaN(t)||Number.isNaN(n)||Number.isNaN(r))}function go(e,t,n,r){var o=oP(t);if(!(!e.mounted||!o)){var s=e.setTransformState,c=e.transformState,u=c.scale,f=c.positionX,h=c.positionY,p=t.scale-u,g=t.positionX-f,y=t.positionY-h;n===0?s(t.scale,t.positionX,t.positionY):Xy(e,r,n,function(S){var C=u+p*S,w=f+g*S,k=h+y*S;s(C,w,k)})}}function iP(e,t,n){var r=e.offsetWidth,o=e.offsetHeight,s=t.offsetWidth,c=t.offsetHeight,u=s*n,f=c*n,h=r-u,p=o-f;return{wrapperWidth:r,wrapperHeight:o,newContentWidth:u,newDiffWidth:h,newContentHeight:f,newDiffHeight:p}}var aP=function(e,t,n,r,o,s,c){var u=e>t?n*(c?1:.5):0,f=r>o?s*(c?1:.5):0,h=e-t-u,p=u,g=r-o-f,y=f;return{minPositionX:h,maxPositionX:p,minPositionY:g,maxPositionY:y}},hp=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,o=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var s=iP(n,r,t),c=s.wrapperWidth,u=s.wrapperHeight,f=s.newContentWidth,h=s.newDiffWidth,p=s.newContentHeight,g=s.newDiffHeight,y=aP(c,f,h,u,p,g,Boolean(o));return y},Df=function(e,t,n,r){return r?en?Wn(n,2):Wn(e,2):Wn(e,2)},ea=function(e,t){var n=hp(e,t);return e.bounds=n,n};function Nc(e,t,n,r,o,s,c){var u=n.minPositionX,f=n.minPositionY,h=n.maxPositionX,p=n.maxPositionY,g=0,y=0;c&&(g=o,y=s);var S=Df(e,u-g,h+g,r),C=Df(t,f-y,p+y,r);return{x:S,y:C}}function Fc(e,t,n,r,o,s){var c=e.transformState,u=c.scale,f=c.positionX,h=c.positionY,p=r-u;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:f,y:h};var g=f-t*p,y=h-n*p,S=Nc(g,y,o,s,0,0,null);return S}function ys(e,t,n,r,o){var s=o?r:0,c=t-s;return!Number.isNaN(n)&&e>=n?n:!Number.isNaN(t)&&e<=c?c:e}var a0=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,o=e.wrapperComponent,s=t.target,c=o==null?void 0:o.contains(s),u=r&&s&&c;if(!u)return!1;var f=Lc(s,n);return!f},s0=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,o=r.panning.disabled,s=t&&n&&!o;return!!s},sP=function(e,t){var n=e.transformState,r=n.positionX,o=n.positionY;e.isPanning=!0;var s=t.clientX,c=t.clientY;e.startCoords={x:s-r,y:c-o}},lP=function(e,t){var n=t.touches,r=e.transformState,o=r.positionX,s=r.positionY;e.isPanning=!0;var c=n.length===1;if(c){var u=n[0].clientX,f=n[0].clientY;e.startCoords={x:u-o,y:f-s}}};function cP(e){var t=e.transformState,n=t.positionX,r=t.positionY,o=t.scale,s=e.setup,c=s.disabled,u=s.limitToBounds,f=s.centerZoomedOut,h=e.wrapperComponent;if(!(c||!h||!e.bounds)){var p=e.bounds,g=p.maxPositionX,y=p.minPositionX,S=p.maxPositionY,C=p.minPositionY,w=n>g||nS||rg?h.offsetWidth:e.setup.minPositionX||0,M=r>S?h.offsetHeight:e.setup.minPositionY||0,P=Fc(e,j,M,o,e.bounds,u||f),I=P.x,T=P.y;return{scale:o,positionX:w?I:n,positionY:k?T:r}}}function uP(e,t,n,r,o){var s=e.setup.limitToBounds,c=e.wrapperComponent,u=e.bounds,f=e.transformState,h=f.scale,p=f.positionX,g=f.positionY;if(!(c===null||u===null||t===p&&n===g)){var y=Nc(t,n,u,s,r,o,c),S=y.x,C=y.y;e.setTransformState(h,S,C)}}var dP=function(e,t,n){var r=e.startCoords,o=e.transformState,s=e.setup.panning,c=s.lockAxisX,u=s.lockAxisY,f=o.positionX,h=o.positionY;if(!r)return{x:f,y:h};var p=t-r.x,g=n-r.y,y=c?f:p,S=u?h:g;return{x:y,y:S}},dc=function(e,t){var n=e.setup,r=e.transformState,o=r.scale,s=n.minScale,c=n.disablePadding;return t>0&&o>=s&&!c?t:0},fP=function(e){var t=e.mounted,n=e.setup,r=n.disabled,o=n.velocityAnimation,s=e.transformState.scale,c=o.disabled,u=!c||s>1||!r||t;return!!u},hP=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,o=e.setup,s=o.disabled,c=o.velocityAnimation,u=e.transformState.scale,f=c.disabled,h=!f||u>1||!s||t;return!(!h||!n||!r)};function pP(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,o=n.animationTime,s=n.sensitivity;return r?o*t*s:o}function l0(e,t,n,r,o,s,c,u,f,h){if(o){if(t>c&&n>c){var p=c+(e-c)*h;return p>f?f:ps?s:p}}return r?t:Df(e,s,c,o)}function mP(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function vP(e,t){var n=fP(e);if(n){var r=e.lastMousePosition,o=e.velocityTime,s=e.setup,c=e.wrapperComponent,u=s.velocityAnimation.equalToMove,f=Date.now();if(r&&o&&c){var h=mP(c,u),p=t.x-r.x,g=t.y-r.y,y=p/h,S=g/h,C=f-o,w=p*p+g*g,k=Math.sqrt(w)/C;e.velocity={velocityX:y,velocityY:S,total:k}}e.lastMousePosition=t,e.velocityTime=f}}function gP(e){var t=e.velocity,n=e.bounds,r=e.setup,o=e.wrapperComponent,s=hP(e);if(!(!s||!t||!n||!o)){var c=t.velocityX,u=t.velocityY,f=t.total,h=n.maxPositionX,p=n.minPositionX,g=n.maxPositionY,y=n.minPositionY,S=r.limitToBounds,C=r.alignmentAnimation,w=r.zoomAnimation,k=r.panning,j=k.lockAxisY,M=k.lockAxisX,P=w.animationType,I=C.sizeX,T=C.sizeY,D=C.velocityAlignmentTime,_=D,z=pP(e,f),V=Math.max(z,_),F=dc(e,I),L=dc(e,T),X=F*o.offsetWidth/100,$=L*o.offsetHeight/100,Q=h+X,re=p-X,ie=g+$,U=y-$,K=e.transformState,ne=new Date().getTime();Xy(e,P,V,function(ce){var Re=e.transformState,ze=Re.scale,Me=Re.positionX,J=Re.positionY,ue=new Date().getTime()-ne,Ie=ue/_,Be=qy[C.animationType],Ne=1-Be(Math.min(1,Ie)),Ge=1-ce,Qe=Me+c*Ge,ve=J+u*Ge,_e=l0(Qe,K.positionX,Me,M,S,p,h,re,Q,Ne),qe=l0(ve,K.positionY,J,j,S,y,g,U,ie,Ne);(Me!==Qe||J!==ve)&&e.setTransformState(ze,_e,qe)})}}function c0(e,t){var n=e.transformState.scale;gr(e),ea(e,n),window.TouchEvent!==void 0&&t instanceof TouchEvent?lP(e,t):sP(e,t)}function Ky(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,o=n.alignmentAnimation,s=o.disabled,c=o.sizeX,u=o.sizeY,f=o.animationTime,h=o.animationType,p=s||t.1&&g;y?gP(e):Ky(e)}}function pp(e,t,n,r){var o=e.setup,s=o.minScale,c=o.maxScale,u=o.limitToBounds,f=ys(Wn(t,2),s,c,0,!1),h=ea(e,f),p=Fc(e,n,r,f,h,u),g=p.x,y=p.y;return{scale:f,positionX:g,positionY:y}}function Qy(e,t,n){var r=e.transformState.scale,o=e.wrapperComponent,s=e.setup,c=s.minScale,u=s.limitToBounds,f=s.zoomAnimation,h=f.disabled,p=f.animationTime,g=f.animationType,y=h||r>=c;if((r>=1||u)&&Ky(e),!(y||!o||!e.mounted)){var S=t||o.offsetWidth/2,C=n||o.offsetHeight/2,w=pp(e,c,S,C);w&&go(e,w,p,g)}}var lo=function(){return lo=Object.assign||function(t){for(var n,r=1,o=arguments.length;rc||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},AP=function(e,t){var n=e.setup.pinch,r=n.disabled,o=n.excluded,s=e.isInitialized,c=t.target,u=s&&!r&&c;if(!u)return!1;var f=Lc(c,o);return!f},zP=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,o=n&&!t&&r;return!!o},RP=function(e,t,n){var r=n.getBoundingClientRect(),o=e.touches,s=Wn(o[0].clientX-r.left,5),c=Wn(o[0].clientY-r.top,5),u=Wn(o[1].clientX-r.left,5),f=Wn(o[1].clientY-r.top,5);return{x:(s+u)/2/t,y:(c+f)/2/t}},o4=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},NP=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,o=e.setup,s=o.maxScale,c=o.minScale,u=o.zoomAnimation,f=o.disablePadding,h=u.size,p=u.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var g=t/r,y=g*n;return ys(Wn(y,2),c,s,h,!p&&!f)},FP=160,LP=100,BP=function(e,t){var n=e.props,r=n.onWheelStart,o=n.onZoomStart;e.wheelStopEventTimer||(gr(e),Tt(dt(e),t,r),Tt(dt(e),t,o))},HP=function(e,t){var n=e.props,r=n.onWheel,o=n.onZoom,s=e.contentComponent,c=e.setup,u=e.transformState,f=u.scale,h=c.limitToBounds,p=c.centerZoomedOut,g=c.zoomAnimation,y=c.wheel,S=c.disablePadding,C=g.size,w=g.disabled,k=y.step;if(!s)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var j=_P(t,null),M=DP(e,j,k,!t.ctrlKey);if(f!==M){var P=ea(e,M),I=r4(t,s,f),T=w||C===0||p||S,D=h&&T,_=Fc(e,I.x,I.y,M,P,D),z=_.x,V=_.y;e.previousWheelEvent=t,e.setTransformState(M,z,V),Tt(dt(e),t,r),Tt(dt(e),t,o)}},WP=function(e,t){var n=e.props,r=n.onWheelStop,o=n.onZoomStop;Of(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){e.mounted&&(Qy(e,t.x,t.y),e.wheelAnimationTimer=null)},LP);var s=OP(e,t);s&&(Of(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){e.mounted&&(e.wheelStopEventTimer=null,Tt(dt(e),t,r),Tt(dt(e),t,o))},FP))},VP=function(e,t){var n=o4(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,gr(e)},UP=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,o=e.transformState.scale,s=e.setup,c=s.limitToBounds,u=s.centerZoomedOut,f=s.zoomAnimation,h=f.disabled,p=f.size;if(!(r===null||!n)){var g=RP(t,o,n);if(!(!Number.isFinite(g.x)||!Number.isFinite(g.y))){var y=o4(t),S=NP(e,y);if(S!==o){var C=ea(e,S),w=h||p===0||u,k=c&&w,j=Fc(e,g.x,g.y,S,C,k),M=j.x,P=j.y;e.pinchMidpoint=g,e.lastDistance=y,e.setTransformState(S,M,P)}}}},$P=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,Qy(e,t==null?void 0:t.x,t==null?void 0:t.y)},i4=function(e,t){var n=e.props.onZoomStop,r=e.setup.doubleClick.animationTime;Of(e.doubleClickStopEventTimer),e.doubleClickStopEventTimer=setTimeout(function(){e.doubleClickStopEventTimer=null,Tt(dt(e),t,n)},r)},GP=function(e,t){var n=e.props,r=n.onZoomStart,o=n.onZoom,s=e.setup.doubleClick,c=s.animationTime,u=s.animationType;Tt(dt(e),t,r),t4(e,c,u,function(){return Tt(dt(e),t,o)}),i4(e,t)};function qP(e,t){var n=e.setup,r=e.doubleClickStopEventTimer,o=e.transformState,s=e.contentComponent,c=o.scale,u=e.props,f=u.onZoomStart,h=u.onZoom,p=n.doubleClick,g=p.disabled,y=p.mode,S=p.step,C=p.animationTime,w=p.animationType;if(!g&&!r){if(y==="reset")return GP(e,t);if(!s)return console.error("No ContentComponent found");var k=y==="zoomOut"?-1:1,j=Jy(e,k,S);if(c!==j){Tt(dt(e),t,f);var M=r4(t,s,c),P=pp(e,j,M.x,M.y);if(!P)return console.error("Error during zoom event. New transformation state was not calculated.");Tt(dt(e),t,h),go(e,P,C,w),i4(e,t)}}}var YP=function(e,t){var n=e.isInitialized,r=e.setup,o=e.wrapperComponent,s=r.doubleClick,c=s.disabled,u=s.excluded,f=t.target,h=o==null?void 0:o.contains(f),p=n&&f&&h&&!c;if(!p)return!1;var g=Lc(f,u);return!g},XP=function(){function e(t){var n=this;this.mounted=!0,this.onChangeCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.startCoords=null,this.lastTouch=null,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.animate=!1,this.animation=null,this.maxBounds=null,this.pressedKeys={},this.mount=function(){n.initializeWindowEvents()},this.unmount=function(){n.cleanupWindowEvents()},this.update=function(r){ea(n,n.transformState.scale),n.setup=f0(r)},this.initializeWindowEvents=function(){var r,o=Fd(),s=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,c=s==null?void 0:s.defaultView;c==null||c.addEventListener("mousedown",n.onPanningStart,o),c==null||c.addEventListener("mousemove",n.onPanning,o),c==null||c.addEventListener("mouseup",n.onPanningStop,o),s==null||s.addEventListener("mouseleave",n.clearPanning,o),c==null||c.addEventListener("keyup",n.setKeyUnPressed,o),c==null||c.addEventListener("keydown",n.setKeyPressed,o)},this.cleanupWindowEvents=function(){var r,o,s=Fd(),c=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,u=c==null?void 0:c.defaultView;u==null||u.removeEventListener("mousedown",n.onPanningStart,s),u==null||u.removeEventListener("mousemove",n.onPanning,s),u==null||u.removeEventListener("mouseup",n.onPanningStop,s),c==null||c.removeEventListener("mouseleave",n.clearPanning,s),u==null||u.removeEventListener("keyup",n.setKeyUnPressed,s),u==null||u.removeEventListener("keydown",n.setKeyPressed,s),document.removeEventListener("mouseleave",n.clearPanning,s),gr(n),(o=n.observer)===null||o===void 0||o.disconnect()},this.handleInitializeWrapperEvents=function(r){var o=Fd();r.addEventListener("wheel",n.onWheelZoom,o),r.addEventListener("dblclick",n.onDoubleClick,o),r.addEventListener("touchstart",n.onTouchPanningStart,o),r.addEventListener("touchmove",n.onTouchPanning,o),r.addEventListener("touchend",n.onTouchPanningStop,o)},this.handleInitialize=function(r){var o=n.setup.centerOnInit;n.applyTransformation(),o&&(n.setCenter(),n.observer=new ResizeObserver(function(){var s;n.setCenter(),(s=n.observer)===null||s===void 0||s.disconnect()}),n.observer.observe(r))},this.onWheelZoom=function(r){var o=n.setup.disabled;if(!o){var s=MP(n,r);if(s){var c=n.isPressingKeys(n.setup.wheel.activationKeys);c&&(BP(n,r),HP(n,r),WP(n,r))}}},this.onPanningStart=function(r){var o=n.setup.disabled,s=n.props.onPanningStart;if(!o){var c=a0(n,r);if(c){var u=n.isPressingKeys(n.setup.panning.activationKeys);u&&(r.preventDefault(),r.stopPropagation(),gr(n),c0(n,r),Tt(dt(n),r,s))}}},this.onPanning=function(r){var o=n.setup.disabled,s=n.props.onPanning;if(!o){var c=s0(n);if(c){var u=n.isPressingKeys(n.setup.panning.activationKeys);u&&(r.preventDefault(),r.stopPropagation(),u0(n,r.clientX,r.clientY),Tt(dt(n),r,s))}}},this.onPanningStop=function(r){var o=n.props.onPanningStop;n.isPanning&&(xP(n),Tt(dt(n),r,o))},this.onPinchStart=function(r){var o=n.setup.disabled,s=n.props,c=s.onPinchingStart,u=s.onZoomStart;if(!o){var f=AP(n,r);f&&(VP(n,r),gr(n),Tt(dt(n),r,c),Tt(dt(n),r,u))}},this.onPinch=function(r){var o=n.setup.disabled,s=n.props,c=s.onPinching,u=s.onZoom;if(!o){var f=zP(n);f&&(r.preventDefault(),r.stopPropagation(),UP(n,r),Tt(dt(n),r,c),Tt(dt(n),r,u))}},this.onPinchStop=function(r){var o=n.props,s=o.onPinchingStop,c=o.onZoomStop;n.pinchStartScale&&($P(n),Tt(dt(n),r,s),Tt(dt(n),r,c))},this.onTouchPanningStart=function(r){var o=n.setup.disabled,s=n.props.onPanningStart;if(!o){var c=a0(n,r);if(c){var u=n.lastTouch&&+new Date-n.lastTouch<200;if(u&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,gr(n);var f=r.touches,h=f.length===1,p=f.length===2;h&&(gr(n),c0(n,r),Tt(dt(n),r,s)),p&&n.onPinchStart(r)}}}},this.onTouchPanning=function(r){var o=n.setup.disabled,s=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(o)return;var c=s0(n);if(!c)return;r.preventDefault(),r.stopPropagation();var u=r.touches[0];u0(n,u.clientX,u.clientY),Tt(dt(n),r,s)}else r.touches.length>1&&n.onPinch(r)},this.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},this.onDoubleClick=function(r){var o=n.setup.disabled;if(!o){var s=YP(n,r);s&&qP(n,r)}},this.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},this.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},this.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},this.isPressingKeys=function(r){return r.length?Boolean(r.find(function(o){return n.pressedKeys[o]})):!0},this.setTransformState=function(r,o,s){var c=n.props.onTransformed;if(!Number.isNaN(r)&&!Number.isNaN(o)&&!Number.isNaN(s)){r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=o,n.transformState.positionY=s;var u=dt(n);n.onChangeCallbacks.forEach(function(f){return f(u)}),Tt(u,{scale:r,positionX:o,positionY:s},c),n.applyTransformation()}else console.error("Detected NaN set state values")},this.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=n4(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},this.handleTransformStyles=function(r,o,s){return n.props.customTransform?n.props.customTransform(r,o,s):PP(r,o,s)},this.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,o=r.scale,s=r.positionX,c=r.positionY,u=n.handleTransformStyles(s,c,o);n.contentComponent.style.transform=u}},this.getContext=function(){return dt(n)},this.onChange=function(r){return n.onChangeCallbacks.has(r)||n.onChangeCallbacks.add(r),function(){n.onChangeCallbacks.delete(r)}},this.init=function(r,o){n.cleanupWindowEvents(),n.wrapperComponent=r,n.contentComponent=o,ea(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(o),n.initializeWindowEvents(),n.isInitialized=!0,Tt(dt(n),void 0,n.props.onInit)},this.props=t,this.setup=f0(this.props),this.transformState=Zy(this.props)}return e}(),Bc=ke.createContext(null),KP=function(e,t){return typeof e=="function"?e(t):e},QP=ke.forwardRef(function(e,t){var n=x.useState(0),r=n[1],o=e.children,s=x.useRef(new XP(e)).current,c=KP(e.children,dt(s)),u=x.useCallback(function(){typeof o=="function"&&r(function(f){return f+1})},[o]);return x.useImperativeHandle(t,function(){return dt(s)},[s]),x.useEffect(function(){s.update(e)},[s,e]),x.useEffect(function(){return s.onChange(u)},[s,e,u]),ke.createElement(Bc.Provider,{value:s},c)});function ZP(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var JP=`.transform-component-module_wrapper__7HFJe { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__uCDPE { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__uCDPE img { + pointer-events: none; +} +`,h0={wrapper:"transform-component-module_wrapper__7HFJe",content:"transform-component-module_content__uCDPE"};ZP(JP);var eI=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,o=e.contentClass,s=o===void 0?"":o,c=e.wrapperStyle,u=e.contentStyle,f=e.wrapperProps,h=f===void 0?{}:f,p=e.contentProps,g=p===void 0?{}:p,y=x.useContext(Bc).init,S=x.useRef(null),C=x.useRef(null);return x.useEffect(function(){var w=S.current,k=C.current;w!==null&&k!==null&&y&&y(w,k)},[]),ke.createElement("div",lo({},h,{ref:S,className:"react-transform-wrapper ".concat(h0.wrapper," ").concat(r),style:c}),ke.createElement("div",lo({},g,{ref:C,className:"react-transform-component ".concat(h0.content," ").concat(s),style:u}),t))},a4=function(){var e=x.useContext(Bc),t=x.useState(dt(e||{})),n=t[0],r=t[1];if(!e)throw new Error("Transform context mus be placed inside TransformWrapper");return x.useEffect(function(){e.onChange(function(o){r(o)})},[e]),n};ke.forwardRef(function(e,t){var n=x.useRef(null),r=x.useContext(Bc);return x.useEffect(function(){return r.onChange(function(o){if(n.current){var s=0,c=0;n.current.style.transform=r.handleTransformStyles(s,c,1/o.state.scale)}})},[r]),ke.createElement("div",lo({},e,{ref:IP([n,t])}))});const tI=()=>{const[e,t]=x.useState(0),[n,r]=x.useState(1),[o,s]=x.useState(1);return{rotation:e,scaleX:n,scaleY:o,flipHorizontally:()=>{r(n*-1)},flipVertically:()=>{s(o*-1)},rotateCounterClockwise:()=>{t(e===-270?0:e-90)},rotateClockwise:()=>{t(e===270?0:e+90)},reset:()=>{t(0),r(1),s(1)}}},nI=({flipHorizontally:e,flipVertically:t,rotateCounterClockwise:n,rotateClockwise:r,reset:o})=>{const{zoomIn:s,zoomOut:c,resetTransform:u}=a4();return l.jsxs(en,{isAttached:!0,orientation:"vertical",children:[l.jsx(le,{icon:l.jsx(J7,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>s(),fontSize:20}),l.jsx(le,{icon:l.jsx(e8,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>c(),fontSize:20}),l.jsx(le,{icon:l.jsx(Q7,{}),"aria-label":"Rotate Counter-Clockwise",tooltip:"Rotate Counter-Clockwise",onClick:n,fontSize:20}),l.jsx(le,{icon:l.jsx(Z7,{}),"aria-label":"Rotate Clockwise",tooltip:"Rotate Clockwise",onClick:r,fontSize:20}),l.jsx(le,{icon:l.jsx(Zg,{}),"aria-label":"Flip Horizontally",tooltip:"Flip Horizontally",onClick:e,fontSize:20}),l.jsx(le,{icon:l.jsx(Zg,{style:{transform:"rotate(90deg)"}}),"aria-label":"Flip Vertically",tooltip:"Flip Vertically",onClick:t,fontSize:20}),l.jsx(le,{icon:l.jsx(Jh,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{u(),o()},fontSize:20})]})};function rI({image:e,alt:t,ref:n,styleClass:r,rotation:o,scaleX:s,scaleY:c}){const{centerView:u}=a4();return l.jsx(eI,{wrapperStyle:{width:"100%",height:"100%"},children:l.jsx("img",{style:{transform:`rotate(${o}deg) scaleX(${s}) scaleY(${c})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>u(1,0,"easeOut")})})}const oI=be([Vr,oi],(e,t)=>{const{currentImage:n}=e,{shouldShowImageDetails:r}=t;return{viewerImageToDisplay:n,shouldShowImageDetails:r}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function iI(){const e=Y(),t=O(y=>y.lightbox.isLightboxOpen),{rotation:n,scaleX:r,scaleY:o,flipHorizontally:s,flipVertically:c,rotateCounterClockwise:u,rotateClockwise:f,reset:h}=tI(),{viewerImageToDisplay:p,shouldShowImageDetails:g}=O(oI);return fe("Esc",()=>{t&&e(Ho(!1))},[t]),l.jsx(QP,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:l.jsxs(We,{sx:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",insetInlineStart:0,top:0,zIndex:30,animation:"popIn 0.3s ease-in",bg:"base.800"},children:[l.jsxs(B,{sx:{flexDir:"column",position:"absolute",top:4,insetInlineStart:4,gap:4,zIndex:3},children:[l.jsx(le,{icon:l.jsx(K7,{}),"aria-label":"Exit Viewer",onClick:()=>{e(Ho(!1))},fontSize:20}),l.jsx(nI,{flipHorizontally:s,flipVertically:c,rotateCounterClockwise:u,rotateClockwise:f,reset:h})]}),l.jsxs(B,{children:[l.jsxs($n,{sx:{overflow:"hidden",gridTemplateColumns:"auto max-content",placeItems:"center",width:"100vw",height:"100vh",bg:"base.850"},children:[p&&l.jsxs(l.Fragment,{children:[l.jsx(rI,{rotation:n,scaleX:r,scaleY:o,image:p.url,styleClass:"lightbox-image"}),g&&l.jsx(fp,{image:p})]}),!g&&l.jsx(We,{sx:{position:"absolute",top:0,insetInlineStart:0,w:`calc(100vw - ${8*2*4}px)`,h:"100vh",mx:8,pointerEvents:"none"},children:l.jsx(Gy,{})}),l.jsx(We,{sx:{position:"absolute",top:4},children:l.jsx(Ry,{})})]}),l.jsx(Uy,{})]})]})})}function aI(e){const{menuType:t="icon",iconTooltip:n,buttonText:r,isLazy:o=!0,menuItems:s,menuProps:c,menuButtonProps:u,menuListProps:f,menuItemProps:h}=e,p=()=>{const g=[];return s.forEach((y,S)=>{g.push(l.jsx(pr,{onClick:y.onClick,fontSize:"sm",...h,children:y.item},S))}),g};return l.jsx(zh,{...c,isLazy:o,children:({isOpen:g})=>l.jsxs(l.Fragment,{children:[l.jsx(Nh,{as:t==="icon"?co:ni,tooltip:n,icon:g?l.jsx(S9,{}):l.jsx(b9,{}),paddingX:0,paddingY:t==="regular"?2:0,...u,children:t==="regular"&&r}),l.jsx(Rh,{zIndex:15,padding:0,...f,children:p()})]})})}const sI=be(Pt,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable,currentIteration:e.currentIteration,totalIterations:e.totalIterations,cancelType:e.cancelOptions.cancelType,cancelAfter:e.cancelOptions.cancelAfter}),{memoizeOptions:{resultEqualityCheck:te.isEqual}});function mp(e){const t=Y(),{btnGroupWidth:n="auto",...r}=e,{isProcessing:o,isConnected:s,isCancelable:c,currentIteration:u,totalIterations:f,cancelType:h,cancelAfter:p}=O(sI),g=x.useCallback(()=>{t(nC()),t(dd(null))},[t]),{t:y}=Z(),S=p!==null;fe("shift+x",()=>{(s||o)&&c&&g()},[s,o,c]),x.useEffect(()=>{p!==null&&pt(Nv("immediate"))},{item:y("parameters.cancel.schedule"),onClick:()=>t(Nv("scheduled"))}];return l.jsxs(en,{isAttached:!0,width:n,children:[h==="immediate"?l.jsx(le,{icon:l.jsx(C9,{}),tooltip:y("parameters.cancel.immediate"),"aria-label":y("parameters.cancel.immediate"),isDisabled:!s||!o||!c,onClick:g,colorScheme:"error",...r}):l.jsx(le,{icon:S?l.jsx(oc,{}):l.jsx(d9,{}),tooltip:y(S?"parameters.cancel.isScheduled":"parameters.cancel.schedule"),"aria-label":y(S?"parameters.cancel.isScheduled":"parameters.cancel.schedule"),isDisabled:!s||!o||!c||u===f,onClick:()=>{t(S?dd(null):dd(u))},colorScheme:"error",...r}),l.jsx(aI,{menuItems:C,iconTooltip:y("parameters.cancel.setType"),menuButtonProps:{colorScheme:"error",minWidth:5}})]})}const vp=e=>e.generation;be(vp,({shouldRandomizeSeed:e,shouldGenerateVariations:t})=>e||t,{memoizeOptions:{resultEqualityCheck:te.isEqual}});const s4=be([vp,Pt,zy,Bt],(e,t,n,r)=>{const{prompt:o,shouldGenerateVariations:s,seedWeights:c,initialImage:u,seed:f}=e,{isProcessing:h,isConnected:p}=t;let g=!0;const y=[];return(!o||Boolean(o.match(/^[\s\r\n]+$/)))&&(g=!1,y.push("Missing prompt")),r==="img2img"&&!u&&(g=!1,y.push("No initial image selected")),h&&(g=!1,y.push("System Busy")),p||(g=!1,y.push("System Disconnected")),s&&(!(V1(c)||c==="")||f===-1)&&(g=!1,y.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:y}},{memoizeOptions:{equalityCheck:te.isEqual,resultEqualityCheck:te.isEqual}});function gp(e){const{iconButton:t=!1,...n}=e,r=Y(),{isReady:o}=O(s4),s=O(Bt),c=()=>{r(af(s))},{t:u}=Z();return fe(["ctrl+enter","meta+enter"],()=>{r(U1()),r(af(s))},{enabled:()=>o,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[o,s]),l.jsx(We,{style:{flexGrow:4},children:t?l.jsx(le,{"aria-label":u("parameters.invoke"),type:"submit",icon:l.jsx(V8,{}),isDisabled:!o,onClick:c,flexGrow:1,w:"100%",tooltip:u("parameters.invoke"),tooltipProps:{placement:"bottom"},colorScheme:"accent",...n}):l.jsx(Je,{"aria-label":u("parameters.invoke"),type:"submit",isDisabled:!o,onClick:c,flexGrow:1,w:"100%",colorScheme:"accent",fontWeight:700,...n,children:"Invoke"})})}const Ld={borderStartStartRadius:0,borderEndStartRadius:0},xp=be([Vr,oi,Bt],(e,t,n)=>{const{shouldPinParametersPanel:r,shouldShowParametersPanel:o,shouldHoldParametersPanelOpen:s,shouldUseCanvasBetaLayout:c}=t,{shouldShowGallery:u,shouldPinGallery:f,shouldHoldGalleryOpen:h}=e,p=c&&n==="unifiedCanvas",g=!p&&!(o||s&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),y=!(u||h&&!f)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinParametersPanel:r,shouldShowProcessButtons:!p&&(!r||!o),shouldShowParametersPanelButton:g,shouldShowParametersPanel:o,shouldShowGallery:u,shouldPinGallery:f,shouldShowGalleryButton:y}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),lI=()=>{const e=Y(),{shouldShowParametersPanelButton:t,shouldShowProcessButtons:n,shouldPinParametersPanel:r}=O(xp),o=()=>{e(Wo(!0)),r&&setTimeout(()=>e(on(!0)),400)};return t?l.jsxs(B,{pos:"absolute",transform:"translate(0, -50%)",zIndex:20,minW:8,top:"50%",insetInlineStart:"4.5rem",direction:"column",gap:2,children:[l.jsx(le,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:o,sx:Ld,children:l.jsx(ip,{})}),n&&l.jsxs(l.Fragment,{children:[l.jsx(gp,{iconButton:!0,sx:Ld}),l.jsx(mp,{sx:Ld})]})]}):null},cI=be(Vr,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),uI=()=>{const{resultImages:e,userImages:t}=O(cI);return n=>{const r=e.find(s=>s.uuid===n);if(r)return r;const o=t.find(s=>s.uuid===n);if(o)return o}},dI=be([oi,Ac,Bt],(e,t,n)=>{const{shouldPinParametersPanel:r}=e,{isLightboxOpen:o}=t;return{shouldPinParametersPanel:r,isLightboxOpen:o,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),yp=e=>{const t=Y(),{optionsPanel:n,children:r,...o}=e,{activeTabName:s,isLightboxOpen:c}=O(dI),u=uI(),f=h=>{const p=h.dataTransfer.getData("invokeai/imageUuid"),g=u(p);g&&(s==="img2img"?t(is(g)):s==="unifiedCanvas"&&t(bc(g)))};return l.jsx(We,{...o,pos:"relative",w:"100%",h:"100%",children:l.jsxs(B,{gap:4,h:"100%",children:[n,l.jsx(We,{pos:"relative",w:"100%",h:"100%",onDrop:f,children:r}),!c&&l.jsx(Uy,{})]})})},fI=e=>{const{styleClass:t}=e,n=x.useContext(Kh),r=()=>{n&&n()};return l.jsx(B,{sx:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},className:t,children:l.jsxs(B,{onClick:r,sx:{display:"flex",flexDirection:"column",rowGap:8,p:8,borderRadius:"base",alignItems:"center",justifyContent:"center",textAlign:"center",cursor:"pointer",color:"base.600",bg:"base.800",_hover:{bg:"base.700"}},children:[l.jsx(Jt,{as:Rc,boxSize:24}),l.jsx(Vn,{size:"md",children:"Click or Drag and Drop"})]})})},hI=be([Vr,oi],(e,t)=>{const{currentImage:n,intermediateImage:r}=e,{shouldShowImageDetails:o}=t;return{imageToDisplay:r||n,isIntermediate:Boolean(r),shouldShowImageDetails:o}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function pI(){const{shouldShowImageDetails:e,imageToDisplay:t,isIntermediate:n}=O(hI);return l.jsxs(B,{sx:{position:"relative",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:[t&&l.jsx(ds,{src:t.url,sx:{objectFit:"contain",maxWidth:"100%",maxHeight:"100%",height:"auto",position:"absolute",imageRendering:n?"pixelated":"initial",borderRadius:"base"},...n&&{width:t.width,height:t.height}}),!e&&l.jsx(Gy,{}),e&&t&&l.jsx(fp,{image:t,styleClass:"current-image-metadata"})]})}const mI=be([Vr],e=>{const{currentImage:t,intermediateImage:n}=e;return{hasAnImageToDisplay:t||n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),l4=()=>{const{hasAnImageToDisplay:e}=O(mI);return l.jsx(B,{sx:{flexDirection:"column",height:"100%",width:"100%",rowGap:4,borderRadius:"base"},children:e?l.jsxs(l.Fragment,{children:[l.jsx(Ry,{}),l.jsx(pI,{})]}):l.jsx(B,{sx:{alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:l.jsx(Jt,{as:y9,sx:{boxSize:24,color:"base.500"}})})})},vI=()=>{const e=x.useContext(Kh);return l.jsx(le,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:l.jsx(Rc,{}),onClick:e||void 0})};function gI(){const e=O(s=>s.generation.initialImage),{t}=Z(),n=Y(),r=us(),o=()=>{r({title:t("toast.parametersFailed"),description:t("toast.parametersFailedDesc"),status:"error",isClosable:!0}),n(rC())};return l.jsxs(l.Fragment,{children:[l.jsxs(B,{sx:{alignItems:"center",justifyContent:"center",w:"100%",gap:4},children:[l.jsx(Ce,{sx:{fontSize:"lg"},variant:"subtext",children:t("parameters.initialImage")}),l.jsx(vI,{})]}),e&&l.jsx(B,{sx:{position:"relative",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:l.jsx(ds,{sx:{fit:"contain",maxWidth:"100%",maxHeight:"100%",borderRadius:"base",objectFit:"contain",position:"absolute"},src:typeof e=="string"?e:e.url,onError:o})})]})}const p0={flexDirection:"column",height:"100%",width:"100%",gap:4,padding:4},xI=()=>{const t=O(n=>n.generation.initialImage)?l.jsx(B,{flexDirection:"column",gap:4,w:"100%",h:"100%",children:l.jsx(gI,{})}):l.jsx(fI,{});return l.jsxs($n,{sx:{w:"100%",h:"100%",gridTemplateColumns:"1fr 1fr",borderRadius:"base",bg:"base.850"},children:[l.jsx(B,{sx:{...p0,paddingInlineEnd:2},children:t}),l.jsx(B,{sx:{...p0,paddingInlineStart:2},children:l.jsx(l4,{})})]})};var dn=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(dn||{});const yI=()=>{const{t:e}=Z();return x.useMemo(()=>({[0]:{text:e("tooltip.feature.prompt"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:e("tooltip.feature.gallery"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:e("tooltip.feature.other"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:e("tooltip.feature.seed"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:e("tooltip.feature.variations"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:e("tooltip.feature.upscale"),href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:e("tooltip.feature.faceCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:e("tooltip.feature.imageToImage"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:e("tooltip.feature.boundingBox"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:e("tooltip.feature.seamCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:e("tooltip.feature.infillAndScaling"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}}),[e])},bI=e=>yI()[e];function c4(){const e=O(o=>o.system.isGFPGANAvailable),t=O(o=>o.postprocessing.shouldRunFacetool),n=Y(),r=o=>n(oC(o.target.checked));return l.jsx(En,{isDisabled:!e,isChecked:t,onChange:r})}const u4=()=>{const e=Y(),t=O(o=>o.generation.seamless),n=o=>e(B1(o.target.checked)),{t:r}=Z();return l.jsx(En,{label:r("parameters.seamlessTiling"),fontSize:"md",isChecked:t,onChange:n})},SI=()=>l.jsx(Le,{gap:2,alignItems:"stretch",children:l.jsx(u4,{})});function bp(){const e=O(s=>s.generation.horizontalSymmetrySteps),t=O(s=>s.generation.verticalSymmetrySteps),n=O(s=>s.generation.steps),r=Y(),{t:o}=Z();return l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(ut,{label:o("parameters.hSymmetryStep"),value:e,onChange:s=>r(Fv(s)),min:0,max:n,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>r(Fv(0))}),l.jsx(ut,{label:o("parameters.vSymmetryStep"),value:t,onChange:s=>r(Lv(s)),min:0,max:n,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>r(Lv(0))})]})}function Sp(){const e=O(n=>n.generation.shouldUseSymmetry),t=Y();return l.jsx(En,{isChecked:e,onChange:n=>t(iC(n.target.checked))})}function CI(){const e=Y(),t=O(r=>r.generation.perlin),{t:n}=Z();return l.jsx(ut,{label:n("parameters.perlinNoise"),min:0,max:1,step:.05,onChange:r=>e(tf(r)),handleReset:()=>e(tf(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0})}function wI(){const e=Y(),{t}=Z(),n=O(o=>o.generation.shouldRandomizeSeed),r=o=>e(aC(o.target.checked));return l.jsx(En,{label:t("parameters.randomizeSeed"),isChecked:n,onChange:r})}const m0=/^-?(0\.)?\.?$/,Lr=e=>{const{label:t,isDisabled:n=!1,showStepper:r=!0,isInvalid:o,value:s,onChange:c,min:u,max:f,isInteger:h=!0,formControlProps:p,formLabelProps:g,numberInputFieldProps:y,numberInputStepperProps:S,tooltipProps:C,...w}=e,[k,j]=x.useState(String(s));x.useEffect(()=>{!k.match(m0)&&s!==Number(k)&&j(String(s))},[s,k]);const M=I=>{j(I),I.match(m0)||c(h?Math.floor(Number(I)):Number(I))},P=I=>{const T=te.clamp(h?Math.floor(Number(I.target.value)):Number(I.target.value),u,f);j(String(T)),c(T)};return l.jsx(Yt,{...C,children:l.jsxs(rt,{isDisabled:n,isInvalid:o,...p,children:[t&&l.jsx(st,{...g,children:t}),l.jsxs(Lh,{value:k,min:u,max:f,keepWithinRange:!0,clampValueOnBlur:!1,onChange:M,onBlur:P,...w,children:[l.jsx(Hh,{...y}),r&&l.jsxs(Bh,{children:[l.jsx(Vh,{...S}),l.jsx(Wh,{...S})]})]})]})})};function kI(){const e=Y(),t=O(o=>o.generation.shouldRandomizeSeed),{t:n}=Z(),r=()=>e(as(sC(G1,$1)));return l.jsx(ni,{size:"sm",isDisabled:t,onClick:r,padding:"0 1.5rem",children:l.jsx("p",{children:n("parameters.shuffle")})})}function jI(){const e=O(c=>c.generation.seed),t=O(c=>c.generation.shouldRandomizeSeed),n=O(c=>c.generation.shouldGenerateVariations),{t:r}=Z(),o=Y(),s=c=>o(as(c));return l.jsxs(sa,{gap:2,children:[l.jsx(Lr,{label:r("parameters.seed"),step:1,precision:0,flexGrow:1,min:G1,max:$1,isDisabled:t,isInvalid:e<0&&n,onChange:s,value:e,formControlProps:{display:"flex",alignItems:"center",gap:3}}),l.jsx(kI,{})]})}function EI(){const e=Y(),t=O(r=>r.generation.threshold),{t:n}=Z();return l.jsx(ut,{label:n("parameters.noiseThreshold"),min:0,max:20,step:.1,onChange:r=>e(ef(r)),handleReset:()=>e(ef(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0})}const Cp=()=>l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(wI,{}),l.jsx(jI,{}),l.jsx(EI,{}),l.jsx(CI,{})]});function d4(){const e=O(o=>o.system.isESRGANAvailable),t=O(o=>o.postprocessing.shouldRunESRGAN),n=Y(),r=o=>n(lC(o.target.checked));return l.jsx(En,{isDisabled:!e,isChecked:t,onChange:r})}function wp(){const e=O(r=>r.generation.shouldGenerateVariations),t=Y(),n=r=>t(cC(r.target.checked));return l.jsx(En,{isChecked:e,width:"auto",onChange:n})}function mt(e){const{label:t="",isDisabled:n=!1,isInvalid:r,formControlProps:o,...s}=e;return l.jsxs(rt,{isInvalid:r,isDisabled:n,...o,children:[t!==""&&l.jsx(st,{children:t}),l.jsx(Ch,{...s})]})}function PI(){const e=O(s=>s.generation.seedWeights),t=O(s=>s.generation.shouldGenerateVariations),{t:n}=Z(),r=Y(),o=s=>r(L1(s.target.value));return l.jsx(mt,{label:n("parameters.seedWeights"),value:e,isInvalid:t&&!(V1(e)||e===""),isDisabled:!t,onChange:o})}function II(){const e=O(o=>o.generation.variationAmount),t=O(o=>o.generation.shouldGenerateVariations),{t:n}=Z(),r=Y();return l.jsx(ut,{label:n("parameters.variationAmount"),value:e,step:.01,min:0,max:1,isSliderDisabled:!t,isInputDisabled:!t,isResetDisabled:!t,onChange:o=>r(Bv(o)),handleReset:()=>r(Bv(.1)),withInput:!0,withReset:!0,withSliderMarks:!0})}const kp=()=>l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(II,{}),l.jsx(PI,{})]});function v0(){const e=Y(),t=O(s=>s.generation.cfgScale),n=O(s=>s.ui.shouldUseSliders),{t:r}=Z(),o=s=>e(rf(s));return n?l.jsx(ut,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:30,onChange:o,handleReset:()=>e(rf(7.5)),value:t,sliderNumberInputProps:{max:200},withInput:!0,withReset:!0,withSliderMarks:!0}):l.jsx(Lr,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:200,onChange:o,value:t,isInteger:!1,numberInputFieldProps:{textAlign:"center"}})}function g0(){const e=O(s=>s.generation.height),t=O(s=>s.ui.shouldUseSliders),n=O(Bt),r=Y(),{t:o}=Z();return t?l.jsx(ut,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:o("parameters.height"),value:e,min:64,step:64,max:2048,onChange:s=>r(Vl(s)),handleReset:()=>r(Vl(512)),withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:15360}}):l.jsx(Mn,{isDisabled:n==="unifiedCanvas",label:o("parameters.height"),value:e,flexGrow:1,onChange:s=>r(Vl(Number(s.target.value))),validValues:uC})}function x0(){const e=O(s=>s.generation.iterations),t=O(s=>s.ui.shouldUseSliders),n=Y(),{t:r}=Z(),o=s=>n(Hv(s));return t?l.jsx(ut,{label:r("parameters.images"),step:1,min:1,max:16,onChange:o,handleReset:()=>n(Hv(1)),value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:9999}}):l.jsx(Lr,{label:r("parameters.images"),step:1,min:1,max:9999,onChange:o,value:e,numberInputFieldProps:{textAlign:"center"}})}function y0(){const e=O(s=>s.generation.sampler),t=O(Sy),n=Y(),{t:r}=Z(),o=s=>n(F1(s.target.value));return l.jsx(Mn,{label:r("parameters.sampler"),value:e,onChange:o,validValues:t.format==="diffusers"?dC:fC,minWidth:36})}function b0(){const e=Y(),t=O(c=>c.generation.steps),n=O(c=>c.ui.shouldUseSliders),{t:r}=Z(),o=c=>{e(nf(c))},s=()=>{e(U1())};return n?l.jsx(ut,{label:r("parameters.steps"),min:1,step:1,onChange:o,handleReset:()=>e(nf(20)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:9999}}):l.jsx(Lr,{label:r("parameters.steps"),min:1,max:9999,step:1,onChange:o,value:t,numberInputFieldProps:{textAlign:"center"},onBlur:s})}function S0(){const e=O(s=>s.generation.width),t=O(s=>s.ui.shouldUseSliders),n=O(Bt),{t:r}=Z(),o=Y();return t?l.jsx(ut,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,min:64,step:64,max:2048,onChange:s=>o(Wl(s)),handleReset:()=>o(Wl(512)),withInput:!0,withReset:!0,withSliderMarks:!0,inputReadOnly:!0,sliderNumberInputProps:{max:15360}}):l.jsx(Mn,{isDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,flexGrow:1,onChange:s=>o(Wl(Number(s.target.value))),validValues:hC})}function jp(){return O(t=>t.ui.shouldUseSliders)?l.jsxs(Le,{gap:2,children:[l.jsx(x0,{}),l.jsx(b0,{}),l.jsx(v0,{}),l.jsx(S0,{}),l.jsx(g0,{}),l.jsx(y0,{})]}):l.jsxs(B,{rowGap:2,flexDirection:"column",children:[l.jsxs(B,{columnGap:1,children:[l.jsx(x0,{}),l.jsx(b0,{}),l.jsx(v0,{})]}),l.jsxs(B,{columnGap:1,children:[l.jsx(S0,{}),l.jsx(g0,{}),l.jsx(y0,{})]})]})}const MI=be(Pt,e=>e.shouldDisplayGuides),TI=({children:e,feature:t})=>{const n=O(MI),{text:r}=bI(t);return n?l.jsxs(Gh,{trigger:"hover",children:[l.jsx($h,{children:l.jsx(We,{children:e})}),l.jsxs(Yh,{maxWidth:"400px",onClick:o=>o.preventDefault(),cursor:"initial",children:[l.jsx(qh,{}),l.jsx(Kx,{children:r})]})]}):null},_I=he(({feature:e,icon:t=f9},n)=>l.jsx(TI,{feature:e,children:l.jsx(We,{ref:n,children:l.jsx(Jt,{marginBottom:"-.15rem",as:t})})}));function DI(e){const{header:t,feature:n,content:r,additionalHeaderComponents:o}=e;return l.jsxs(Ni,{children:[l.jsx(zi,{children:l.jsxs(B,{width:"100%",gap:2,align:"center",children:[l.jsx(We,{flexGrow:1,textAlign:"start",children:t}),o,n&&l.jsx(_I,{feature:n}),l.jsx(Ri,{})]})}),l.jsx(Li,{children:r})]})}const Ep=e=>{const{accordionInfo:t}=e,n=O(c=>c.system.openAccordions),r=Y(),o=c=>r(pC(c)),s=()=>{const c=[];return t&&Object.keys(t).forEach(u=>{const{header:f,feature:h,content:p,additionalHeaderComponents:g}=t[u];c.push(l.jsx(DI,{header:f,feature:h,content:p,additionalHeaderComponents:g},u))}),c};return l.jsx(sh,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:o,children:s()})},OI=be(np,({shouldLoopback:e})=>e),AI=()=>{const e=Y(),t=O(OI),{t:n}=Z();return l.jsx(le,{"aria-label":n("parameters.toggleLoopback"),tooltip:n("parameters.toggleLoopback"),isChecked:t,icon:l.jsx($8,{}),onClick:()=>{e(mC(!t))}})},Pp=()=>{const e=O(Bt);return l.jsxs(B,{gap:2,children:[l.jsx(gp,{}),e==="img2img"&&l.jsx(AI,{}),l.jsx(mp,{})]})},Ip=()=>{const e=O(r=>r.generation.negativePrompt),t=Y(),{t:n}=Z();return l.jsx(rt,{children:l.jsx(Xh,{id:"negativePrompt",name:"negativePrompt",value:e,onChange:r=>t(O1(r.target.value)),placeholder:n("parameters.negativePrompts"),_focusVisible:{borderColor:"error.600"},fontSize:"sm"})})},zI=be([e=>e.generation,Bt],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:te.isEqual}}),Mp=()=>{const e=Y(),{prompt:t,activeTabName:n}=O(zI),{isReady:r}=O(s4),o=x.useRef(null),{t:s}=Z(),c=f=>{e(D1(f.target.value))};fe("alt+a",()=>{var f;(f=o.current)==null||f.focus()},[]);const u=f=>{f.key==="Enter"&&f.shiftKey===!1&&r&&(f.preventDefault(),e(af(n)))};return l.jsx(We,{children:l.jsx(rt,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:l.jsx(Xh,{id:"prompt",name:"prompt",placeholder:s("parameters.promptPlaceholder"),value:t,onChange:c,onKeyDown:u,resize:"vertical",ref:o,minH:40})})})},RI=""+new URL("logo-13003d72.png",import.meta.url).href,f4=()=>{const e=O(t=>t.system.app_version);return l.jsxs(B,{alignItems:"center",gap:3,ps:1,children:[l.jsx(ds,{src:RI,alt:"invoke-ai-logo",w:"32px",h:"32px"}),l.jsxs(Ce,{fontSize:"xl",children:["invoke ",l.jsx("strong",{children:"ai"})]}),l.jsx(Ce,{sx:{fontWeight:300,marginTop:1},variant:"subtext",children:e})]})};const NI=be(oi,e=>{const{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:o}=e;return{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:o}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),Tp=e=>{const t=Y(),{direction:n}=ei(),{shouldShowParametersPanel:r,shouldHoldParametersPanelOpen:o,shouldPinParametersPanel:s}=O(NI),c=x.useRef(null),u=x.useRef(null),f=x.useRef(null),{children:h}=e,{t:p}=Z();fe("o",()=>{t(Wo(!r)),s&&setTimeout(()=>t(on(!0)),400)},[r,s]),fe("esc",()=>{t(Wo(!1))},{enabled:()=>!s,preventDefault:!0},[s]),fe("shift+o",()=>{C(),t(on(!0))},[s]);const g=x.useCallback(()=>{s||(t(vC(u.current?u.current.scrollTop:0)),t(Wo(!1)),t(gC(!1)))},[t,s]),y=()=>{f.current=window.setTimeout(()=>g(),500)},S=()=>{f.current&&window.clearTimeout(f.current)},C=()=>{t(xC(!s)),t(on(!0))};return x.useEffect(()=>{function w(k){c.current&&!c.current.contains(k.target)&&g()}return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},[g]),l.jsx(Wy,{nodeRef:c,in:r||o&&!s,unmountOnExit:!0,timeout:200,classNames:`${n}-parameters-panel-transition`,children:l.jsx(We,{className:`${n}-parameters-panel-transition`,tabIndex:1,ref:c,onMouseEnter:s?void 0:S,onMouseOver:s?void 0:S,sx:{borderInlineEndWidth:s?0:5,borderInlineEndStyle:"solid",bg:"base.900",borderColor:"base.700",height:A9,width:Al,maxWidth:Al,flexShrink:0,position:"relative",overflowY:"scroll",overflowX:"hidden",...h2,...!s&&{zIndex:20,position:"fixed",top:0,insetInlineStart:0,width:`calc(${Al} + 2rem)`,maxWidth:`calc(${Al} + 2rem)`,height:"100%"}},children:l.jsx(We,{sx:{margin:!s&&4},children:l.jsxs(B,{ref:u,onMouseLeave:w=>{w.target!==u.current?S():!s&&y()},sx:{display:"flex",flexDirection:"column",rowGap:2,height:"100%"},children:[l.jsx(Yt,{label:p("common.pinOptionsPanel"),children:l.jsx(We,{onClick:C,sx:{position:"absolute",cursor:"pointer",padding:2,top:4,insetInlineEnd:4,zIndex:20,...s&&{top:0,insetInlineEnd:0}},children:l.jsx(Jt,{sx:{opacity:.2},as:s?Fy:Ly})})}),!s&&l.jsx(We,{sx:{pt:dp,pb:2},children:l.jsx(f4,{})}),h]})})})})};function FI(){const e=Y(),t=O(o=>o.generation.shouldFitToWidthHeight),n=o=>e(W1(o.target.checked)),{t:r}=Z();return l.jsx(En,{label:r("parameters.imageFit"),isChecked:t,onChange:n})}function h4(e){const{t}=Z(),{label:n=`${t("parameters.strength")}`}=e,r=O(u=>u.generation.img2imgStrength),o=Y(),s=u=>o(of(u)),c=()=>{o(of(.75))};return l.jsx(ut,{label:n,step:.01,min:.01,max:1,onChange:s,value:r,isInteger:!1,withInput:!0,withSliderMarks:!0,inputWidth:22,withReset:!0,handleReset:c})}function LI(){const{t:e}=Z();return l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(h4,{label:e("parameters.img2imgStrength")}),l.jsx(FI,{})]})}function BI(){const{t:e}=Z(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:l.jsx(jp,{})},imageToImage:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:l.jsx(LI,{})},seed:{header:`${e("parameters.seed")}`,feature:dn.SEED,content:l.jsx(Cp,{})},variations:{header:`${e("parameters.variations")}`,feature:dn.VARIATIONS,content:l.jsx(kp,{}),additionalHeaderComponents:l.jsx(wp,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:dn.FACE_CORRECTION,content:l.jsx(ep,{}),additionalHeaderComponents:l.jsx(c4,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:dn.UPSCALE,content:l.jsx(tp,{}),additionalHeaderComponents:l.jsx(d4,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:l.jsx(bp,{}),additionalHeaderComponents:l.jsx(Sp,{})},other:{header:`${e("parameters.otherOptions")}`,feature:dn.OTHER,content:l.jsx(SI,{})}};return l.jsxs(Tp,{children:[l.jsxs(B,{flexDir:"column",rowGap:2,children:[l.jsx(Mp,{}),l.jsx(Ip,{})]}),l.jsx(Pp,{}),l.jsx(Ep,{accordionInfo:t})]})}function HI(){return l.jsx(yp,{optionsPanel:l.jsx(BI,{}),children:l.jsx(xI,{})})}const WI=()=>l.jsx(We,{sx:{width:"100%",height:"100%",borderRadius:"base",bg:"base.850"},children:l.jsx(B,{sx:{p:4,width:"100%",height:"100%"},children:l.jsx(l4,{})})}),VI=be([np],({hiresFix:e,hiresStrength:t})=>({hiresFix:e,hiresStrength:t}),{memoizeOptions:{resultEqualityCheck:te.isEqual}}),UI=()=>{const{hiresFix:e,hiresStrength:t}=O(VI),n=Y(),{t:r}=Z(),o=c=>{n(Wv(c))},s=()=>{n(Wv(.75))};return l.jsx(ut,{label:r("parameters.hiresStrength"),step:.01,min:.01,max:.99,onChange:o,value:t,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})},$I=()=>{const e=Y(),t=O(o=>o.postprocessing.hiresFix),{t:n}=Z(),r=o=>e(H1(o.target.checked));return l.jsx(En,{label:n("parameters.hiresOptim"),fontSize:"md",isChecked:t,onChange:r})},GI=()=>l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(u4,{}),l.jsx($I,{}),l.jsx(UI,{})]});function qI(){const{t:e}=Z(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:l.jsx(jp,{})},seed:{header:`${e("parameters.seed")}`,feature:dn.SEED,content:l.jsx(Cp,{})},variations:{header:`${e("parameters.variations")}`,feature:dn.VARIATIONS,content:l.jsx(kp,{}),additionalHeaderComponents:l.jsx(wp,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:dn.FACE_CORRECTION,content:l.jsx(ep,{}),additionalHeaderComponents:l.jsx(c4,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:dn.UPSCALE,content:l.jsx(tp,{}),additionalHeaderComponents:l.jsx(d4,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:l.jsx(bp,{}),additionalHeaderComponents:l.jsx(Sp,{})},other:{header:`${e("parameters.otherOptions")}`,feature:dn.OTHER,content:l.jsx(GI,{})}};return l.jsxs(Tp,{children:[l.jsxs(B,{flexDir:"column",rowGap:2,children:[l.jsx(Mp,{}),l.jsx(Ip,{})]}),l.jsx(Pp,{}),l.jsx(Ep,{accordionInfo:t})]})}function YI(){return l.jsx(yp,{optionsPanel:l.jsx(qI,{}),children:l.jsx(WI,{})})}var Af={},XI={get exports(){return Af},set exports(e){Af=e}};/** + * @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 KI=function(t){var n={},r=x,o=Ul,s=Object.assign;function c(i){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;dA||v[E]!==b[A]){var W=` +`+v[E].replace(" at new "," at ");return i.displayName&&W.includes("")&&(W=W.replace("",i.displayName)),W}while(1<=E&&0<=A);break}}}finally{eu=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?ha(i):""}var Wb=Object.prototype.hasOwnProperty,nu=[],di=-1;function Gr(i){return{current:i}}function bt(i){0>di||(i.current=nu[di],nu[di]=null,di--)}function gt(i,a){di++,nu[di]=i.current,i.current=a}var qr={},an=Gr(qr),gn=Gr(!1),Co=qr;function fi(i,a){var d=i.type.contextTypes;if(!d)return qr;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===a)return m.__reactInternalMemoizedMaskedChildContext;var v={},b;for(b in d)v[b]=a[b];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=a,i.__reactInternalMemoizedMaskedChildContext=v),v}function xn(i){return i=i.childContextTypes,i!=null}function js(){bt(gn),bt(an)}function Zp(i,a,d){if(an.current!==qr)throw Error(c(168));gt(an,a),gt(gn,d)}function Jp(i,a,d){var m=i.stateNode;if(a=a.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var v in m)if(!(v in a))throw Error(c(108,z(i)||"Unknown",v));return s({},d,m)}function Es(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||qr,Co=an.current,gt(an,i),gt(gn,gn.current),!0}function em(i,a,d){var m=i.stateNode;if(!m)throw Error(c(169));d?(i=Jp(i,a,Co),m.__reactInternalMemoizedMergedChildContext=i,bt(gn),bt(an),gt(an,i)):bt(gn),gt(gn,d)}var Xn=Math.clz32?Math.clz32:$b,Vb=Math.log,Ub=Math.LN2;function $b(i){return i>>>=0,i===0?32:31-(Vb(i)/Ub|0)|0}var Ps=64,Is=4194304;function pa(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Ms(i,a){var d=i.pendingLanes;if(d===0)return 0;var m=0,v=i.suspendedLanes,b=i.pingedLanes,E=d&268435455;if(E!==0){var A=E&~v;A!==0?m=pa(A):(b&=E,b!==0&&(m=pa(b)))}else E=d&~v,E!==0?m=pa(E):b!==0&&(m=pa(b));if(m===0)return 0;if(a!==0&&a!==m&&!(a&v)&&(v=m&-m,b=a&-a,v>=b||v===16&&(b&4194240)!==0))return a;if(m&4&&(m|=d&16),a=i.entangledLanes,a!==0)for(i=i.entanglements,a&=m;0d;d++)a.push(i);return a}function ma(i,a,d){i.pendingLanes|=a,a!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,a=31-Xn(a),i[a]=d}function Yb(i,a){var d=i.pendingLanes&~a;i.pendingLanes=a,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=a,i.mutableReadLanes&=a,i.entangledLanes&=a,a=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0>=E,v-=E,Er=1<<32-Xn(a)+v|d<it?(Zt=$e,$e=null):Zt=$e.sibling;var at=ye(H,$e,G[it],Se);if(at===null){$e===null&&($e=Zt);break}i&&$e&&at.alternate===null&&a(H,$e),R=b(at,R,it),Xe===null?Oe=at:Xe.sibling=at,Xe=at,$e=Zt}if(it===G.length)return d(H,$e),It&&ko(H,it),Oe;if($e===null){for(;itit?(Zt=$e,$e=null):Zt=$e.sibling;var to=ye(H,$e,at.value,Se);if(to===null){$e===null&&($e=Zt);break}i&&$e&&to.alternate===null&&a(H,$e),R=b(to,R,it),Xe===null?Oe=to:Xe.sibling=to,Xe=to,$e=Zt}if(at.done)return d(H,$e),It&&ko(H,it),Oe;if($e===null){for(;!at.done;it++,at=G.next())at=Ue(H,at.value,Se),at!==null&&(R=b(at,R,it),Xe===null?Oe=at:Xe.sibling=at,Xe=at);return It&&ko(H,it),Oe}for($e=m(H,$e);!at.done;it++,at=G.next())at=St($e,H,it,at.value,Se),at!==null&&(i&&at.alternate!==null&&$e.delete(at.key===null?it:at.key),R=b(at,R,it),Xe===null?Oe=at:Xe.sibling=at,Xe=at);return i&&$e.forEach(function(OS){return a(H,OS)}),It&&ko(H,it),Oe}function _r(H,R,G,Se){if(typeof G=="object"&&G!==null&&G.type===p&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case f:e:{for(var Oe=G.key,Xe=R;Xe!==null;){if(Xe.key===Oe){if(Oe=G.type,Oe===p){if(Xe.tag===7){d(H,Xe.sibling),R=v(Xe,G.props.children),R.return=H,H=R;break e}}else if(Xe.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===P&&ym(Oe)===Xe.type){d(H,Xe.sibling),R=v(Xe,G.props),R.ref=ga(H,Xe,G),R.return=H,H=R;break e}d(H,Xe);break}else a(H,Xe);Xe=Xe.sibling}G.type===p?(R=_o(G.props.children,H.mode,Se,G.key),R.return=H,H=R):(Se=hl(G.type,G.key,G.props,null,H.mode,Se),Se.ref=ga(H,R,G),Se.return=H,H=Se)}return E(H);case h:e:{for(Xe=G.key;R!==null;){if(R.key===Xe)if(R.tag===4&&R.stateNode.containerInfo===G.containerInfo&&R.stateNode.implementation===G.implementation){d(H,R.sibling),R=v(R,G.children||[]),R.return=H,H=R;break e}else{d(H,R);break}else a(H,R);R=R.sibling}R=ud(G,H.mode,Se),R.return=H,H=R}return E(H);case P:return Xe=G._init,_r(H,R,Xe(G._payload),Se)}if(re(G))return ft(H,R,G,Se);if(D(G))return Cn(H,R,G,Se);Hs(H,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,R!==null&&R.tag===6?(d(H,R.sibling),R=v(R,G),R.return=H,H=R):(d(H,R),R=cd(G,H.mode,Se),R.return=H,H=R),E(H)):d(H,R)}return _r}var xi=bm(!0),Sm=bm(!1),xa={},Rn=Gr(xa),ya=Gr(xa),yi=Gr(xa);function lr(i){if(i===xa)throw Error(c(174));return i}function wu(i,a){gt(yi,a),gt(ya,i),gt(Rn,xa),i=U(a),bt(Rn),gt(Rn,i)}function bi(){bt(Rn),bt(ya),bt(yi)}function Cm(i){var a=lr(yi.current),d=lr(Rn.current);a=K(d,i.type,a),d!==a&&(gt(ya,i),gt(Rn,a))}function ku(i){ya.current===i&&(bt(Rn),bt(ya))}var _t=Gr(0);function Ws(i){for(var a=i;a!==null;){if(a.tag===13){var d=a.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||Qp(d)||Zc(d)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if(a.flags&128)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ju=[];function Eu(){for(var i=0;id?d:4,i(!0);var m=Pu.transition;Pu.transition={};try{i(!1),a()}finally{ot=d,Pu.transition=m}}function Bm(){return Nn().memoizedState}function aS(i,a,d){var m=Zr(i);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},Hm(i))Wm(a,d);else if(d=dm(i,a,d,m),d!==null){var v=un();Fn(d,i,m,v),Vm(d,a,m)}}function sS(i,a,d){var m=Zr(i),v={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(Hm(i))Wm(a,v);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var E=a.lastRenderedState,A=b(E,d);if(v.hasEagerState=!0,v.eagerState=A,Kn(A,E)){var W=a.interleaved;W===null?(v.next=v,yu(a)):(v.next=W.next,W.next=v),a.interleaved=v;return}}catch{}finally{}d=dm(i,a,v,m),d!==null&&(v=un(),Fn(d,i,m,v),Vm(d,a,m))}}function Hm(i){var a=i.alternate;return i===Dt||a!==null&&a===Dt}function Wm(i,a){ba=Us=!0;var d=i.pending;d===null?a.next=a:(a.next=d.next,d.next=a),i.pending=a}function Vm(i,a,d){if(d&4194240){var m=a.lanes;m&=i.pendingLanes,d|=m,a.lanes=d,iu(i,d)}}var qs={readContext:zn,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},lS={readContext:zn,useCallback:function(i,a){return cr().memoizedState=[i,a===void 0?null:a],i},useContext:zn,useEffect:Dm,useImperativeHandle:function(i,a,d){return d=d!=null?d.concat([i]):null,$s(4194308,4,zm.bind(null,a,i),d)},useLayoutEffect:function(i,a){return $s(4194308,4,i,a)},useInsertionEffect:function(i,a){return $s(4,2,i,a)},useMemo:function(i,a){var d=cr();return a=a===void 0?null:a,i=i(),d.memoizedState=[i,a],i},useReducer:function(i,a,d){var m=cr();return a=d!==void 0?d(a):a,m.memoizedState=m.baseState=a,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:a},m.queue=i,i=i.dispatch=aS.bind(null,Dt,i),[m.memoizedState,i]},useRef:function(i){var a=cr();return i={current:i},a.memoizedState=i},useState:Tm,useDebugValue:Au,useDeferredValue:function(i){return cr().memoizedState=i},useTransition:function(){var i=Tm(!1),a=i[0];return i=iS.bind(null,i[1]),cr().memoizedState=i,[a,i]},useMutableSource:function(){},useSyncExternalStore:function(i,a,d){var m=Dt,v=cr();if(It){if(d===void 0)throw Error(c(407));d=d()}else{if(d=a(),Qt===null)throw Error(c(349));Eo&30||jm(m,a,d)}v.memoizedState=d;var b={value:d,getSnapshot:a};return v.queue=b,Dm(Pm.bind(null,m,b,i),[i]),m.flags|=2048,wa(9,Em.bind(null,m,b,d,a),void 0,null),d},useId:function(){var i=cr(),a=Qt.identifierPrefix;if(It){var d=Pr,m=Er;d=(m&~(1<<32-Xn(m)-1)).toString(32)+d,a=":"+a+"R"+d,d=Sa++,0td&&(a.flags|=128,m=!0,Ea(v,!1),a.lanes=4194304)}else{if(!m)if(i=Ws(b),i!==null){if(a.flags|=128,m=!0,i=i.updateQueue,i!==null&&(a.updateQueue=i,a.flags|=4),Ea(v,!0),v.tail===null&&v.tailMode==="hidden"&&!b.alternate&&!It)return ln(a),null}else 2*Xt()-v.renderingStartTime>td&&d!==1073741824&&(a.flags|=128,m=!0,Ea(v,!1),a.lanes=4194304);v.isBackwards?(b.sibling=a.child,a.child=b):(i=v.last,i!==null?i.sibling=b:a.child=b,v.last=b)}return v.tail!==null?(a=v.tail,v.rendering=a,v.tail=a.sibling,v.renderingStartTime=Xt(),a.sibling=null,i=_t.current,gt(_t,m?i&1|2:i&1),a):(ln(a),null);case 22:case 23:return ad(),d=a.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(a.flags|=8192),d&&a.mode&1?_n&1073741824&&(ln(a),ve&&a.subtreeFlags&6&&(a.flags|=8192)):ln(a),null;case 24:return null;case 25:return null}throw Error(c(156,a.tag))}function vS(i,a){switch(du(a),a.tag){case 1:return xn(a.type)&&js(),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return bi(),bt(gn),bt(an),Eu(),i=a.flags,i&65536&&!(i&128)?(a.flags=i&-65537|128,a):null;case 5:return ku(a),null;case 13:if(bt(_t),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(c(340));mi()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return bt(_t),null;case 4:return bi(),null;case 10:return gu(a.type._context),null;case 22:case 23:return ad(),null;case 24:return null;default:return null}}var Zs=!1,cn=!1,gS=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ci(i,a){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){Mt(i,a,m)}else d.current=null}function Vu(i,a,d){try{d()}catch(m){Mt(i,a,m)}}var lv=!1;function xS(i,a){for(ne(i.containerInfo),we=a;we!==null;)if(i=we,a=i.child,(i.subtreeFlags&1028)!==0&&a!==null)a.return=i,we=a;else for(;we!==null;){i=we;try{var d=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(d!==null){var m=d.memoizedProps,v=d.memoizedState,b=i.stateNode,E=b.getSnapshotBeforeUpdate(i.elementType===i.type?m:Zn(i.type,m),v);b.__reactInternalSnapshotBeforeUpdate=E}break;case 3:ve&&So(i.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(c(163))}}catch(A){Mt(i,i.return,A)}if(a=i.sibling,a!==null){a.return=i.return,we=a;break}we=i.return}return d=lv,lv=!1,d}function Pa(i,a,d){var m=a.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var v=m=m.next;do{if((v.tag&i)===i){var b=v.destroy;v.destroy=void 0,b!==void 0&&Vu(a,d,b)}v=v.next}while(v!==m)}}function Js(i,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var d=a=a.next;do{if((d.tag&i)===i){var m=d.create;d.destroy=m()}d=d.next}while(d!==a)}}function Uu(i){var a=i.ref;if(a!==null){var d=i.stateNode;switch(i.tag){case 5:i=ie(d);break;default:i=d}typeof a=="function"?a(i):a.current=i}}function cv(i){var a=i.alternate;a!==null&&(i.alternate=null,cv(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&Ve(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function uv(i){return i.tag===5||i.tag===3||i.tag===4}function dv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||uv(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function $u(i,a,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?hn(d,i,a):He(d,i);else if(m!==4&&(i=i.child,i!==null))for($u(i,a,d),i=i.sibling;i!==null;)$u(i,a,d),i=i.sibling}function Gu(i,a,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?De(d,i,a):ee(d,i);else if(m!==4&&(i=i.child,i!==null))for(Gu(i,a,d),i=i.sibling;i!==null;)Gu(i,a,d),i=i.sibling}var tn=null,Jn=!1;function dr(i,a,d){for(d=d.child;d!==null;)qu(i,a,d),d=d.sibling}function qu(i,a,d){if(ir&&typeof ir.onCommitFiberUnmount=="function")try{ir.onCommitFiberUnmount(Ts,d)}catch{}switch(d.tag){case 5:cn||Ci(d,a);case 6:if(ve){var m=tn,v=Jn;tn=null,dr(i,a,d),tn=m,Jn=v,tn!==null&&(Jn?pn(tn,d.stateNode):$t(tn,d.stateNode))}else dr(i,a,d);break;case 18:ve&&tn!==null&&(Jn?Fb(tn,d.stateNode):Nb(tn,d.stateNode));break;case 4:ve?(m=tn,v=Jn,tn=d.stateNode.containerInfo,Jn=!0,dr(i,a,d),tn=m,Jn=v):(_e&&(m=d.stateNode.containerInfo,v=qp(m),Qc(m,v)),dr(i,a,d));break;case 0:case 11:case 14:case 15:if(!cn&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){v=m=m.next;do{var b=v,E=b.destroy;b=b.tag,E!==void 0&&(b&2||b&4)&&Vu(d,a,E),v=v.next}while(v!==m)}dr(i,a,d);break;case 1:if(!cn&&(Ci(d,a),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(A){Mt(d,a,A)}dr(i,a,d);break;case 21:dr(i,a,d);break;case 22:d.mode&1?(cn=(m=cn)||d.memoizedState!==null,dr(i,a,d),cn=m):dr(i,a,d);break;default:dr(i,a,d)}}function fv(i){var a=i.updateQueue;if(a!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new gS),a.forEach(function(m){var v=PS.bind(null,i,m);d.has(m)||(d.add(m),m.then(v,v))})}}function er(i,a){var d=a.deletions;if(d!==null)for(var m=0;m";case tl:return":has("+(Ku(i)||"")+")";case nl:return'[role="'+i.value+'"]';case ol:return'"'+i.value+'"';case rl:return'[data-testname="'+i.value+'"]';default:throw Error(c(365))}}function xv(i,a){var d=[];i=[i,0];for(var m=0;mv&&(v=E),m&=~b}if(m=v,m=Xt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*bS(m/1960))-m,10i?16:i,Qr===null)var m=!1;else{if(i=Qr,Qr=null,cl=0,Ke&6)throw Error(c(331));var v=Ke;for(Ke|=4,we=i.current;we!==null;){var b=we,E=b.child;if(we.flags&16){var A=b.deletions;if(A!==null){for(var W=0;WXt()-ed?Io(i,0):Ju|=d),Sn(i,a)}function Pv(i,a){a===0&&(i.mode&1?(a=Is,Is<<=1,!(Is&130023424)&&(Is=4194304)):a=1);var d=un();i=sr(i,a),i!==null&&(ma(i,a,d),Sn(i,d))}function ES(i){var a=i.memoizedState,d=0;a!==null&&(d=a.retryLane),Pv(i,d)}function PS(i,a){var d=0;switch(i.tag){case 13:var m=i.stateNode,v=i.memoizedState;v!==null&&(d=v.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(c(314))}m!==null&&m.delete(a),Pv(i,d)}var Iv;Iv=function(i,a,d){if(i!==null)if(i.memoizedProps!==a.pendingProps||gn.current)yn=!0;else{if(!(i.lanes&d)&&!(a.flags&128))return yn=!1,pS(i,a,d);yn=!!(i.flags&131072)}else yn=!1,It&&a.flags&1048576&&im(a,Os,a.index);switch(a.lanes=0,a.tag){case 2:var m=a.type;Xs(i,a),i=a.pendingProps;var v=fi(a,an.current);gi(a,d),v=Mu(null,a,m,i,v,d);var b=Tu();return a.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,xn(m)?(b=!0,Es(a)):b=!1,a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,bu(a),v.updater=Bs,a.stateNode=v,v._reactInternals=a,Cu(a,m,i,d),a=Fu(null,a,m,!0,b,d)):(a.tag=0,It&&b&&uu(a),mn(null,a,v,d),a=a.child),a;case 16:m=a.elementType;e:{switch(Xs(i,a),i=a.pendingProps,v=m._init,m=v(m._payload),a.type=m,v=a.tag=MS(m),i=Zn(m,i),v){case 0:a=Nu(null,a,m,i,d);break e;case 1:a=ev(null,a,m,i,d);break e;case 11:a=Xm(null,a,m,i,d);break e;case 14:a=Km(null,a,m,Zn(m.type,i),d);break e}throw Error(c(306,m,""))}return a;case 0:return m=a.type,v=a.pendingProps,v=a.elementType===m?v:Zn(m,v),Nu(i,a,m,v,d);case 1:return m=a.type,v=a.pendingProps,v=a.elementType===m?v:Zn(m,v),ev(i,a,m,v,d);case 3:e:{if(tv(a),i===null)throw Error(c(387));m=a.pendingProps,b=a.memoizedState,v=b.element,fm(i,a),Ls(a,m,null,d);var E=a.memoizedState;if(m=E.element,qe&&b.isDehydrated)if(b={element:m,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){v=Si(Error(c(423)),a),a=nv(i,a,m,d,v);break e}else if(m!==v){v=Si(Error(c(424)),a),a=nv(i,a,m,d,v);break e}else for(qe&&(An=Mb(a.stateNode.containerInfo),Tn=a,It=!0,Qn=null,va=!1),d=Sm(a,null,m,d),a.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(mi(),m===v){a=Mr(i,a,d);break e}mn(i,a,m,d)}a=a.child}return a;case 5:return Cm(a),i===null&&hu(a),m=a.type,v=a.pendingProps,b=i!==null?i.memoizedProps:null,E=v.children,ue(m,v)?E=null:b!==null&&ue(m,b)&&(a.flags|=32),Jm(i,a),mn(i,a,E,d),a.child;case 6:return i===null&&hu(a),null;case 13:return rv(i,a,d);case 4:return wu(a,a.stateNode.containerInfo),m=a.pendingProps,i===null?a.child=xi(a,null,m,d):mn(i,a,m,d),a.child;case 11:return m=a.type,v=a.pendingProps,v=a.elementType===m?v:Zn(m,v),Xm(i,a,m,v,d);case 7:return mn(i,a,a.pendingProps,d),a.child;case 8:return mn(i,a,a.pendingProps.children,d),a.child;case 12:return mn(i,a,a.pendingProps.children,d),a.child;case 10:e:{if(m=a.type._context,v=a.pendingProps,b=a.memoizedProps,E=v.value,um(a,m,E),b!==null)if(Kn(b.value,E)){if(b.children===v.children&&!gn.current){a=Mr(i,a,d);break e}}else for(b=a.child,b!==null&&(b.return=a);b!==null;){var A=b.dependencies;if(A!==null){E=b.child;for(var W=A.firstContext;W!==null;){if(W.context===m){if(b.tag===1){W=Ir(-1,d&-d),W.tag=2;var ae=b.updateQueue;if(ae!==null){ae=ae.shared;var Ee=ae.pending;Ee===null?W.next=W:(W.next=Ee.next,Ee.next=W),ae.pending=W}}b.lanes|=d,W=b.alternate,W!==null&&(W.lanes|=d),xu(b.return,d,a),A.lanes|=d;break}W=W.next}}else if(b.tag===10)E=b.type===a.type?null:b.child;else if(b.tag===18){if(E=b.return,E===null)throw Error(c(341));E.lanes|=d,A=E.alternate,A!==null&&(A.lanes|=d),xu(E,d,a),E=b.sibling}else E=b.child;if(E!==null)E.return=b;else for(E=b;E!==null;){if(E===a){E=null;break}if(b=E.sibling,b!==null){b.return=E.return,E=b;break}E=E.return}b=E}mn(i,a,v.children,d),a=a.child}return a;case 9:return v=a.type,m=a.pendingProps.children,gi(a,d),v=zn(v),m=m(v),a.flags|=1,mn(i,a,m,d),a.child;case 14:return m=a.type,v=Zn(m,a.pendingProps),v=Zn(m.type,v),Km(i,a,m,v,d);case 15:return Qm(i,a,a.type,a.pendingProps,d);case 17:return m=a.type,v=a.pendingProps,v=a.elementType===m?v:Zn(m,v),Xs(i,a),a.tag=1,xn(m)?(i=!0,Es(a)):i=!1,gi(a,d),gm(a,m,v),Cu(a,m,v,d),Fu(null,a,m,!0,i,d);case 19:return iv(i,a,d);case 22:return Zm(i,a,d)}throw Error(c(156,a.tag))};function Mv(i,a){return au(i,a)}function IS(i,a,d,m){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ln(i,a,d,m){return new IS(i,a,d,m)}function ld(i){return i=i.prototype,!(!i||!i.isReactComponent)}function MS(i){if(typeof i=="function")return ld(i)?1:0;if(i!=null){if(i=i.$$typeof,i===w)return 11;if(i===M)return 14}return 2}function eo(i,a){var d=i.alternate;return d===null?(d=Ln(i.tag,a,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=a,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,a=i.dependencies,d.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function hl(i,a,d,m,v,b){var E=2;if(m=i,typeof i=="function")ld(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case p:return _o(d.children,v,b,a);case g:E=8,v|=8;break;case y:return i=Ln(12,d,a,v|2),i.elementType=y,i.lanes=b,i;case k:return i=Ln(13,d,a,v),i.elementType=k,i.lanes=b,i;case j:return i=Ln(19,d,a,v),i.elementType=j,i.lanes=b,i;case I:return pl(d,v,b,a);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case S:E=10;break e;case C:E=9;break e;case w:E=11;break e;case M:E=14;break e;case P:E=16,m=null;break e}throw Error(c(130,i==null?i:typeof i,""))}return a=Ln(E,d,a,v),a.elementType=i,a.type=m,a.lanes=b,a}function _o(i,a,d,m){return i=Ln(7,i,m,a),i.lanes=d,i}function pl(i,a,d,m){return i=Ln(22,i,m,a),i.elementType=I,i.lanes=d,i.stateNode={isHidden:!1},i}function cd(i,a,d){return i=Ln(6,i,null,a),i.lanes=d,i}function ud(i,a,d){return a=Ln(4,i.children!==null?i.children:[],i.key,a),a.lanes=d,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}function TS(i,a,d,m,v){this.tag=a,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ge,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ou(0),this.expirationTimes=ou(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.identifierPrefix=m,this.onRecoverableError=v,qe&&(this.mutableSourceEagerHydrationData=null)}function Tv(i,a,d,m,v,b,E,A,W){return i=new TS(i,a,d,A,W),a===1?(a=1,b===!0&&(a|=8)):a=0,b=Ln(3,null,null,a),i.current=b,b.stateNode=i,b.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},bu(b),i}function _v(i){if(!i)return qr;i=i._reactInternals;e:{if(V(i)!==i||i.tag!==1)throw Error(c(170));var a=i;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(xn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(c(171))}if(i.tag===1){var d=i.type;if(xn(d))return Jp(i,d,a)}return a}function Dv(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(c(188)):(i=Object.keys(i).join(","),Error(c(268,i)));return i=X(a),i===null?null:i.stateNode}function Ov(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d=ae&&b>=Ue&&v<=Ee&&E<=ye){i.splice(a,1);break}else if(m!==ae||d.width!==W.width||yeE){if(!(b!==Ue||d.height!==W.height||Eev)){ae>m&&(W.width+=ae-m,W.x=m),Eeb&&(W.height+=Ue-b,W.y=b),yed&&(d=E)),E ")+` + +No matching component was found for: + `)+i.join(" > ")}return null},n.getPublicRootInstance=function(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return ie(i.child.stateNode);default:return i.child.stateNode}},n.injectIntoDevTools=function(i){if(i={bundleType:i.bundleType,version:i.version,rendererPackageName:i.rendererPackageName,rendererConfig:i.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:u.ReactCurrentDispatcher,findHostInstanceByFiber:_S,findFiberByHostInstance:i.findFiberByHostInstance||DS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")i=!1;else{var a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(a.isDisabled||!a.supportsFiber)i=!0;else{try{Ts=a.inject(i),ir=a}catch{}i=!!a.checkDCE}}return i},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(i,a,d,m){if(!N)throw Error(c(363));i=Qu(i,a);var v=Ze(i,d,m).disconnect;return{disconnect:function(){v()}}},n.registerMutableSourceForHydration=function(i,a){var d=a._getVersion;d=d(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,d]:i.mutableSourceEagerHydrationData.push(a,d)},n.runWithPriority=function(i,a){var d=ot;try{return ot=i,a()}finally{ot=d}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(i,a,d,m){var v=a.current,b=un(),E=Zr(v);return d=_v(d),a.context===null?a.context=d:a.pendingContext=d,a=Ir(b,E),a.payload={element:i},m=m===void 0?null:m,m!==null&&(a.callback=m),i=Xr(v,a,E),i!==null&&(Fn(i,v,E,b),Fs(i,v,E)),E},n};(function(e){e.exports=KI})(XI);const QI=yC(Af);var fc={},ZI={get exports(){return fc},set exports(e){fc=e}},ai={};/** + * @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. + */ai.ConcurrentRoot=1;ai.ContinuousEventPriority=4;ai.DefaultEventPriority=16;ai.DiscreteEventPriority=1;ai.IdleEventPriority=536870912;ai.LegacyRoot=0;(function(e){e.exports=ai})(ZI);const C0={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let w0=!1,k0=!1;const _p=".react-konva-event",JI=`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 +`,eM=`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 +`,tM={};function Hc(e,t,n=tM){if(!w0&&"zIndex"in t&&(console.warn(eM),w0=!0),!k0&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(JI),k0=!0)}for(var s in n)if(!C0[s]){var c=s.slice(0,2)==="on",u=n[s]!==t[s];if(c&&u){var f=s.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),e.off(f,n[s])}var h=!t.hasOwnProperty(s);h&&e.setAttr(s,void 0)}var p=t._useStrictMode,g={},y=!1;const S={};for(var s in t)if(!C0[s]){var c=s.slice(0,2)==="on",C=n[s]!==t[s];if(c&&C){var f=s.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),t[s]&&(S[f]=t[s])}!c&&(t[s]!==n[s]||p&&t[s]!==e.getAttr(s))&&(y=!0,g[s]=t[s])}y&&(e.setAttrs(g),xo(e));for(var f in S)e.on(f+_p,S[f])}function xo(e){if(!bC.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const p4={},nM={};qa.Node.prototype._applyProps=Hc;function rM(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),xo(e)}function oM(e,t,n){let r=qa[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=qa.Group);const o={},s={};for(var c in t){var u=c.slice(0,2)==="on";u?s[c]=t[c]:o[c]=t[c]}const f=new r(o);return Hc(f,s),f}function iM(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function aM(e,t,n){return!1}function sM(e){return e}function lM(){return null}function cM(){return null}function uM(e,t,n,r){return nM}function dM(){}function fM(e){}function hM(e,t){return!1}function pM(){return p4}function mM(){return p4}const vM=setTimeout,gM=clearTimeout,xM=-1;function yM(e,t){return!1}const bM=!1,SM=!0,CM=!0;function wM(e,t){t.parent===e?t.moveToTop():e.add(t),xo(e)}function kM(e,t){t.parent===e?t.moveToTop():e.add(t),xo(e)}function m4(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),xo(e)}function jM(e,t,n){m4(e,t,n)}function EM(e,t){t.destroy(),t.off(_p),xo(e)}function PM(e,t){t.destroy(),t.off(_p),xo(e)}function IM(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function MM(e,t,n){}function TM(e,t,n,r,o){Hc(e,o,r)}function _M(e){e.hide(),xo(e)}function DM(e){}function OM(e,t){(t.visible==null||t.visible)&&e.show()}function AM(e,t){}function zM(e){}function RM(){}const NM=()=>fc.DefaultEventPriority,FM=Object.freeze(Object.defineProperty({__proto__:null,appendChild:wM,appendChildToContainer:kM,appendInitialChild:rM,cancelTimeout:gM,clearContainer:zM,commitMount:MM,commitTextUpdate:IM,commitUpdate:TM,createInstance:oM,createTextInstance:iM,detachDeletedInstance:RM,finalizeInitialChildren:aM,getChildHostContext:mM,getCurrentEventPriority:NM,getPublicInstance:sM,getRootHostContext:pM,hideInstance:_M,hideTextInstance:DM,idlePriority:Ul.unstable_IdlePriority,insertBefore:m4,insertInContainerBefore:jM,isPrimaryRenderer:bM,noTimeout:xM,now:Ul.unstable_now,prepareForCommit:lM,preparePortalMount:cM,prepareUpdate:uM,removeChild:EM,removeChildFromContainer:PM,resetAfterCommit:dM,resetTextContent:fM,run:Ul.unstable_runWithPriority,scheduleTimeout:vM,shouldDeprioritizeSubtree:hM,shouldSetTextContent:yM,supportsMutation:CM,unhideInstance:OM,unhideTextInstance:AM,warnsIfNotActing:SM},Symbol.toStringTag,{value:"Module"}));var LM=Object.defineProperty,BM=Object.defineProperties,HM=Object.getOwnPropertyDescriptors,j0=Object.getOwnPropertySymbols,WM=Object.prototype.hasOwnProperty,VM=Object.prototype.propertyIsEnumerable,E0=(e,t,n)=>t in e?LM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P0=(e,t)=>{for(var n in t||(t={}))WM.call(t,n)&&E0(e,n,t[n]);if(j0)for(var n of j0(t))VM.call(t,n)&&E0(e,n,t[n]);return e},UM=(e,t)=>BM(e,HM(t));function v4(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const o=v4(r,t,n);if(o)return o;r=t?null:r.sibling}}function g4(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Dp=g4(x.createContext(null));class x4 extends x.Component{render(){return x.createElement(Dp.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:$M,ReactCurrentDispatcher:GM}=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function qM(){const e=x.useContext(Dp);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=x.useId();return x.useMemo(()=>{var r;return(r=$M.current)!=null?r:v4(e,!1,o=>{let s=o.memoizedState;for(;s;){if(s.memoizedState===t)return!0;s=s.next}})},[e,t])}function YM(){var e,t;const n=qM(),[r]=x.useState(()=>new Map);r.clear();let o=n;for(;o;){const s=(e=o.type)==null?void 0:e._context;s&&s!==Dp&&!r.has(s)&&r.set(s,(t=GM.current)==null?void 0:t.readContext(g4(s))),o=o.return}return x.useMemo(()=>Array.from(r.keys()).reduce((s,c)=>u=>x.createElement(s,null,x.createElement(c.Provider,UM(P0({},u),{value:r.get(c)}))),s=>x.createElement(x4,P0({},s))),[r])}function XM(e){const t=ke.useRef();return ke.useLayoutEffect(()=>{t.current=e}),t.current}const KM=e=>{const t=ke.useRef(),n=ke.useRef(),r=ke.useRef(),o=XM(e),s=YM(),c=u=>{const{forwardedRef:f}=e;f&&(typeof f=="function"?f(u):f.current=u)};return ke.useLayoutEffect(()=>(n.current=new qa.Stage({width:e.width,height:e.height,container:t.current}),c(n.current),r.current=Ba.createContainer(n.current,fc.LegacyRoot,!1,null),Ba.updateContainer(ke.createElement(s,{},e.children),r.current),()=>{qa.isBrowser&&(c(null),Ba.updateContainer(null,r.current,null),n.current.destroy())}),[]),ke.useLayoutEffect(()=>{c(n.current),Hc(n.current,e,o),Ba.updateContainer(ke.createElement(s,{},e.children),r.current,null)}),ke.createElement("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},za="Layer",Br="Group",Hr="Rect",Do="Circle",hc="Line",y4="Image",QM="Transformer",Ba=QI(FM);Ba.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ke.version,rendererPackageName:"react-konva"});const ZM=ke.forwardRef((e,t)=>ke.createElement(x4,{},ke.createElement(KM,{...e,forwardedRef:t}))),JM=be([tt,zt],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),eT=()=>{const e=Y(),{tool:t,isStaging:n,isMovingBoundingBox:r}=O(JM);return{handleDragStart:x.useCallback(()=>{(t==="move"||n)&&!r&&e(Jl(!0))},[e,r,n,t]),handleDragMove:x.useCallback(o=>{if(!((t==="move"||n)&&!r))return;const s={x:o.target.x(),y:o.target.y()};e(q1(s))},[e,r,n,t]),handleDragEnd:x.useCallback(()=>{(t==="move"||n)&&!r&&e(Jl(!1))},[e,r,n,t])}},tT=be([tt,Bt,zt],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:c,isMaskEnabled:u,shouldSnapToGrid:f}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:c,isStaging:n,isMaskEnabled:u,shouldSnapToGrid:f}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),nT=()=>{const e=Y(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:o,isMaskEnabled:s,shouldSnapToGrid:c}=O(tT),u=x.useRef(null),f=Y1(),h=()=>e(Zf());fe(["shift+c"],()=>{h()},{enabled:()=>!o,preventDefault:!0},[]);const p=()=>e(ss(!s));fe(["h"],()=>{p()},{enabled:()=>!o,preventDefault:!0},[s]),fe(["n"],()=>{e(ec(!c))},{enabled:!0,preventDefault:!0},[c]),fe("esc",()=>{e(SC())},{enabled:()=>!0,preventDefault:!0}),fe("shift+h",()=>{e(CC(!n))},{enabled:()=>!o,preventDefault:!0},[t,n]),fe(["space"],g=>{g.repeat||(f==null||f.container().focus(),r!=="move"&&(u.current=r,e(xr("move"))),r==="move"&&u.current&&u.current!=="move"&&(e(xr(u.current)),u.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,u])},Op=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}},b4=()=>{const e=Y(),t=Sr(),n=Y1();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const o=wC.pixelRatio,[s,c,u,f]=t.getContext().getImageData(r.x*o,r.y*o,1,1).data;e(kC({r:s,g:c,b:u,a:f}))},commitColorUnderCursor:()=>{e(jC())}}},rT=be([Bt,tt,zt],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),oT=e=>{const t=Y(),{tool:n,isStaging:r}=O(rT),{commitColorUnderCursor:o}=b4();return x.useCallback(s=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Jl(!0));return}if(n==="colorPicker"){o();return}const c=Op(e.current);c&&(s.evt.preventDefault(),t(X1(!0)),t(EC([c.x,c.y])))},[e,n,r,t,o])},iT=be([Bt,tt,zt],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),aT=(e,t,n)=>{const r=Y(),{isDrawing:o,tool:s,isStaging:c}=O(iT),{updateColorUnderCursor:u}=b4();return x.useCallback(()=>{if(!e.current)return;const f=Op(e.current);if(f){if(r(PC(f)),n.current=f,s==="colorPicker"){u();return}!o||s==="move"||c||(t.current=!0,r(K1([f.x,f.y])))}},[t,r,o,c,n,e,s,u])},sT=()=>{const e=Y();return x.useCallback(()=>{e(IC())},[e])},lT=be([Bt,tt,zt],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),cT=(e,t)=>{const n=Y(),{tool:r,isDrawing:o,isStaging:s}=O(lT);return x.useCallback(()=>{if(r==="move"||s){n(Jl(!1));return}if(!t.current&&o&&e.current){const c=Op(e.current);if(!c)return;n(K1([c.x,c.y]))}else t.current=!1;n(X1(!1))},[t,n,o,s,e,r])},uT=be([tt],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),dT=e=>{const t=Y(),{isMoveStageKeyHeld:n,stageScale:r}=O(uT);return x.useCallback(o=>{if(!e.current||n)return;o.evt.preventDefault();const s=e.current.getPointerPosition();if(!s)return;const c={x:(s.x-e.current.x())/r,y:(s.y-e.current.y())/r};let u=o.evt.deltaY;o.evt.ctrlKey&&(u=-u);const f=te.clamp(r*MC**u,TC,_C),h={x:s.x-c.x*f,y:s.y-c.y*f};t(DC(f)),t(q1(h))},[e,n,r,t])},fT=be(tt,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:o,shouldDarkenOutsideBoundingBox:s,stageCoordinates:c}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:s,stageCoordinates:c,stageDimensions:r,stageScale:o}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),hT=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=O(fT);return l.jsxs(Br,{children:[l.jsx(Hr,{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}),l.jsx(Hr,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},pT=be([tt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),mT={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)",ocean:"rgba(136, 148, 184, 0.2)"},vT=()=>{const e=O(u=>u.ui.currentTheme),{stageScale:t,stageCoordinates:n,stageDimensions:r}=O(pT),[o,s]=x.useState([]),c=x.useCallback(u=>u/t,[t]);return x.useLayoutEffect(()=>{const u=mT[e],{width:f,height:h}=r,{x:p,y:g}=n,y={x1:0,y1:0,x2:f,y2:h,offset:{x:c(p),y:c(g)}},S={x:Math.ceil(c(p)/64)*64,y:Math.ceil(c(g)/64)*64},C={x1:-S.x,y1:-S.y,x2:c(f)-S.x+64,y2:c(h)-S.y+64},k={x1:Math.min(y.x1,C.x1),y1:Math.min(y.y1,C.y1),x2:Math.max(y.x2,C.x2),y2:Math.max(y.y2,C.y2)},j=k.x2-k.x1,M=k.y2-k.y1,P=Math.round(j/64)+1,I=Math.round(M/64)+1,T=te.range(0,P).map(_=>l.jsx(hc,{x:k.x1+_*64,y:k.y1,points:[0,0,0,M],stroke:u,strokeWidth:1},`x_${_}`)),D=te.range(0,I).map(_=>l.jsx(hc,{x:k.x1,y:k.y1+_*64,points:[0,0,j,0],stroke:u,strokeWidth:1},`y_${_}`));s(T.concat(D))},[t,n,r,e,c]),l.jsx(Br,{children:o})},gT=be([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:te.isEqual}}),xT=e=>{const{...t}=e,n=O(gT),[r,o]=x.useState(null);if(x.useEffect(()=>{if(!n)return;const h=new Image;h.onload=()=>{o(h)},h.src=n.url},[n]),!(n!=null&&n.boundingBox))return null;const{boundingBox:{x:s,y:c,width:u,height:f}}=n;return r?l.jsx(y4,{x:s,y:c,width:u,height:f,image:r,listening:!1,...t}):null},Yo=e=>{const{r:t,g:n,b:r,a:o}=e;return`rgba(${t}, ${n}, ${r}, ${o})`},yT=be(tt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:o}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:o,maskColorString:Yo(t)}}),I0=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),bT=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=O(yT),[c,u]=x.useState(null),[f,h]=x.useState(0),p=x.useRef(null),g=x.useCallback(()=>{h(f+1),setTimeout(g,500)},[f]);return x.useEffect(()=>{if(c)return;const y=new Image;y.onload=()=>{u(y)},y.src=I0(n)},[c,n]),x.useEffect(()=>{c&&(c.src=I0(n))},[c,n]),x.useEffect(()=>{const y=setInterval(()=>h(S=>(S+1)%5),50);return()=>clearInterval(y)},[]),!c||!te.isNumber(r.x)||!te.isNumber(r.y)||!te.isNumber(s)||!te.isNumber(o.width)||!te.isNumber(o.height)?null:l.jsx(Hr,{ref:p,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:c,fillPatternOffsetY:te.isNumber(f)?f:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},ST=be([tt],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:te.isEqual}}),CT=e=>{const{...t}=e,{objects:n}=O(ST);return l.jsx(Br,{listening:!1,...t,children:n.filter(OC).map((r,o)=>l.jsx(hc,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},o))})};var Oo=x,wT=function(t,n,r){const o=Oo.useRef("loading"),s=Oo.useRef(),[c,u]=Oo.useState(0),f=Oo.useRef(),h=Oo.useRef(),p=Oo.useRef();return(f.current!==t||h.current!==n||p.current!==r)&&(o.current="loading",s.current=void 0,f.current=t,h.current=n,p.current=r),Oo.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function y(){o.current="loaded",s.current=g,u(Math.random())}function S(){o.current="failed",s.current=void 0,u(Math.random())}return g.addEventListener("load",y),g.addEventListener("error",S),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",y),g.removeEventListener("error",S)}},[t,n,r]),[s.current,o.current]};const S4=e=>{const{url:t,x:n,y:r}=e,[o]=wT(t);return l.jsx(y4,{x:n,y:r,image:o,listening:!1})},kT=be([tt],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),jT=()=>{const{objects:e}=O(kT);return e?l.jsx(Br,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(M1(t))return l.jsx(S4,{x:t.x,y:t.y,url:t.image.url},n);if(AC(t)){const r=l.jsx(hc,{points:t.points,stroke:t.color?Yo(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?l.jsx(Br,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(zC(t))return l.jsx(Hr,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Yo(t.color)},n);if(RC(t))return l.jsx(Hr,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},ET=be([tt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:o,boundingBoxCoordinates:{x:s,y:c},boundingBoxDimensions:{width:u,height:f}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:c,width:u,height:f}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),PT=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:c,width:u,height:f}=O(ET);return l.jsxs(Br,{...t,children:[r&&n&&l.jsx(S4,{url:n.image.url,x:s,y:c}),o&&l.jsxs(Br,{children:[l.jsx(Hr,{x:s,y:c,width:u,height:f,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),l.jsx(Hr,{x:s,y:c,width:u,height:f,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},IT=be([tt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:o}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:o,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),MT=()=>{const e=Y(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:o}=O(IT),{t:s}=Z(),c=x.useCallback(()=>{e(Vv(!0))},[e]),u=x.useCallback(()=>{e(Vv(!1))},[e]);fe(["left"],()=>{f()},{enabled:()=>!0,preventDefault:!0}),fe(["right"],()=>{h()},{enabled:()=>!0,preventDefault:!0}),fe(["enter"],()=>{p()},{enabled:()=>!0,preventDefault:!0});const f=()=>e(NC()),h=()=>e(FC()),p=()=>e(LC());return r?l.jsx(B,{pos:"absolute",bottom:4,w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:c,onMouseOut:u,children:l.jsxs(en,{isAttached:!0,children:[l.jsx(le,{tooltip:`${s("unifiedCanvas.previous")} (Left)`,"aria-label":`${s("unifiedCanvas.previous")} (Left)`,icon:l.jsx(P8,{}),onClick:f,colorScheme:"accent",isDisabled:t}),l.jsx(le,{tooltip:`${s("unifiedCanvas.next")} (Right)`,"aria-label":`${s("unifiedCanvas.next")} (Right)`,icon:l.jsx(I8,{}),onClick:h,colorScheme:"accent",isDisabled:n}),l.jsx(le,{tooltip:`${s("unifiedCanvas.accept")} (Enter)`,"aria-label":`${s("unifiedCanvas.accept")} (Enter)`,icon:l.jsx(zc,{}),onClick:p,colorScheme:"accent"}),l.jsx(le,{tooltip:s("unifiedCanvas.showHide"),"aria-label":s("unifiedCanvas.showHide"),"data-alert":!o,icon:o?l.jsx(z8,{}):l.jsx(A8,{}),onClick:()=>e(BC(!o)),colorScheme:"accent"}),l.jsx(le,{tooltip:s("unifiedCanvas.saveToGallery"),"aria-label":s("unifiedCanvas.saveToGallery"),icon:l.jsx(op,{}),onClick:()=>e(HC(r.image.url)),colorScheme:"accent"}),l.jsx(le,{tooltip:s("unifiedCanvas.discardAll"),"aria-label":s("unifiedCanvas.discardAll"),icon:l.jsx(xs,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(WC()),colorScheme:"error",fontSize:20})]})}):null},Hi=e=>Math.round(e*100)/100,TT=be([tt],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${Hi(n)}, ${Hi(r)})`}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function _T(){const{cursorCoordinatesString:e}=O(TT),{t}=Z();return l.jsx(We,{children:`${t("unifiedCanvas.cursorPosition")}: ${e}`})}const zf="var(--invokeai-colors-warning-500)",DT=be([tt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:o},boundingBoxDimensions:{width:s,height:c},scaledBoundingBoxDimensions:{width:u,height:f},boundingBoxCoordinates:{x:h,y:p},stageScale:g,shouldShowCanvasDebugInfo:y,layer:S,boundingBoxScaleMethod:C,shouldPreserveMaskedArea:w}=e;let k="inherit";return(C==="none"&&(s<512||c<512)||C==="manual"&&u*f<512*512)&&(k=zf),{activeLayerColor:S==="mask"?zf:"inherit",activeLayerString:S.charAt(0).toUpperCase()+S.slice(1),boundingBoxColor:k,boundingBoxCoordinatesString:`(${Hi(h)}, ${Hi(p)})`,boundingBoxDimensionsString:`${s}×${c}`,scaledBoundingBoxDimensionsString:`${u}×${f}`,canvasCoordinatesString:`${Hi(r)}×${Hi(o)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:y,shouldShowBoundingBox:C!=="auto",shouldShowScaledBoundingBox:C!=="none",shouldPreserveMaskedArea:w}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),OT=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:o,scaledBoundingBoxDimensionsString:s,shouldShowScaledBoundingBox:c,canvasCoordinatesString:u,canvasDimensionsString:f,canvasScaleString:h,shouldShowCanvasDebugInfo:p,shouldShowBoundingBox:g,shouldPreserveMaskedArea:y}=O(DT),{t:S}=Z();return l.jsxs(B,{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:"blackAlpha.500"},children:[l.jsx(We,{style:{color:e},children:`${S("unifiedCanvas.activeLayer")}: ${t}`}),l.jsx(We,{children:`${S("unifiedCanvas.canvasScale")}: ${h}%`}),y&&l.jsx(We,{style:{color:zf},children:"Preserve Masked Area: On"}),g&&l.jsx(We,{style:{color:n},children:`${S("unifiedCanvas.boundingBox")}: ${o}`}),c&&l.jsx(We,{style:{color:n},children:`${S("unifiedCanvas.scaledBoundingBox")}: ${s}`}),p&&l.jsxs(l.Fragment,{children:[l.jsx(We,{children:`${S("unifiedCanvas.boundingBoxPosition")}: ${r}`}),l.jsx(We,{children:`${S("unifiedCanvas.canvasDimensions")}: ${f}`}),l.jsx(We,{children:`${S("unifiedCanvas.canvasPosition")}: ${u}`}),l.jsx(_T,{})]})]})},AT=be(tt,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:o,isTransformingBoundingBox:s,isMovingBoundingBox:c,tool:u,shouldSnapToGrid:f}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMovingBoundingBox:c,isTransformingBoundingBox:s,stageScale:r,shouldSnapToGrid:f,tool:u,hitStrokeWidth:20/r}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),zT=e=>{const{...t}=e,n=Y(),{boundingBoxCoordinates:r,boundingBoxDimensions:o,isDrawing:s,isMovingBoundingBox:c,isTransformingBoundingBox:u,stageScale:f,shouldSnapToGrid:h,tool:p,hitStrokeWidth:g}=O(AT),y=x.useRef(null),S=x.useRef(null),[C,w]=x.useState(!1);x.useEffect(()=>{var X;!y.current||!S.current||(y.current.nodes([S.current]),(X=y.current.getLayer())==null||X.batchDraw())},[]);const k=64*f,j=x.useCallback(X=>{if(!h){n(fd({x:Math.floor(X.target.x()),y:Math.floor(X.target.y())}));return}const $=X.target.x(),Q=X.target.y(),re=Uv($,64),ie=Uv(Q,64);X.target.x(re),X.target.y(ie),n(fd({x:re,y:ie}))},[n,h]),M=x.useCallback(()=>{if(!S.current)return;const X=S.current,$=X.scaleX(),Q=X.scaleY(),re=Math.round(X.width()*$),ie=Math.round(X.height()*Q),U=Math.round(X.x()),K=Math.round(X.y());n(Na({width:re,height:ie})),n(fd({x:h?xl(U,64):U,y:h?xl(K,64):K})),X.scaleX(1),X.scaleY(1)},[n,h]),P=x.useCallback((X,$,Q)=>{const re=X.x%k,ie=X.y%k;return{x:xl($.x,k)+re,y:xl($.y,k)+ie}},[k]),I=()=>{n(hd(!0))},T=()=>{n(hd(!1)),n(pd(!1)),n(yl(!1)),w(!1)},D=()=>{n(pd(!0))},_=()=>{n(hd(!1)),n(pd(!1)),n(yl(!1)),w(!1)},z=()=>{w(!0)},V=()=>{!u&&!c&&w(!1)},F=()=>{n(yl(!0))},L=()=>{n(yl(!1))};return l.jsxs(Br,{...t,children:[l.jsx(Hr,{height:o.height,width:o.width,x:r.x,y:r.y,onMouseEnter:F,onMouseOver:F,onMouseLeave:L,onMouseOut:L}),l.jsx(Hr,{draggable:!0,fillEnabled:!1,height:o.height,hitStrokeWidth:g,listening:!s&&p==="move",onDragStart:D,onDragEnd:_,onDragMove:j,onMouseDown:D,onMouseOut:V,onMouseOver:z,onMouseEnter:z,onMouseUp:_,onTransform:M,onTransformEnd:T,ref:S,stroke:C?"rgba(255,255,255,0.7)":"white",strokeWidth:(C?8:1)/f,width:o.width,x:r.x,y:r.y}),l.jsx(QM,{anchorCornerRadius:3,anchorDragBoundFunc:P,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:p==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!s&&p==="move",onDragStart:D,onDragEnd:_,onMouseDown:I,onMouseUp:T,onTransformEnd:T,ref:y,rotateEnabled:!1})]})},RT=be(tt,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:o,brushColor:s,tool:c,layer:u,shouldShowBrush:f,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:g,stageDimensions:y,boundingBoxCoordinates:S,boundingBoxDimensions:C,shouldRestrictStrokesToBox:w}=e,k=w?{clipX:S.x,clipY:S.y,clipWidth:C.width,clipHeight:C.height}:{};return{cursorPosition:t,brushX:t?t.x:y.width/2,brushY:t?t.y:y.height/2,radius:n/2,colorPickerOuterRadius:$v/g,colorPickerInnerRadius:($v-sf+1)/g,maskColorString:Yo({...o,a:.5}),brushColorString:Yo(s),colorPickerColorString:Yo(r),tool:c,layer:u,shouldShowBrush:f,shouldDrawBrushPreview:!(h||p||!t)&&f,strokeWidth:1.5/g,dotRadius:1.5/g,clip:k}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),NT=e=>{const{...t}=e,{brushX:n,brushY:r,radius:o,maskColorString:s,tool:c,layer:u,shouldDrawBrushPreview:f,dotRadius:h,strokeWidth:p,brushColorString:g,colorPickerColorString:y,colorPickerInnerRadius:S,colorPickerOuterRadius:C,clip:w}=O(RT);return f?l.jsxs(Br,{listening:!1,...w,...t,children:[c==="colorPicker"?l.jsxs(l.Fragment,{children:[l.jsx(Do,{x:n,y:r,radius:C,stroke:g,strokeWidth:sf,strokeScaleEnabled:!1}),l.jsx(Do,{x:n,y:r,radius:S,stroke:y,strokeWidth:sf,strokeScaleEnabled:!1})]}):l.jsxs(l.Fragment,{children:[l.jsx(Do,{x:n,y:r,radius:o,fill:u==="mask"?s:g,globalCompositeOperation:c==="eraser"?"destination-out":"source-out"}),l.jsx(Do,{x:n,y:r,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:p*2,strokeEnabled:!0,listening:!1}),l.jsx(Do,{x:n,y:r,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:p,strokeEnabled:!0,listening:!1})]}),l.jsx(Do,{x:n,y:r,radius:h*2,fill:"rgba(255,255,255,0.4)",listening:!1}),l.jsx(Do,{x:n,y:r,radius:h,fill:"rgba(0,0,0,1)",listening:!1})]}):null},FT=be([tt,zt],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:o,isTransformingBoundingBox:s,isMouseOverBoundingBox:c,isMovingBoundingBox:u,stageDimensions:f,stageCoordinates:h,tool:p,isMovingStage:g,shouldShowIntermediates:y,shouldShowGrid:S,shouldRestrictStrokesToBox:C}=e;let w="none";return p==="move"||t?g?w="grabbing":w="grab":s?w=void 0:C&&!c&&(w="default"),{isMaskEnabled:n,isModifyingBoundingBox:s||u,shouldShowBoundingBox:o,shouldShowGrid:S,stageCoordinates:h,stageCursor:w,stageDimensions:f,stageScale:r,tool:p,isStaging:t,shouldShowIntermediates:y}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),LT=oe(ZM,{shouldForwardProp:e=>!["sx"].includes(e)}),C4=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:o,stageCursor:s,stageDimensions:c,stageScale:u,tool:f,isStaging:h,shouldShowIntermediates:p}=O(FT);nT();const g=x.useRef(null),y=x.useRef(null),S=x.useCallback(V=>{UC(V),g.current=V},[]),C=x.useCallback(V=>{VC(V),y.current=V},[]),w=x.useRef({x:0,y:0}),k=x.useRef(!1),j=dT(g),M=oT(g),P=cT(g,k),I=aT(g,k,w),T=sT(),{handleDragStart:D,handleDragMove:_,handleDragEnd:z}=eT();return l.jsx(B,{sx:{position:"relative",height:"100%",width:"100%",borderRadius:"base"},children:l.jsxs(We,{sx:{position:"relative"},children:[l.jsxs(LT,{tabIndex:-1,ref:S,sx:{outline:"none",overflow:"hidden",cursor:s||void 0,canvas:{outline:"none"}},x:o.x,y:o.y,width:c.width,height:c.height,scale:{x:u,y:u},onTouchStart:M,onTouchMove:I,onTouchEnd:P,onMouseDown:M,onMouseLeave:T,onMouseMove:I,onMouseUp:P,onDragStart:D,onDragMove:_,onDragEnd:z,onContextMenu:V=>V.evt.preventDefault(),onWheel:j,draggable:(f==="move"||h)&&!t,children:[l.jsx(za,{id:"grid",visible:r,children:l.jsx(vT,{})}),l.jsx(za,{id:"base",ref:C,listening:!1,imageSmoothingEnabled:!1,children:l.jsx(jT,{})}),l.jsxs(za,{id:"mask",visible:e,listening:!1,children:[l.jsx(CT,{visible:!0,listening:!1}),l.jsx(bT,{listening:!1})]}),l.jsx(za,{children:l.jsx(hT,{})}),l.jsxs(za,{id:"preview",imageSmoothingEnabled:!1,children:[!h&&l.jsx(NT,{visible:f!=="move",listening:!1}),l.jsx(PT,{visible:h}),p&&l.jsx(xT,{}),l.jsx(zT,{visible:n&&!h})]})]}),l.jsx(OT,{}),l.jsx(MT,{})]})})},BT=be(tt,zy,Bt,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:o}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:o}}),w4=()=>{const e=Y(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:o}=O(BT),s=x.useRef(null);return x.useLayoutEffect(()=>{window.setTimeout(()=>{if(!s.current)return;const{clientWidth:c,clientHeight:u}=s.current;e($C({width:c,height:u})),e(o?GC():Sc()),e(on(!1))},0)},[e,r,t,n,o]),l.jsx(B,{ref:s,sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,width:"100%",height:"100%"},children:l.jsx(Qf,{thickness:"2px",speed:"1s",size:"xl"})})},HT=be([tt,Bt,Pt],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function k4(){const e=Y(),{canRedo:t,activeTabName:n}=O(HT),{t:r}=Z(),o=()=>{e(qC())};return fe(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{o()},{enabled:()=>t,preventDefault:!0},[n,t]),l.jsx(le,{"aria-label":`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,icon:l.jsx(G8,{}),onClick:o,isDisabled:!t})}const WT=be([tt,Bt,Pt],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function j4(){const e=Y(),{t}=Z(),{canUndo:n,activeTabName:r}=O(WT),o=()=>{e(YC())};return fe(["meta+z","ctrl+z"],()=>{o()},{enabled:()=>n,preventDefault:!0},[r,n]),l.jsx(le,{"aria-label":`${t("unifiedCanvas.undo")} (Ctrl+Z)`,tooltip:`${t("unifiedCanvas.undo")} (Ctrl+Z)`,icon:l.jsx(Q8,{}),onClick:o,isDisabled:!n})}const VT=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const o=document.createElement("canvas");o.width=t,o.height=n;const s=o.getContext("2d");s&&(s.drawImage(r,0,0),o.toBlob(c=>{c&&navigator.clipboard.write([new ClipboardItem({[c.type]:c})])}),o.remove(),r.remove())}),r.src=e},UT=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},$T=(e,t,n,r)=>{const o=e.scale(),s=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:c,y:u,width:f,height:h}=e.getClientRect(),p=r?{x:r.x+n.x,y:r.y+n.y,width:r.width,height:r.height}:{x:c,y:u,width:f,height:h},g=e.toDataURL(p);return e.scale(o),{dataURL:g,boundingBox:{x:s.x,y:s.y,width:f,height:h}}},GT={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},ao=(e=GT)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:o,shouldSaveToGallery:s,shouldDownload:c,shouldCopy:u,shouldSetAsInitialImage:f}=e;t(XC("Exporting Image")),t(bl(!1));const h=n(),{stageScale:p,boundingBoxCoordinates:g,boundingBoxDimensions:y,stageCoordinates:S}=h.canvas,C=Sr();if(!C){t(md(!1)),t(bl(!0));return}const{dataURL:w,boundingBox:k}=$T(C,p,S,o?{...g,...y}:void 0);if(!w){t(md(!1)),t(bl(!0));return}const j=new FormData;j.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:s?"result":"temp",cropVisible:r}));const P=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:j})).json(),{url:I,width:T,height:D}=P,_={uuid:E1(),category:s?"result":"user",...P};c&&(UT(I),t(Sl({title:nr.t("toast.downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),u&&(VT(I,T,D),t(Sl({title:nr.t("toast.imageCopied"),status:"success",duration:2500,isClosable:!0}))),s&&(t(P1({image:_,category:"result"})),t(Sl({title:nr.t("toast.imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),f&&(t(KC({kind:"image",layer:"base",...k,image:_})),t(Sl({title:nr.t("toast.canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(md(!1)),t(QC(nr.t("common.statusConnected"))),t(bl(!0))};function qT(){const e=O(zt),t=Sr(),n=O(u=>u.system.isProcessing),r=O(u=>u.canvas.shouldCropToBoundingBoxOnSave),o=Y(),{t:s}=Z();fe(["meta+c","ctrl+c"],()=>{c()},{enabled:()=>!e,preventDefault:!0},[t,n]);const c=()=>{o(ao({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return l.jsx(le,{"aria-label":`${s("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${s("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:l.jsx(Ji,{}),onClick:c,isDisabled:e})}function YT(){const e=Y(),{t}=Z(),n=Sr(),r=O(zt),o=O(u=>u.system.isProcessing),s=O(u=>u.canvas.shouldCropToBoundingBoxOnSave);fe(["shift+d"],()=>{c()},{enabled:()=>!r,preventDefault:!0},[n,o]);const c=()=>{e(ao({cropVisible:!s,cropToBoundingBox:s,shouldDownload:!0}))};return l.jsx(le,{"aria-label":`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:l.jsx(rp,{}),onClick:c,isDisabled:r})}function XT(){const e=O(zt),{openUploader:t}=Qh(),{t:n}=Z();return l.jsx(le,{"aria-label":n("common.upload"),tooltip:n("common.upload"),icon:l.jsx(Rc,{}),onClick:t,isDisabled:e})}const KT=be([tt,zt],(e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function QT(){const e=Y(),{t}=Z(),{layer:n,isMaskEnabled:r,isStaging:o}=O(KT),s=()=>{e(tc(n==="mask"?"base":"mask"))};fe(["q"],()=>{s()},{enabled:()=>!o,preventDefault:!0},[n]);const c=u=>{const f=u.target.value;e(tc(f)),f==="mask"&&!r&&e(ss(!0))};return l.jsx(Mn,{tooltip:`${t("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:Q1,onChange:c,isDisabled:o})}function ZT(){const e=Y(),{t}=Z(),n=Sr(),r=O(zt),o=O(c=>c.system.isProcessing);fe(["shift+m"],()=>{s()},{enabled:()=>!r,preventDefault:!0},[n,o]);const s=()=>{e(ao({cropVisible:!1,shouldSetAsInitialImage:!0}))};return l.jsx(le,{"aria-label":`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:l.jsx(Oy,{}),onClick:s,isDisabled:r})}function JT(){const e=O(s=>s.canvas.tool),t=O(zt),n=Y(),{t:r}=Z();fe(["v"],()=>{o()},{enabled:()=>!t,preventDefault:!0},[]);const o=()=>n(xr("move"));return l.jsx(le,{"aria-label":`${r("unifiedCanvas.move")} (V)`,tooltip:`${r("unifiedCanvas.move")} (V)`,icon:l.jsx(Py,{}),isChecked:e==="move"||t,onClick:o})}function e_(){const e=O(o=>o.ui.shouldPinParametersPanel),t=Y(),{t:n}=Z(),r=()=>{t(Wo(!0)),e&&setTimeout(()=>t(on(!0)),400)};return l.jsxs(B,{flexDirection:"column",gap:2,children:[l.jsx(le,{tooltip:`${n("parameters.showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":n("parameters.showOptionsPanel"),onClick:r,children:l.jsx(ip,{})}),l.jsx(B,{children:l.jsx(gp,{iconButton:!0})}),l.jsx(B,{children:l.jsx(mp,{width:"100%",height:"40px",btnGroupWidth:"100%"})})]})}function t_(){const e=Y(),{t}=Z(),n=O(zt),r=()=>{e(Jf()),e(Sc())};return l.jsx(le,{"aria-label":t("unifiedCanvas.clearCanvas"),tooltip:t("unifiedCanvas.clearCanvas"),icon:l.jsx(ii,{}),onClick:r,isDisabled:n,colorScheme:"error"})}function E4(e,t,n=250){const[r,o]=x.useState(0);return x.useEffect(()=>{const s=setTimeout(()=>{r===1&&e(),o(0)},n);return r===2&&t(),()=>clearTimeout(s)},[r,e,t,n]),()=>o(s=>s+1)}function n_(){const e=Sr(),t=Y(),{t:n}=Z();fe(["r"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[e]);const r=E4(()=>o(!1),()=>o(!0)),o=(s=!1)=>{const c=Sr();if(!c)return;const u=c.getClientRect({skipTransform:!0});t(Z1({contentRect:u,shouldScaleTo1:s}))};return l.jsx(le,{"aria-label":`${n("unifiedCanvas.resetView")} (R)`,tooltip:`${n("unifiedCanvas.resetView")} (R)`,icon:l.jsx(My,{}),onClick:r})}function r_(){const e=O(zt),t=Sr(),n=O(u=>u.system.isProcessing),r=O(u=>u.canvas.shouldCropToBoundingBoxOnSave),o=Y(),{t:s}=Z();fe(["shift+s"],()=>{c()},{enabled:()=>!e,preventDefault:!0},[t,n]);const c=()=>{o(ao({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return l.jsx(le,{"aria-label":`${s("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${s("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:l.jsx(op,{}),onClick:c,isDisabled:e})}const o_=be([tt,zt,Pt],(e,t,n)=>{const{isProcessing:r}=n,{tool:o}=e;return{tool:o,isStaging:t,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),i_=()=>{const e=Y(),{t}=Z(),{tool:n,isStaging:r}=O(o_);fe(["b"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[]),fe(["e"],()=>{s()},{enabled:()=>!r,preventDefault:!0},[n]),fe(["c"],()=>{c()},{enabled:()=>!r,preventDefault:!0},[n]),fe(["shift+f"],()=>{u()},{enabled:()=>!r,preventDefault:!0}),fe(["delete","backspace"],()=>{f()},{enabled:()=>!r,preventDefault:!0});const o=()=>e(xr("brush")),s=()=>e(xr("eraser")),c=()=>e(xr("colorPicker")),u=()=>e(J1()),f=()=>e(e2());return l.jsxs(B,{flexDirection:"column",gap:2,children:[l.jsxs(en,{children:[l.jsx(le,{"aria-label":`${t("unifiedCanvas.brush")} (B)`,tooltip:`${t("unifiedCanvas.brush")} (B)`,icon:l.jsx(Ay,{}),isChecked:n==="brush"&&!r,onClick:o,isDisabled:r}),l.jsx(le,{"aria-label":`${t("unifiedCanvas.eraser")} (E)`,tooltip:`${t("unifiedCanvas.eraser")} (B)`,icon:l.jsx(Ty,{}),isChecked:n==="eraser"&&!r,isDisabled:r,onClick:s})]}),l.jsxs(en,{children:[l.jsx(le,{"aria-label":`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:l.jsx(Dy,{}),isDisabled:r,onClick:u}),l.jsx(le,{"aria-label":`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:l.jsx(xs,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:f})]}),l.jsx(le,{"aria-label":`${t("unifiedCanvas.colorPicker")} (C)`,tooltip:`${t("unifiedCanvas.colorPicker")} (C)`,icon:l.jsx(_y,{}),isChecked:n==="colorPicker"&&!r,isDisabled:r,onClick:c,width:"max-content"})]})},Wc=he((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:o="Cancel",cancelCallback:s,children:c,title:u,triggerComponent:f}=e,{isOpen:h,onOpen:p,onClose:g}=uo(),y=x.useRef(null),S=()=>{r(),g()},C=()=>{s&&s(),g()};return l.jsxs(l.Fragment,{children:[x.cloneElement(f,{onClick:p,ref:t}),l.jsx(qx,{isOpen:h,leastDestructiveRef:y,onClose:g,children:l.jsx(Nr,{children:l.jsxs(Yx,{children:[l.jsx(Rr,{fontSize:"lg",fontWeight:"bold",children:u}),l.jsx(Fr,{children:c}),l.jsxs(zr,{children:[l.jsx(Je,{ref:y,onClick:C,children:o}),l.jsx(Je,{colorScheme:"error",onClick:S,ml:3,children:n})]})]})})})]})}),P4=()=>{const e=O(zt),t=Y(),{t:n}=Z(),r=()=>{t(ZC()),t(Jf()),t(t2())};return l.jsxs(Wc,{title:n("unifiedCanvas.emptyTempImageFolder"),acceptCallback:r,acceptButtonText:n("unifiedCanvas.emptyFolder"),triggerComponent:l.jsx(Je,{leftIcon:l.jsx(ii,{}),size:"sm",isDisabled:e,children:n("unifiedCanvas.emptyTempImageFolder")}),children:[l.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderMessage")}),l.jsx("br",{}),l.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderConfirm")})]})},I4=()=>{const e=O(zt),t=Y(),{t:n}=Z();return l.jsxs(Wc,{title:n("unifiedCanvas.clearCanvasHistory"),acceptCallback:()=>t(t2()),acceptButtonText:n("unifiedCanvas.clearHistory"),triggerComponent:l.jsx(Je,{size:"sm",leftIcon:l.jsx(ii,{}),isDisabled:e,children:n("unifiedCanvas.clearCanvasHistory")}),children:[l.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryMessage")}),l.jsx("br",{}),l.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryConfirm")})]})},a_=be([tt],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:o}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:o}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),s_=()=>{const e=Y(),{t}=Z(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:o,shouldShowIntermediates:s}=O(a_);return l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(le,{tooltip:t("unifiedCanvas.canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedCanvas.canvasSettings"),icon:l.jsx(ap,{})}),children:l.jsxs(B,{direction:"column",gap:2,children:[l.jsx(pt,{label:t("unifiedCanvas.showIntermediates"),isChecked:s,onChange:c=>e(n2(c.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:c=>e(r2(c.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:c=>e(o2(c.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:o,onChange:c=>e(i2(c.target.checked))}),l.jsx(I4,{}),l.jsx(P4,{})]})})},l_=()=>{const e=O(t=>t.ui.shouldShowParametersPanel);return l.jsxs(B,{flexDirection:"column",rowGap:2,children:[l.jsx(QT,{}),l.jsx(i_,{}),l.jsxs(B,{gap:2,children:[l.jsx(JT,{}),l.jsx(n_,{})]}),l.jsxs(B,{columnGap:2,children:[l.jsx(ZT,{}),l.jsx(r_,{})]}),l.jsxs(B,{columnGap:2,children:[l.jsx(qT,{}),l.jsx(YT,{})]}),l.jsxs(B,{gap:2,children:[l.jsx(j4,{}),l.jsx(k4,{})]}),l.jsxs(B,{gap:2,children:[l.jsx(XT,{}),l.jsx(t_,{})]}),l.jsx(s_,{}),!e&&l.jsx(e_,{})]})};function c_(){const e=Y(),t=O(o=>o.canvas.brushSize),{t:n}=Z(),r=O(zt);return fe(["BracketLeft"],()=>{e(Wi(Math.max(t-5,5)))},{enabled:()=>!r,preventDefault:!0},[t]),fe(["BracketRight"],()=>{e(Wi(Math.min(t+5,500)))},{enabled:()=>!r,preventDefault:!0},[t]),l.jsx(ut,{label:n("unifiedCanvas.brushSize"),value:t,withInput:!0,onChange:o=>e(Wi(o)),sliderNumberInputProps:{max:500},inputReadOnly:!1,isCompact:!0})}function Vc(){return(Vc=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function Rf(e){var t=x.useRef(e),n=x.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var ta=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:k.buttons>0)&&o.current?s(M0(o.current,k,u.current)):w(!1)},C=function(){return w(!1)};function w(k){var j=f.current,M=Nf(o.current),P=k?M.addEventListener:M.removeEventListener;P(j?"touchmove":"mousemove",S),P(j?"touchend":"mouseup",C)}return[function(k){var j=k.nativeEvent,M=o.current;if(M&&(T0(j),!function(I,T){return T&&!Ua(I)}(j,f.current)&&M)){if(Ua(j)){f.current=!0;var P=j.changedTouches||[];P.length&&(u.current=P[0].identifier)}M.focus(),s(M0(M,j,u.current)),w(!0)}},function(k){var j=k.which||k.keyCode;j<37||j>40||(k.preventDefault(),c({left:j===39?.05:j===37?-.05:0,top:j===40?.05:j===38?-.05:0}))},w]},[c,s]),p=h[0],g=h[1],y=h[2];return x.useEffect(function(){return y},[y]),ke.createElement("div",Vc({},r,{onTouchStart:p,onMouseDown:p,className:"react-colorful__interactive",ref:o,onKeyDown:g,tabIndex:0,role:"slider"}))}),Uc=function(e){return e.filter(Boolean).join(" ")},zp=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,s=Uc(["react-colorful__pointer",e.className]);return ke.createElement("div",{className:s,style:{top:100*o+"%",left:100*n+"%"}},ke.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},vn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},T4=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:vn(e.h),s:vn(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:vn(o/2),a:vn(r,2)}},Ff=function(e){var t=T4(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Bd=function(e){var t=T4(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},u_=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),c=r*(1-n),u=r*(1-(t-s)*n),f=r*(1-(1-t+s)*n),h=s%6;return{r:vn(255*[r,u,c,c,f,r][h]),g:vn(255*[f,r,r,u,c,c][h]),b:vn(255*[c,c,f,r,r,u][h]),a:vn(o,2)}},d_=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,s=Math.max(t,n,r),c=s-Math.min(t,n,r),u=c?s===t?(n-r)/c:s===n?2+(r-t)/c:4+(t-n)/c:0;return{h:vn(60*(u<0?u+6:u)),s:vn(s?c/s*100:0),v:vn(s/255*100),a:o}},f_=ke.memo(function(e){var t=e.hue,n=e.onChange,r=Uc(["react-colorful__hue",e.className]);return ke.createElement("div",{className:r},ke.createElement(Ap,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:ta(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":vn(t),"aria-valuemax":"360","aria-valuemin":"0"},ke.createElement(zp,{className:"react-colorful__hue-pointer",left:t/360,color:Ff({h:t,s:100,v:100,a:1})})))}),h_=ke.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Ff({h:t.h,s:100,v:100,a:1})};return ke.createElement("div",{className:"react-colorful__saturation",style:r},ke.createElement(Ap,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:ta(t.s+100*o.left,0,100),v:ta(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+vn(t.s)+"%, Brightness "+vn(t.v)+"%"},ke.createElement(zp,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Ff(t)})))}),_4=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function p_(e,t,n){var r=Rf(n),o=x.useState(function(){return e.toHsva(t)}),s=o[0],c=o[1],u=x.useRef({color:t,hsva:s});x.useEffect(function(){if(!e.equal(t,u.current.color)){var h=e.toHsva(t);u.current={hsva:h,color:t},c(h)}},[t,e]),x.useEffect(function(){var h;_4(s,u.current.hsva)||e.equal(h=e.fromHsva(s),u.current.color)||(u.current={hsva:s,color:h},r(h))},[s,e,r]);var f=x.useCallback(function(h){c(function(p){return Object.assign({},p,h)})},[]);return[s,f]}var m_=typeof window<"u"?x.useLayoutEffect:x.useEffect,v_=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_0=new Map,g_=function(e){m_(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_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}`,_0.set(t,n);var r=v_();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},x_=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+Bd(Object.assign({},n,{a:0}))+", "+Bd(Object.assign({},n,{a:1}))+")"},s=Uc(["react-colorful__alpha",t]),c=vn(100*n.a);return ke.createElement("div",{className:s},ke.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),ke.createElement(Ap,{onMove:function(u){r({a:u.left})},onKey:function(u){r({a:ta(n.a+u.left)})},"aria-label":"Alpha","aria-valuetext":c+"%","aria-valuenow":c,"aria-valuemin":"0","aria-valuemax":"100"},ke.createElement(zp,{className:"react-colorful__alpha-pointer",left:n.a,color:Bd(n)})))},y_=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,s=e.onChange,c=M4(e,["className","colorModel","color","onChange"]),u=x.useRef(null);g_(u);var f=p_(n,o,s),h=f[0],p=f[1],g=Uc(["react-colorful",t]);return ke.createElement("div",Vc({},c,{ref:u,className:g}),ke.createElement(h_,{hsva:h,onChange:p}),ke.createElement(f_,{hue:h.h,onChange:p}),ke.createElement(x_,{hsva:h,onChange:p,className:"react-colorful__last-control"}))},b_={defaultColor:{r:0,g:0,b:0,a:1},toHsva:d_,fromHsva:u_,equal:_4},S_=function(e){return ke.createElement(y_,Vc({},e,{colorModel:b_}))};const C_=oe(S_,{baseStyle:{paddingInline:4},shouldForwardProp:e=>!["pickerColor"].includes(e)}),Hd={width:6,height:6,borderColor:"base.100"},pc=e=>{const{styleClass:t="",...n}=e;return l.jsx(C_,{sx:{".react-colorful__hue-pointer":Hd,".react-colorful__saturation-pointer":Hd,".react-colorful__alpha-pointer":Hd},className:t,...n})},w_=be([tt,zt],(e,t)=>{const{brushColor:n,maskColor:r,layer:o}=e;return{brushColor:n,maskColor:r,layer:o,isStaging:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function k_(){const e=Y(),{brushColor:t,maskColor:n,layer:r,isStaging:o}=O(w_),s=()=>{if(r==="base")return`rgba(${t.r},${t.g},${t.b},${t.a})`;if(r==="mask")return`rgba(${n.r},${n.g},${n.b},${n.a})`};return fe(["shift+BracketLeft"],()=>{e(Vi({...t,a:te.clamp(t.a-.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[t]),fe(["shift+BracketRight"],()=>{e(Vi({...t,a:te.clamp(t.a+.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[t]),l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(We,{sx:{width:7,height:7,minWidth:7,minHeight:7,borderRadius:"full",bg:s(),cursor:"pointer"}}),children:l.jsxs(B,{minWidth:60,direction:"column",gap:4,width:"100%",children:[r==="base"&&l.jsx(pc,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:t,onChange:c=>e(Vi(c))}),r==="mask"&&l.jsx(pc,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:n,onChange:c=>e(a2(c))})]})})}function D4(){return l.jsxs(B,{columnGap:4,alignItems:"center",children:[l.jsx(c_,{}),l.jsx(k_,{})]})}function j_(){const e=Y(),t=O(r=>r.canvas.shouldRestrictStrokesToBox),{t:n}=Z();return l.jsx(pt,{label:n("unifiedCanvas.betaLimitToBox"),isChecked:t,onChange:r=>e(s2(r.target.checked))})}function E_(){return l.jsxs(B,{gap:4,alignItems:"center",children:[l.jsx(D4,{}),l.jsx(j_,{})]})}function P_(){const e=Y(),{t}=Z(),n=()=>e(Zf());return l.jsx(Je,{size:"sm",leftIcon:l.jsx(ii,{}),onClick:n,tooltip:`${t("unifiedCanvas.clearMask")} (Shift+C)`,children:t("unifiedCanvas.betaClear")})}function I_(){const e=O(o=>o.canvas.isMaskEnabled),t=Y(),{t:n}=Z(),r=()=>t(ss(!e));return l.jsx(pt,{label:`${n("unifiedCanvas.enableMask")} (H)`,isChecked:e,onChange:r})}function M_(){const e=Y(),{t}=Z(),n=O(r=>r.canvas.shouldPreserveMaskedArea);return l.jsx(pt,{label:t("unifiedCanvas.betaPreserveMasked"),isChecked:n,onChange:r=>e(l2(r.target.checked))})}function T_(){return l.jsxs(B,{gap:4,alignItems:"center",children:[l.jsx(D4,{}),l.jsx(I_,{}),l.jsx(M_,{}),l.jsx(P_,{})]})}function __(){const e=O(r=>r.canvas.shouldDarkenOutsideBoundingBox),t=Y(),{t:n}=Z();return l.jsx(pt,{label:n("unifiedCanvas.betaDarkenOutside"),isChecked:e,onChange:r=>t(c2(r.target.checked))})}function D_(){const e=O(r=>r.canvas.shouldShowGrid),t=Y(),{t:n}=Z();return l.jsx(pt,{label:n("unifiedCanvas.showGrid"),isChecked:e,onChange:r=>t(u2(r.target.checked))})}function O_(){const e=O(o=>o.canvas.shouldSnapToGrid),t=Y(),{t:n}=Z(),r=o=>t(ec(o.target.checked));return l.jsx(pt,{label:`${n("unifiedCanvas.snapToGrid")} (N)`,isChecked:e,onChange:r})}function A_(){return l.jsxs(B,{alignItems:"center",gap:4,children:[l.jsx(D_,{}),l.jsx(O_,{}),l.jsx(__,{})]})}const z_=be([tt],e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function R_(){const{tool:e,layer:t}=O(z_);return l.jsxs(B,{height:8,minHeight:8,maxHeight:8,alignItems:"center",children:[t=="base"&&["brush","eraser","colorPicker"].includes(e)&&l.jsx(E_,{}),t=="mask"&&["brush","eraser","colorPicker"].includes(e)&&l.jsx(T_,{}),e=="move"&&l.jsx(A_,{})]})}const N_=be([tt],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),F_=()=>{const e=Y(),{doesCanvasNeedScaling:t}=O(N_);return x.useLayoutEffect(()=>{e(on(!0));const n=te.debounce(()=>{e(on(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),l.jsx(We,{sx:{width:"100%",height:"100%",borderRadius:"base",bg:"base.850"},children:l.jsxs(B,{flexDirection:"row",width:"100%",height:"100%",columnGap:4,padding:4,children:[l.jsx(l_,{}),l.jsxs(B,{width:"100%",height:"100%",flexDirection:"column",rowGap:4,children:[l.jsx(R_,{}),t?l.jsx(w4,{}):l.jsx(C4,{})]})]})})},L_=be([tt,zt],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:o,shouldPreserveMaskedArea:s}=e;return{layer:r,maskColor:n,maskColorString:Yo(n),isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),B_=()=>{const e=Y(),{t}=Z(),{layer:n,maskColor:r,isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:c}=O(L_);fe(["q"],()=>{u()},{enabled:()=>!c,preventDefault:!0},[n]),fe(["shift+c"],()=>{f()},{enabled:()=>!c,preventDefault:!0},[]),fe(["h"],()=>{h()},{enabled:()=>!c,preventDefault:!0},[o]);const u=()=>{e(tc(n==="mask"?"base":"mask"))},f=()=>e(Zf()),h=()=>e(ss(!o));return l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(en,{children:l.jsx(le,{"aria-label":t("unifiedCanvas.maskingOptions"),tooltip:t("unifiedCanvas.maskingOptions"),icon:l.jsx(B8,{}),isChecked:n==="mask",isDisabled:c})}),children:l.jsxs(B,{direction:"column",gap:2,children:[l.jsx(pt,{label:`${t("unifiedCanvas.enableMask")} (H)`,isChecked:o,onChange:h}),l.jsx(pt,{label:t("unifiedCanvas.preserveMaskedArea"),isChecked:s,onChange:p=>e(l2(p.target.checked))}),l.jsx(pc,{sx:{paddingTop:2,paddingBottom:2},pickerColor:r,onChange:p=>e(a2(p))}),l.jsxs(Je,{size:"sm",leftIcon:l.jsx(ii,{}),onClick:f,children:[t("unifiedCanvas.clearMask")," (Shift+C)"]})]})})},H_=be([tt],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:c,shouldSnapToGrid:u,shouldRestrictStrokesToBox:f}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:c,shouldSnapToGrid:u,shouldRestrictStrokesToBox:f}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),W_=()=>{const e=Y(),{t}=Z(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:s,shouldShowGrid:c,shouldShowIntermediates:u,shouldSnapToGrid:f,shouldRestrictStrokesToBox:h}=O(H_);fe(["n"],()=>{e(ec(!f))},{enabled:!0,preventDefault:!0},[f]);const p=g=>e(ec(g.target.checked));return l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(le,{tooltip:t("unifiedCanvas.canvasSettings"),"aria-label":t("unifiedCanvas.canvasSettings"),icon:l.jsx(ap,{})}),children:l.jsxs(B,{direction:"column",gap:2,children:[l.jsx(pt,{label:t("unifiedCanvas.showIntermediates"),isChecked:u,onChange:g=>e(n2(g.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.showGrid"),isChecked:c,onChange:g=>e(u2(g.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.snapToGrid"),isChecked:f,onChange:p}),l.jsx(pt,{label:t("unifiedCanvas.darkenOutsideSelection"),isChecked:o,onChange:g=>e(c2(g.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:g=>e(r2(g.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:g=>e(o2(g.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.limitStrokesToBox"),isChecked:h,onChange:g=>e(s2(g.target.checked))}),l.jsx(pt,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:s,onChange:g=>e(i2(g.target.checked))}),l.jsx(I4,{}),l.jsx(P4,{})]})})},V_=be([tt,zt,Pt],(e,t,n)=>{const{isProcessing:r}=n,{tool:o,brushColor:s,brushSize:c}=e;return{tool:o,isStaging:t,isProcessing:r,brushColor:s,brushSize:c}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),U_=()=>{const e=Y(),{tool:t,brushColor:n,brushSize:r,isStaging:o}=O(V_),{t:s}=Z();fe(["b"],()=>{c()},{enabled:()=>!o,preventDefault:!0},[]),fe(["e"],()=>{u()},{enabled:()=>!o,preventDefault:!0},[t]),fe(["c"],()=>{f()},{enabled:()=>!o,preventDefault:!0},[t]),fe(["shift+f"],()=>{h()},{enabled:()=>!o,preventDefault:!0}),fe(["delete","backspace"],()=>{p()},{enabled:()=>!o,preventDefault:!0}),fe(["BracketLeft"],()=>{e(Wi(Math.max(r-5,5)))},{enabled:()=>!o,preventDefault:!0},[r]),fe(["BracketRight"],()=>{e(Wi(Math.min(r+5,500)))},{enabled:()=>!o,preventDefault:!0},[r]),fe(["shift+BracketLeft"],()=>{e(Vi({...n,a:te.clamp(n.a-.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]),fe(["shift+BracketRight"],()=>{e(Vi({...n,a:te.clamp(n.a+.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]);const c=()=>e(xr("brush")),u=()=>e(xr("eraser")),f=()=>e(xr("colorPicker")),h=()=>e(J1()),p=()=>e(e2());return l.jsxs(en,{isAttached:!0,children:[l.jsx(le,{"aria-label":`${s("unifiedCanvas.brush")} (B)`,tooltip:`${s("unifiedCanvas.brush")} (B)`,icon:l.jsx(Ay,{}),isChecked:t==="brush"&&!o,onClick:c,isDisabled:o}),l.jsx(le,{"aria-label":`${s("unifiedCanvas.eraser")} (E)`,tooltip:`${s("unifiedCanvas.eraser")} (E)`,icon:l.jsx(Ty,{}),isChecked:t==="eraser"&&!o,isDisabled:o,onClick:u}),l.jsx(le,{"aria-label":`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:l.jsx(Dy,{}),isDisabled:o,onClick:h}),l.jsx(le,{"aria-label":`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:l.jsx(xs,{style:{transform:"rotate(45deg)"}}),isDisabled:o,onClick:p}),l.jsx(le,{"aria-label":`${s("unifiedCanvas.colorPicker")} (C)`,tooltip:`${s("unifiedCanvas.colorPicker")} (C)`,icon:l.jsx(_y,{}),isChecked:t==="colorPicker"&&!o,isDisabled:o,onClick:f}),l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(le,{"aria-label":s("unifiedCanvas.brushOptions"),tooltip:s("unifiedCanvas.brushOptions"),icon:l.jsx(ip,{})}),children:l.jsxs(B,{minWidth:60,direction:"column",gap:4,width:"100%",children:[l.jsx(B,{gap:4,justifyContent:"space-between",children:l.jsx(ut,{label:s("unifiedCanvas.brushSize"),value:r,withInput:!0,onChange:g=>e(Wi(g)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),l.jsx(pc,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:n,onChange:g=>e(Vi(g))})]})})]})},$_=be([Pt,tt,zt],(e,t,n)=>{const{isProcessing:r}=e,{tool:o,shouldCropToBoundingBoxOnSave:s,layer:c,isMaskEnabled:u}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:u,tool:o,layer:c,shouldCropToBoundingBoxOnSave:s}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),G_=()=>{const e=Y(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:o,tool:s,shouldCropToBoundingBoxOnSave:c}=O($_),u=Sr(),{t:f}=Z(),{openUploader:h}=Qh();fe(["v"],()=>{p()},{enabled:()=>!n,preventDefault:!0},[]),fe(["r"],()=>{y()},{enabled:()=>!0,preventDefault:!0},[u]),fe(["shift+m"],()=>{C()},{enabled:()=>!n,preventDefault:!0},[u,t]),fe(["shift+s"],()=>{w()},{enabled:()=>!n,preventDefault:!0},[u,t]),fe(["meta+c","ctrl+c"],()=>{k()},{enabled:()=>!n,preventDefault:!0},[u,t]),fe(["shift+d"],()=>{j()},{enabled:()=>!n,preventDefault:!0},[u,t]);const p=()=>e(xr("move")),g=E4(()=>y(!1),()=>y(!0)),y=(P=!1)=>{const I=Sr();if(!I)return;const T=I.getClientRect({skipTransform:!0});e(Z1({contentRect:T,shouldScaleTo1:P}))},S=()=>{e(Jf()),e(Sc())},C=()=>{e(ao({cropVisible:!1,shouldSetAsInitialImage:!0}))},w=()=>{e(ao({cropVisible:!c,cropToBoundingBox:c,shouldSaveToGallery:!0}))},k=()=>{e(ao({cropVisible:!c,cropToBoundingBox:c,shouldCopy:!0}))},j=()=>{e(ao({cropVisible:!c,cropToBoundingBox:c,shouldDownload:!0}))},M=P=>{const I=P.target.value;e(tc(I)),I==="mask"&&!r&&e(ss(!0))};return l.jsxs(B,{sx:{alignItems:"center",gap:2},children:[l.jsx(Mn,{tooltip:`${f("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:o,validValues:Q1,onChange:M,isDisabled:n}),l.jsx(B_,{}),l.jsx(U_,{}),l.jsxs(en,{isAttached:!0,children:[l.jsx(le,{"aria-label":`${f("unifiedCanvas.move")} (V)`,tooltip:`${f("unifiedCanvas.move")} (V)`,icon:l.jsx(Py,{}),isChecked:s==="move"||n,onClick:p}),l.jsx(le,{"aria-label":`${f("unifiedCanvas.resetView")} (R)`,tooltip:`${f("unifiedCanvas.resetView")} (R)`,icon:l.jsx(My,{}),onClick:g})]}),l.jsxs(en,{isAttached:!0,children:[l.jsx(le,{"aria-label":`${f("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${f("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:l.jsx(Oy,{}),onClick:C,isDisabled:n}),l.jsx(le,{"aria-label":`${f("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${f("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:l.jsx(op,{}),onClick:w,isDisabled:n}),l.jsx(le,{"aria-label":`${f("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${f("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:l.jsx(Ji,{}),onClick:k,isDisabled:n}),l.jsx(le,{"aria-label":`${f("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${f("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:l.jsx(rp,{}),onClick:j,isDisabled:n})]}),l.jsxs(en,{isAttached:!0,children:[l.jsx(j4,{}),l.jsx(k4,{})]}),l.jsxs(en,{isAttached:!0,children:[l.jsx(le,{"aria-label":`${f("common.upload")}`,tooltip:`${f("common.upload")}`,icon:l.jsx(Rc,{}),onClick:h,isDisabled:n}),l.jsx(le,{"aria-label":`${f("unifiedCanvas.clearCanvas")}`,tooltip:`${f("unifiedCanvas.clearCanvas")}`,icon:l.jsx(ii,{}),onClick:S,colorScheme:"error",isDisabled:n})]}),l.jsx(en,{isAttached:!0,children:l.jsx(W_,{})})]})},q_=be([tt],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),Y_=()=>{const e=Y(),{doesCanvasNeedScaling:t}=O(q_);return x.useLayoutEffect(()=>{e(on(!0));const n=te.debounce(()=>{e(on(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),l.jsx(We,{sx:{width:"100%",height:"100%",padding:4,borderRadius:"base",bg:"base.850"},children:l.jsxs(B,{sx:{flexDirection:"column",alignItems:"center",gap:4,width:"100%",height:"100%"},children:[l.jsx(G_,{}),l.jsx(B,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,width:"100%",height:"100%"},children:t?l.jsx(w4,{}):l.jsx(C4,{})})]})})},X_=be(tt,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),K_=()=>{const e=Y(),{boundingBoxDimensions:t}=O(X_),{t:n}=Z(),r=u=>{e(Na({...t,width:Math.floor(u)}))},o=u=>{e(Na({...t,height:Math.floor(u)}))},s=()=>{e(Na({...t,width:Math.floor(512)}))},c=()=>{e(Na({...t,height:Math.floor(512)}))};return l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(ut,{label:n("parameters.width"),min:64,max:1024,step:64,value:t.width,onChange:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:s}),l.jsx(ut,{label:n("parameters.height"),min:64,max:1024,step:64,value:t.height,onChange:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:c})]})},Q_=be([vp,Pt,tt],(e,t,n)=>{const{tileSize:r,infillMethod:o}=e,{infill_methods:s}=t,{boundingBoxScaleMethod:c,scaledBoundingBoxDimensions:u}=n;return{boundingBoxScale:c,scaledBoundingBoxDimensions:u,tileSize:r,infillMethod:o,availableInfillMethods:s,isManual:c==="manual"}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),Z_=()=>{const e=Y(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:o,isManual:s,scaledBoundingBoxDimensions:c}=O(Q_),{t:u}=Z(),f=S=>{e(Cl({...c,width:Math.floor(S)}))},h=S=>{e(Cl({...c,height:Math.floor(S)}))},p=()=>{e(Cl({...c,width:Math.floor(512)}))},g=()=>{e(Cl({...c,height:Math.floor(512)}))},y=S=>{e(t3(S.target.value))};return l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(Mn,{label:u("parameters.scaleBeforeProcessing"),validValues:JC,value:o,onChange:y}),l.jsx(ut,{isInputDisabled:!s,isResetDisabled:!s,isSliderDisabled:!s,label:u("parameters.scaledWidth"),min:64,max:1024,step:64,value:c.width,onChange:f,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:p}),l.jsx(ut,{isInputDisabled:!s,isResetDisabled:!s,isSliderDisabled:!s,label:u("parameters.scaledHeight"),min:64,max:1024,step:64,value:c.height,onChange:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:g}),l.jsx(Mn,{label:u("parameters.infillMethod"),value:n,validValues:r,onChange:S=>e(e3(S.target.value))}),l.jsx(ut,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",label:u("parameters.tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:S=>{e(Gv(S))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(Gv(32))}})]})};function J_(){const e=Y(),t=O(r=>r.generation.seamBlur),{t:n}=Z();return l.jsx(ut,{label:n("parameters.seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r=>{e(qv(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(qv(16))}})}function eD(){const e=Y(),{t}=Z(),n=O(r=>r.generation.seamSize);return l.jsx(ut,{label:t("parameters.seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:n,onChange:r=>{e(Yv(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>e(Yv(96))})}function tD(){const{t:e}=Z(),t=O(r=>r.generation.seamSteps),n=Y();return l.jsx(ut,{label:e("parameters.seamSteps"),min:1,max:100,sliderNumberInputProps:{max:999},value:t,onChange:r=>{n(Xv(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{n(Xv(30))}})}function nD(){const e=Y(),{t}=Z(),n=O(r=>r.generation.seamStrength);return l.jsx(ut,{label:t("parameters.seamStrength"),min:.01,max:.99,step:.01,value:n,onChange:r=>{e(Kv(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(Kv(.7))}})}const rD=()=>l.jsxs(Le,{gap:2,alignItems:"stretch",children:[l.jsx(eD,{}),l.jsx(J_,{}),l.jsx(nD,{}),l.jsx(tD,{})]});function oD(){const{t:e}=Z(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:l.jsx(jp,{})},unifiedCanvasImg2Img:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:l.jsx(h4,{label:e("parameters.img2imgStrength")})},seed:{header:`${e("parameters.seed")}`,feature:dn.SEED,content:l.jsx(Cp,{})},boundingBox:{header:`${e("parameters.boundingBoxHeader")}`,feature:dn.BOUNDING_BOX,content:l.jsx(K_,{})},seamCorrection:{header:`${e("parameters.seamCorrectionHeader")}`,feature:dn.SEAM_CORRECTION,content:l.jsx(rD,{})},infillAndScaling:{header:`${e("parameters.infillScalingHeader")}`,feature:dn.INFILL_AND_SCALING,content:l.jsx(Z_,{})},variations:{header:`${e("parameters.variations")}`,feature:dn.VARIATIONS,content:l.jsx(kp,{}),additionalHeaderComponents:l.jsx(wp,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:l.jsx(bp,{}),additionalHeaderComponents:l.jsx(Sp,{})}};return l.jsxs(Tp,{children:[l.jsxs(B,{flexDir:"column",rowGap:2,children:[l.jsx(Mp,{}),l.jsx(Ip,{})]}),l.jsx(Pp,{}),l.jsx(Ep,{accordionInfo:t})]})}function iD(){const e=O(t=>t.ui.shouldUseCanvasBetaLayout);return l.jsx(yp,{optionsPanel:l.jsx(oD,{}),children:e?l.jsx(F_,{}):l.jsx(Y_,{})})}const Hn={txt2img:{title:l.jsx(Jt,{as:p9,boxSize:6}),workarea:l.jsx(YI,{}),tooltip:"Text To Image"},img2img:{title:l.jsx(Jt,{as:lp,boxSize:6}),workarea:l.jsx(HI,{}),tooltip:"Image To Image"},unifiedCanvas:{title:l.jsx(Jt,{as:g9,boxSize:6}),workarea:l.jsx(iD,{}),tooltip:"Unified Canvas"},nodes:{title:l.jsx(Jt,{as:m9,boxSize:6}),workarea:l.jsx(V7,{}),tooltip:"Nodes"},postprocess:{title:l.jsx(Jt,{as:x9,boxSize:6}),workarea:l.jsx(U7,{}),tooltip:"Post Processing"},training:{title:l.jsx(Jt,{as:v9,boxSize:6}),workarea:l.jsx($7,{}),tooltip:"Training"}};function aD(){Hn.txt2img.tooltip=nr.t("common.text2img"),Hn.img2img.tooltip=nr.t("common.img2img"),Hn.unifiedCanvas.tooltip=nr.t("common.unifiedCanvas"),Hn.nodes.tooltip=nr.t("common.nodes"),Hn.postprocess.tooltip=nr.t("common.postProcessing"),Hn.training.tooltip=nr.t("common.training")}function sD(){const e=O(W7),t=O(h=>h.lightbox.isLightboxOpen),{shouldShowGallery:n,shouldShowParametersPanel:r,shouldPinGallery:o,shouldPinParametersPanel:s}=O(xp);G7(aD);const c=Y();fe("1",()=>{c(kn(0))}),fe("2",()=>{c(kn(1))}),fe("3",()=>{c(kn(2))}),fe("4",()=>{c(kn(3))}),fe("5",()=>{c(kn(4))}),fe("6",()=>{c(kn(5))}),fe("z",()=>{c(Ho(!t))},[t]),fe("f",()=>{n||r?(c(Wo(!1)),c(Lo(!1))):(c(Wo(!0)),c(Lo(!0))),(o||s)&&setTimeout(()=>c(on(!0)),400)},[n,r]);const u=()=>{const h=[];return Object.keys(Hn).forEach(p=>{h.push(l.jsx(Yt,{hasArrow:!0,label:Hn[p].tooltip,placement:"end",children:l.jsx(gy,{children:Hn[p].title})},p))}),h},f=()=>{const h=[];return Object.keys(Hn).forEach(p=>{h.push(l.jsx(my,{children:Hn[p].workarea},p))}),h};return l.jsxs(hy,{isLazy:!0,defaultIndex:e,index:e,onChange:h=>{c(kn(h))},children:[l.jsx(py,{children:u()}),l.jsx(vy,{children:t?l.jsx(iI,{}):f()})]})}var lD=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function bs(e,t){var n=cD(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function cD(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=lD.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var uD=[".DS_Store","Thumbs.db"];function dD(e){return ia(this,void 0,void 0,function(){return aa(this,function(t){return mc(e)&&fD(e.dataTransfer)?[2,vD(e.dataTransfer,e.type)]:hD(e)?[2,pD(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,mD(e)]:[2,[]]})})}function fD(e){return mc(e)}function hD(e){return mc(e)&&mc(e.target)}function mc(e){return typeof e=="object"&&e!==null}function pD(e){return Lf(e.target.files).map(function(t){return bs(t)})}function mD(e){return ia(this,void 0,void 0,function(){var t;return aa(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 bs(r)})]}})})}function vD(e,t){return ia(this,void 0,void 0,function(){var n,r;return aa(this,function(o){switch(o.label){case 0:return e.items?(n=Lf(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(gD))]):[3,2];case 1:return r=o.sent(),[2,D0(O4(r))];case 2:return[2,D0(Lf(e.files).map(function(s){return bs(s)}))]}})})}function D0(e){return e.filter(function(t){return uD.indexOf(t.name)===-1})}function Lf(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,N0(n)];if(e.sizen)return[!1,N0(n)]}return[!0,null]}function Fo(e){return e!=null}function OD(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,c=e.maxFiles,u=e.validator;return!s&&t.length>1||s&&c>=1&&t.length>c?!1:t.every(function(f){var h=N4(f,n),p=es(h,1),g=p[0],y=F4(f,r,o),S=es(y,1),C=S[0],w=u?u(f):null;return g&&C&&!w})}function vc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Nl(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 L0(e){e.preventDefault()}function AD(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function zD(e){return e.indexOf("Edge/")!==-1}function RD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return AD(e)||zD(e)}function hr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),c=1;ce.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 JD(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 Rp=x.forwardRef(function(e,t){var n=e.children,r=gc(e,WD),o=V4(r),s=o.open,c=gc(o,VD);return x.useImperativeHandle(t,function(){return{open:s}},[s]),ke.createElement(x.Fragment,null,n(Ot(Ot({},c),{},{open:s})))});Rp.displayName="Dropzone";var W4={disabled:!1,getFilesFromEvent:dD,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};Rp.defaultProps=W4;Rp.propTypes={children:lt.func,accept:lt.objectOf(lt.arrayOf(lt.string)),multiple:lt.bool,preventDropOnDocument:lt.bool,noClick:lt.bool,noKeyboard:lt.bool,noDrag:lt.bool,noDragEventsBubbling:lt.bool,minSize:lt.number,maxSize:lt.number,maxFiles:lt.number,disabled:lt.bool,getFilesFromEvent:lt.func,onFileDialogCancel:lt.func,onFileDialogOpen:lt.func,useFsAccessApi:lt.bool,autoFocus:lt.bool,onDragEnter:lt.func,onDragLeave:lt.func,onDragOver:lt.func,onDrop:lt.func,onDropAccepted:lt.func,onDropRejected:lt.func,onError:lt.func,validator:lt.func};var Vf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function V4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ot(Ot({},W4),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,c=t.minSize,u=t.multiple,f=t.maxFiles,h=t.onDragEnter,p=t.onDragLeave,g=t.onDragOver,y=t.onDrop,S=t.onDropAccepted,C=t.onDropRejected,w=t.onFileDialogCancel,k=t.onFileDialogOpen,j=t.useFsAccessApi,M=t.autoFocus,P=t.preventDropOnDocument,I=t.noClick,T=t.noKeyboard,D=t.noDrag,_=t.noDragEventsBubbling,z=t.onError,V=t.validator,F=x.useMemo(function(){return LD(n)},[n]),L=x.useMemo(function(){return FD(n)},[n]),X=x.useMemo(function(){return typeof k=="function"?k:H0},[k]),$=x.useMemo(function(){return typeof w=="function"?w:H0},[w]),Q=x.useRef(null),re=x.useRef(null),ie=x.useReducer(eO,Vf),U=Wd(ie,2),K=U[0],ne=U[1],ce=K.isFocused,Re=K.isFileDialogActive,ze=x.useRef(typeof window<"u"&&window.isSecureContext&&j&&ND()),Me=function(){!ze.current&&Re&&setTimeout(function(){if(re.current){var se=re.current.files;se.length||(ne({type:"closeDialog"}),$())}},300)};x.useEffect(function(){return window.addEventListener("focus",Me,!1),function(){window.removeEventListener("focus",Me,!1)}},[re,Re,$,ze]);var J=x.useRef([]),ue=function(se){Q.current&&Q.current.contains(se.target)||(se.preventDefault(),J.current=[])};x.useEffect(function(){return P&&(document.addEventListener("dragover",L0,!1),document.addEventListener("drop",ue,!1)),function(){P&&(document.removeEventListener("dragover",L0),document.removeEventListener("drop",ue))}},[Q,P]),x.useEffect(function(){return!r&&M&&Q.current&&Q.current.focus(),function(){}},[Q,M,r]);var Ie=x.useCallback(function(q){z?z(q):console.error(q)},[z]),Be=x.useCallback(function(q){q.preventDefault(),q.persist(),N(q),J.current=[].concat(GD(J.current),[q.target]),Nl(q)&&Promise.resolve(o(q)).then(function(se){if(!(vc(q)&&!_)){var Fe=se.length,Ze=Fe>0&&OD({files:se,accept:F,minSize:c,maxSize:s,multiple:u,maxFiles:f,validator:V}),ee=Fe>0&&!Ze;ne({isDragAccept:Ze,isDragReject:ee,isDragActive:!0,type:"setDraggedFiles"}),h&&h(q)}}).catch(function(se){return Ie(se)})},[o,h,Ie,_,F,c,s,u,f,V]),Ne=x.useCallback(function(q){q.preventDefault(),q.persist(),N(q);var se=Nl(q);if(se&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return se&&g&&g(q),!1},[g,_]),Ge=x.useCallback(function(q){q.preventDefault(),q.persist(),N(q);var se=J.current.filter(function(Ze){return Q.current&&Q.current.contains(Ze)}),Fe=se.indexOf(q.target);Fe!==-1&&se.splice(Fe,1),J.current=se,!(se.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Nl(q)&&p&&p(q))},[Q,p,_]),Qe=x.useCallback(function(q,se){var Fe=[],Ze=[];q.forEach(function(ee){var He=N4(ee,F),nt=Wd(He,2),Ft=nt[0],pe=nt[1],De=F4(ee,c,s),hn=Wd(De,2),$t=hn[0],pn=hn[1],or=V?V(ee):null;if(Ft&&$t&&!or)Fe.push(ee);else{var bo=[pe,pn];or&&(bo=bo.concat(or)),Ze.push({file:ee,errors:bo.filter(function(da){return da})})}}),(!u&&Fe.length>1||u&&f>=1&&Fe.length>f)&&(Fe.forEach(function(ee){Ze.push({file:ee,errors:[DD]})}),Fe.splice(0)),ne({acceptedFiles:Fe,fileRejections:Ze,type:"setFiles"}),y&&y(Fe,Ze,se),Ze.length>0&&C&&C(Ze,se),Fe.length>0&&S&&S(Fe,se)},[ne,u,F,c,s,f,y,S,C,V]),ve=x.useCallback(function(q){q.preventDefault(),q.persist(),N(q),J.current=[],Nl(q)&&Promise.resolve(o(q)).then(function(se){vc(q)&&!_||Qe(se,q)}).catch(function(se){return Ie(se)}),ne({type:"reset"})},[o,Qe,Ie,_]),_e=x.useCallback(function(){if(ze.current){ne({type:"openDialog"}),X();var q={multiple:u,types:L};window.showOpenFilePicker(q).then(function(se){return o(se)}).then(function(se){Qe(se,null),ne({type:"closeDialog"})}).catch(function(se){BD(se)?($(se),ne({type:"closeDialog"})):HD(se)?(ze.current=!1,re.current?(re.current.value=null,re.current.click()):Ie(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."))):Ie(se)});return}re.current&&(ne({type:"openDialog"}),X(),re.current.value=null,re.current.click())},[ne,X,$,j,Qe,Ie,L,u]),qe=x.useCallback(function(q){!Q.current||!Q.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),_e())},[Q,_e]),ge=x.useCallback(function(){ne({type:"focus"})},[]),Te=x.useCallback(function(){ne({type:"blur"})},[]),et=x.useCallback(function(){I||(RD()?setTimeout(_e,0):_e())},[I,_e]),Ve=function(se){return r?null:se},vt=function(se){return T?null:Ve(se)},Nt=function(se){return D?null:Ve(se)},N=function(se){_&&se.stopPropagation()},de=x.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=q.refKey,Fe=se===void 0?"ref":se,Ze=q.role,ee=q.onKeyDown,He=q.onFocus,nt=q.onBlur,Ft=q.onClick,pe=q.onDragEnter,De=q.onDragOver,hn=q.onDragLeave,$t=q.onDrop,pn=gc(q,UD);return Ot(Ot(Wf({onKeyDown:vt(hr(ee,qe)),onFocus:vt(hr(He,ge)),onBlur:vt(hr(nt,Te)),onClick:Ve(hr(Ft,et)),onDragEnter:Nt(hr(pe,Be)),onDragOver:Nt(hr(De,Ne)),onDragLeave:Nt(hr(hn,Ge)),onDrop:Nt(hr($t,ve)),role:typeof Ze=="string"&&Ze!==""?Ze:"presentation"},Fe,Q),!r&&!T?{tabIndex:0}:{}),pn)}},[Q,qe,ge,Te,et,Be,Ne,Ge,ve,T,D,r]),xe=x.useCallback(function(q){q.stopPropagation()},[]),je=x.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=q.refKey,Fe=se===void 0?"ref":se,Ze=q.onChange,ee=q.onClick,He=gc(q,$D),nt=Wf({accept:F,multiple:u,type:"file",style:{display:"none"},onChange:Ve(hr(Ze,ve)),onClick:Ve(hr(ee,xe)),tabIndex:-1},Fe,re);return Ot(Ot({},nt),He)}},[re,n,u,ve,r]);return Ot(Ot({},K),{},{isFocused:ce&&!r,getRootProps:de,getInputProps:je,rootRef:Q,inputRef:re,open:Ve(_e)})}function eO(e,t){switch(t.type){case"focus":return Ot(Ot({},e),{},{isFocused:!0});case"blur":return Ot(Ot({},e),{},{isFocused:!1});case"openDialog":return Ot(Ot({},Vf),{},{isFileDialogActive:!0});case"closeDialog":return Ot(Ot({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ot(Ot({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ot(Ot({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ot({},Vf);default:return e}}function H0(){}const tO=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:o}=e;return fe("esc",()=>{o(!1)}),l.jsx(We,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"100vw",height:"100vh",zIndex:999,backdropFilter:"blur(20px)"},children:l.jsx(B,{sx:{opacity:.4,width:"100%",height:"100%",flexDirection:"column",rowGap:4,alignItems:"center",justifyContent:"center",bg:"base.900",boxShadow:`inset 0 0 20rem 1rem var(--invokeai-colors-${t?"accent":"error"}-500)`},children:t?l.jsxs(Vn,{size:"lg",children:["Upload Image",r]}):l.jsxs(l.Fragment,{children:[l.jsx(Vn,{size:"lg",children:"Invalid Upload"}),l.jsx(Vn,{size:"md",children:"Must be single JPEG or PNG image"})]})})})},nO=e=>{const{children:t}=e,n=Y(),r=O(Bt),o=us({}),{t:s}=Z(),[c,u]=x.useState(!1),{setOpenUploader:f}=Qh(),h=x.useCallback(P=>{u(!0);const I=P.errors.reduce((T,D)=>`${T} +${D.message}`,"");o({title:s("toast.uploadFailed"),description:I,status:"error",isClosable:!0})},[s,o]),p=x.useCallback(async P=>{n(Vg({imageFile:P}))},[n]),g=x.useCallback((P,I)=>{I.forEach(T=>{h(T)}),P.forEach(T=>{p(T)})},[p,h]),{getRootProps:y,getInputProps:S,isDragAccept:C,isDragReject:w,isDragActive:k,open:j}=V4({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:g,onDragOver:()=>u(!0),maxFiles:1});f(j),x.useEffect(()=>{const P=I=>{var z;const T=(z=I.clipboardData)==null?void 0:z.items;if(!T)return;const D=[];for(const V of T)V.kind==="file"&&["image/png","image/jpg"].includes(V.type)&&D.push(V);if(!D.length)return;if(I.stopImmediatePropagation(),D.length>1){o({description:s("toast.uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});return}const _=D[0].getAsFile();if(!_){o({description:s("toast.uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0});return}n(Vg({imageFile:_}))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[s,n,o,r]);const M=["img2img","unifiedCanvas"].includes(r)?` to ${Hn[r].tooltip}`:"";return l.jsx(Kh.Provider,{value:j,children:l.jsxs(We,{...y({style:{}}),onKeyDown:P=>{P.key},children:[l.jsx("input",{...S()}),t,k&&c&&l.jsx(tO,{isDragAccept:C,isDragReject:w,overlaySecondaryText:M,setIsHandlingUpload:u})]})})},rO=be(Pt,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),oO=be(Pt,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:te.isEqual}}),iO=()=>{const e=Y(),t=O(rO),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:o}=O(oO),[s,c]=x.useState(!0),u=x.useRef(null);x.useLayoutEffect(()=>{u.current!==null&&s&&(u.current.scrollTop=u.current.scrollHeight)},[s,t,n]);const f=()=>{e(d2()),e(vd(!n))};fe("`",()=>{e(vd(!n))},[n]),fe("esc",()=>{e(vd(!1))});const h=()=>{u.current&&s&&u.current.scrollTop{const{timestamp:y,message:S,level:C}=p,w=C==="info"?"base":C;return l.jsxs(B,{sx:{gap:2,color:`${w}.300`},children:[l.jsxs(Ce,{fontWeight:"600",children:[y,":"]}),l.jsx(Ce,{wordBreak:"break-all",children:S})]},g)})})}),n&&l.jsx(Yt,{hasArrow:!0,label:s?"Autoscroll On":"Autoscroll Off",children:l.jsx(le,{size:"sm","aria-label":"Toggle autoscroll",icon:l.jsx(k8,{}),onClick:()=>c(!s),isChecked:s,sx:{position:"fixed",insetInlineStart:2,bottom:12,zIndex:"10000"}})}),l.jsx(Yt,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:l.jsx(le,{size:"sm","aria-label":"Toggle Log Viewer",icon:n?l.jsx(H8,{}):l.jsx(Iy,{}),onClick:f,sx:{position:"fixed",insetInlineStart:2,bottom:2,zIndex:"10000"},colorScheme:r||!o?"error":"base"})})]})},aO=be(Pt,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:te.isEqual}}),sO=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=O(aO),o=t?Math.round(t*100/n):0;return l.jsx(Zx,{value:o,isIndeterminate:e&&!r,height:dp,zIndex:99})};function lO(e){const{title:t,hotkey:n,description:r}=e;return l.jsxs($n,{sx:{gridTemplateColumns:"auto max-content",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs($n,{children:[l.jsx(Ce,{fontWeight:600,children:t}),r&&l.jsx(Ce,{sx:{fontSize:"sm"},variant:"subtext",children:r})]}),l.jsx(We,{sx:{fontSize:"sm",fontWeight:600,px:2,py:1},children:n})]})}function cO({children:e}){const{isOpen:t,onOpen:n,onClose:r}=uo(),{t:o}=Z(),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.pinOptions.title"),desc:o("hotkeys.pinOptions.desc"),hotkey:"Shift+O"},{title:o("hotkeys.toggleViewer.title"),desc:o("hotkeys.toggleViewer.desc"),hotkey:"Z"},{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"},{title:o("hotkeys.consoleToggle.title"),desc:o("hotkeys.consoleToggle.desc"),hotkey:"`"}],c=[{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.restoreFaces.title"),desc:o("hotkeys.restoreFaces.desc"),hotkey:"Shift+R"},{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"}],u=[{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.toggleGalleryPin.title"),desc:o("hotkeys.toggleGalleryPin.desc"),hotkey:"Shift+G"},{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"}],f=[{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"}],h=p=>l.jsx(B,{flexDir:"column",gap:4,children:p.map((g,y)=>l.jsxs(B,{flexDir:"column",px:2,gap:4,children:[l.jsx(lO,{title:g.title,description:g.desc,hotkey:g.hotkey}),y-1}function $O(e,t){var n=this.__data__,r=$c(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function $r(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=ZA}var JA="[object Arguments]",ez="[object Array]",tz="[object Boolean]",nz="[object Date]",rz="[object Error]",oz="[object Function]",iz="[object Map]",az="[object Number]",sz="[object Object]",lz="[object RegExp]",cz="[object Set]",uz="[object String]",dz="[object WeakMap]",fz="[object ArrayBuffer]",hz="[object DataView]",pz="[object Float32Array]",mz="[object Float64Array]",vz="[object Int8Array]",gz="[object Int16Array]",xz="[object Int32Array]",yz="[object Uint8Array]",bz="[object Uint8ClampedArray]",Sz="[object Uint16Array]",Cz="[object Uint32Array]",Ct={};Ct[pz]=Ct[mz]=Ct[vz]=Ct[gz]=Ct[xz]=Ct[yz]=Ct[bz]=Ct[Sz]=Ct[Cz]=!0;Ct[JA]=Ct[ez]=Ct[fz]=Ct[tz]=Ct[hz]=Ct[nz]=Ct[rz]=Ct[oz]=Ct[iz]=Ct[az]=Ct[sz]=Ct[lz]=Ct[cz]=Ct[uz]=Ct[dz]=!1;function wz(e){return li(e)&&tb(e.length)&&!!Ct[si(e)]}function Fp(e){return function(t){return e(t)}}var nb=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$a=nb&&typeof module=="object"&&module&&!module.nodeType&&module,kz=$a&&$a.exports===nb,Ud=kz&&U4.process,jz=function(){try{var e=$a&&$a.require&&$a.require("util").types;return e||Ud&&Ud.binding&&Ud.binding("util")}catch{}}();const na=jz;var Q0=na&&na.isTypedArray,Ez=Q0?Fp(Q0):wz;const Pz=Ez;var Iz=Object.prototype,Mz=Iz.hasOwnProperty;function rb(e,t){var n=Cs(e),r=!n&&VA(e),o=!n&&!r&&eb(e),s=!n&&!r&&!o&&Pz(e),c=n||r||o||s,u=c?FA(e.length,String):[],f=u.length;for(var h in e)(t||Mz.call(e,h))&&!(c&&(h=="length"||o&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||QA(h,f)))&&u.push(h);return u}var Tz=Object.prototype;function Lp(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Tz;return e===n}var _z=G4(Object.keys,Object);const Dz=_z;var Oz=Object.prototype,Az=Oz.hasOwnProperty;function zz(e){if(!Lp(e))return Dz(e);var t=[];for(var n in Object(e))Az.call(e,n)&&n!="constructor"&&t.push(n);return t}function ob(e){return e!=null&&tb(e.length)&&!X4(e)}function Bp(e){return ob(e)?rb(e):zz(e)}function Rz(e,t){return e&&qc(t,Bp(t),e)}function Nz(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Fz=Object.prototype,Lz=Fz.hasOwnProperty;function Bz(e){if(!Ss(e))return Nz(e);var t=Lp(e),n=[];for(var r in e)r=="constructor"&&(t||!Lz.call(e,r))||n.push(r);return n}function Hp(e){return ob(e)?rb(e,!0):Bz(e)}function Hz(e,t){return e&&qc(t,Hp(t),e)}var ib=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Z0=ib&&typeof module=="object"&&module&&!module.nodeType&&module,Wz=Z0&&Z0.exports===ib,J0=Wz?kr.Buffer:void 0,e1=J0?J0.allocUnsafe:void 0;function Vz(e,t){if(t)return e.slice();var n=e.length,r=e1?e1(n):new e.constructor(n);return e.copy(r),r}function ab(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[o]=e[o]);return n}function v1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var g1=function(t){return Array.isArray(t)&&t.length===0},wn=function(t){return typeof t=="function"},Yc=function(t){return t!==null&&typeof t=="object"},HN=function(t){return String(Math.floor(Number(t)))===t},$d=function(t){return Object.prototype.toString.call(t)==="[object String]"},gb=function(t){return x.Children.count(t)===0},Gd=function(t){return Yc(t)&&wn(t.then)};function rn(e,t,n,r){r===void 0&&(r=0);for(var o=vb(t);e&&r=0?[]:{}}}return(s===0?e:o)[c[s]]===n?e:(n===void 0?delete o[c[s]]:o[c[s]]=n,s===0&&n===void 0&&delete r[c[s]],r)}function xb(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,s=Object.keys(e);o0?de.map(function(je){return z(je,rn(N,je))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(xe).then(function(je){return je.reduce(function(q,se,Fe){return se==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||se&&(q=br(q,de[Fe],se)),q},{})})},[z]),F=x.useCallback(function(N){return Promise.all([V(N),y.validationSchema?_(N):{},y.validate?D(N):{}]).then(function(de){var xe=de[0],je=de[1],q=de[2],se=$f.all([xe,je,q],{arrayMerge:qN});return se})},[y.validate,y.validationSchema,V,D,_]),L=Bn(function(N){return N===void 0&&(N=I.values),T({type:"SET_ISVALIDATING",payload:!0}),F(N).then(function(de){return j.current&&(T({type:"SET_ISVALIDATING",payload:!1}),T({type:"SET_ERRORS",payload:de})),de})});x.useEffect(function(){c&&j.current===!0&&ro(S.current,y.initialValues)&&L(S.current)},[c,L]);var X=x.useCallback(function(N){var de=N&&N.values?N.values:S.current,xe=N&&N.errors?N.errors:C.current?C.current:y.initialErrors||{},je=N&&N.touched?N.touched:w.current?w.current:y.initialTouched||{},q=N&&N.status?N.status:k.current?k.current:y.initialStatus;S.current=de,C.current=xe,w.current=je,k.current=q;var se=function(){T({type:"RESET_FORM",payload:{isSubmitting:!!N&&!!N.isSubmitting,errors:xe,touched:je,status:q,values:de,isValidating:!!N&&!!N.isValidating,submitCount:N&&N.submitCount&&typeof N.submitCount=="number"?N.submitCount:0}})};if(y.onReset){var Fe=y.onReset(I.values,ve);Gd(Fe)?Fe.then(se):se()}else se()},[y.initialErrors,y.initialStatus,y.initialTouched]);x.useEffect(function(){j.current===!0&&!ro(S.current,y.initialValues)&&(h&&(S.current=y.initialValues,X()),c&&L(S.current))},[h,y.initialValues,X,c,L]),x.useEffect(function(){h&&j.current===!0&&!ro(C.current,y.initialErrors)&&(C.current=y.initialErrors||Ao,T({type:"SET_ERRORS",payload:y.initialErrors||Ao}))},[h,y.initialErrors]),x.useEffect(function(){h&&j.current===!0&&!ro(w.current,y.initialTouched)&&(w.current=y.initialTouched||Fl,T({type:"SET_TOUCHED",payload:y.initialTouched||Fl}))},[h,y.initialTouched]),x.useEffect(function(){h&&j.current===!0&&!ro(k.current,y.initialStatus)&&(k.current=y.initialStatus,T({type:"SET_STATUS",payload:y.initialStatus}))},[h,y.initialStatus,y.initialTouched]);var $=Bn(function(N){if(M.current[N]&&wn(M.current[N].validate)){var de=rn(I.values,N),xe=M.current[N].validate(de);return Gd(xe)?(T({type:"SET_ISVALIDATING",payload:!0}),xe.then(function(je){return je}).then(function(je){T({type:"SET_FIELD_ERROR",payload:{field:N,value:je}}),T({type:"SET_ISVALIDATING",payload:!1})})):(T({type:"SET_FIELD_ERROR",payload:{field:N,value:xe}}),Promise.resolve(xe))}else if(y.validationSchema)return T({type:"SET_ISVALIDATING",payload:!0}),_(I.values,N).then(function(je){return je}).then(function(je){T({type:"SET_FIELD_ERROR",payload:{field:N,value:je[N]}}),T({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=x.useCallback(function(N,de){var xe=de.validate;M.current[N]={validate:xe}},[]),re=x.useCallback(function(N){delete M.current[N]},[]),ie=Bn(function(N,de){T({type:"SET_TOUCHED",payload:N});var xe=de===void 0?o:de;return xe?L(I.values):Promise.resolve()}),U=x.useCallback(function(N){T({type:"SET_ERRORS",payload:N})},[]),K=Bn(function(N,de){var xe=wn(N)?N(I.values):N;T({type:"SET_VALUES",payload:xe});var je=de===void 0?n:de;return je?L(xe):Promise.resolve()}),ne=x.useCallback(function(N,de){T({type:"SET_FIELD_ERROR",payload:{field:N,value:de}})},[]),ce=Bn(function(N,de,xe){T({type:"SET_FIELD_VALUE",payload:{field:N,value:de}});var je=xe===void 0?n:xe;return je?L(br(I.values,N,de)):Promise.resolve()}),Re=x.useCallback(function(N,de){var xe=de,je=N,q;if(!$d(N)){N.persist&&N.persist();var se=N.target?N.target:N.currentTarget,Fe=se.type,Ze=se.name,ee=se.id,He=se.value,nt=se.checked,Ft=se.outerHTML,pe=se.options,De=se.multiple;xe=de||Ze||ee,je=/number|range/.test(Fe)?(q=parseFloat(He),isNaN(q)?"":q):/checkbox/.test(Fe)?XN(rn(I.values,xe),nt,He):pe&&De?YN(pe):He}xe&&ce(xe,je)},[ce,I.values]),ze=Bn(function(N){if($d(N))return function(de){return Re(de,N)};Re(N)}),Me=Bn(function(N,de,xe){de===void 0&&(de=!0),T({type:"SET_FIELD_TOUCHED",payload:{field:N,value:de}});var je=xe===void 0?o:xe;return je?L(I.values):Promise.resolve()}),J=x.useCallback(function(N,de){N.persist&&N.persist();var xe=N.target,je=xe.name,q=xe.id,se=xe.outerHTML,Fe=de||je||q;Me(Fe,!0)},[Me]),ue=Bn(function(N){if($d(N))return function(de){return J(de,N)};J(N)}),Ie=x.useCallback(function(N){wn(N)?T({type:"SET_FORMIK_STATE",payload:N}):T({type:"SET_FORMIK_STATE",payload:function(){return N}})},[]),Be=x.useCallback(function(N){T({type:"SET_STATUS",payload:N})},[]),Ne=x.useCallback(function(N){T({type:"SET_ISSUBMITTING",payload:N})},[]),Ge=Bn(function(){return T({type:"SUBMIT_ATTEMPT"}),L().then(function(N){var de=N instanceof Error,xe=!de&&Object.keys(N).length===0;if(xe){var je;try{if(je=_e(),je===void 0)return}catch(q){throw q}return Promise.resolve(je).then(function(q){return j.current&&T({type:"SUBMIT_SUCCESS"}),q}).catch(function(q){if(j.current)throw T({type:"SUBMIT_FAILURE"}),q})}else if(j.current&&(T({type:"SUBMIT_FAILURE"}),de))throw N})}),Qe=Bn(function(N){N&&N.preventDefault&&wn(N.preventDefault)&&N.preventDefault(),N&&N.stopPropagation&&wn(N.stopPropagation)&&N.stopPropagation(),Ge().catch(function(de){console.warn("Warning: An unhandled error was caught from submitForm()",de)})}),ve={resetForm:X,validateForm:L,validateField:$,setErrors:U,setFieldError:ne,setFieldTouched:Me,setFieldValue:ce,setStatus:Be,setSubmitting:Ne,setTouched:ie,setValues:K,setFormikState:Ie,submitForm:Ge},_e=Bn(function(){return p(I.values,ve)}),qe=Bn(function(N){N&&N.preventDefault&&wn(N.preventDefault)&&N.preventDefault(),N&&N.stopPropagation&&wn(N.stopPropagation)&&N.stopPropagation(),X()}),ge=x.useCallback(function(N){return{value:rn(I.values,N),error:rn(I.errors,N),touched:!!rn(I.touched,N),initialValue:rn(S.current,N),initialTouched:!!rn(w.current,N),initialError:rn(C.current,N)}},[I.errors,I.touched,I.values]),Te=x.useCallback(function(N){return{setValue:function(xe,je){return ce(N,xe,je)},setTouched:function(xe,je){return Me(N,xe,je)},setError:function(xe){return ne(N,xe)}}},[ce,Me,ne]),et=x.useCallback(function(N){var de=Yc(N),xe=de?N.name:N,je=rn(I.values,xe),q={name:xe,value:je,onChange:ze,onBlur:ue};if(de){var se=N.type,Fe=N.value,Ze=N.as,ee=N.multiple;se==="checkbox"?Fe===void 0?q.checked=!!je:(q.checked=!!(Array.isArray(je)&&~je.indexOf(Fe)),q.value=Fe):se==="radio"?(q.checked=je===Fe,q.value=Fe):Ze==="select"&&ee&&(q.value=q.value||[],q.multiple=!0)}return q},[ue,ze,I.values]),Ve=x.useMemo(function(){return!ro(S.current,I.values)},[S.current,I.values]),vt=x.useMemo(function(){return typeof u<"u"?Ve?I.errors&&Object.keys(I.errors).length===0:u!==!1&&wn(u)?u(y):u:I.errors&&Object.keys(I.errors).length===0},[u,Ve,I.errors,y]),Nt=ht({},I,{initialValues:S.current,initialErrors:C.current,initialTouched:w.current,initialStatus:k.current,handleBlur:ue,handleChange:ze,handleReset:qe,handleSubmit:Qe,resetForm:X,setErrors:U,setFormikState:Ie,setFieldTouched:Me,setFieldValue:ce,setFieldError:ne,setStatus:Be,setSubmitting:Ne,setTouched:ie,setValues:K,submitForm:Ge,validateForm:L,validateField:$,isValid:vt,dirty:Ve,unregisterField:re,registerField:Q,getFieldProps:et,getFieldMeta:ge,getFieldHelpers:Te,validateOnBlur:o,validateOnChange:n,validateOnMount:c});return Nt}function ws(e){var t=UN(e),n=e.component,r=e.children,o=e.render,s=e.innerRef;return x.useImperativeHandle(s,function(){return t}),x.createElement(WN,{value:t},n?x.createElement(n,t):o?o(t):r?wn(r)?r(t):gb(r)?null:x.Children.only(r):null)}function $N(e){var t={};if(e.inner){if(e.inner.length===0)return br(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var s;if(n){if(r>=o.length)break;s=o[r++]}else{if(r=o.next(),r.done)break;s=r.value}var c=s;rn(t,c.path)||(t=br(t,c.path,c.message))}}return t}function GN(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r={});var o=Kf(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:r})}function Kf(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||$0(o)?Kf(o):o!==""?o:void 0}):$0(e[r])?t[r]=Kf(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function qN(e,t,n){var r=e.slice();return t.forEach(function(s,c){if(typeof r[c]>"u"){var u=n.clone!==!1,f=u&&n.isMergeableObject(s);r[c]=f?$f(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[c]=$f(e[c],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function YN(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function XN(e,t,n){if(typeof e=="boolean")return Boolean(t);var r=[],o=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),o=s>=0;else if(!n||n=="true"||n=="false")return Boolean(t);return t&&n&&!o?r.concat(n):o?r.slice(0,s).concat(r.slice(s+1)):r}var KN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function Bn(e){var t=x.useRef(e);return KN(function(){t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;or?o:r},0);return Array.from(ht({},t,{length:n+1}))}else return[]},tF=function(e){BN(t,e);function t(r){var o;return o=e.call(this,r)||this,o.updateArrayField=function(s,c,u){var f=o.props,h=f.name,p=f.formik.setFormikState;p(function(g){var y=typeof u=="function"?u:s,S=typeof c=="function"?c:s,C=br(g.values,h,s(rn(g.values,h))),w=u?y(rn(g.errors,h)):void 0,k=c?S(rn(g.touched,h)):void 0;return g1(w)&&(w=void 0),g1(k)&&(k=void 0),ht({},g,{values:C,errors:u?br(g.errors,h,w):g.errors,touched:c?br(g.touched,h,k):g.touched})})},o.push=function(s){return o.updateArrayField(function(c){return[].concat(ra(c),[LN(s)])},!1,!1)},o.handlePush=function(s){return function(){return o.push(s)}},o.swap=function(s,c){return o.updateArrayField(function(u){return JN(u,s,c)},!0,!0)},o.handleSwap=function(s,c){return function(){return o.swap(s,c)}},o.move=function(s,c){return o.updateArrayField(function(u){return ZN(u,s,c)},!0,!0)},o.handleMove=function(s,c){return function(){return o.move(s,c)}},o.insert=function(s,c){return o.updateArrayField(function(u){return qd(u,s,c)},function(u){return qd(u,s,null)},function(u){return qd(u,s,null)})},o.handleInsert=function(s,c){return function(){return o.insert(s,c)}},o.replace=function(s,c){return o.updateArrayField(function(u){return eF(u,s,c)},!1,!1)},o.handleReplace=function(s,c){return function(){return o.replace(s,c)}},o.unshift=function(s){var c=-1;return o.updateArrayField(function(u){var f=u?[s].concat(u):[s];return c<0&&(c=f.length),f},function(u){var f=u?[null].concat(u):[null];return c<0&&(c=f.length),f},function(u){var f=u?[null].concat(u):[null];return c<0&&(c=f.length),f}),c},o.handleUnshift=function(s){return function(){return o.unshift(s)}},o.handleRemove=function(s){return function(){return o.remove(s)}},o.handlePop=function(){return function(){return o.pop()}},o.remove=o.remove.bind(v1(o)),o.pop=o.pop.bind(v1(o)),o}var n=t.prototype;return n.componentDidUpdate=function(o){this.props.validateOnChange&&this.props.formik.validateOnChange&&!ro(rn(o.formik.values,o.name),rn(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(o){var s;return this.updateArrayField(function(c){var u=c?ra(c):[];return s||(s=u[o]),wn(u.splice)&&u.splice(o,1),u},!0,!0),s},n.pop=function(){var o;return this.updateArrayField(function(s){var c=s;return o||(o=c&&c.pop&&c.pop()),c},!0,!0),o},n.render=function(){var o={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},s=this.props,c=s.component,u=s.render,f=s.children,h=s.name,p=s.formik,g=Bo(p,["validate","validationSchema"]),y=ht({},o,{form:g,name:h});return c?x.createElement(c,y):u?u(y):f?typeof f=="function"?f(y):gb(f)?null:x.Children.only(f):null},t}(x.Component);tF.defaultProps={validateOnChange:!0};function nF(e){const{model:t}=e,r=O(C=>C.system.model_list)[t],o=Y(),{t:s}=Z(),c=O(C=>C.system.isProcessing),u=O(C=>C.system.isConnected),[f,h]=x.useState("same"),[p,g]=x.useState("");x.useEffect(()=>{h("same")},[t]);const y=()=>{h("same")},S=()=>{o(n3({model_name:t,save_location:f,custom_location:f==="custom"&&p!==""?p:null}))};return l.jsxs(Wc,{title:`${s("modelManager.convert")} ${t}`,acceptCallback:S,cancelCallback:y,acceptButtonText:`${s("modelManager.convert")}`,triggerComponent:l.jsxs(Je,{size:"sm","aria-label":s("modelManager.convertToDiffusers"),isDisabled:r.status==="active"||c||!u,className:" modal-close-btn",marginInlineEnd:8,children:["🧨 ",s("modelManager.convertToDiffusers")]}),motionPreset:"slideInBottom",children:[l.jsxs(B,{flexDirection:"column",rowGap:4,children:[l.jsx(Ce,{children:s("modelManager.convertToDiffusersHelpText1")}),l.jsxs(mx,{children:[l.jsx(Fa,{children:s("modelManager.convertToDiffusersHelpText2")}),l.jsx(Fa,{children:s("modelManager.convertToDiffusersHelpText3")}),l.jsx(Fa,{children:s("modelManager.convertToDiffusersHelpText4")}),l.jsx(Fa,{children:s("modelManager.convertToDiffusersHelpText5")})]}),l.jsx(Ce,{children:s("modelManager.convertToDiffusersHelpText6")})]}),l.jsxs(B,{flexDir:"column",gap:4,children:[l.jsxs(B,{marginTop:4,flexDir:"column",gap:2,children:[l.jsx(Ce,{fontWeight:"600",children:s("modelManager.convertToDiffusersSaveLocation")}),l.jsx(Ja,{value:f,onChange:C=>h(C),children:l.jsxs(B,{gap:4,children:[l.jsx(jn,{value:"same",children:l.jsx(Yt,{label:"Save converted model in the same folder",children:s("modelManager.sameFolder")})}),l.jsx(jn,{value:"root",children:l.jsx(Yt,{label:"Save converted model in the InvokeAI root folder",children:s("modelManager.invokeRoot")})}),l.jsx(jn,{value:"custom",children:l.jsx(Yt,{label:"Save converted model in a custom folder",children:s("modelManager.custom")})})]})})]}),f==="custom"&&l.jsxs(B,{flexDirection:"column",rowGap:2,children:[l.jsx(Ce,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:s("modelManager.customSaveLocation")}),l.jsx(mt,{value:p,onChange:C=>{C.target.value!==""&&g(C.target.value)},width:"full"})]})]})]})}const rF=be([Pt],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),x1=64,y1=2048;function oF(){const{openModel:e,model_list:t}=O(rF),n=O(f=>f.system.isProcessing),r=Y(),{t:o}=Z(),[s,c]=x.useState({name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1,format:"ckpt"});x.useEffect(()=>{var f,h,p,g,y,S,C;if(e){const w=te.pickBy(t,(k,j)=>te.isEqual(j,e));c({name:e,description:(f=w[e])==null?void 0:f.description,config:(h=w[e])==null?void 0:h.config,weights:(p=w[e])==null?void 0:p.weights,vae:(g=w[e])==null?void 0:g.vae,width:(y=w[e])==null?void 0:y.width,height:(S=w[e])==null?void 0:S.height,default:(C=w[e])==null?void 0:C.default,format:"ckpt"})}},[t,e]);const u=f=>{r(ls({...f,width:Number(f.width),height:Number(f.height)}))};return e?l.jsxs(B,{flexDirection:"column",rowGap:4,width:"100%",children:[l.jsxs(B,{alignItems:"center",gap:4,justifyContent:"space-between",children:[l.jsx(Ce,{fontSize:"lg",fontWeight:"bold",children:e}),l.jsx(nF,{model:e})]}),l.jsx(B,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingInlineEnd:8,children:l.jsx(ws,{enableReinitialize:!0,initialValues:s,onSubmit:u,children:({handleSubmit:f,errors:h,touched:p})=>l.jsx("form",{onSubmit:f,children:l.jsxs(Le,{rowGap:2,alignItems:"start",children:[l.jsxs(rt,{isInvalid:!!h.description&&p.description,isRequired:!0,children:[l.jsx(st,{htmlFor:"description",fontSize:"sm",children:o("modelManager.description")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"description",name:"description",type:"text",width:"full"}),h.description&&p.description?l.jsx(kt,{children:h.description}):l.jsx(wt,{margin:0,children:o("modelManager.descriptionValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!h.config&&p.config,isRequired:!0,children:[l.jsx(st,{htmlFor:"config",fontSize:"sm",children:o("modelManager.config")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"config",name:"config",type:"text",width:"full"}),h.config&&p.config?l.jsx(kt,{children:h.config}):l.jsx(wt,{margin:0,children:o("modelManager.configValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!h.weights&&p.weights,isRequired:!0,children:[l.jsx(st,{htmlFor:"config",fontSize:"sm",children:o("modelManager.modelLocation")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"weights",name:"weights",type:"text",width:"full"}),h.weights&&p.weights?l.jsx(kt,{children:h.weights}):l.jsx(wt,{margin:0,children:o("modelManager.modelLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!h.vae&&p.vae,children:[l.jsx(st,{htmlFor:"vae",fontSize:"sm",children:o("modelManager.vaeLocation")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae",name:"vae",type:"text",width:"full"}),h.vae&&p.vae?l.jsx(kt,{children:h.vae}):l.jsx(wt,{margin:0,children:o("modelManager.vaeLocationValidationMsg")})]})]}),l.jsxs(sa,{width:"100%",children:[l.jsxs(rt,{isInvalid:!!h.width&&p.width,children:[l.jsx(st,{htmlFor:"width",fontSize:"sm",children:o("modelManager.width")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{id:"width",name:"width",children:({field:g,form:y})=>l.jsx(Lr,{id:"width",name:"width",min:x1,max:y1,step:64,value:y.values.width,onChange:S=>y.setFieldValue(g.name,Number(S))})}),h.width&&p.width?l.jsx(kt,{children:h.width}):l.jsx(wt,{margin:0,children:o("modelManager.widthValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!h.height&&p.height,children:[l.jsx(st,{htmlFor:"height",fontSize:"sm",children:o("modelManager.height")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{id:"height",name:"height",children:({field:g,form:y})=>l.jsx(Lr,{id:"height",name:"height",min:x1,max:y1,step:64,value:y.values.height,onChange:S=>y.setFieldValue(g.name,Number(S))})}),h.height&&p.height?l.jsx(kt,{children:h.height}):l.jsx(wt,{margin:0,children:o("modelManager.heightValidationMsg")})]})]})]}),l.jsx(Je,{type:"submit",className:"modal-close-btn",isLoading:n,children:o("modelManager.updateModel")})]})})})})]}):l.jsx(B,{sx:{width:"100%",justifyContent:"center",alignItems:"center",borderRadius:"base",bg:"base.900"},children:l.jsx(Ce,{fontWeight:500,children:"Pick A Model To Edit"})})}const iF=be([Pt],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}});function aF(){const{openModel:e,model_list:t}=O(iF),n=O(f=>f.system.isProcessing),r=Y(),{t:o}=Z(),[s,c]=x.useState({name:"",description:"",repo_id:"",path:"",vae:{repo_id:"",path:""},default:!1,format:"diffusers"});x.useEffect(()=>{var f,h,p,g,y,S,C,w,k,j,M,P,I,T,D,_;if(e){const z=te.pickBy(t,(V,F)=>te.isEqual(F,e));c({name:e,description:(f=z[e])==null?void 0:f.description,path:(h=z[e])!=null&&h.path&&((p=z[e])==null?void 0:p.path)!=="None"?(g=z[e])==null?void 0:g.path:"",repo_id:(y=z[e])!=null&&y.repo_id&&((S=z[e])==null?void 0:S.repo_id)!=="None"?(C=z[e])==null?void 0:C.repo_id:"",vae:{repo_id:(k=(w=z[e])==null?void 0:w.vae)!=null&&k.repo_id?(M=(j=z[e])==null?void 0:j.vae)==null?void 0:M.repo_id:"",path:(I=(P=z[e])==null?void 0:P.vae)!=null&&I.path?(D=(T=z[e])==null?void 0:T.vae)==null?void 0:D.path:""},default:(_=z[e])==null?void 0:_.default,format:"diffusers"})}},[t,e]);const u=f=>{const h=f;f.path===""&&delete h.path,f.repo_id===""&&delete h.repo_id,f.vae.path===""&&delete h.vae.path,f.vae.repo_id===""&&delete h.vae.repo_id,r(ls(f))};return e?l.jsxs(B,{flexDirection:"column",rowGap:4,width:"100%",children:[l.jsx(B,{alignItems:"center",children:l.jsx(Ce,{fontSize:"lg",fontWeight:"bold",children:e})}),l.jsx(B,{flexDirection:"column",overflowY:"scroll",paddingInlineEnd:8,children:l.jsx(ws,{enableReinitialize:!0,initialValues:s,onSubmit:u,children:({handleSubmit:f,errors:h,touched:p})=>{var g,y,S,C,w,k,j,M,P,I;return l.jsx("form",{onSubmit:f,children:l.jsxs(Le,{rowGap:2,alignItems:"start",children:[l.jsxs(rt,{isInvalid:!!h.description&&p.description,isRequired:!0,children:[l.jsx(st,{htmlFor:"description",fontSize:"sm",children:o("modelManager.description")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"description",name:"description",type:"text",width:"full"}),h.description&&p.description?l.jsx(kt,{children:h.description}):l.jsx(wt,{margin:0,children:o("modelManager.descriptionValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!h.path&&p.path,isRequired:!0,children:[l.jsx(st,{htmlFor:"path",fontSize:"sm",children:o("modelManager.modelLocation")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"path",name:"path",type:"text",width:"full"}),h.path&&p.path?l.jsx(kt,{children:h.path}):l.jsx(wt,{margin:0,children:o("modelManager.modelLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!h.repo_id&&p.repo_id,children:[l.jsx(st,{htmlFor:"repo_id",fontSize:"sm",children:o("modelManager.repo_id")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"repo_id",name:"repo_id",type:"text",width:"full"}),h.repo_id&&p.repo_id?l.jsx(kt,{children:h.repo_id}):l.jsx(wt,{margin:0,children:o("modelManager.repoIDValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!((g=h.vae)!=null&&g.path)&&((y=p.vae)==null?void 0:y.path),children:[l.jsx(st,{htmlFor:"vae.path",fontSize:"sm",children:o("modelManager.vaeLocation")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae.path",name:"vae.path",type:"text",width:"full"}),(S=h.vae)!=null&&S.path&&((C=p.vae)!=null&&C.path)?l.jsx(kt,{children:(w=h.vae)==null?void 0:w.path}):l.jsx(wt,{margin:0,children:o("modelManager.vaeLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!((k=h.vae)!=null&&k.repo_id)&&((j=p.vae)==null?void 0:j.repo_id),children:[l.jsx(st,{htmlFor:"vae.repo_id",fontSize:"sm",children:o("modelManager.vaeRepoID")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"full"}),(M=h.vae)!=null&&M.repo_id&&((P=p.vae)!=null&&P.repo_id)?l.jsx(kt,{children:(I=h.vae)==null?void 0:I.repo_id}):l.jsx(wt,{margin:0,children:o("modelManager.vaeRepoIDValidationMsg")})]})]}),l.jsx(Je,{type:"submit",className:"modal-close-btn",isLoading:n,children:o("modelManager.updateModel")})]})})}})})]}):l.jsx(B,{sx:{width:"100%",justifyContent:"center",alignItems:"center",borderRadius:"base",bg:"base.900"},children:l.jsx(Ce,{fontWeight:"500",children:"Pick A Model To Edit"})})}const bb=be([Pt],e=>{const{model_list:t}=e,n=[];return te.forEach(t,r=>{n.push(r.weights)}),n});function b1({model:e,modelsToAdd:t,setModelsToAdd:n}){const{t:r}=Z(),o=O(bb),s=c=>{t.includes(c.target.value)?n(te.remove(t,u=>u!==c.target.value)):n([...t,c.target.value])};return l.jsx(Le,{children:l.jsxs(B,{flexDirection:"column",gap:2,backgroundColor:t.includes(e.name)?"accent.650":"base.800",paddingX:4,paddingY:2,borderRadius:4,children:[l.jsxs(B,{gap:4,children:[l.jsx(pt,{value:e.name,label:l.jsx(Ce,{fontWeight:500,children:e.name}),isChecked:t.includes(e.name),isDisabled:o.includes(e.location),onChange:s}),o.includes(e.location)&&l.jsx(yx,{colorScheme:"accent",children:r("modelManager.modelExists")})]}),l.jsx(Ce,{fontStyle:"italic",variant:"subtext",children:e.location})]})})}function sF(){const e=Y(),{t}=Z(),n=O(P=>P.system.searchFolder),r=O(P=>P.system.foundModels),o=O(bb),s=O(P=>P.ui.shouldShowExistingModelsInSearch),c=O(P=>P.system.isProcessing),[u,f]=ke.useState([]),[h,p]=ke.useState("v1"),[g,y]=ke.useState(""),S=()=>{e(o3(null)),e(i3(null)),f([])},C=P=>{e(Qv(P.checkpointFolder))},w=()=>{f([]),r&&r.forEach(P=>{o.includes(P.location)||f(I=>[...I,P.name])})},k=()=>{f([])},j=()=>{const P=r==null?void 0:r.filter(T=>u.includes(T.name)),I={v1:"configs/stable-diffusion/v1-inference.yaml",v2:"configs/stable-diffusion/v2-inference-v.yaml",inpainting:"configs/stable-diffusion/v1-inpainting-inference.yaml",custom:g};P==null||P.forEach(T=>{const D={name:T.name,description:"",config:I[h],weights:T.location,vae:"",width:512,height:512,default:!1,format:"ckpt"};e(ls(D))}),f([])},M=()=>{const P=[],I=[];return r&&r.forEach((T,D)=>{o.includes(T.location)?I.push(l.jsx(b1,{model:T,modelsToAdd:u,setModelsToAdd:f},D)):P.push(l.jsx(b1,{model:T,modelsToAdd:u,setModelsToAdd:f},D))}),l.jsxs(l.Fragment,{children:[P,s&&I]})};return l.jsxs(l.Fragment,{children:[n?l.jsxs(B,{sx:{padding:4,gap:2,position:"relative",borderRadius:"base",alignItems:"center",w:"full",bg:"base.900"},children:[l.jsxs(B,{sx:{flexDir:"column",gap:2},children:[l.jsx(Ce,{sx:{fontWeight:500,fontSize:"sm"},variant:"subtext",children:t("modelManager.checkpointFolder")}),l.jsx(Ce,{sx:{fontWeight:500,fontSize:"sm"},children:n})]}),l.jsx(jc,{}),l.jsx(le,{"aria-label":t("modelManager.scanAgain"),tooltip:t("modelManager.scanAgain"),icon:l.jsx(Jh,{}),fontSize:18,disabled:c,onClick:()=>e(Qv(n))}),l.jsx(le,{"aria-label":t("modelManager.clearCheckpointFolder"),icon:l.jsx(xs,{style:{transform:"rotate(45deg)"}}),onClick:S})]}):l.jsx(ws,{initialValues:{checkpointFolder:""},onSubmit:P=>{C(P)},children:({handleSubmit:P})=>l.jsx("form",{onSubmit:P,children:l.jsxs(sa,{columnGap:2,alignItems:"flex-end",width:"100%",children:[l.jsx(rt,{isRequired:!0,width:"lg",children:l.jsx(jt,{as:mt,id:"checkpointFolder",name:"checkpointFolder",type:"text",size:"md",label:t("modelManager.checkpointFolder")})}),l.jsx(Je,{leftIcon:l.jsx(q8,{}),"aria-label":t("modelManager.findModels"),tooltip:t("modelManager.findModels"),type:"submit",disabled:c,paddingX:10,children:t("modelManager.findModels")})]})})}),r&&l.jsxs(B,{flexDirection:"column",rowGap:4,width:"full",children:[l.jsxs(B,{justifyContent:"space-between",alignItems:"center",children:[l.jsxs("p",{children:[t("modelManager.modelsFound"),": ",r.length]}),l.jsxs("p",{children:[t("modelManager.selected"),": ",u.length]})]}),l.jsxs(B,{columnGap:2,justifyContent:"space-between",children:[l.jsxs(B,{columnGap:2,children:[l.jsx(Je,{isDisabled:u.length===r.length,onClick:w,children:t("modelManager.selectAll")}),l.jsx(Je,{isDisabled:u.length===0,onClick:k,children:t("modelManager.deselectAll")}),l.jsx(pt,{label:t("modelManager.showExisting"),isChecked:s,onChange:()=>e(r3(!s))})]}),l.jsx(Je,{isDisabled:u.length===0,onClick:j,colorScheme:"accent",children:t("modelManager.addSelected")})]}),l.jsxs(B,{sx:{flexDirection:"column",padding:4,rowGap:4,borderRadius:"base",width:"full",bg:"base.900"},children:[l.jsxs(B,{gap:4,children:[l.jsx(Ce,{fontWeight:500,variant:"subtext",children:t("modelManager.pickModelType")}),l.jsx(Ja,{value:h,onChange:P=>p(P),defaultValue:"v1",name:"model_type",children:l.jsxs(B,{gap:4,children:[l.jsx(jn,{value:"v1",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.v1")})}),l.jsx(jn,{value:"v2",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.v2")})}),l.jsx(jn,{value:"inpainting",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.inpainting")})}),l.jsx(jn,{value:"custom",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.customConfig")})})]})})]}),h==="custom"&&l.jsxs(B,{flexDirection:"column",rowGap:2,children:[l.jsx(Ce,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:t("modelManager.pathToCustomConfig")}),l.jsx(mt,{value:g,onChange:P=>{P.target.value!==""&&y(P.target.value)},width:"full"})]})]}),l.jsx(B,{flexDirection:"column",maxHeight:72,overflowY:"scroll",borderRadius:"sm",paddingInlineEnd:4,gap:2,children:r.length>0?M():l.jsx(Ce,{fontWeight:"500",padding:2,borderRadius:"sm",textAlign:"center",variant:"subtext",children:t("modelManager.noModelsFound")})})]})]})}const S1=64,C1=2048;function lF(){const e=Y(),{t}=Z(),n=O(h=>h.system.isProcessing);function r(h){return/\s/.test(h)}function o(h){let p;return r(h)&&(p=t("modelManager.cannotUseSpaces")),p}const s={name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,format:"ckpt",default:!1},c=h=>{e(ls(h)),e(Vo(null))},[u,f]=ke.useState(!1);return l.jsxs(Le,{gap:2,alignItems:"flex-start",children:[l.jsx(le,{"aria-label":t("common.back"),tooltip:t("common.back"),onClick:()=>e(Vo(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",insetInlineEnd:12,top:3,icon:l.jsx(by,{})}),l.jsx(sF,{}),l.jsx(pt,{label:t("modelManager.addManually"),isChecked:u,onChange:()=>f(!u)}),u&&l.jsx(ws,{initialValues:s,onSubmit:c,children:({handleSubmit:h,errors:p,touched:g})=>l.jsx("form",{onSubmit:h,children:l.jsxs(Le,{rowGap:2,children:[l.jsx(Ce,{fontSize:20,fontWeight:"bold",alignSelf:"start",children:t("modelManager.manual")}),l.jsxs(rt,{isInvalid:!!p.name&&g.name,isRequired:!0,children:[l.jsx(st,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"name",name:"name",type:"text",validate:o,width:"2xl"}),p.name&&g.name?l.jsx(kt,{children:p.name}):l.jsx(wt,{margin:0,children:t("modelManager.nameValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.description&&g.description,isRequired:!0,children:[l.jsx(st,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"description",name:"description",type:"text",width:"2xl"}),p.description&&g.description?l.jsx(kt,{children:p.description}):l.jsx(wt,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.config&&g.config,isRequired:!0,children:[l.jsx(st,{htmlFor:"config",fontSize:"sm",children:t("modelManager.config")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"config",name:"config",type:"text",width:"2xl"}),p.config&&g.config?l.jsx(kt,{children:p.config}):l.jsx(wt,{margin:0,children:t("modelManager.configValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.weights&&g.weights,isRequired:!0,children:[l.jsx(st,{htmlFor:"config",fontSize:"sm",children:t("modelManager.modelLocation")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"weights",name:"weights",type:"text",width:"2xl"}),p.weights&&g.weights?l.jsx(kt,{children:p.weights}):l.jsx(wt,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.vae&&g.vae,children:[l.jsx(st,{htmlFor:"vae",fontSize:"sm",children:t("modelManager.vaeLocation")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae",name:"vae",type:"text",width:"2xl"}),p.vae&&g.vae?l.jsx(kt,{children:p.vae}):l.jsx(wt,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),l.jsxs(sa,{width:"100%",children:[l.jsxs(rt,{isInvalid:!!p.width&&g.width,children:[l.jsx(st,{htmlFor:"width",fontSize:"sm",children:t("modelManager.width")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{id:"width",name:"width",children:({field:y,form:S})=>l.jsx(Lr,{id:"width",name:"width",min:S1,max:C1,step:64,width:"90%",value:S.values.width,onChange:C=>S.setFieldValue(y.name,Number(C))})}),p.width&&g.width?l.jsx(kt,{children:p.width}):l.jsx(wt,{margin:0,children:t("modelManager.widthValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.height&&g.height,children:[l.jsx(st,{htmlFor:"height",fontSize:"sm",children:t("modelManager.height")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{id:"height",name:"height",children:({field:y,form:S})=>l.jsx(Lr,{id:"height",name:"height",min:S1,max:C1,width:"90%",step:64,value:S.values.height,onChange:C=>S.setFieldValue(y.name,Number(C))})}),p.height&&g.height?l.jsx(kt,{children:p.height}):l.jsx(wt,{margin:0,children:t("modelManager.heightValidationMsg")})]})]})]}),l.jsx(Je,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelManager.addModel")})]})})})]})}function Ll({children:e}){return l.jsx(B,{sx:{flexDirection:"column",padding:4,rowGap:4,borderRadius:"base",width:"full",bg:"base.900"},children:e})}function cF(){const e=Y(),{t}=Z(),n=O(u=>u.system.isProcessing);function r(u){return/\s/.test(u)}function o(u){let f;return r(u)&&(f=t("modelManager.cannotUseSpaces")),f}const s={name:"",description:"",repo_id:"",path:"",format:"diffusers",default:!1,vae:{repo_id:"",path:""}},c=u=>{const f=u;u.path===""&&delete f.path,u.repo_id===""&&delete f.repo_id,u.vae.path===""&&delete f.vae.path,u.vae.repo_id===""&&delete f.vae.repo_id,e(ls(f)),e(Vo(null))};return l.jsxs(B,{children:[l.jsx(le,{"aria-label":t("common.back"),tooltip:t("common.back"),onClick:()=>e(Vo(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",insetInlineEnd:12,top:3,icon:l.jsx(by,{})}),l.jsx(ws,{initialValues:s,onSubmit:c,children:({handleSubmit:u,errors:f,touched:h})=>{var p,g,y,S,C,w,k,j,M,P;return l.jsx("form",{onSubmit:u,children:l.jsxs(Le,{rowGap:2,children:[l.jsx(Ll,{children:l.jsxs(rt,{isInvalid:!!f.name&&h.name,isRequired:!0,children:[l.jsx(st,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"name",name:"name",type:"text",validate:o,width:"2xl",isRequired:!0}),f.name&&h.name?l.jsx(kt,{children:f.name}):l.jsx(wt,{margin:0,children:t("modelManager.nameValidationMsg")})]})]})}),l.jsx(Ll,{children:l.jsxs(rt,{isInvalid:!!f.description&&h.description,isRequired:!0,children:[l.jsx(st,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"description",name:"description",type:"text",width:"2xl",isRequired:!0}),f.description&&h.description?l.jsx(kt,{children:f.description}):l.jsx(wt,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]})}),l.jsxs(Ll,{children:[l.jsx(Ce,{fontWeight:"bold",fontSize:"sm",children:t("modelManager.formMessageDiffusersModelLocation")}),l.jsx(Ce,{sx:{fontSize:"sm",fontStyle:"italic"},variant:"subtext",children:t("modelManager.formMessageDiffusersModelLocationDesc")}),l.jsxs(rt,{isInvalid:!!f.path&&h.path,children:[l.jsx(st,{htmlFor:"path",fontSize:"sm",children:t("modelManager.modelLocation")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"path",name:"path",type:"text",width:"2xl"}),f.path&&h.path?l.jsx(kt,{children:f.path}):l.jsx(wt,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!f.repo_id&&h.repo_id,children:[l.jsx(st,{htmlFor:"repo_id",fontSize:"sm",children:t("modelManager.repo_id")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"repo_id",name:"repo_id",type:"text",width:"2xl"}),f.repo_id&&h.repo_id?l.jsx(kt,{children:f.repo_id}):l.jsx(wt,{margin:0,children:t("modelManager.repoIDValidationMsg")})]})]})]}),l.jsxs(Ll,{children:[l.jsx(Ce,{fontWeight:"bold",children:t("modelManager.formMessageDiffusersVAELocation")}),l.jsx(Ce,{sx:{fontSize:"sm",fontStyle:"italic"},variant:"subtext",children:t("modelManager.formMessageDiffusersVAELocationDesc")}),l.jsxs(rt,{isInvalid:!!((p=f.vae)!=null&&p.path)&&((g=h.vae)==null?void 0:g.path),children:[l.jsx(st,{htmlFor:"vae.path",fontSize:"sm",children:t("modelManager.vaeLocation")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae.path",name:"vae.path",type:"text",width:"2xl"}),(y=f.vae)!=null&&y.path&&((S=h.vae)!=null&&S.path)?l.jsx(kt,{children:(C=f.vae)==null?void 0:C.path}):l.jsx(wt,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!((w=f.vae)!=null&&w.repo_id)&&((k=h.vae)==null?void 0:k.repo_id),children:[l.jsx(st,{htmlFor:"vae.repo_id",fontSize:"sm",children:t("modelManager.vaeRepoID")}),l.jsxs(Le,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"2xl"}),(j=f.vae)!=null&&j.repo_id&&((M=h.vae)!=null&&M.repo_id)?l.jsx(kt,{children:(P=f.vae)==null?void 0:P.repo_id}):l.jsx(wt,{margin:0,children:t("modelManager.vaeRepoIDValidationMsg")})]})]})]}),l.jsx(Je,{type:"submit",isLoading:n,children:t("modelManager.addModel")})]})})}})]})}function w1({text:e,onClick:t}){return l.jsx(B,{position:"relative",width:"50%",height:40,justifyContent:"center",alignItems:"center",onClick:t,as:ni,children:l.jsx(Ce,{fontWeight:"bold",children:e})})}function uF(){const{isOpen:e,onOpen:t,onClose:n}=uo(),r=O(u=>u.ui.addNewModelUIOption),o=Y(),{t:s}=Z(),c=()=>{n(),o(Vo(null))};return l.jsxs(l.Fragment,{children:[l.jsx(Je,{"aria-label":s("modelManager.addNewModel"),tooltip:s("modelManager.addNewModel"),onClick:t,size:"sm",children:l.jsxs(B,{columnGap:2,alignItems:"center",children:[l.jsx(xs,{}),s("modelManager.addNew")]})}),l.jsxs(fo,{isOpen:e,onClose:c,size:"3xl",closeOnOverlayClick:!1,children:[l.jsx(Nr,{}),l.jsxs(ho,{margin:"auto",paddingInlineEnd:4,children:[l.jsx(Rr,{children:s("modelManager.addNewModel")}),l.jsx(ca,{}),l.jsxs(Fr,{children:[r==null&&l.jsxs(B,{columnGap:4,children:[l.jsx(w1,{text:s("modelManager.addCheckpointModel"),onClick:()=>o(Vo("ckpt"))}),l.jsx(w1,{text:s("modelManager.addDiffuserModel"),onClick:()=>o(Vo("diffusers"))})]}),r=="ckpt"&&l.jsx(lF,{}),r=="diffusers"&&l.jsx(cF,{})]}),l.jsx(zr,{})]})]})]})}function Bl(e){const{isProcessing:t,isConnected:n}=O(S=>S.system),r=O(S=>S.system.openModel),{t:o}=Z(),s=Y(),{name:c,status:u,description:f}=e,h=()=>{s(f2(c))},p=()=>{s(Zv(c))},g=()=>{s(a3(c)),s(Zv(null))},y=()=>{switch(u){case"active":return"ok.500";case"cached":return"warning.500";case"not loaded":return"inherit"}};return l.jsxs(B,{alignItems:"center",p:2,borderRadius:"base",sx:c===r?{bg:"accent.750",_hover:{bg:"accent.750"}}:{_hover:{bg:"base.750"}},children:[l.jsx(We,{onClick:p,cursor:"pointer",children:l.jsx(Yt,{label:f,hasArrow:!0,placement:"bottom",children:l.jsx(Ce,{fontWeight:"600",children:c})})}),l.jsx(jc,{onClick:p,cursor:"pointer"}),l.jsxs(B,{gap:2,alignItems:"center",children:[l.jsx(Ce,{color:y(),children:u}),l.jsx(ni,{size:"sm",onClick:h,isDisabled:u==="active"||t||!n,children:o("modelManager.load")}),l.jsx(le,{icon:l.jsx(F9,{}),size:"sm",onClick:p,"aria-label":"Modify Config",isDisabled:u==="active"||t||!n}),l.jsx(Wc,{title:o("modelManager.deleteModel"),acceptCallback:g,acceptButtonText:o("modelManager.delete"),triggerComponent:l.jsx(le,{icon:l.jsx(L9,{}),size:"sm","aria-label":o("modelManager.deleteConfig"),isDisabled:u==="active"||t||!n,colorScheme:"error"}),children:l.jsxs(B,{rowGap:4,flexDirection:"column",children:[l.jsx("p",{style:{fontWeight:"bold"},children:o("modelManager.deleteMsg1")}),l.jsx("p",{children:o("modelManager.deleteMsg2")})]})})]})]})}function dF(){const e=Y(),{isOpen:t,onOpen:n,onClose:r}=uo(),o=O(s8),{t:s}=Z(),[c,u]=x.useState(Object.keys(o)[0]),[f,h]=x.useState(Object.keys(o)[1]),[p,g]=x.useState("none"),[y,S]=x.useState(""),[C,w]=x.useState(.5),[k,j]=x.useState("weighted_sum"),[M,P]=x.useState("root"),[I,T]=x.useState(""),[D,_]=x.useState(!1),z=Object.keys(o).filter($=>$!==f&&$!==p),V=Object.keys(o).filter($=>$!==c&&$!==p),F=[{key:s("modelManager.none"),value:"none"},...Object.keys(o).filter($=>$!==c&&$!==f).map($=>({key:$,value:$}))],L=O($=>$.system.isProcessing),X=()=>{let $=[c,f,p];$=$.filter(re=>re!=="none");const Q={models_to_merge:$,merged_model_name:y!==""?y:$.join("-"),alpha:C,interp:k,model_merge_save_path:M==="root"?null:I,force:D};e(s3(Q))};return l.jsxs(l.Fragment,{children:[l.jsx(Je,{onClick:n,size:"sm",children:l.jsx(B,{columnGap:2,alignItems:"center",children:s("modelManager.mergeModels")})}),l.jsxs(fo,{isOpen:t,onClose:r,size:"4xl",closeOnOverlayClick:!1,children:[l.jsx(Nr,{}),l.jsxs(ho,{fontFamily:"Inter",margin:"auto",paddingInlineEnd:4,children:[l.jsx(Rr,{children:s("modelManager.mergeModels")}),l.jsx(ca,{}),l.jsx(Fr,{children:l.jsxs(B,{flexDirection:"column",rowGap:4,children:[l.jsxs(B,{sx:{flexDirection:"column",marginBottom:4,padding:4,borderRadius:"base",rowGap:1,bg:"base.900"},children:[l.jsx(Ce,{children:s("modelManager.modelMergeHeaderHelp1")}),l.jsx(Ce,{fontSize:"sm",variant:"subtext",children:s("modelManager.modelMergeHeaderHelp2")})]}),l.jsxs(B,{columnGap:4,children:[l.jsx(Mn,{label:s("modelManager.modelOne"),validValues:z,onChange:$=>u($.target.value)}),l.jsx(Mn,{label:s("modelManager.modelTwo"),validValues:V,onChange:$=>h($.target.value)}),l.jsx(Mn,{label:s("modelManager.modelThree"),validValues:F,onChange:$=>{$.target.value!=="none"?(g($.target.value),j("add_difference")):(g("none"),j("weighted_sum"))}})]}),l.jsx(mt,{label:s("modelManager.mergedModelName"),value:y,onChange:$=>S($.target.value)}),l.jsxs(B,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[l.jsx(ut,{label:s("modelManager.alpha"),min:.01,max:.99,step:.01,value:C,onChange:$=>w($),withInput:!0,withReset:!0,handleReset:()=>w(.5),withSliderMarks:!0}),l.jsx(Ce,{variant:"subtext",fontSize:"sm",children:s("modelManager.modelMergeAlphaHelp")})]}),l.jsxs(B,{sx:{padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[l.jsx(Ce,{fontWeight:500,fontSize:"sm",variant:"subtext",children:s("modelManager.interpolationType")}),l.jsx(Ja,{value:k,onChange:$=>j($),children:l.jsx(B,{columnGap:4,children:p==="none"?l.jsxs(l.Fragment,{children:[l.jsx(jn,{value:"weighted_sum",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.weightedSum")})}),l.jsx(jn,{value:"sigmoid",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.sigmoid")})}),l.jsx(jn,{value:"inv_sigmoid",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.inverseSigmoid")})})]}):l.jsx(jn,{value:"add_difference",children:l.jsx(Yt,{label:s("modelManager.modelMergeInterpAddDifferenceHelp"),children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.addDifference")})})})})})]}),l.jsxs(B,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[l.jsxs(B,{columnGap:4,children:[l.jsx(Ce,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:s("modelManager.mergedModelSaveLocation")}),l.jsx(Ja,{value:M,onChange:$=>P($),children:l.jsxs(B,{columnGap:4,children:[l.jsx(jn,{value:"root",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.invokeAIFolder")})}),l.jsx(jn,{value:"custom",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.custom")})})]})})]}),M==="custom"&&l.jsx(mt,{label:s("modelManager.mergedModelCustomSaveLocation"),value:I,onChange:$=>T($.target.value)})]}),l.jsx(pt,{label:s("modelManager.ignoreMismatch"),isChecked:D,onChange:$=>_($.target.checked),fontWeight:"500"}),l.jsx(Je,{onClick:X,isLoading:L,isDisabled:M==="custom"&&I==="",children:s("modelManager.merge")})]})}),l.jsx(zr,{})]})]})]})}const fF=be(Pt,e=>te.map(e.model_list,(n,r)=>({name:r,...n})),{memoizeOptions:{resultEqualityCheck:te.isEqual}});function Yd({label:e,isActive:t,onClick:n}){return l.jsx(Je,{onClick:n,isActive:t,sx:{_active:{bg:"accent.750"}},size:"sm",children:e})}const hF=()=>{const e=O(fF),[t,n]=ke.useState(!1);ke.useEffect(()=>{const y=setTimeout(()=>{n(!0)},200);return()=>clearTimeout(y)},[]);const[r,o]=x.useState(""),[s,c]=x.useState("all"),[u,f]=x.useTransition(),{t:h}=Z(),p=y=>{f(()=>{o(y.target.value)})},g=x.useMemo(()=>{const y=[],S=[],C=[],w=[];return e.forEach((k,j)=>{k.name.toLowerCase().includes(r.toLowerCase())&&(C.push(l.jsx(Bl,{name:k.name,status:k.status,description:k.description},j)),k.format===s&&w.push(l.jsx(Bl,{name:k.name,status:k.status,description:k.description},j))),k.format!=="diffusers"?y.push(l.jsx(Bl,{name:k.name,status:k.status,description:k.description},j)):S.push(l.jsx(Bl,{name:k.name,status:k.status,description:k.description},j))}),r!==""?s==="all"?l.jsx(We,{marginTop:4,children:C}):l.jsx(We,{marginTop:4,children:w}):l.jsxs(B,{flexDirection:"column",rowGap:6,children:[s==="all"&&l.jsxs(l.Fragment,{children:[l.jsxs(We,{children:[l.jsx(Ce,{sx:{fontWeight:"500",py:2,px:4,my:4,mx:0,borderRadius:"base",width:"max-content",fontSize:"sm",bg:"base.750"},children:h("modelManager.checkpointModels")}),y]}),l.jsxs(We,{children:[l.jsx(Ce,{sx:{fontWeight:"500",py:2,px:4,mb:4,borderRadius:"base",width:"max-content",fontSize:"sm",bg:"base.750"},children:h("modelManager.diffusersModels")}),S]})]}),s==="ckpt"&&l.jsx(B,{flexDirection:"column",marginTop:4,children:y}),s==="diffusers"&&l.jsx(B,{flexDirection:"column",marginTop:4,children:S})]})},[e,r,h,s]);return l.jsxs(B,{flexDirection:"column",rowGap:4,width:"50%",minWidth:"50%",children:[l.jsxs(B,{justifyContent:"space-between",alignItems:"center",gap:2,children:[l.jsx(Vn,{size:"md",children:h("modelManager.availableModels")}),l.jsx(jc,{}),l.jsx(uF,{}),l.jsx(dF,{})]}),l.jsx(mt,{onChange:p,label:h("modelManager.search")}),l.jsxs(B,{flexDirection:"column",gap:1,maxHeight:window.innerHeight-240,overflow:"scroll",paddingInlineEnd:4,children:[l.jsxs(B,{columnGap:2,children:[l.jsx(Yd,{label:h("modelManager.allModels"),onClick:()=>c("all"),isActive:s==="all"}),l.jsx(Yd,{label:h("modelManager.checkpointModels"),onClick:()=>c("ckpt"),isActive:s==="ckpt"}),l.jsx(Yd,{label:h("modelManager.diffusersModels"),onClick:()=>c("diffusers"),isActive:s==="diffusers"})]}),t?g:l.jsx(B,{width:"100%",minHeight:96,justifyContent:"center",alignItems:"center",children:l.jsx(Qf,{})})]})]})};function pF({children:e}){const{isOpen:t,onOpen:n,onClose:r}=uo(),o=O(u=>u.system.model_list),s=O(u=>u.system.openModel),{t:c}=Z();return l.jsxs(l.Fragment,{children:[x.cloneElement(e,{onClick:n}),l.jsxs(fo,{isOpen:t,onClose:r,size:"full",children:[l.jsx(Nr,{}),l.jsxs(ho,{children:[l.jsx(ca,{}),l.jsx(Rr,{children:c("modelManager.modelManager")}),l.jsx(Fr,{children:l.jsxs(B,{width:"100%",columnGap:8,children:[l.jsx(hF,{}),s&&o[s].format==="diffusers"?l.jsx(aF,{}):l.jsx(oF,{})]})}),l.jsx(zr,{})]})]})]})}const mF=be([Pt],e=>{const{isProcessing:t,model_list:n}=e;return{models:te.map(n,(o,s)=>s),isProcessing:t}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),vF=()=>{const e=Y(),{models:t,isProcessing:n}=O(mF),r=O(Sy),o=s=>{e(f2(s.target.value))};return l.jsx(B,{style:{paddingInlineStart:1.5},children:l.jsx(Mn,{style:{fontSize:"sm"},tooltip:r.description,isDisabled:n,value:r.name,validValues:t,onChange:o})})},gF=be([Pt,oi],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:o,model_list:s,saveIntermediatesInterval:c,enableImageDebugging:u}=e,{shouldUseCanvasBetaLayout:f,shouldUseSliders:h}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:o,models:te.map(s,(p,g)=>g),saveIntermediatesInterval:c,enableImageDebugging:u,shouldUseCanvasBetaLayout:f,shouldUseSliders:h}},{memoizeOptions:{resultEqualityCheck:te.isEqual}}),Xd={flexDirection:"column",gap:2,p:4,bg:"base.900"},xF=({children:e})=>{const t=Y(),{t:n}=Z(),r=O(P=>P.generation.steps),{isOpen:o,onOpen:s,onClose:c}=uo(),{isOpen:u,onOpen:f,onClose:h}=uo(),{shouldDisplayInProgressType:p,shouldConfirmOnDelete:g,shouldDisplayGuides:y,saveIntermediatesInterval:S,enableImageDebugging:C,shouldUseCanvasBetaLayout:w,shouldUseSliders:k}=O(gF),j=()=>{p3.purge().then(()=>{c(),f()})},M=P=>{P>r&&(P=r),P<1&&(P=1),t(m3(P))};return l.jsxs(l.Fragment,{children:[x.cloneElement(e,{onClick:s}),l.jsxs(fo,{isOpen:o,onClose:c,size:"xl",children:[l.jsx(Nr,{}),l.jsxs(ho,{paddingInlineEnd:4,children:[l.jsx(Rr,{children:n("common.settingsLabel")}),l.jsx(ca,{}),l.jsx(Fr,{children:l.jsxs($n,{gap:4,children:[l.jsxs(B,{sx:Xd,children:[l.jsx(Mn,{label:n("settings.displayInProgress"),validValues:l3,value:p,onChange:P=>t(c3(P.target.value))}),p==="full-res"&&l.jsx(Lr,{label:n("settings.saveSteps"),min:1,max:r,step:1,onChange:M,value:S,width:"auto",textAlign:"center"}),l.jsx(En,{label:n("settings.confirmOnDelete"),isChecked:g,onChange:P=>t(T1(P.target.checked))}),l.jsx(En,{label:n("settings.displayHelpIcons"),isChecked:y,onChange:P=>t(u3(P.target.checked))}),l.jsx(En,{label:n("settings.useCanvasBeta"),isChecked:w,onChange:P=>t(d3(P.target.checked))}),l.jsx(En,{label:n("settings.useSlidersForAll"),isChecked:k,onChange:P=>t(f3(P.target.checked))})]}),l.jsxs(B,{sx:Xd,children:[l.jsx(Vn,{size:"sm",style:{fontWeight:"bold"},children:"Developer"}),l.jsx(En,{label:n("settings.enableImageDebugging"),isChecked:C,onChange:P=>t(h3(P.target.checked))})]}),l.jsxs(B,{sx:Xd,children:[l.jsx(Vn,{size:"sm",children:n("settings.resetWebUI")}),l.jsx(Je,{colorScheme:"error",onClick:j,children:n("settings.resetWebUI")}),l.jsx(Ce,{children:n("settings.resetWebUIDesc1")}),l.jsx(Ce,{children:n("settings.resetWebUIDesc2")})]})]})}),l.jsx(zr,{children:l.jsx(Je,{onClick:c,children:n("common.close")})})]})]}),l.jsxs(fo,{closeOnOverlayClick:!1,isOpen:u,onClose:h,isCentered:!0,children:[l.jsx(Nr,{backdropFilter:"blur(40px)"}),l.jsxs(ho,{children:[l.jsx(Rr,{}),l.jsx(Fr,{children:l.jsx(B,{justifyContent:"center",children:l.jsx(Ce,{fontSize:"lg",children:l.jsx(Ce,{children:n("settings.resetComplete")})})})}),l.jsx(zr,{})]})]})]})},yF=be(Pt,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:te.isEqual}}),bF=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:o,hasError:s,wasErrorSeen:c}=O(yF),u=Y(),{t:f}=Z();let h;e&&!s?h="ok":h="error";let p=o;t&&(h="working"),p&&t&&r>1&&(p=`${f(p)} (${n}/${r})`);const g=s&&!c?"Click to clear, check logs for details":void 0,y=s&&!c?"pointer":"initial",S=()=>{(s||!c)&&u(d2())};return l.jsx(Yt,{label:g,children:l.jsx(Ce,{cursor:y,onClick:S,sx:{fontSize:"xs",fontWeight:"600",color:`${h}.400`},children:f(p)})})};function SF(){const{t:e}=Z(),t=Y(),n=O(c=>c.ui.currentTheme),r={dark:e("common.darkTheme"),light:e("common.lightTheme"),green:e("common.greenTheme"),ocean:e("common.oceanTheme")},o=c=>{t(v3(c))},s=()=>{const c=[];return Object.keys(r).forEach(u=>{c.push(l.jsx(Je,{sx:{width:24},isChecked:n===u,leftIcon:n===u?l.jsx(zc,{}):void 0,size:"sm",onClick:()=>o(u),children:r[u]},u))}),c};return l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(le,{"aria-label":e("common.themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:l.jsx(W8,{})}),children:l.jsx(Le,{align:"stretch",children:s()})})}function CF(){const{t:e,i18n:t}=Z(),n={ar:e("common.langArabic",{lng:"ar"}),nl:e("common.langDutch",{lng:"nl"}),en:e("common.langEnglish",{lng:"en"}),fr:e("common.langFrench",{lng:"fr"}),de:e("common.langGerman",{lng:"de"}),he:e("common.langHebrew",{lng:"he"}),it:e("common.langItalian",{lng:"it"}),ja:e("common.langJapanese",{lng:"ja"}),ko:e("common.langKorean",{lng:"ko"}),pl:e("common.langPolish",{lng:"pl"}),pt_BR:e("common.langBrPortuguese",{lng:"pt_BR"}),pt:e("common.langPortuguese",{lng:"pt"}),ru:e("common.langRussian",{lng:"ru"}),zh_CN:e("common.langSimplifiedChinese",{lng:"zh_CN"}),es:e("common.langSpanish",{lng:"es"}),uk:e("common.langUkranian",{lng:"ua"})},r=()=>{const o=[];return Object.keys(n).forEach(s=>{o.push(l.jsx(Je,{isChecked:localStorage.getItem("i18nextLng")===s,leftIcon:localStorage.getItem("i18nextLng")===s?l.jsx(zc,{}):void 0,onClick:()=>t.changeLanguage(s),"aria-label":n[s],size:"sm",minWidth:"200px",children:n[s]},s))}),o};return l.jsx(rr,{trigger:"hover",triggerComponent:l.jsx(le,{"aria-label":e("common.languagePickerLabel"),tooltip:e("common.languagePickerLabel"),icon:l.jsx(L8,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:l.jsx(Le,{children:r()})})}const wF=()=>{const{t:e}=Z();return l.jsxs($n,{gridTemplateColumns:"auto max-content",children:[l.jsx(f4,{}),l.jsxs(B,{alignItems:"center",gap:2,children:[l.jsx(bF,{}),l.jsx(vF,{}),l.jsx(pF,{children:l.jsx(le,{"aria-label":e("modelManager.modelManager"),tooltip:e("modelManager.modelManager"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:l.jsx(_8,{})})}),l.jsx(cO,{children:l.jsx(le,{"aria-label":e("common.hotkeysLabel"),tooltip:e("common.hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:l.jsx(F8,{})})}),l.jsx(SF,{}),l.jsx(CF,{}),l.jsx(le,{"aria-label":e("common.reportBugLabel"),tooltip:e("common.reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:l.jsx(Go,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:l.jsx(T8,{})})}),l.jsx(le,{"aria-label":e("common.githubLabel"),tooltip:e("common.githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:l.jsx(Go,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:l.jsx(w8,{})})}),l.jsx(le,{"aria-label":e("common.discordLabel"),tooltip:e("common.discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:l.jsx(Go,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:l.jsx(C8,{})})}),l.jsx(xF,{children:l.jsx(le,{"aria-label":e("common.settingsLabel"),tooltip:e("common.settingsLabel"),variant:"link","data-variant":"link",fontSize:22,size:"sm",icon:l.jsx(h9,{})})})]})]})};function kF(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(o=>o)};(!{}.NODE_ENV||{}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}const jF=()=>{const e=Y(),t=O(a8),n=us();x.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(g3())},[e,n,t])},EF=()=>{const e=Y(),{shouldShowGalleryButton:t,shouldPinGallery:n}=O(xp),r=()=>{e(Lo(!0)),n&&e(on(!0))};return t?l.jsx(le,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",onClick:r,sx:{pos:"absolute",top:"50%",transform:"translate(0, -50%)",zIndex:31,p:0,insetInlineEnd:0,px:3,h:48,w:8,borderStartEndRadius:0,borderEndEndRadius:0},children:l.jsx(lp,{})}):null};kF();const _F=()=>(jF(),l.jsxs($n,{w:"100vw",h:"100vh",children:[l.jsxs(nO,{children:[l.jsx(sO,{}),l.jsxs($n,{gap:4,p:_9,gridAutoRows:"min-content auto",w:D9,h:O9,children:[l.jsx(wF,{}),l.jsx(sD,{})]}),l.jsx(We,{children:l.jsx(iO,{})})]}),l.jsx(lI,{}),l.jsx(EF,{})]}));export{_F as default}; diff --git a/invokeai/frontend/web/dist/assets/Inter-Bold-790c108b.ttf b/invokeai/frontend/web/dist/assets/Inter-Bold-790c108b.ttf deleted file mode 100644 index 8e82c70d10..0000000000 Binary files a/invokeai/frontend/web/dist/assets/Inter-Bold-790c108b.ttf and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/Inter-b9a8e5e2.ttf b/invokeai/frontend/web/dist/assets/Inter-b9a8e5e2.ttf deleted file mode 100644 index ec3164efa8..0000000000 Binary files a/invokeai/frontend/web/dist/assets/Inter-b9a8e5e2.ttf and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-659796d3.js b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-659796d3.js new file mode 100644 index 0000000000..7b021c2fd8 --- /dev/null +++ b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-659796d3.js @@ -0,0 +1,315 @@ +import{j as S,cM as Me,r as w,cN as ut,q as Lr,cO as o,cP as u,cQ as f,cR as x,cS as Or,cT as vt,cU as ft,cV as mt,cW as ht,n as gt,cX as yt,E as pt}from"./index-bcc89564.js";import{d as St,i as xt,T as $t,j as kt,s as _t,g as wt}from"./scrollbar-2bd1868c.js";var qr=` + :root { + --chakra-vh: 100vh; + } + + @supports (height: -webkit-fill-available) { + :root { + --chakra-vh: -webkit-fill-available; + } + } + + @supports (height: -moz-fill-available) { + :root { + --chakra-vh: -moz-fill-available; + } + } + + @supports (height: 100dvh) { + :root { + --chakra-vh: 100dvh; + } + } +`,Ct=()=>S.jsx(Me,{styles:qr}),zt=()=>S.jsx(Me,{styles:` + 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%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + 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; + } + + select::-ms-expand { + display: none; + } + + ${qr} + `}),pe={light:"chakra-ui-light",dark:"chakra-ui-dark"};function At(e={}){const{preventTransition:r=!0}=e,t={setDataset:a=>{const n=r?t.preventTransition():void 0;document.documentElement.dataset.theme=a,document.documentElement.style.colorScheme=a,n==null||n()},setClassName(a){document.body.classList.add(a?pe.dark:pe.light),document.body.classList.remove(a?pe.light:pe.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(a){var n;return((n=t.query().matches)!=null?n:a==="dark")?"dark":"light"},addListener(a){const n=t.query(),l=s=>{a(s.matches?"dark":"light")};return typeof n.addListener=="function"?n.addListener(l):n.addEventListener("change",l),()=>{typeof n.removeListener=="function"?n.removeListener(l):n.removeEventListener("change",l)}},preventTransition(){const a=document.createElement("style");return a.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(a),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(a)})})}}};return t}var Pt="chakra-ui-color-mode";function Tt(e){return{ssr:!1,type:"localStorage",get(r){if(!(globalThis!=null&&globalThis.document))return r;let t;try{t=localStorage.getItem(e)||r}catch{}return t||r},set(r){try{localStorage.setItem(e,r)}catch{}}}}var Ft=Tt(Pt),sr=()=>{};function dr(e,r){return e.type==="cookie"&&e.ssr?e.get(r):r}function Nr(e){const{value:r,children:t,options:{useSystemColorMode:a,initialColorMode:n,disableTransitionOnChange:l}={},colorModeManager:s=Ft}=e,c=n==="dark"?"dark":"light",[b,k]=w.useState(()=>dr(s,c)),[g,y]=w.useState(()=>dr(s)),{getSystemTheme:_,setClassName:I,setDataset:he,addListener:ir}=w.useMemo(()=>At({preventTransition:l}),[l]),ge=n==="system"&&!b?g:b,M=w.useCallback(te=>{const ye=te==="system"?_():te;k(ye),I(ye==="dark"),he(ye),s.set(ye)},[s,_,I,he]);St(()=>{n==="system"&&y(_())},[]),w.useEffect(()=>{const te=s.get();if(te){M(te);return}if(n==="system"){M("system");return}M(c)},[s,c,n,M]);const lr=w.useCallback(()=>{M(ge==="dark"?"light":"dark")},[ge,M]);w.useEffect(()=>{if(a)return ir(M)},[a,ir,M]);const bt=w.useMemo(()=>({colorMode:r??ge,toggleColorMode:r?sr:lr,setColorMode:r?sr:M,forced:r!==void 0}),[ge,lr,M,r]);return S.jsx(ut.Provider,{value:bt,children:t})}Nr.displayName="ColorModeProvider";var It=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function Mt(e){return Lr(e)?It.every(r=>Object.prototype.hasOwnProperty.call(e,r)):!1}var Bt={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},Et=Bt,Dt={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},jt=Dt,Rt={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"}},Wt=Rt,Ht={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Vt=Ht,Lt={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"},Ot=Lt,qt={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"},Nt={"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)"},Gt={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Ut={property:qt,easing:Nt,duration:Gt},Yt=Ut,Xt={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Kt=Xt,Qt={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zt=Qt,Jt={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"}},Gr=Jt,Ur={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"},eo={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"},ro={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},to={...Ur,...eo,container:ro},Yr=to,oo={breakpoints:jt,zIndices:Et,radii:Vt,blur:Kt,colors:Wt,...Gr,sizes:Yr,shadows:Ot,space:Ur,borders:Zt,transition:Yt};function m(e,r={}){let t=!1;function a(){if(!t){t=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function n(...g){a();for(const y of g)r[y]=b(y);return m(e,r)}function l(...g){for(const y of g)y in r||(r[y]=b(y));return m(e,r)}function s(){return Object.fromEntries(Object.entries(r).map(([y,_])=>[y,_.selector]))}function c(){return Object.fromEntries(Object.entries(r).map(([y,_])=>[y,_.className]))}function b(g){const I=`chakra-${(["container","root"].includes(g??"")?[e]:[e,g]).filter(Boolean).join("__")}`;return{className:I,selector:`.${I}`,toString:()=>g}}return{parts:n,toPart:b,extend:l,selectors:s,classnames:c,get keys(){return Object.keys(r)},__type:{}}}var ao=m("accordion").parts("root","container","button","panel").extend("icon"),no=m("alert").parts("title","description","container").extend("icon","spinner"),io=m("avatar").parts("label","badge","container").extend("excessLabel","group"),lo=m("breadcrumb").parts("link","item","container").extend("separator");m("button").parts();var so=m("checkbox").parts("control","icon","container").extend("label");m("progress").parts("track","filledTrack").extend("label");var co=m("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),bo=m("editable").parts("preview","input","textarea"),uo=m("form").parts("container","requiredIndicator","helperText"),vo=m("formError").parts("text","icon"),fo=m("input").parts("addon","field","element"),mo=m("list").parts("container","item","icon"),ho=m("menu").parts("button","list","item").extend("groupTitle","command","divider"),go=m("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),yo=m("numberinput").parts("root","field","stepperGroup","stepper");m("pininput").parts("field");var po=m("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),So=m("progress").parts("label","filledTrack","track"),xo=m("radio").parts("container","control","label"),$o=m("select").parts("field","icon"),ko=m("slider").parts("container","track","thumb","filledTrack","mark"),_o=m("stat").parts("container","label","helpText","number","icon"),wo=m("switch").parts("container","track","thumb"),Co=m("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),zo=m("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Ao=m("tag").parts("container","label","closeButton"),Po=m("card").parts("container","header","body","footer");function N(e,r,t){return Math.min(Math.max(e,t),r)}class To extends Error{constructor(r){super(`Failed to parse color: "${r}"`)}}var ne=To;function er(e){if(typeof e!="string")throw new ne(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let r=e.trim();r=Ro.test(e)?Mo(e):e;const t=Bo.exec(r);if(t){const s=Array.from(t).slice(1);return[...s.slice(0,3).map(c=>parseInt(ue(c,2),16)),parseInt(ue(s[3]||"f",2),16)/255]}const a=Eo.exec(r);if(a){const s=Array.from(a).slice(1);return[...s.slice(0,3).map(c=>parseInt(c,16)),parseInt(s[3]||"ff",16)/255]}const n=Do.exec(r);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(c=>parseInt(c,10)),parseFloat(s[3]||"1")]}const l=jo.exec(r);if(l){const[s,c,b,k]=Array.from(l).slice(1).map(parseFloat);if(N(0,100,c)!==c)throw new ne(e);if(N(0,100,b)!==b)throw new ne(e);return[...Wo(s,c,b),Number.isNaN(k)?1:k]}throw new ne(e)}function Fo(e){let r=5381,t=e.length;for(;t;)r=r*33^e.charCodeAt(--t);return(r>>>0)%2341}const cr=e=>parseInt(e.replace(/_/g,""),36),Io="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,r)=>{const t=cr(r.substring(0,3)),a=cr(r.substring(3)).toString(16);let n="";for(let l=0;l<6-a.length;l++)n+="0";return e[t]=`${n}${a}`,e},{});function Mo(e){const r=e.toLowerCase().trim(),t=Io[Fo(r)];if(!t)throw new ne(e);return`#${t}`}const ue=(e,r)=>Array.from(Array(r)).map(()=>e).join(""),Bo=new RegExp(`^#${ue("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Eo=new RegExp(`^#${ue("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Do=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${ue(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),jo=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Ro=/^[a-z]+$/i,br=e=>Math.round(e*255),Wo=(e,r,t)=>{let a=t/100;if(r===0)return[a,a,a].map(br);const n=(e%360+360)%360/60,l=(1-Math.abs(2*a-1))*(r/100),s=l*(1-Math.abs(n%2-1));let c=0,b=0,k=0;n>=0&&n<1?(c=l,b=s):n>=1&&n<2?(c=s,b=l):n>=2&&n<3?(b=l,k=s):n>=3&&n<4?(b=s,k=l):n>=4&&n<5?(c=s,k=l):n>=5&&n<6&&(c=l,k=s);const g=a-l/2,y=c+g,_=b+g,I=k+g;return[y,_,I].map(br)};function Ho(e,r,t,a){return`rgba(${N(0,255,e).toFixed()}, ${N(0,255,r).toFixed()}, ${N(0,255,t).toFixed()}, ${parseFloat(N(0,1,a).toFixed(3))})`}function Vo(e,r){const[t,a,n,l]=er(e);return Ho(t,a,n,l-r)}function Lo(e){const[r,t,a,n]=er(e);let l=s=>{const c=N(0,255,s).toString(16);return c.length===1?`0${c}`:c};return`#${l(r)}${l(t)}${l(a)}${n<1?l(Math.round(n*255)):""}`}function Oo(e,r,t,a,n){for(r=r.split?r.split("."):r,a=0;aObject.keys(e).length===0,C=(e,r,t)=>{const a=Oo(e,`colors.${r}`,r);try{return Lo(a),a}catch{return t??"#000000"}},No=e=>{const[r,t,a]=er(e);return(r*299+t*587+a*114)/1e3},Go=e=>r=>{const t=C(r,e);return No(t)<128?"dark":"light"},Uo=e=>r=>Go(e)(r)==="dark",re=(e,r)=>t=>{const a=C(t,e);return Vo(a,1-r)};function ur(e="1rem",r="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${r} 25%, + transparent 25%, + transparent 50%, + ${r} 50%, + ${r} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}var Yo=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function Xo(e){const r=Yo();return!e||qo(e)?r:e.string&&e.colors?Qo(e.string,e.colors):e.string&&!e.colors?Ko(e.string):e.colors&&!e.string?Zo(e.colors):r}function Ko(e){let r=0;if(e.length===0)return r.toString();for(let a=0;a>a*8&255;t+=`00${n.toString(16)}`.substr(-2)}return t}function Qo(e,r){let t=0;if(e.length===0)return r[0];for(let a=0;at.colorMode==="dark"?r:e}function rr(e){const{orientation:r,vertical:t,horizontal:a}=e;return r?r==="vertical"?t:a:{}}function Xr(e){return Lr(e)&&e.reference?e.reference:String(e)}var Be=(e,...r)=>r.map(Xr).join(` ${e} `).replace(/calc/g,""),vr=(...e)=>`calc(${Be("+",...e)})`,fr=(...e)=>`calc(${Be("-",...e)})`,Ke=(...e)=>`calc(${Be("*",...e)})`,mr=(...e)=>`calc(${Be("/",...e)})`,hr=e=>{const r=Xr(e);return r!=null&&!Number.isNaN(parseFloat(r))?String(r).startsWith("-")?String(r).slice(1):`-${r}`:Ke(r,-1)},j=Object.assign(e=>({add:(...r)=>j(vr(e,...r)),subtract:(...r)=>j(fr(e,...r)),multiply:(...r)=>j(Ke(e,...r)),divide:(...r)=>j(mr(e,...r)),negate:()=>j(hr(e)),toString:()=>e.toString()}),{add:vr,subtract:fr,multiply:Ke,divide:mr,negate:hr});function Jo(e){return!Number.isInteger(parseFloat(e.toString()))}function ea(e,r="-"){return e.replace(/\s+/g,r)}function Kr(e){const r=ea(e.toString());return r.includes("\\.")?e:Jo(e)?r.replace(".","\\."):e}function ra(e,r=""){return[r,Kr(e)].filter(Boolean).join("-")}function ta(e,r){return`var(${Kr(e)}${r?`, ${r}`:""})`}function oa(e,r=""){return`--${ra(e,r)}`}function $(e,r){const t=oa(e,r==null?void 0:r.prefix);return{variable:t,reference:ta(t,aa(r==null?void 0:r.fallback))}}function aa(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:na,definePartsStyle:Ce}=u(wo.keys),se=$("switch-track-width"),G=$("switch-track-height"),je=$("switch-track-diff"),ia=j.subtract(se,G),Qe=$("switch-thumb-x"),oe=$("switch-bg"),la=o(e=>{const{colorScheme:r}=e;return{borderRadius:"full",p:"0.5",width:[se.reference],height:[G.reference],transitionProperty:"common",transitionDuration:"fast",[oe.variable]:"colors.gray.300",_dark:{[oe.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[oe.variable]:`colors.${r}.500`,_dark:{[oe.variable]:`colors.${r}.200`}},bg:oe.reference}}),sa=o({bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[G.reference],height:[G.reference],_checked:{transform:`translateX(${Qe.reference})`}}),da=Ce(e=>({container:{[je.variable]:ia,[Qe.variable]:je.reference,_rtl:{[Qe.variable]:j(je).negate().toString()}},track:la(e),thumb:sa})),ca={sm:Ce({container:{[se.variable]:"1.375rem",[G.variable]:"sizes.3"}}),md:Ce({container:{[se.variable]:"1.875rem",[G.variable]:"sizes.4"}}),lg:Ce({container:{[se.variable]:"2.875rem",[G.variable]:"sizes.6"}})},ba=na({baseStyle:da,sizes:ca,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ua,definePartsStyle:K}=u(Co.keys),va=K({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"}}),Te=o({"&[data-is-numeric=true]":{textAlign:"end"}}),fa=K(e=>{const{colorScheme:r}=e;return{th:{color:d("gray.600","gray.400")(e),borderBottom:"1px",borderColor:d(`${r}.100`,`${r}.700`)(e),...Te},td:{borderBottom:"1px",borderColor:d(`${r}.100`,`${r}.700`)(e),...Te},caption:{color:d("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),ma=K(e=>{const{colorScheme:r}=e;return{th:{color:d("gray.600","gray.400")(e),borderBottom:"1px",borderColor:d(`${r}.100`,`${r}.700`)(e),...Te},td:{borderBottom:"1px",borderColor:d(`${r}.100`,`${r}.700`)(e),...Te},caption:{color:d("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:d(`${r}.100`,`${r}.700`)(e)},td:{background:d(`${r}.100`,`${r}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),ha={simple:fa,striped:ma,unstyled:o({})},ga={sm:K({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:K({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:K({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},ya=ua({baseStyle:va,variants:ha,sizes:ga,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),A=f("tabs-color"),F=f("tabs-bg"),Se=f("tabs-border-color"),{defineMultiStyleConfig:pa,definePartsStyle:D}=u(zo.keys),Sa=o(e=>{const{orientation:r}=e;return{display:r==="vertical"?"flex":"block"}}),xa=o(e=>{const{isFitted:r}=e;return{flex:r?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}}),$a=o(e=>{const{align:r="start",orientation:t}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[r],flexDirection:t==="vertical"?"column":"row"}}),ka=o({p:4}),_a=D(e=>({root:Sa(e),tab:xa(e),tablist:$a(e),tabpanel:ka})),wa={sm:D({tab:{py:1,px:4,fontSize:"sm"}}),md:D({tab:{fontSize:"md",py:2,px:4}}),lg:D({tab:{fontSize:"lg",py:3,px:4}})},Ca=D(e=>{const{colorScheme:r,orientation:t}=e,a=t==="vertical",n=t==="vertical"?"borderStart":"borderBottom",l=a?"marginStart":"marginBottom";return{tablist:{[n]:"2px solid",borderColor:"inherit"},tab:{[n]:"2px solid",borderColor:"transparent",[l]:"-2px",_selected:{[A.variable]:`colors.${r}.600`,_dark:{[A.variable]:`colors.${r}.300`},borderColor:"currentColor"},_active:{[F.variable]:"colors.gray.200",_dark:{[F.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:A.reference,bg:F.reference}}}),za=D(e=>{const{colorScheme:r}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Se.variable]:"transparent",_selected:{[A.variable]:`colors.${r}.600`,[Se.variable]:"colors.white",_dark:{[A.variable]:`colors.${r}.300`,[Se.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Se.reference},color:A.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Aa=D(e=>{const{colorScheme:r}=e;return{tab:{border:"1px solid",borderColor:"inherit",[F.variable]:"colors.gray.50",_dark:{[F.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[F.variable]:"colors.white",[A.variable]:`colors.${r}.600`,_dark:{[F.variable]:"colors.gray.800",[A.variable]:`colors.${r}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:A.reference,bg:F.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Pa=D(e=>{const{colorScheme:r,theme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:C(t,`${r}.700`),bg:C(t,`${r}.100`)}}}}),Ta=D(e=>{const{colorScheme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[A.variable]:"colors.gray.600",_dark:{[A.variable]:"inherit"},_selected:{[A.variable]:"colors.white",[F.variable]:`colors.${r}.600`,_dark:{[A.variable]:"colors.gray.800",[F.variable]:`colors.${r}.300`}},color:A.reference,bg:F.reference}}}),Fa=D({}),Ia={line:Ca,enclosed:za,"enclosed-colored":Aa,"soft-rounded":Pa,"solid-rounded":Ta,unstyled:Fa},Ma=pa({baseStyle:_a,sizes:wa,variants:Ia,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Ba=o({px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"}),Q=f("badge-bg"),E=f("badge-color"),Ea=o(e=>{const{colorScheme:r,theme:t}=e,a=re(`${r}.500`,.6)(t);return{[Q.variable]:`colors.${r}.500`,[E.variable]:"colors.white",_dark:{[Q.variable]:a,[E.variable]:"colors.whiteAlpha.800"},bg:Q.reference,color:E.reference}}),Da=o(e=>{const{colorScheme:r,theme:t}=e,a=re(`${r}.200`,.16)(t);return{[Q.variable]:`colors.${r}.100`,[E.variable]:`colors.${r}.800`,_dark:{[Q.variable]:a,[E.variable]:`colors.${r}.200`},bg:Q.reference,color:E.reference}}),ja=o(e=>{const{colorScheme:r,theme:t}=e,a=re(`${r}.200`,.8)(t);return{[E.variable]:`colors.${r}.500`,_dark:{[E.variable]:a},color:E.reference,boxShadow:`inset 0 0 0px 1px ${E.reference}`}}),Ra={solid:Ea,subtle:Da,outline:ja},de=x({baseStyle:Ba,variants:Ra,defaultProps:{variant:"subtle",colorScheme:"gray"}}),{defineMultiStyleConfig:Wa,definePartsStyle:U}=u(Ao.keys),Ha=o({fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}}),Va=o({lineHeight:1.2,overflow:"visible"}),La=o({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}}),Oa=U({container:Ha,label:Va,closeButton:La}),qa={sm:U({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:U({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:U({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Na={subtle:U(e=>{var r;return{container:(r=de.variants)==null?void 0:r.subtle(e)}}),solid:U(e=>{var r;return{container:(r=de.variants)==null?void 0:r.solid(e)}}),outline:U(e=>{var r;return{container:(r=de.variants)==null?void 0:r.outline(e)}})},Ga=Wa({variants:Na,baseStyle:Oa,sizes:qa,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:R,defineMultiStyleConfig:Ua}=u(fo.keys),Ya=R({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),V={lg:o({fontSize:"lg",px:"4",h:"12",borderRadius:"md"}),md:o({fontSize:"md",px:"4",h:"10",borderRadius:"md"}),sm:o({fontSize:"sm",px:"3",h:"8",borderRadius:"sm"}),xs:o({fontSize:"xs",px:"2",h:"6",borderRadius:"sm"})},Xa={lg:R({field:V.lg,addon:V.lg}),md:R({field:V.md,addon:V.md}),sm:R({field:V.sm,addon:V.sm}),xs:R({field:V.xs,addon:V.xs})};function tr(e){const{focusBorderColor:r,errorBorderColor:t}=e;return{focusBorderColor:r||d("blue.500","blue.300")(e),errorBorderColor:t||d("red.500","red.300")(e)}}var Ka=R(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:a}=tr(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:d("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:C(r,a),boxShadow:`0 0 0 1px ${C(r,a)}`},_focusVisible:{zIndex:1,borderColor:C(r,t),boxShadow:`0 0 0 1px ${C(r,t)}`}},addon:{border:"1px solid",borderColor:d("inherit","whiteAlpha.50")(e),bg:d("gray.100","whiteAlpha.300")(e)}}}),Qa=R(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:a}=tr(e);return{field:{border:"2px solid",borderColor:"transparent",bg:d("gray.100","whiteAlpha.50")(e),_hover:{bg:d("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:C(r,a)},_focusVisible:{bg:"transparent",borderColor:C(r,t)}},addon:{border:"2px solid",borderColor:"transparent",bg:d("gray.100","whiteAlpha.50")(e)}}}),Za=R(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:a}=tr(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:C(r,a),boxShadow:`0px 1px 0px 0px ${C(r,a)}`},_focusVisible:{borderColor:C(r,t),boxShadow:`0px 1px 0px 0px ${C(r,t)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Ja=R({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),en={outline:Ka,filled:Qa,flushed:Za,unstyled:Ja},v=Ua({baseStyle:Ya,sizes:Xa,variants:en,defaultProps:{size:"md",variant:"outline"}}),gr,rn=o({...(gr=v.baseStyle)==null?void 0:gr.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"}),yr,pr,tn={outline:o(e=>{var r,t;return(t=(r=v.variants)==null?void 0:r.outline(e).field)!=null?t:{}}),flushed:o(e=>{var r,t;return(t=(r=v.variants)==null?void 0:r.flushed(e).field)!=null?t:{}}),filled:o(e=>{var r,t;return(t=(r=v.variants)==null?void 0:r.filled(e).field)!=null?t:{}}),unstyled:(pr=(yr=v.variants)==null?void 0:yr.unstyled.field)!=null?pr:{}},Sr,xr,$r,kr,_r,wr,Cr,zr,on={xs:(xr=(Sr=v.sizes)==null?void 0:Sr.xs.field)!=null?xr:{},sm:(kr=($r=v.sizes)==null?void 0:$r.sm.field)!=null?kr:{},md:(wr=(_r=v.sizes)==null?void 0:_r.md.field)!=null?wr:{},lg:(zr=(Cr=v.sizes)==null?void 0:Cr.lg.field)!=null?zr:{}},an=x({baseStyle:rn,sizes:on,variants:tn,defaultProps:{size:"md",variant:"outline"}}),xe=$("tooltip-bg"),Re=$("tooltip-fg"),nn=$("popper-arrow-bg"),ln=o({bg:xe.reference,color:Re.reference,[xe.variable]:"colors.gray.700",[Re.variable]:"colors.whiteAlpha.900",_dark:{[xe.variable]:"colors.gray.300",[Re.variable]:"colors.gray.900"},[nn.variable]:xe.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}),sn=x({baseStyle:ln}),{defineMultiStyleConfig:dn,definePartsStyle:ie}=u(So.keys),cn=o(e=>{const{colorScheme:r,theme:t,isIndeterminate:a,hasStripe:n}=e,l=d(ur(),ur("1rem","rgba(0,0,0,0.1)"))(e),s=d(`${r}.500`,`${r}.200`)(e),c=`linear-gradient( + to right, + transparent 0%, + ${C(t,s)} 50%, + transparent 100% + )`;return{...!a&&n&&l,...a?{bgImage:c}:{bgColor:s}}}),bn=o({lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"}),un=o(e=>({bg:d("gray.100","whiteAlpha.300")(e)})),vn=o(e=>({transitionProperty:"common",transitionDuration:"slow",...cn(e)})),fn=ie(e=>({label:bn,filledTrack:vn(e),track:un(e)})),mn={xs:ie({track:{h:"1"}}),sm:ie({track:{h:"2"}}),md:ie({track:{h:"3"}}),lg:ie({track:{h:"4"}})},hn=dn({sizes:mn,baseStyle:fn,defaultProps:{size:"md",colorScheme:"blue"}}),gn=e=>typeof e=="function";function z(e,...r){return gn(e)?e(...r):e}var{definePartsStyle:ze,defineMultiStyleConfig:yn}=u(so.keys),ce=f("checkbox-size"),pn=o(e=>{const{colorScheme:r}=e;return{w:ce.reference,h:ce.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:d(`${r}.500`,`${r}.200`)(e),borderColor:d(`${r}.500`,`${r}.200`)(e),color:d("white","gray.900")(e),_hover:{bg:d(`${r}.600`,`${r}.300`)(e),borderColor:d(`${r}.600`,`${r}.300`)(e)},_disabled:{borderColor:d("gray.200","transparent")(e),bg:d("gray.200","whiteAlpha.300")(e),color:d("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:d(`${r}.500`,`${r}.200`)(e),borderColor:d(`${r}.500`,`${r}.200`)(e),color:d("white","gray.900")(e)},_disabled:{bg:d("gray.100","whiteAlpha.100")(e),borderColor:d("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:d("red.500","red.300")(e)}}}),Sn=o({_disabled:{cursor:"not-allowed"}}),xn=o({userSelect:"none",_disabled:{opacity:.4}}),$n=o({transitionProperty:"transform",transitionDuration:"normal"}),kn=ze(e=>({icon:$n,container:Sn,control:z(pn,e),label:xn})),_n={sm:ze({control:{[ce.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:ze({control:{[ce.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:ze({control:{[ce.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Fe=yn({baseStyle:kn,sizes:_n,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:wn,definePartsStyle:Ae}=u(xo.keys),Cn=o(e=>{var r;const t=(r=z(Fe.baseStyle,e))==null?void 0:r.control;return{...t,borderRadius:"full",_checked:{...t==null?void 0:t._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}}),zn=Ae(e=>{var r,t,a,n;return{label:(t=(r=Fe).baseStyle)==null?void 0:t.call(r,e).label,container:(n=(a=Fe).baseStyle)==null?void 0:n.call(a,e).container,control:Cn(e)}}),An={md:Ae({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Ae({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Ae({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Pn=wn({baseStyle:zn,sizes:An,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Tn,definePartsStyle:Fn}=u($o.keys),$e=f("select-bg"),Ar,In=o({...(Ar=v.baseStyle)==null?void 0:Ar.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:$e.reference,[$e.variable]:"colors.white",_dark:{[$e.variable]:"colors.gray.700"},"> option, > optgroup":{bg:$e.reference}}),Mn=o({width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}}),Bn=Fn({field:In,icon:Mn}),ke=o({paddingInlineEnd:"8"}),Pr,Tr,Fr,Ir,Mr,Br,Er,Dr,En={lg:{...(Pr=v.sizes)==null?void 0:Pr.lg,field:{...(Tr=v.sizes)==null?void 0:Tr.lg.field,...ke}},md:{...(Fr=v.sizes)==null?void 0:Fr.md,field:{...(Ir=v.sizes)==null?void 0:Ir.md.field,...ke}},sm:{...(Mr=v.sizes)==null?void 0:Mr.sm,field:{...(Br=v.sizes)==null?void 0:Br.sm.field,...ke}},xs:{...(Er=v.sizes)==null?void 0:Er.xs,field:{...(Dr=v.sizes)==null?void 0:Dr.xs.field,...ke},icon:{insetEnd:"1"}}},Dn=Tn({baseStyle:Bn,sizes:En,variants:v.variants,defaultProps:v.defaultProps}),We=f("skeleton-start-color"),He=f("skeleton-end-color"),jn=o({[We.variable]:"colors.gray.100",[He.variable]:"colors.gray.400",_dark:{[We.variable]:"colors.gray.800",[He.variable]:"colors.gray.600"},background:We.reference,borderColor:He.reference,opacity:.7,borderRadius:"sm"}),Rn=x({baseStyle:jn}),Ve=f("skip-link-bg"),Wn=o({borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ve.variable]:"colors.white",_dark:{[Ve.variable]:"colors.gray.700"},bg:Ve.reference}}),Hn=x({baseStyle:Wn}),{defineMultiStyleConfig:Vn,definePartsStyle:Ee}=u(ko.keys),ve=f("slider-thumb-size"),fe=f("slider-track-size"),O=f("slider-bg"),Ln=o(e=>{const{orientation:r}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...rr({orientation:r,vertical:{h:"100%"},horizontal:{w:"100%"}})}}),On=o(e=>({...rr({orientation:e.orientation,horizontal:{h:fe.reference},vertical:{w:fe.reference}}),overflow:"hidden",borderRadius:"sm",[O.variable]:"colors.gray.200",_dark:{[O.variable]:"colors.whiteAlpha.200"},_disabled:{[O.variable]:"colors.gray.300",_dark:{[O.variable]:"colors.whiteAlpha.300"}},bg:O.reference})),qn=o(e=>{const{orientation:r}=e;return{...rr({orientation:r,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:ve.reference,h:ve.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"}}}),Nn=o(e=>{const{colorScheme:r}=e;return{width:"inherit",height:"inherit",[O.variable]:`colors.${r}.500`,_dark:{[O.variable]:`colors.${r}.200`},bg:O.reference}}),Gn=Ee(e=>({container:Ln(e),track:On(e),thumb:qn(e),filledTrack:Nn(e)})),Un=Ee({container:{[ve.variable]:"sizes.4",[fe.variable]:"sizes.1"}}),Yn=Ee({container:{[ve.variable]:"sizes.3.5",[fe.variable]:"sizes.1"}}),Xn=Ee({container:{[ve.variable]:"sizes.2.5",[fe.variable]:"sizes.0.5"}}),Kn={lg:Un,md:Yn,sm:Xn},Qn=Vn({baseStyle:Gn,sizes:Kn,defaultProps:{size:"md",colorScheme:"blue"}}),q=$("spinner-size"),Zn=o({width:[q.reference],height:[q.reference]}),Jn={xs:o({[q.variable]:"sizes.3"}),sm:o({[q.variable]:"sizes.4"}),md:o({[q.variable]:"sizes.6"}),lg:o({[q.variable]:"sizes.8"}),xl:o({[q.variable]:"sizes.12"})},ei=x({baseStyle:Zn,sizes:Jn,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ri,definePartsStyle:Qr}=u(_o.keys),ti=o({fontWeight:"medium"}),oi=o({opacity:.8,marginBottom:"2"}),ai=o({verticalAlign:"baseline",fontWeight:"semibold"}),ni=o({marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"}),ii=Qr({container:{},label:ti,helpText:oi,number:ai,icon:ni}),li={md:Qr({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},si=ri({baseStyle:ii,sizes:li,defaultProps:{size:"md"}}),Le=f("kbd-bg"),di=o({[Le.variable]:"colors.gray.100",_dark:{[Le.variable]:"colors.whiteAlpha.100"},bg:Le.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),ci=x({baseStyle:di}),bi=o({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}),ui=x({baseStyle:bi}),{defineMultiStyleConfig:vi,definePartsStyle:fi}=u(mo.keys),mi=o({marginEnd:"2",display:"inline",verticalAlign:"text-bottom"}),hi=fi({icon:mi}),gi=vi({baseStyle:hi}),{defineMultiStyleConfig:yi,definePartsStyle:pi}=u(ho.keys),B=f("menu-bg"),Oe=f("menu-shadow"),Si=o({[B.variable]:"#fff",[Oe.variable]:"shadows.sm",_dark:{[B.variable]:"colors.gray.700",[Oe.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:B.reference,boxShadow:Oe.reference}),xi=o({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[B.variable]:"colors.gray.100",_dark:{[B.variable]:"colors.whiteAlpha.100"}},_active:{[B.variable]:"colors.gray.200",_dark:{[B.variable]:"colors.whiteAlpha.200"}},_expanded:{[B.variable]:"colors.gray.100",_dark:{[B.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:B.reference}),$i=o({mx:4,my:2,fontWeight:"semibold",fontSize:"sm"}),ki=o({opacity:.6}),_i=o({border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}),wi=o({transitionProperty:"common",transitionDuration:"normal"}),Ci=pi({button:wi,list:Si,item:xi,groupTitle:$i,command:ki,divider:_i}),zi=yi({baseStyle:Ci}),{defineMultiStyleConfig:Ai,definePartsStyle:Ze}=u(go.keys),Pi=o({bg:"blackAlpha.600",zIndex:"modal"}),Ti=o(e=>{const{isCentered:r,scrollBehavior:t}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:r?"center":"flex-start",overflow:t==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}}),Fi=o(e=>{const{scrollBehavior:r}=e;return{borderRadius:"md",bg:d("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:r==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:d("lg","dark-lg")(e)}}),Ii=o({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),Mi=o({position:"absolute",top:"2",insetEnd:"3"}),Bi=o(e=>{const{scrollBehavior:r}=e;return{px:"6",py:"2",flex:"1",overflow:r==="inside"?"auto":void 0}}),Ei=o({px:"6",py:"4"}),Di=Ze(e=>({overlay:Pi,dialogContainer:z(Ti,e),dialog:z(Fi,e),header:Ii,closeButton:Mi,body:z(Bi,e),footer:Ei}));function T(e){return Ze(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var ji={xs:T("xs"),sm:T("sm"),md:T("md"),lg:T("lg"),xl:T("xl"),"2xl":T("2xl"),"3xl":T("3xl"),"4xl":T("4xl"),"5xl":T("5xl"),"6xl":T("6xl"),full:T("full")},Ri=Ai({baseStyle:Di,sizes:ji,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Wi,definePartsStyle:Zr}=u(yo.keys),or=$("number-input-stepper-width"),Jr=$("number-input-input-padding"),Hi=j(or).add("0.5rem").toString(),qe=$("number-input-bg"),Ne=$("number-input-color"),Ge=$("number-input-border-color"),Vi=o({[or.variable]:"sizes.6",[Jr.variable]:Hi}),Li=o(e=>{var r,t;return(t=(r=z(v.baseStyle,e))==null?void 0:r.field)!=null?t:{}}),Oi=o({width:or.reference}),qi=o({borderStart:"1px solid",borderStartColor:Ge.reference,color:Ne.reference,bg:qe.reference,[Ne.variable]:"colors.chakra-body-text",[Ge.variable]:"colors.chakra-border-color",_dark:{[Ne.variable]:"colors.whiteAlpha.800",[Ge.variable]:"colors.whiteAlpha.300"},_active:{[qe.variable]:"colors.gray.200",_dark:{[qe.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}}),Ni=Zr(e=>{var r;return{root:Vi,field:(r=z(Li,e))!=null?r:{},stepperGroup:Oi,stepper:qi}});function _e(e){var r,t,a;const n=(r=v.sizes)==null?void 0:r[e],l={lg:"md",md:"md",sm:"sm",xs:"sm"},s=(a=(t=n.field)==null?void 0:t.fontSize)!=null?a:"md",c=Gr.fontSizes[s];return Zr({field:{...n.field,paddingInlineEnd:Jr.reference,verticalAlign:"top"},stepper:{fontSize:j(c).multiply(.75).toString(),_first:{borderTopEndRadius:l[e]},_last:{borderBottomEndRadius:l[e],mt:"-1px",borderTopWidth:1}}})}var Gi={xs:_e("xs"),sm:_e("sm"),md:_e("md"),lg:_e("lg")},Ui=Wi({baseStyle:Ni,sizes:Gi,variants:v.variants,defaultProps:v.defaultProps}),jr,Yi=o({...(jr=v.baseStyle)==null?void 0:jr.field,textAlign:"center"}),Xi={lg:o({fontSize:"lg",w:12,h:12,borderRadius:"md"}),md:o({fontSize:"md",w:10,h:10,borderRadius:"md"}),sm:o({fontSize:"sm",w:8,h:8,borderRadius:"sm"}),xs:o({fontSize:"xs",w:6,h:6,borderRadius:"sm"})},Rr,Wr,Ki={outline:o(e=>{var r,t,a;return(a=(t=z((r=v.variants)==null?void 0:r.outline,e))==null?void 0:t.field)!=null?a:{}}),flushed:o(e=>{var r,t,a;return(a=(t=z((r=v.variants)==null?void 0:r.flushed,e))==null?void 0:t.field)!=null?a:{}}),filled:o(e=>{var r,t,a;return(a=(t=z((r=v.variants)==null?void 0:r.filled,e))==null?void 0:t.field)!=null?a:{}}),unstyled:(Wr=(Rr=v.variants)==null?void 0:Rr.unstyled.field)!=null?Wr:{}},Qi=x({baseStyle:Yi,sizes:Xi,variants:Ki,defaultProps:v.defaultProps}),{defineMultiStyleConfig:Zi,definePartsStyle:Ji}=u(po.keys),we=$("popper-bg"),el=$("popper-arrow-bg"),Hr=$("popper-arrow-shadow-color"),rl=o({zIndex:10}),tl=o({[we.variable]:"colors.white",bg:we.reference,[el.variable]:we.reference,[Hr.variable]:"colors.gray.200",_dark:{[we.variable]:"colors.gray.700",[Hr.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}}),ol=o({px:3,py:2,borderBottomWidth:"1px"}),al=o({px:3,py:2}),nl=o({px:3,py:2,borderTopWidth:"1px"}),il=o({position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2}),ll=Ji({popper:rl,content:tl,header:ol,body:al,footer:nl,closeButton:il}),sl=Zi({baseStyle:ll}),{definePartsStyle:Je,defineMultiStyleConfig:dl}=u(co.keys),Ue=f("drawer-bg"),Ye=f("drawer-box-shadow");function X(e){return Je(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var cl=o({bg:"blackAlpha.600",zIndex:"overlay"}),bl=o({display:"flex",zIndex:"modal",justifyContent:"center"}),ul=o(e=>{const{isFullHeight:r}=e;return{...r&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ue.variable]:"colors.white",[Ye.variable]:"shadows.lg",_dark:{[Ue.variable]:"colors.gray.700",[Ye.variable]:"shadows.dark-lg"},bg:Ue.reference,boxShadow:Ye.reference}}),vl=o({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),fl=o({position:"absolute",top:"2",insetEnd:"3"}),ml=o({px:"6",py:"2",flex:"1",overflow:"auto"}),hl=o({px:"6",py:"4"}),gl=Je(e=>({overlay:cl,dialogContainer:bl,dialog:z(ul,e),header:vl,closeButton:fl,body:ml,footer:hl})),yl={xs:X("xs"),sm:X("md"),md:X("lg"),lg:X("2xl"),xl:X("4xl"),full:X("full")},pl=dl({baseStyle:gl,sizes:yl,defaultProps:{size:"xs"}}),{definePartsStyle:Sl,defineMultiStyleConfig:xl}=u(bo.keys),$l=o({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"}),kl=o({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),_l=o({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),wl=Sl({preview:$l,input:kl,textarea:_l}),Cl=xl({baseStyle:wl}),{definePartsStyle:zl,defineMultiStyleConfig:Al}=u(uo.keys),Z=f("form-control-color"),Pl=o({marginStart:"1",[Z.variable]:"colors.red.500",_dark:{[Z.variable]:"colors.red.300"},color:Z.reference}),Tl=o({mt:"2",[Z.variable]:"colors.gray.600",_dark:{[Z.variable]:"colors.whiteAlpha.600"},color:Z.reference,lineHeight:"normal",fontSize:"sm"}),Fl=zl({container:{width:"100%",position:"relative"},requiredIndicator:Pl,helperText:Tl}),Il=Al({baseStyle:Fl}),{definePartsStyle:Ml,defineMultiStyleConfig:Bl}=u(vo.keys),J=f("form-error-color"),El=o({[J.variable]:"colors.red.500",_dark:{[J.variable]:"colors.red.300"},color:J.reference,mt:"2",fontSize:"sm",lineHeight:"normal"}),Dl=o({marginEnd:"0.5em",[J.variable]:"colors.red.500",_dark:{[J.variable]:"colors.red.300"},color:J.reference}),jl=Ml({text:El,icon:Dl}),Rl=Bl({baseStyle:jl}),Wl=o({fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}),Hl=x({baseStyle:Wl}),Vl=o({fontFamily:"heading",fontWeight:"bold"}),Ll={"4xl":o({fontSize:["6xl",null,"7xl"],lineHeight:1}),"3xl":o({fontSize:["5xl",null,"6xl"],lineHeight:1}),"2xl":o({fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]}),xl:o({fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]}),lg:o({fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]}),md:o({fontSize:"xl",lineHeight:1.2}),sm:o({fontSize:"md",lineHeight:1.2}),xs:o({fontSize:"sm",lineHeight:1.2})},Ol=x({baseStyle:Vl,sizes:Ll,defaultProps:{size:"xl"}}),{defineMultiStyleConfig:ql,definePartsStyle:Nl}=u(lo.keys),Gl=o({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}),Ul=Nl({link:Gl}),Yl=ql({baseStyle:Ul}),Xl=o({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"}}}),et=o(e=>{const{colorScheme:r,theme:t}=e;if(r==="gray")return{color:d("inherit","whiteAlpha.900")(e),_hover:{bg:d("gray.100","whiteAlpha.200")(e)},_active:{bg:d("gray.200","whiteAlpha.300")(e)}};const a=re(`${r}.200`,.12)(t),n=re(`${r}.200`,.24)(t);return{color:d(`${r}.600`,`${r}.200`)(e),bg:"transparent",_hover:{bg:d(`${r}.50`,a)(e)},_active:{bg:d(`${r}.100`,n)(e)}}}),Kl=o(e=>{const{colorScheme:r}=e,t=d("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:r==="gray"?t:"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"},...z(et,e)}}),Ql={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Zl=o(e=>{var r;const{colorScheme:t}=e;if(t==="gray"){const b=d("gray.100","whiteAlpha.200")(e);return{bg:b,_hover:{bg:d("gray.200","whiteAlpha.300")(e),_disabled:{bg:b}},_active:{bg:d("gray.300","whiteAlpha.400")(e)}}}const{bg:a=`${t}.500`,color:n="white",hoverBg:l=`${t}.600`,activeBg:s=`${t}.700`}=(r=Ql[t])!=null?r:{},c=d(a,`${t}.200`)(e);return{bg:c,color:d(n,"gray.800")(e),_hover:{bg:d(l,`${t}.300`)(e),_disabled:{bg:c}},_active:{bg:d(s,`${t}.400`)(e)}}}),Jl=o(e=>{const{colorScheme:r}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:d(`${r}.500`,`${r}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:d(`${r}.700`,`${r}.500`)(e)}}}),es=o({bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}),rs={ghost:et,outline:Kl,solid:Zl,link:Jl,unstyled:es},ts={lg:o({h:"12",minW:"12",fontSize:"lg",px:"6"}),md:o({h:"10",minW:"10",fontSize:"md",px:"4"}),sm:o({h:"8",minW:"8",fontSize:"sm",px:"3"}),xs:o({h:"6",minW:"6",fontSize:"xs",px:"2"})},os=x({baseStyle:Xl,variants:rs,sizes:ts,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}}),{definePartsStyle:Y,defineMultiStyleConfig:as}=u(Po.keys),Ie=f("card-bg"),W=f("card-padding"),rt=f("card-shadow"),Pe=f("card-radius"),tt=f("card-border-width","0"),ot=f("card-border-color"),ns=Y({container:{[Ie.variable]:"colors.chakra-body-bg",backgroundColor:Ie.reference,boxShadow:rt.reference,borderRadius:Pe.reference,color:"chakra-body-text",borderWidth:tt.reference,borderColor:ot.reference},body:{padding:W.reference,flex:"1 1 0%"},header:{padding:W.reference},footer:{padding:W.reference}}),is={sm:Y({container:{[Pe.variable]:"radii.base",[W.variable]:"space.3"}}),md:Y({container:{[Pe.variable]:"radii.md",[W.variable]:"space.5"}}),lg:Y({container:{[Pe.variable]:"radii.xl",[W.variable]:"space.7"}})},ls={elevated:Y({container:{[rt.variable]:"shadows.base",_dark:{[Ie.variable]:"colors.gray.700"}}}),outline:Y({container:{[tt.variable]:"1px",[ot.variable]:"colors.chakra-border-color"}}),filled:Y({container:{[Ie.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[W.variable]:0},header:{[W.variable]:0},footer:{[W.variable]:0}}},ss=as({baseStyle:ns,variants:ls,sizes:is,defaultProps:{variant:"elevated",size:"md"}}),be=$("close-button-size"),ae=$("close-button-bg"),ds=o({w:[be.reference],h:[be.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[ae.variable]:"colors.blackAlpha.100",_dark:{[ae.variable]:"colors.whiteAlpha.100"}},_active:{[ae.variable]:"colors.blackAlpha.200",_dark:{[ae.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:ae.reference}),cs={lg:o({[be.variable]:"sizes.10",fontSize:"md"}),md:o({[be.variable]:"sizes.8",fontSize:"xs"}),sm:o({[be.variable]:"sizes.6",fontSize:"2xs"})},bs=x({baseStyle:ds,sizes:cs,defaultProps:{size:"md"}}),{variants:us,defaultProps:vs}=de,fs=o({fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"}),ms=x({baseStyle:fs,variants:us,defaultProps:vs}),hs=o({w:"100%",mx:"auto",maxW:"prose",px:"4"}),gs=x({baseStyle:hs}),ys=o({opacity:.6,borderColor:"inherit"}),ps=o({borderStyle:"solid"}),Ss=o({borderStyle:"dashed"}),xs={solid:ps,dashed:Ss},$s=x({baseStyle:ys,variants:xs,defaultProps:{variant:"solid"}}),{definePartsStyle:ks,defineMultiStyleConfig:_s}=u(ao.keys),ws=o({borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}}),Cs=o({transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"}),zs=o({pt:"2",px:"4",pb:"5"}),As=o({fontSize:"1.25em"}),Ps=ks({container:ws,button:Cs,panel:zs,icon:As}),Ts=_s({baseStyle:Ps}),{definePartsStyle:me,defineMultiStyleConfig:Fs}=u(no.keys),P=f("alert-fg"),H=f("alert-bg"),Is=me({container:{bg:H.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:P.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:P.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function ar(e){const{theme:r,colorScheme:t}=e,a=re(`${t}.200`,.16)(r);return{light:`colors.${t}.100`,dark:a}}var Ms=me(e=>{const{colorScheme:r}=e,t=ar(e);return{container:{[P.variable]:`colors.${r}.500`,[H.variable]:t.light,_dark:{[P.variable]:`colors.${r}.200`,[H.variable]:t.dark}}}}),Bs=me(e=>{const{colorScheme:r}=e,t=ar(e);return{container:{[P.variable]:`colors.${r}.500`,[H.variable]:t.light,_dark:{[P.variable]:`colors.${r}.200`,[H.variable]:t.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:P.reference}}}),Es=me(e=>{const{colorScheme:r}=e,t=ar(e);return{container:{[P.variable]:`colors.${r}.500`,[H.variable]:t.light,_dark:{[P.variable]:`colors.${r}.200`,[H.variable]:t.dark},pt:"2",borderTopWidth:"4px",borderTopColor:P.reference}}}),Ds=me(e=>{const{colorScheme:r}=e;return{container:{[P.variable]:"colors.white",[H.variable]:`colors.${r}.500`,_dark:{[P.variable]:"colors.gray.900",[H.variable]:`colors.${r}.200`},color:P.reference}}}),js={subtle:Ms,"left-accent":Bs,"top-accent":Es,solid:Ds},Rs=Fs({baseStyle:Is,variants:js,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:at,defineMultiStyleConfig:Ws}=u(io.keys),ee=f("avatar-border-color"),Xe=f("avatar-bg"),Hs=o({borderRadius:"full",border:"0.2em solid",[ee.variable]:"white",_dark:{[ee.variable]:"colors.gray.800"},borderColor:ee.reference}),Vs=o({[Xe.variable]:"colors.gray.200",_dark:{[Xe.variable]:"colors.whiteAlpha.400"},bgColor:Xe.reference}),Vr=f("avatar-background"),Ls=o(e=>{const{name:r,theme:t}=e,a=r?Xo({string:r}):"colors.gray.400",n=Uo(a)(t);let l="white";return n||(l="gray.800"),{bg:Vr.reference,"&:not([data-loaded])":{[Vr.variable]:a},color:l,[ee.variable]:"colors.white",_dark:{[ee.variable]:"colors.gray.800"},borderColor:ee.reference,verticalAlign:"top"}}),Os=at(e=>({badge:z(Hs,e),excessLabel:z(Vs,e),container:z(Ls,e)}));function L(e){const r=e!=="100%"?Yr[e]:void 0;return at({container:{width:e,height:e,fontSize:`calc(${r??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${r??e} / 2.5)`,lineHeight:e!=="100%"?r??e:void 0}})}var qs={"2xs":L(4),xs:L(6),sm:L(8),md:L(12),lg:L(16),xl:L(24),"2xl":L(32),full:L("100%")},Ns=Ws({baseStyle:Os,sizes:qs,defaultProps:{size:"md"}}),Gs={Accordion:Ts,Alert:Rs,Avatar:Ns,Badge:de,Breadcrumb:Yl,Button:os,Checkbox:Fe,CloseButton:bs,Code:ms,Container:gs,Divider:$s,Drawer:pl,Editable:Cl,Form:Il,FormError:Rl,FormLabel:Hl,Heading:Ol,Input:v,Kbd:ci,Link:ui,List:gi,Menu:zi,Modal:Ri,NumberInput:Ui,PinInput:Qi,Popover:sl,Progress:hn,Radio:Pn,Select:Dn,Skeleton:Rn,SkipLink:Hn,Slider:Qn,Spinner:ei,Stat:si,Switch:ba,Table:ya,Tabs:Ma,Tag:Ga,Textarea:an,Tooltip:sn,Card:ss},Us={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-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Ys={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",wordWrap:"break-word"}}},Xs="ltr",Ks={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},nt={semanticTokens:Us,direction:Xs,...oo,components:Gs,styles:Ys,config:Ks};function le(e){return typeof e=="function"}function Qs(...e){return r=>e.reduce((t,a)=>a(t),r)}var Zs=e=>function(...t){let a=[...t],n=t[t.length-1];return Mt(n)&&a.length>1?a=a.slice(0,a.length-1):n=e,Qs(...a.map(l=>s=>le(l)?l(s):e0(s,l)))(n)},Js=Zs(nt);function e0(...e){return Or({},...e,it)}function it(e,r,t,a){if((le(e)||le(r))&&Object.prototype.hasOwnProperty.call(a,t))return(...n)=>{const l=le(e)?e(...n):e,s=le(r)?r(...n):r;return Or({},l,s,it)}}function r0(e={}){const{strict:r=!0,errorMessage:t="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:a}=e,n=w.createContext(void 0);n.displayName=a;function l(){var s;const c=w.useContext(n);if(!c&&r){const b=new Error(t);throw b.name="ContextError",(s=Error.captureStackTrace)==null||s.call(Error,b,l),b}return c}return[n.Provider,l,n]}function t0(e){const{cssVarsRoot:r,theme:t,children:a}=e,n=w.useMemo(()=>vt(t),[t]);return S.jsxs(ft,{theme:n,children:[S.jsx(o0,{root:r}),a]})}function o0({root:e=":host, :root"}){const r=[e,"[data-theme]"].join(",");return S.jsx(Me,{styles:t=>({[r]:t.__cssVars})})}r0({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function a0(){const{colorMode:e}=mt();return S.jsx(Me,{styles:r=>{const t=ht(r,"styles.global"),a=gt(t,{theme:r,colorMode:e});return a?yt(a)(r):void 0}})}var lt=w.createContext({getDocument(){return document},getWindow(){return window}});lt.displayName="EnvironmentContext";function st(e){const{children:r,environment:t,disabled:a}=e,n=w.useRef(null),l=w.useMemo(()=>t||{getDocument:()=>{var c,b;return(b=(c=n.current)==null?void 0:c.ownerDocument)!=null?b:document},getWindow:()=>{var c,b;return(b=(c=n.current)==null?void 0:c.ownerDocument.defaultView)!=null?b:window}},[t]),s=!a||!t;return S.jsxs(lt.Provider,{value:l,children:[r,s&&S.jsx("span",{id:"__chakra_env",hidden:!0,ref:n})]})}st.displayName="EnvironmentProvider";var n0=e=>{const{children:r,colorModeManager:t,portalZIndex:a,resetCSS:n=!0,theme:l={},environment:s,cssVarsRoot:c,disableEnvironment:b}=e,k=S.jsx(st,{environment:s,disabled:b,children:r});return S.jsx(t0,{theme:l,cssVarsRoot:c,children:S.jsxs(Nr,{colorModeManager:t,options:l.config,children:[n?S.jsx(zt,{}):S.jsx(Ct,{}),S.jsx(a0,{}),a?S.jsx(xt,{zIndex:a,children:k}):k]})})},i0=e=>function({children:t,theme:a=e,toastOptions:n,...l}){return S.jsxs(n0,{theme:a,...l,children:[S.jsx($t,{value:n==null?void 0:n.defaultOptions,children:t}),S.jsx(kt,{...n})]})},l0=i0(nt);function i(e,r){return t=>t.colorMode==="dark"?r:e}function s0(e){return!Number.isInteger(parseFloat(e.toString()))}function d0(e,r="-"){return e.replace(/\s+/g,r)}function dt(e){const r=d0(e.toString());return r.includes("\\.")?e:s0(e)?r.replace(".","\\."):e}function c0(e,r=""){return[r,dt(e)].filter(Boolean).join("-")}function b0(e,r){return`var(${dt(e)}${r?`, ${r}`:""})`}function u0(e,r=""){return`--${c0(e,r)}`}function nr(e,r){const t=u0(e,r==null?void 0:r.prefix);return{variable:t,reference:b0(t,v0(r==null?void 0:r.fallback))}}function v0(e){return typeof e=="string"?e:e==null?void 0:e.reference}function h(e,r={}){let t=!1;function a(){if(!t){t=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function n(...g){a();for(const y of g)r[y]=b(y);return h(e,r)}function l(...g){for(const y of g)y in r||(r[y]=b(y));return h(e,r)}function s(){return Object.fromEntries(Object.entries(r).map(([y,_])=>[y,_.selector]))}function c(){return Object.fromEntries(Object.entries(r).map(([y,_])=>[y,_.className]))}function b(g){const I=`chakra-${(["container","root"].includes(g??"")?[e]:[e,g]).filter(Boolean).join("__")}`;return{className:I,selector:`.${I}`,toString:()=>g}}return{parts:n,toPart:b,extend:l,selectors:s,classnames:c,get keys(){return Object.keys(r)},__type:{}}}var f0=h("accordion").parts("root","container","button","panel").extend("icon");h("alert").parts("title","description","container").extend("icon","spinner");h("avatar").parts("label","badge","container").extend("excessLabel","group");h("breadcrumb").parts("link","item","container").extend("separator");h("button").parts();var m0=h("checkbox").parts("control","icon","container").extend("label");h("progress").parts("track","filledTrack").extend("label");h("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer");h("editable").parts("preview","input","textarea");h("form").parts("container","requiredIndicator","helperText");h("formError").parts("text","icon");var h0=h("input").parts("addon","field","element");h("list").parts("container","item","icon");var g0=h("menu").parts("button","list","item").extend("groupTitle","command","divider"),y0=h("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),p0=h("numberinput").parts("root","field","stepperGroup","stepper");h("pininput").parts("field");var S0=h("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),x0=h("progress").parts("label","filledTrack","track");h("radio").parts("container","control","label");var $0=h("select").parts("field","icon"),k0=h("slider").parts("container","track","thumb","filledTrack","mark");h("stat").parts("container","label","helpText","number","icon");var _0=h("switch").parts("container","track","thumb");h("table").parts("table","thead","tbody","tr","th","td","tfoot","caption");var w0=h("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator");h("tag").parts("container","label","closeButton");h("card").parts("container","header","body","footer");function p(e,r,t=!1){e=String(e),r=String(r);const a=Array.from({length:21},(c,b)=>b*50),n=["0","5","10","15","20","25","30","35","40","45","50","55","59","64","68","73","77","82","86","95","100"],l={},s={};return a.forEach((c,b)=>{l[c]=`hsl(${e}, ${r}%, ${n[a.length-1-b]}%)`,s[c]=`hsl(${e}, ${r}%, ${n[b]}%)`}),t?s:l}const ct={base:p(225,15),accent:p(250,50),working:p(47,67),warning:p(28,75),ok:p(113,70),error:p(0,76)},{definePartsStyle:C0,defineMultiStyleConfig:z0}=u(f0.keys),A0=o({border:"none",pt:2}),P0=o(e=>{const{colorScheme:r}=e;return{fontWeight:"600",fontSize:"sm",border:"none",borderRadius:"base",bg:i(`${r}.250`,`${r}.800`)(e),color:i("base.900","base.100")(e),_hover:{bg:i(`${r}.300`,`${r}.700`)(e)},_expanded:{bg:i(`${r}.250`,`${r}.750`)(e),borderBottomRadius:"none",_hover:{bg:i(`${r}.300`,`${r}.700`)(e)}}}}),T0=o(e=>{const{colorScheme:r}=e;return{bg:i(`${r}.200`,`${r}.800`)(e),borderRadius:"base",borderTopRadius:"none",p:4}}),F0=o({}),I0=C0(e=>({container:A0,button:P0(e),panel:T0(e),icon:F0})),M0=z0({variants:{invokeAI:I0},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),B0=o(e=>{const{colorScheme:r}=e,t={bg:i(`${r}.200`,`${r}.600`)(e),color:i(`${r}.700`,`${r}.100`)(e),svg:{fill:i(`${r}.700`,`${r}.100`)(e)}};return{bg:i(`${r}.300`,`${r}.700`)(e),color:i(`${r}.800`,`${r}.100`)(e),borderRadius:"base",svg:{fill:i(`${r}.800`,`${r}.100`)(e)},_disabled:t,_hover:{bg:i(`${r}.400`,`${r}.650`)(e),color:i("black",`${r}.50`)(e),svg:{fill:i("black",`${r}.50`)(e)},_disabled:t},_checked:{bg:i("accent.200","accent.700")(e),color:i("accent.800","accent.100")(e),svg:{fill:i("accent.800","accent.100")(e)},_disabled:t,_hover:{bg:i("accent.300","accent.600")(e),color:i("accent.900","accent.50")(e),svg:{fill:i("accent.900","accent.50")(e)},_disabled:t}}}}),E0=x({variants:{invokeAI:B0},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),{definePartsStyle:D0,defineMultiStyleConfig:j0}=u(m0.keys),R0=o(e=>{const{colorScheme:r}=e;return{_checked:{bg:i(`${r}.500`,`${r}.200`)(e),borderColor:i(`${r}.500`,`${r}.200`)(e),color:i("white","base.900")(e),_hover:{bg:i(`${r}.600`,`${r}.300`)(e),borderColor:i(`${r}.600`,`${r}.300`)(e)},_disabled:{borderColor:i("base.200","transparent")(e),bg:i("base.200","whiteAlpha.300")(e),color:i("base.500","whiteAlpha.500")(e)}},_indeterminate:{bg:i(`${r}.500`,`${r}.200`)(e),borderColor:i(`${r}.500`,`${r}.200`)(e),color:i("white","base.900")(e)},_disabled:{bg:i("base.100","whiteAlpha.100")(e),borderColor:i("base.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:i("red.500","red.300")(e)}}}),W0=D0(e=>({control:R0(e)})),H0=j0({variants:{invokeAI:W0},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),V0=o(e=>({fontSize:"sm",marginEnd:0,mb:1,fontWeight:"400",transitionProperty:"common",transitionDuration:"normal",whiteSpace:"nowrap",_disabled:{opacity:.4},color:i("base.600","base.300")(e)})),L0=x({variants:{invokeAI:V0},defaultProps:{variant:"invokeAI"}}),De=e=>({outline:"none",borderWidth:2,borderStyle:"solid",borderColor:i("base.300","base.800")(e),bg:i("base.200","base.900")(e),borderRadius:"base",color:i("base.900","base.100")(e),boxShadow:"none",_hover:{borderColor:i("base.500","base.600")(e)},_focus:{borderColor:i("accent.600","accent.700")(e),boxShadow:"none",_hover:{borderColor:i("accent.700","accent.600")(e)}},_invalid:{borderColor:i("error.300","error.700")(e),boxShadow:"none",_hover:{borderColor:i("error.500","error.600")(e)}},_disabled:{borderColor:i("base.300","base.700")(e),bg:i("base.400","base.700")(e),color:i("base.600","base.400")(e),_hover:{borderColor:i("base.300","base.700")(e)}},_placeholder:{color:i("base.600","base.400")(e)}}),{definePartsStyle:O0,defineMultiStyleConfig:q0}=u(h0.keys),N0=O0(e=>({field:De(e)})),G0=q0({variants:{invokeAI:N0},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:U0,defineMultiStyleConfig:Y0}=u(g0.keys),X0=U0({button:{fontWeight:"600",bg:"base.500",color:"base.200",_hover:{bg:"base.600",color:"white"}},list:{zIndex:9999,bg:"base.800"},item:{fontSize:"sm",bg:"base.800",_hover:{bg:"base.750"},_focus:{bg:"base.700"}}}),K0=Y0({variants:{invokeAI:X0},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:Q0,definePartsStyle:Z0}=u(y0.keys),J0=o({bg:"blackAlpha.600"}),ed=o({}),rd=o(e=>({bg:i("base.300","base.850")(e),maxH:"80vh"})),td=o(e=>({fontWeight:"600",fontSize:"lg",color:i("base.700","base.200")(e)})),od=o({}),ad=o({overflowY:"scroll"}),nd=o({}),id=Z0(e=>({overlay:J0,dialogContainer:ed,dialog:rd(e),header:td(e),closeButton:od,body:ad,footer:nd})),ld=Q0({variants:{invokeAI:id},defaultProps:{variant:"invokeAI",size:"lg"}}),{defineMultiStyleConfig:sd,definePartsStyle:dd}=u(p0.keys),cd=o(e=>({height:8})),bd=o(e=>({border:"none",fontWeight:"600",height:"auto",py:1,ps:2,pe:6,...De(e)})),ud=o(e=>({display:"flex"})),vd=o(e=>({border:"none",px:2,py:0,mx:-2,my:0,svg:{color:i("base.600","base.300")(e),width:2.5,height:2.5,_hover:{color:i("base.900","base.50")(e)}}})),fd=dd(e=>({root:cd(e),field:bd(e),stepperGroup:ud(e),stepper:vd(e)})),md=sd({variants:{invokeAI:fd},defaultProps:{size:"sm",variant:"invokeAI"}}),{defineMultiStyleConfig:hd,definePartsStyle:gd}=u(S0.keys),yd=nr("popper-bg"),pd=nr("popper-arrow-bg"),Sd=nr("popper-arrow-shadow-color"),xd=o(e=>({[pd.variable]:"colors.base.800",[yd.variable]:"colors.base.800",[Sd.variable]:"colors.base.600",minW:"unset",width:"unset",p:4,borderWidth:"2px",borderStyle:"solid",borderColor:i("base.500","base.600")(e),bg:i("base.200","base.800")(e)})),$d=gd(e=>({content:xd(e)})),kd=hd({variants:{invokeAI:$d},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:_d,definePartsStyle:wd}=u(x0.keys),Cd=o(e=>({bg:i("accent.400","accent.600")(e),transition:"width 0.2s ease-in-out",_indeterminate:{bgGradient:`linear(to-r, transparent 0%, ${i("accent.400","accent.600")(e)} 50%, transparent 100%);`}})),zd=o(e=>({bg:i("base.300","base.800")(e)})),Ad=wd(e=>({filledTrack:Cd(e),track:zd(e)})),Pd=_d({variants:{invokeAI:Ad},defaultProps:{variant:"invokeAI"}}),{definePartsStyle:Td,defineMultiStyleConfig:Fd}=u($0.keys),Id=o(e=>({color:i("base.600","base.300")(e)})),Md=o(e=>({fontWeight:"600",...De(e)})),Bd=Td(e=>({field:Md(e),icon:Id(e)})),Ed=Fd({variants:{invokeAI:Bd},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:Dd,defineMultiStyleConfig:jd}=u(k0.keys),Rd=o(e=>({bg:i("base.300","base.400")(e),h:1.5})),Wd=o(e=>{const{colorScheme:r}=e;return{bg:i(`${r}.400`,`${r}.600`)(e),h:1.5}}),Hd=o(e=>({w:2,h:4})),Vd=o(e=>({fontSize:"xs",fontWeight:"500",color:i("base.800","base.200")(e),mt:2,insetInlineStart:"unset"})),Ld=Dd(e=>({track:Rd(e),filledTrack:Wd(e),thumb:Hd(e),mark:Vd(e)})),Od=jd({variants:{invokeAI:Ld},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:qd,definePartsStyle:Nd}=u(_0.keys),Gd=o(e=>{const{colorScheme:r}=e;return{bg:i("base.400","base.600")(e),_focusVisible:{boxShadow:"none"},_checked:{bg:i(`${r}.400`,`${r}.600`)(e)}}}),Ud=o(e=>{const{colorScheme:r}=e;return{bg:i(`${r}.50`,`${r}.50`)(e)}}),Yd=Nd(e=>({container:{},track:Gd(e),thumb:Ud(e)})),Xd=qd({variants:{invokeAI:Yd},defaultProps:{size:"md",variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:Kd,definePartsStyle:Qd}=u(w0.keys),Zd=o(e=>({display:"flex",columnGap:4})),Jd=o(e=>({})),ec=o(e=>({display:"flex",flexDirection:"column",gap:1,color:i("base.500","base.700")(e),button:{fontSize:"sm",padding:2,borderRadius:"base",_selected:{bg:i("accent.200","accent.700")(e),color:i("accent.800","accent.100")(e),_hover:{bg:i("accent.300","accent.600")(e),color:i("accent.900","accent.50")(e)}},_hover:{bg:i("base.300","base.600")(e),color:i("base.900","base.50")(e)}}})),rc=o(e=>({padding:0,height:"100%"})),tc=Qd(e=>({root:Zd(e),tab:Jd(e),tablist:ec(e),tabpanel:rc(e)})),oc=Kd({variants:{invokeAI:tc},defaultProps:{variant:"invokeAI"}}),ac=o(e=>({color:i("base.700","base.400")(e)})),nc=x({variants:{subtext:ac}}),ic=o(e=>De(e)),lc=x({variants:{invokeAI:ic},defaultProps:{size:"md",variant:"invokeAI"}}),sc={config:{initialColorMode:"dark",useSystemColorMode:!1,cssVarPrefix:"invokeai"},styles:{global:e=>({body:{bg:i("base.100","base.900")(e),color:i("base.800","base.50")(e),overflow:"hidden"},..._t})},direction:"ltr",fonts:{body:"'Inter', 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)"}},colors:{...ct},components:{Button:E0,Input:G0,Textarea:lc,Tabs:oc,Progress:Pd,Accordion:M0,FormLabel:L0,Switch:Xd,NumberInput:md,Select:Ed,Slider:Od,Popover:kd,Modal:ld,Checkbox:H0,Menu:K0,Text:nc}},dc={base:p(223,10),accent:p(155,80),working:p(47,68),warning:p(28,75),ok:p(122,49),error:p(0,50)},cc={base:p(223,10,!0),accent:p(40,80,!0),working:p(47,68,!0),warning:p(28,75,!0),ok:p(122,49,!0),error:p(0,50,!0)},bc={base:p(220,30),accent:p(210,80),working:p(47,68),warning:p(28,75),ok:p(122,49),error:p(0,100)},uc={dark:ct,light:cc,green:dc,ocean:bc};function mc({children:e}){const{i18n:r}=pt(),t=wt(l=>l.ui.currentTheme),a=r.dir(),n=Js({...sc,colors:uc[t],direction:a});return w.useEffect(()=>{document.body.dir=a},[a]),S.jsx(l0,{theme:n,children:e})}export{mc as default}; diff --git a/invokeai/frontend/web/dist/assets/index-0e39fbc4.js b/invokeai/frontend/web/dist/assets/index-0e39fbc4.js deleted file mode 100644 index 62299eb79e..0000000000 --- a/invokeai/frontend/web/dist/assets/index-0e39fbc4.js +++ /dev/null @@ -1,624 +0,0 @@ -function Cj(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 So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g={},XQ={get exports(){return g},set exports(e){g=e}},V3={},S={},ZQ={get exports(){return S},set exports(e){S=e}},Jt={};/** - * @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 Vy=Symbol.for("react.element"),QQ=Symbol.for("react.portal"),JQ=Symbol.for("react.fragment"),eJ=Symbol.for("react.strict_mode"),tJ=Symbol.for("react.profiler"),nJ=Symbol.for("react.provider"),rJ=Symbol.for("react.context"),iJ=Symbol.for("react.forward_ref"),oJ=Symbol.for("react.suspense"),aJ=Symbol.for("react.memo"),sJ=Symbol.for("react.lazy"),ST=Symbol.iterator;function lJ(e){return e===null||typeof e!="object"?null:(e=ST&&e[ST]||e["@@iterator"],typeof e=="function"?e:null)}var _j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kj=Object.assign,Ej={};function a0(e,t,n){this.props=e,this.context=t,this.refs=Ej,this.updater=n||_j}a0.prototype.isReactComponent={};a0.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")};a0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pj(){}Pj.prototype=a0.prototype;function w7(e,t,n){this.props=e,this.context=t,this.refs=Ej,this.updater=n||_j}var C7=w7.prototype=new Pj;C7.constructor=w7;kj(C7,a0.prototype);C7.isPureReactComponent=!0;var wT=Array.isArray,Tj=Object.prototype.hasOwnProperty,_7={current:null},Mj={key:!0,ref:!0,__self:!0,__source:!0};function Lj(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)Tj.call(t,r)&&!Mj.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(10?Vi(s0,--ea):0,jm--,ri===10&&(jm=1,q3--),ri}function Ea(){return ri=ea2||ey(ri)>3?"":" "}function AJ(e,t){for(;--t&&Ea()&&!(ri<48||ri>102||ri>57&&ri<65||ri>70&&ri<97););return Gy(e,Ax()+(t<6&&Ul()==32&&Ea()==32))}function m6(e){for(;Ea();)switch(ri){case e:return ea;case 34:case 39:e!==34&&e!==39&&m6(ri);break;case 40:e===41&&m6(e);break;case 92:Ea();break}return ea}function OJ(e,t){for(;Ea()&&e+ri!==47+10;)if(e+ri===42+42&&Ul()===47)break;return"/*"+Gy(t,ea-1)+"*"+G3(e===47?e:Ea())}function RJ(e){for(;!ey(Ul());)Ea();return Gy(e,ea)}function IJ(e){return Nj(Rx("",null,null,null,[""],e=jj(e),0,[0],e))}function Rx(e,t,n,r,i,o,a,s,l){for(var u=0,d=0,h=a,m=0,y=0,b=0,w=1,E=1,_=1,k=0,T="",L=i,O=o,D=r,I=T;E;)switch(b=k,k=Ea()){case 40:if(b!=108&&Vi(I,h-1)==58){g6(I+=kn(Ox(k),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:I+=Ox(k);break;case 9:case 10:case 13:case 32:I+=LJ(b);break;case 92:I+=AJ(Ax()-1,7);continue;case 47:switch(Ul()){case 42:case 47:gb(DJ(OJ(Ea(),Ax()),t,n),l);break;default:I+="/"}break;case 123*w:s[u++]=Il(I)*_;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+d:y>0&&Il(I)-h&&gb(y>32?kT(I+";",r,n,h-1):kT(kn(I," ","")+";",r,n,h-2),l);break;case 59:I+=";";default:if(gb(D=_T(I,t,n,u,d,i,s,T,L=[],O=[],h),o),k===123)if(d===0)Rx(I,t,D,D,L,o,h,s,O);else switch(m===99&&Vi(I,3)===110?100:m){case 100:case 109:case 115:Rx(e,D,D,r&&gb(_T(e,D,D,0,0,i,s,T,i,L=[],h),O),i,O,h,s,r?L:O);break;default:Rx(I,D,D,D,[""],O,0,s,O)}}u=d=y=0,w=_=1,T=I="",h=a;break;case 58:h=1+Il(I),y=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&MJ()==125)continue}switch(I+=G3(k),k*w){case 38:_=d>0?1:(I+="\f",-1);break;case 44:s[u++]=(Il(I)-1)*_,_=1;break;case 64:Ul()===45&&(I+=Ox(Ea())),m=Ul(),d=h=Il(T=I+=RJ(Ax())),k++;break;case 45:b===45&&Il(I)==2&&(w=0)}}return o}function _T(e,t,n,r,i,o,a,s,l,u,d){for(var h=i-1,m=i===0?o:[""],y=T7(m),b=0,w=0,E=0;b0?m[_]+" "+k:kn(k,/&\f/g,m[_])))&&(l[E++]=T);return K3(e,t,n,i===0?E7:s,l,u,d)}function DJ(e,t,n){return K3(e,t,n,Oj,G3(TJ()),J1(e,2,-2),0)}function kT(e,t,n,r){return K3(e,t,n,P7,J1(e,0,r),J1(e,r+1,-1),r)}function dm(e,t){for(var n="",r=T7(e),i=0;i6)switch(Vi(e,t+1)){case 109:if(Vi(e,t+4)!==45)break;case 102:return kn(e,/(.+:)(.+)-([^]+)/,"$1"+bn+"$2-$3$1"+yS+(Vi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~g6(e,"stretch")?Fj(kn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Vi(e,t+1)!==115)break;case 6444:switch(Vi(e,Il(e)-3-(~g6(e,"!important")&&10))){case 107:return kn(e,":",":"+bn)+e;case 101:return kn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+bn+(Vi(e,14)===45?"inline-":"")+"box$3$1"+bn+"$2$3$1"+no+"$2box$3")+e}break;case 5936:switch(Vi(e,t+11)){case 114:return bn+e+no+kn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return bn+e+no+kn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return bn+e+no+kn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return bn+e+no+e+e}return e}var UJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case P7:t.return=Fj(t.value,t.length);break;case Rj:return dm([Av(t,{value:kn(t.value,"@","@"+bn)})],i);case E7:if(t.length)return PJ(t.props,function(o){switch(EJ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return dm([Av(t,{props:[kn(o,/:(read-\w+)/,":"+yS+"$1")]})],i);case"::placeholder":return dm([Av(t,{props:[kn(o,/:(plac\w+)/,":"+bn+"input-$1")]}),Av(t,{props:[kn(o,/:(plac\w+)/,":"+yS+"$1")]}),Av(t,{props:[kn(o,/:(plac\w+)/,no+"input-$1")]})],i)}return""})}},VJ=[UJ],Bj=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(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||VJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),_=1;_=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 ree={animationIterationCount: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},iee=/[A-Z]|^ms/g,oee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Gj=function(t){return t.charCodeAt(1)===45},TT=function(t){return t!=null&&typeof t!="boolean"},s5=$j(function(e){return Gj(e)?e:e.replace(iee,"-$&").toLowerCase()}),MT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(oee,function(r,i,o){return Dl={name:i,styles:o,next:Dl},i})}return ree[t]!==1&&!Gj(t)&&typeof n=="number"&&n!==0?n+"px":n};function ty(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 Dl={name:n.name,styles:n.styles,next:Dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Dl={name:r.name,styles:r.styles,next:Dl},r=r.next;var i=n.styles+";";return i}return aee(e,t,n)}case"function":{if(e!==void 0){var o=Dl,a=n(e);return Dl=o,ty(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function aee(e,t,n){var r="";if(Array.isArray(n))for(var i=0;ig.jsx(ow,{styles:Xj}),gee=()=>g.jsx(ow,{styles:` - 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%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - 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; - } - - select::-ms-expand { - display: none; - } - - ${Xj} - `});function mee(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Pn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=S.createContext(void 0);a.displayName=t;function s(){var l;const u=S.useContext(a);if(!u&&n){const d=new Error(o??mee(r,i));throw d.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,d,s),d}return u}return[a.Provider,s,a]}var[vee,yee]=Pn({strict:!1,name:"PortalManagerContext"});function Zj(e){const{children:t,zIndex:n}=e;return g.jsx(vee,{value:{zIndex:n},children:t})}Zj.displayName="PortalManager";var Vl=Boolean(globalThis==null?void 0:globalThis.document)?S.useLayoutEffect:S.useEffect,Xs={},bee={get exports(){return Xs},set exports(e){Xs=e}},Ia={},Th={},xee={get exports(){return Th},set exports(e){Th=e}},Qj={};/** - * @license React - * scheduler.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. - */(function(e){function t(G,Y){var ee=G.length;G.push(Y);e:for(;0>>1,Ce=G[fe];if(0>>1;fei(Le,ee))Sei(Qe,Le)?(G[fe]=Qe,G[Se]=ee,fe=Se):(G[fe]=Le,G[xe]=ee,fe=xe);else if(Sei(Qe,ee))G[fe]=Qe,G[Se]=ee,fe=Se;else break e}}return Y}function i(G,Y){var ee=G.sortIndex-Y.sortIndex;return ee!==0?ee:G.id-Y.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=[],d=1,h=null,m=3,y=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Y=n(u);Y!==null;){if(Y.callback===null)r(u);else if(Y.startTime<=G)r(u),Y.sortIndex=Y.expirationTime,t(l,Y);else break;Y=n(u)}}function L(G){if(w=!1,T(G),!b)if(n(l)!==null)b=!0,X(O);else{var Y=n(u);Y!==null&&Q(L,Y.startTime-G)}}function O(G,Y){b=!1,w&&(w=!1,_(N),N=-1),y=!0;var ee=m;try{for(T(Y),h=n(l);h!==null&&(!(h.expirationTime>Y)||G&&!K());){var fe=h.callback;if(typeof fe=="function"){h.callback=null,m=h.priorityLevel;var Ce=fe(h.expirationTime<=Y);Y=e.unstable_now(),typeof Ce=="function"?h.callback=Ce:h===n(l)&&r(l),T(Y)}else r(l);h=n(l)}if(h!==null)var we=!0;else{var xe=n(u);xe!==null&&Q(L,xe.startTime-Y),we=!1}return we}finally{h=null,m=ee,y=!1}}var D=!1,I=null,N=-1,W=5,B=-1;function K(){return!(e.unstable_now()-BG||125fe?(G.sortIndex=ee,t(u,G),n(l)===null&&G===n(u)&&(w?(_(N),N=-1):w=!0,Q(L,ee-fe))):(G.sortIndex=Ce,t(l,G),b||y||(b=!0,X(O))),G},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(G){var Y=m;return function(){var ee=m;m=Y;try{return G.apply(this,arguments)}finally{m=ee}}}})(Qj);(function(e){e.exports=Qj})(xee);/** - * @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 Jj=S,La=Th;function ze(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"),y6=Object.prototype.hasOwnProperty,See=/^[: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]*$/,OT={},RT={};function wee(e){return y6.call(RT,e)?!0:y6.call(OT,e)?!1:See.test(e)?RT[e]=!0:(OT[e]=!0,!1)}function Cee(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 _ee(e,t,n,r){if(t===null||typeof t>"u"||Cee(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 To(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 Ki={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ki[e]=new To(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ki[t]=new To(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ki[e]=new To(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ki[e]=new To(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){Ki[e]=new To(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ki[e]=new To(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ki[e]=new To(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ki[e]=new To(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ki[e]=new To(e,5,!1,e.toLowerCase(),null,!1,!1)});var R7=/[\-:]([a-z])/g;function I7(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(R7,I7);Ki[t]=new To(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(R7,I7);Ki[t]=new To(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(R7,I7);Ki[t]=new To(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ki[e]=new To(e,1,!1,e.toLowerCase(),null,!1,!1)});Ki.xlinkHref=new To("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ki[e]=new To(e,1,!1,e.toLowerCase(),null,!0,!0)});function D7(e,t,n,r){var i=Ki.hasOwnProperty(t)?Ki[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{u5=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?i1(e):""}function kee(e){switch(e.tag){case 5:return i1(e.type);case 16:return i1("Lazy");case 13:return i1("Suspense");case 19:return i1("SuspenseList");case 0:case 2:case 15:return e=c5(e.type,!1),e;case 11:return e=c5(e.type.render,!1),e;case 1:return e=c5(e.type,!0),e;default:return""}}function w6(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 zg:return"Fragment";case Bg:return"Portal";case b6:return"Profiler";case j7:return"StrictMode";case x6:return"Suspense";case S6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case nN:return(e.displayName||"Context")+".Consumer";case tN:return(e._context.displayName||"Context")+".Provider";case N7:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $7:return t=e.displayName||null,t!==null?t:w6(e.type)||"Memo";case hd:t=e._payload,e=e._init;try{return w6(e(t))}catch{}}return null}function Eee(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 w6(t);case 8:return t===j7?"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 Ud(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function iN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pee(e){var t=iN(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 vb(e){e._valueTracker||(e._valueTracker=Pee(e))}function oN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=iN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bS(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 C6(e,t){var n=t.checked;return Pr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function DT(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ud(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 aN(e,t){t=t.checked,t!=null&&D7(e,"checked",t,!1)}function _6(e,t){aN(e,t);var n=Ud(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")?k6(e,t.type,n):t.hasOwnProperty("defaultValue")&&k6(e,t.type,Ud(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jT(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 k6(e,t,n){(t!=="number"||bS(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var o1=Array.isArray;function fm(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=yb.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function iy(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var C1={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},Tee=["Webkit","ms","Moz","O"];Object.keys(C1).forEach(function(e){Tee.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),C1[t]=C1[e]})});function cN(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||C1.hasOwnProperty(e)&&C1[e]?(""+t).trim():t+"px"}function dN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=cN(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Mee=Pr({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 T6(e,t){if(t){if(Mee[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ze(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ze(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ze(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ze(62))}}function M6(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 L6=null;function F7(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var A6=null,hm=null,pm=null;function FT(e){if(e=Yy(e)){if(typeof A6!="function")throw Error(ze(280));var t=e.stateNode;t&&(t=cw(t),A6(e.stateNode,e.type,t))}}function fN(e){hm?pm?pm.push(e):pm=[e]:hm=e}function hN(){if(hm){var e=hm,t=pm;if(pm=hm=null,FT(e),t)for(e=0;e>>=0,e===0?32:31-(Bee(e)/zee|0)|0}var bb=64,xb=4194304;function a1(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 CS(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=a1(s):(o&=a,o!==0&&(r=a1(o)))}else a=n&~i,a!==0?r=a1(a):o!==0&&(r=a1(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 qy(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Gs(t),e[t]=n}function Vee(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=k1),KT=String.fromCharCode(32),YT=!1;function RN(e,t){switch(e){case"keyup":return bte.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IN(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hg=!1;function Ste(e,t){switch(e){case"compositionend":return IN(t);case"keypress":return t.which!==32?null:(YT=!0,KT);case"textInput":return e=t.data,e===KT&&YT?null:e;default:return null}}function wte(e,t){if(Hg)return e==="compositionend"||!q7&&RN(e,t)?(e=AN(),Dx=U7=Sd=null,Hg=!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=JT(n)}}function $N(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$N(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function FN(){for(var e=window,t=bS();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bS(e.document)}return t}function K7(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 Ate(e){var t=FN(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&$N(n.ownerDocument.documentElement,n)){if(r!==null&&K7(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=eM(n,o);var a=eM(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,Wg=null,N6=null,P1=null,$6=!1;function tM(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$6||Wg==null||Wg!==bS(r)||(r=Wg,"selectionStart"in r&&K7(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}),P1&&cy(P1,r)||(P1=r,r=ES(N6,"onSelect"),0Gg||(e.current=U6[Gg],U6[Gg]=null,Gg--)}function nr(e,t){Gg++,U6[Gg]=e.current,e.current=t}var Vd={},lo=of(Vd),Ko=of(!1),Hh=Vd;function $m(e,t){var n=e.type.contextTypes;if(!n)return Vd;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 Yo(e){return e=e.childContextTypes,e!=null}function TS(){cr(Ko),cr(lo)}function lM(e,t,n){if(lo.current!==Vd)throw Error(ze(168));nr(lo,t),nr(Ko,n)}function KN(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(ze(108,Eee(e)||"Unknown",i));return Pr({},n,r)}function MS(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vd,Hh=lo.current,nr(lo,e),nr(Ko,Ko.current),!0}function uM(e,t,n){var r=e.stateNode;if(!r)throw Error(ze(169));n?(e=KN(e,t,Hh),r.__reactInternalMemoizedMergedChildContext=e,cr(Ko),cr(lo),nr(lo,e)):cr(Ko),nr(Ko,n)}var ju=null,dw=!1,_5=!1;function YN(e){ju===null?ju=[e]:ju.push(e)}function Wte(e){dw=!0,YN(e)}function af(){if(!_5&&ju!==null){_5=!0;var e=0,t=In;try{var n=ju;for(In=1;e>=a,i-=a,Fu=1<<32-Gs(t)+i|n<N?(W=I,I=null):W=I.sibling;var B=m(_,I,T[N],L);if(B===null){I===null&&(I=W);break}e&&I&&B.alternate===null&&t(_,I),k=o(B,k,N),D===null?O=B:D.sibling=B,D=B,I=W}if(N===T.length)return n(_,I),yr&&uh(_,N),O;if(I===null){for(;NN?(W=I,I=null):W=I.sibling;var K=m(_,I,B.value,L);if(K===null){I===null&&(I=W);break}e&&I&&K.alternate===null&&t(_,I),k=o(K,k,N),D===null?O=K:D.sibling=K,D=K,I=W}if(B.done)return n(_,I),yr&&uh(_,N),O;if(I===null){for(;!B.done;N++,B=T.next())B=h(_,B.value,L),B!==null&&(k=o(B,k,N),D===null?O=B:D.sibling=B,D=B);return yr&&uh(_,N),O}for(I=r(_,I);!B.done;N++,B=T.next())B=y(I,_,N,B.value,L),B!==null&&(e&&B.alternate!==null&&I.delete(B.key===null?N:B.key),k=o(B,k,N),D===null?O=B:D.sibling=B,D=B);return e&&I.forEach(function(ne){return t(_,ne)}),yr&&uh(_,N),O}function E(_,k,T,L){if(typeof T=="object"&&T!==null&&T.type===zg&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case mb:e:{for(var O=T.key,D=k;D!==null;){if(D.key===O){if(O=T.type,O===zg){if(D.tag===7){n(_,D.sibling),k=i(D,T.props.children),k.return=_,_=k;break e}}else if(D.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===hd&&mM(O)===D.type){n(_,D.sibling),k=i(D,T.props),k.ref=Nv(_,D,T),k.return=_,_=k;break e}n(_,D);break}else t(_,D);D=D.sibling}T.type===zg?(k=Lh(T.props.children,_.mode,L,T.key),k.return=_,_=k):(L=Wx(T.type,T.key,T.props,null,_.mode,L),L.ref=Nv(_,k,T),L.return=_,_=L)}return a(_);case Bg:e:{for(D=T.key;k!==null;){if(k.key===D)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(_,k.sibling),k=i(k,T.children||[]),k.return=_,_=k;break e}else{n(_,k);break}else t(_,k);k=k.sibling}k=O5(T,_.mode,L),k.return=_,_=k}return a(_);case hd:return D=T._init,E(_,k,D(T._payload),L)}if(o1(T))return b(_,k,T,L);if(Ov(T))return w(_,k,T,L);Pb(_,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(_,k.sibling),k=i(k,T),k.return=_,_=k):(n(_,k),k=A5(T,_.mode,L),k.return=_,_=k),a(_)):n(_,k)}return E}var Bm=r$(!0),i$=r$(!1),Xy={},ql=of(Xy),py=of(Xy),gy=of(Xy);function _h(e){if(e===Xy)throw Error(ze(174));return e}function r9(e,t){switch(nr(gy,t),nr(py,e),nr(ql,Xy),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:P6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=P6(t,e)}cr(ql),nr(ql,t)}function zm(){cr(ql),cr(py),cr(gy)}function o$(e){_h(gy.current);var t=_h(ql.current),n=P6(t,e.type);t!==n&&(nr(py,e),nr(ql,n))}function i9(e){py.current===e&&(cr(ql),cr(py))}var kr=of(0);function DS(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 k5=[];function o9(){for(var e=0;en?n:4,e(!0);var r=E5.transition;E5.transition={};try{e(!1),t()}finally{In=n,E5.transition=r}}function S$(){return as().memoizedState}function qte(e,t,n){var r=Dd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},w$(e))C$(t,n);else if(n=JN(e,t,n,r),n!==null){var i=_o();qs(n,e,r,i),_$(n,t,r)}}function Kte(e,t,n){var r=Dd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(w$(e))C$(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,Zs(s,a)){var l=t.interleaved;l===null?(i.next=i,t9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=JN(e,t,i,r),n!==null&&(i=_o(),qs(n,e,r,i),_$(n,t,r))}}function w$(e){var t=e.alternate;return e===Er||t!==null&&t===Er}function C$(e,t){T1=jS=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _$(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,z7(e,n)}}var NS={readContext:os,useCallback:eo,useContext:eo,useEffect:eo,useImperativeHandle:eo,useInsertionEffect:eo,useLayoutEffect:eo,useMemo:eo,useReducer:eo,useRef:eo,useState:eo,useDebugValue:eo,useDeferredValue:eo,useTransition:eo,useMutableSource:eo,useSyncExternalStore:eo,useId:eo,unstable_isNewReconciler:!1},Yte={readContext:os,useCallback:function(e,t){return Ll().memoizedState=[e,t===void 0?null:t],e},useContext:os,useEffect:yM,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fx(4194308,4,m$.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fx(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fx(4,2,e,t)},useMemo:function(e,t){var n=Ll();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ll();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=qte.bind(null,Er,e),[r.memoizedState,e]},useRef:function(e){var t=Ll();return e={current:e},t.memoizedState=e},useState:vM,useDebugValue:c9,useDeferredValue:function(e){return Ll().memoizedState=e},useTransition:function(){var e=vM(!1),t=e[0];return e=Gte.bind(null,e[1]),Ll().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Er,i=Ll();if(yr){if(n===void 0)throw Error(ze(407));n=n()}else{if(n=t(),Ai===null)throw Error(ze(349));Uh&30||l$(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,yM(c$.bind(null,r,o,e),[e]),r.flags|=2048,yy(9,u$.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ll(),t=Ai.identifierPrefix;if(yr){var n=Bu,r=Fu;n=(r&~(1<<32-Gs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=my++,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[jl]=t,e[hy]=r,R$(e,t,!1,!1),t.stateNode=e;e:{switch(a=M6(n,r),n){case"dialog":ir("cancel",e),ir("close",e),i=r;break;case"iframe":case"object":case"embed":ir("load",e),i=r;break;case"video":case"audio":for(i=0;iWm&&(t.flags|=128,r=!0,$v(o,!1),t.lanes=4194304)}else{if(!r)if(e=DS(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),$v(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!yr)return to(t),null}else 2*Zr()-o.renderingStartTime>Wm&&n!==1073741824&&(t.flags|=128,r=!0,$v(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=Zr(),t.sibling=null,n=kr.current,nr(kr,r?n&1|2:n&1),t):(to(t),null);case 22:case 23:return m9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Sa&1073741824&&(to(t),t.subtreeFlags&6&&(t.flags|=8192)):to(t),null;case 24:return null;case 25:return null}throw Error(ze(156,t.tag))}function rne(e,t){switch(X7(t),t.tag){case 1:return Yo(t.type)&&TS(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zm(),cr(Ko),cr(lo),o9(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return i9(t),null;case 13:if(cr(kr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ze(340));Fm()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return cr(kr),null;case 4:return zm(),null;case 10:return e9(t.type._context),null;case 22:case 23:return m9(),null;case 24:return null;default:return null}}var Mb=!1,io=!1,ine=typeof WeakSet=="function"?WeakSet:Set,dt=null;function Xg(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$r(e,t,r)}else n.current=null}function n_(e,t,n){try{n()}catch(r){$r(e,t,r)}}var PM=!1;function one(e,t){if(F6=_S,e=FN(),K7(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,d=0,h=e,m=null;t:for(;;){for(var y;h!==n||i!==0&&h.nodeType!==3||(s=a+i),h!==o||r!==0&&h.nodeType!==3||(l=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(y=h.firstChild)!==null;)m=h,h=y;for(;;){if(h===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++d===r&&(l=a),(y=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=y}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(B6={focusedElem:e,selectionRange:n},_S=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){t=dt;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,E=b.memoizedState,_=t.stateNode,k=_.getSnapshotBeforeUpdate(t.elementType===t.type?w:Bs(t.type,w),E);_.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ze(163))}}catch(L){$r(t,t.return,L)}if(e=t.sibling,e!==null){e.return=t.return,dt=e;break}dt=t.return}return b=PM,PM=!1,b}function M1(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&&n_(t,n,o)}i=i.next}while(i!==r)}}function pw(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 r_(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 j$(e){var t=e.alternate;t!==null&&(e.alternate=null,j$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jl],delete t[hy],delete t[W6],delete t[zte],delete t[Hte])),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 N$(e){return e.tag===5||e.tag===3||e.tag===4}function TM(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||N$(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 i_(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=PS));else if(r!==4&&(e=e.child,e!==null))for(i_(e,t,n),e=e.sibling;e!==null;)i_(e,t,n),e=e.sibling}function o_(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(o_(e,t,n),e=e.sibling;e!==null;)o_(e,t,n),e=e.sibling}var Wi=null,zs=!1;function od(e,t,n){for(n=n.child;n!==null;)$$(e,t,n),n=n.sibling}function $$(e,t,n){if(Gl&&typeof Gl.onCommitFiberUnmount=="function")try{Gl.onCommitFiberUnmount(aw,n)}catch{}switch(n.tag){case 5:io||Xg(n,t);case 6:var r=Wi,i=zs;Wi=null,od(e,t,n),Wi=r,zs=i,Wi!==null&&(zs?(e=Wi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Wi.removeChild(n.stateNode));break;case 18:Wi!==null&&(zs?(e=Wi,n=n.stateNode,e.nodeType===8?C5(e.parentNode,n):e.nodeType===1&&C5(e,n),ly(e)):C5(Wi,n.stateNode));break;case 4:r=Wi,i=zs,Wi=n.stateNode.containerInfo,zs=!0,od(e,t,n),Wi=r,zs=i;break;case 0:case 11:case 14:case 15:if(!io&&(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)&&n_(n,t,a),i=i.next}while(i!==r)}od(e,t,n);break;case 1:if(!io&&(Xg(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){$r(n,t,s)}od(e,t,n);break;case 21:od(e,t,n);break;case 22:n.mode&1?(io=(r=io)||n.memoizedState!==null,od(e,t,n),io=r):od(e,t,n);break;default:od(e,t,n)}}function MM(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ine),t.forEach(function(r){var i=pne.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Is(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Zr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sne(r/1960))-r,10e?16:e,wd===null)var r=!1;else{if(e=wd,wd=null,BS=0,un&6)throw Error(ze(331));var i=un;for(un|=4,dt=e.current;dt!==null;){var o=dt,a=o.child;if(dt.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lZr()-p9?Mh(e,0):h9|=n),Xo(e,t)}function G$(e,t){t===0&&(e.mode&1?(t=xb,xb<<=1,!(xb&130023424)&&(xb=4194304)):t=1);var n=_o();e=ec(e,t),e!==null&&(qy(e,t,n),Xo(e,n))}function hne(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),G$(e,n)}function pne(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(ze(314))}r!==null&&r.delete(t),G$(e,n)}var q$;q$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ko.current)qo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qo=!1,tne(e,t,n);qo=!!(e.flags&131072)}else qo=!1,yr&&t.flags&1048576&&XN(t,AS,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bx(e,t),e=t.pendingProps;var i=$m(t,lo.current);mm(t,n),i=s9(null,t,r,e,i,n);var o=l9();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,Yo(r)?(o=!0,MS(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,n9(t),i.updater=fw,t.stateNode=i,i._reactInternals=t,Y6(t,r,e,n),t=Q6(null,t,r,!0,o,n)):(t.tag=0,yr&&o&&Y7(t),xo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bx(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=mne(r),e=Bs(r,e),i){case 0:t=Z6(null,t,r,e,n);break e;case 1:t=_M(null,t,r,e,n);break e;case 11:t=wM(null,t,r,e,n);break e;case 14:t=CM(null,t,r,Bs(r.type,e),n);break e}throw Error(ze(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Bs(r,i),Z6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Bs(r,i),_M(e,t,r,i,n);case 3:e:{if(L$(t),e===null)throw Error(ze(387));r=t.pendingProps,o=t.memoizedState,i=o.element,e$(e,t),IS(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=Hm(Error(ze(423)),t),t=kM(e,t,r,n,i);break e}else if(r!==i){i=Hm(Error(ze(424)),t),t=kM(e,t,r,n,i);break e}else for(ka=Od(t.stateNode.containerInfo.firstChild),Pa=t,yr=!0,Ws=null,n=i$(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fm(),r===i){t=tc(e,t,n);break e}xo(e,t,r,n)}t=t.child}return t;case 5:return o$(t),e===null&&G6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,z6(r,i)?a=null:o!==null&&z6(r,o)&&(t.flags|=32),M$(e,t),xo(e,t,a,n),t.child;case 6:return e===null&&G6(t),null;case 13:return A$(e,t,n);case 4:return r9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bm(t,null,r,n):xo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Bs(r,i),wM(e,t,r,i,n);case 7:return xo(e,t,t.pendingProps,n),t.child;case 8:return xo(e,t,t.pendingProps.children,n),t.child;case 12:return xo(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,nr(OS,r._currentValue),r._currentValue=a,o!==null)if(Zs(o.value,a)){if(o.children===i.children&&!Ko.current){t=tc(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=Wu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),q6(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(ze(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),q6(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}xo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,mm(t,n),i=os(i),r=r(i),t.flags|=1,xo(e,t,r,n),t.child;case 14:return r=t.type,i=Bs(r,t.pendingProps),i=Bs(r.type,i),CM(e,t,r,i,n);case 15:return P$(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Bs(r,i),Bx(e,t),t.tag=1,Yo(r)?(e=!0,MS(t)):e=!1,mm(t,n),n$(t,r,i),Y6(t,r,i,n),Q6(null,t,r,!0,e,n);case 19:return O$(e,t,n);case 22:return T$(e,t,n)}throw Error(ze(156,t.tag))};function K$(e,t){return xN(e,t)}function gne(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 es(e,t,n,r){return new gne(e,t,n,r)}function y9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mne(e){if(typeof e=="function")return y9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===N7)return 11;if(e===$7)return 14}return 2}function jd(e,t){var n=e.alternate;return n===null?(n=es(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 Wx(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")y9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case zg:return Lh(n.children,i,o,t);case j7:a=8,i|=8;break;case b6:return e=es(12,n,t,i|2),e.elementType=b6,e.lanes=o,e;case x6:return e=es(13,n,t,i),e.elementType=x6,e.lanes=o,e;case S6:return e=es(19,n,t,i),e.elementType=S6,e.lanes=o,e;case rN:return mw(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tN:a=10;break e;case nN:a=9;break e;case N7:a=11;break e;case $7:a=14;break e;case hd:a=16,r=null;break e}throw Error(ze(130,e==null?e:typeof e,""))}return t=es(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Lh(e,t,n,r){return e=es(7,e,r,t),e.lanes=n,e}function mw(e,t,n,r){return e=es(22,e,r,t),e.elementType=rN,e.lanes=n,e.stateNode={isHidden:!1},e}function A5(e,t,n){return e=es(6,e,null,t),e.lanes=n,e}function O5(e,t,n){return t=es(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vne(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=f5(0),this.expirationTimes=f5(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=f5(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function b9(e,t,n,r,i,o,a,s,l){return e=new vne(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=es(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},n9(o),e}function yne(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Ia})(bee);const Ob=S7(Xs);var[Q$,Cne]=Pn({strict:!1,name:"PortalContext"}),C9="chakra-portal",_ne=".chakra-portal",kne=e=>g.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Ene=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=S.useState(null),o=S.useRef(null),[,a]=S.useState({});S.useEffect(()=>a({}),[]);const s=Cne(),l=yee();Vl(()=>{if(!r)return;const d=r.ownerDocument,h=t?s??d.body:d.body;if(!h)return;o.current=d.createElement("div"),o.current.className=C9,h.appendChild(o.current),a({});const m=o.current;return()=>{h.contains(m)&&h.removeChild(m)}},[r]);const u=l!=null&&l.zIndex?g.jsx(kne,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return o.current?Xs.createPortal(g.jsx(Q$,{value:o.current,children:u}),o.current):g.jsx("span",{ref:d=>{d&&i(d)}})},Pne=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=S.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=C9),l},[i]),[,s]=S.useState({});return Vl(()=>s({}),[]),Vl(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Xs.createPortal(g.jsx(Q$,{value:r?a:null,children:t}),a):null};function c0(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?g.jsx(Pne,{containerRef:n,...r}):g.jsx(Ene,{...r})}c0.className=C9;c0.selector=_ne;c0.displayName="Portal";function Zy(){const e=S.useContext(ny);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var _9=S.createContext({});_9.displayName="ColorModeContext";function Qy(){const e=S.useContext(_9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Rb={light:"chakra-ui-light",dark:"chakra-ui-dark"};function Tne(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?Rb.dark:Rb.light),document.body.classList.remove(r?Rb.light:Rb.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var i;return((i=n.query().matches)!=null?i:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},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 Mne="chakra-ui-color-mode";function Lne(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var Ane=Lne(Mne),NM=()=>{};function $M(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function J$(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=Ane}=e,s=i==="dark"?"dark":"light",[l,u]=S.useState(()=>$M(a,s)),[d,h]=S.useState(()=>$M(a)),{getSystemTheme:m,setClassName:y,setDataset:b,addListener:w}=S.useMemo(()=>Tne({preventTransition:o}),[o]),E=i==="system"&&!l?d:l,_=S.useCallback(L=>{const O=L==="system"?m():L;u(O),y(O==="dark"),b(O),a.set(O)},[a,m,y,b]);Vl(()=>{i==="system"&&h(m())},[]),S.useEffect(()=>{const L=a.get();if(L){_(L);return}if(i==="system"){_("system");return}_(s)},[a,s,i,_]);const k=S.useCallback(()=>{_(E==="dark"?"light":"dark")},[E,_]);S.useEffect(()=>{if(r)return w(_)},[r,w,_]);const T=S.useMemo(()=>({colorMode:t??E,toggleColorMode:t?NM:k,setColorMode:t?NM:_,forced:t!==void 0}),[E,k,_,t]);return g.jsx(_9.Provider,{value:T,children:n})}J$.displayName="ColorModeProvider";function eF(){const e=Qy(),t=Zy();return{...e,theme:t}}var xt=(...e)=>e.filter(Boolean).join(" ");function One(){return!1}function ko(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var Jy=e=>{const{condition:t,message:n}=e;t&&One()&&console.warn(n)};function ts(e,...t){return Rne(e)?e(...t):e}var Rne=e=>typeof e=="function",Bt=e=>e?"":void 0,Uu=e=>e?!0:void 0;function ht(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Sw(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var WS={},Ine={get exports(){return WS},set exports(e){WS=e}};(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]",d="[object Boolean]",h="[object Date]",m="[object Error]",y="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",_="[object Null]",k="[object Object]",T="[object Proxy]",L="[object RegExp]",O="[object Set]",D="[object String]",I="[object Undefined]",N="[object WeakMap]",W="[object ArrayBuffer]",B="[object DataView]",K="[object Float32Array]",ne="[object Float64Array]",z="[object Int8Array]",$="[object Int16Array]",V="[object Int32Array]",X="[object Uint8Array]",Q="[object Uint8ClampedArray]",G="[object Uint16Array]",Y="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,fe=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,we={};we[K]=we[ne]=we[z]=we[$]=we[V]=we[X]=we[Q]=we[G]=we[Y]=!0,we[s]=we[l]=we[W]=we[d]=we[B]=we[h]=we[m]=we[y]=we[w]=we[E]=we[k]=we[L]=we[O]=we[D]=we[N]=!1;var xe=typeof So=="object"&&So&&So.Object===Object&&So,Le=typeof self=="object"&&self&&self.Object===Object&&self,Se=xe||Le||Function("return this")(),Qe=t&&!t.nodeType&&t,Xe=Qe&&!0&&e&&!e.nodeType&&e,tt=Xe&&Xe.exports===Qe,yt=tt&&xe.process,Be=function(){try{var q=Xe&&Xe.require&&Xe.require("util").types;return q||yt&&yt.binding&&yt.binding("util")}catch{}}(),Ae=Be&&Be.isTypedArray;function bt(q,re,pe){switch(pe.length){case 0:return q.call(re);case 1:return q.call(re,pe[0]);case 2:return q.call(re,pe[0],pe[1]);case 3:return q.call(re,pe[0],pe[1],pe[2])}return q.apply(re,pe)}function Fe(q,re){for(var pe=-1,ot=Array(q);++pe-1}function P0(q,re){var pe=this.__data__,ot=xs(pe,q);return ot<0?(++this.size,pe.push([q,re])):pe[ot][1]=re,this}na.prototype.clear=mf,na.prototype.delete=E0,na.prototype.get=xc,na.prototype.has=vf,na.prototype.set=P0;function nl(q){var re=-1,pe=q==null?0:q.length;for(this.clear();++re1?pe[Ht-1]:void 0,St=Ht>2?pe[2]:void 0;for(mn=q.length>3&&typeof mn=="function"?(Ht--,mn):void 0,St&&Pp(pe[0],pe[1],St)&&(mn=Ht<3?void 0:mn,Ht=1),re=Object(re);++ot-1&&q%1==0&&q0){if(++re>=i)return arguments[0]}else re=0;return q.apply(void 0,arguments)}}function kc(q){if(q!=null){try{return He.call(q)}catch{}try{return q+""}catch{}}return""}function $a(q,re){return q===re||q!==q&&re!==re}var wf=pu(function(){return arguments}())?pu:function(q){return Xn(q)&&Ue.call(q,"callee")&&!zr.call(q,"callee")},vu=Array.isArray;function Gt(q){return q!=null&&Mp(q.length)&&!Pc(q)}function Tp(q){return Xn(q)&&Gt(q)}var Ec=vs||B0;function Pc(q){if(!aa(q))return!1;var re=il(q);return re==y||re==b||re==u||re==T}function Mp(q){return typeof q=="number"&&q>-1&&q%1==0&&q<=a}function aa(q){var re=typeof q;return q!=null&&(re=="object"||re=="function")}function Xn(q){return q!=null&&typeof q=="object"}function Cf(q){if(!Xn(q)||il(q)!=k)return!1;var re=qe(q);if(re===null)return!0;var pe=Ue.call(re,"constructor")&&re.constructor;return typeof pe=="function"&&pe instanceof pe&&He.call(pe)==vt}var Lp=Ae?at(Ae):wc;function _f(q){return ci(q,Ap(q))}function Ap(q){return Gt(q)?N0(q,!0):ol(q)}var cn=Ss(function(q,re,pe,ot){ra(q,re,pe,ot)});function qt(q){return function(){return q}}function Op(q){return q}function B0(){return!1}e.exports=cn})(Ine,WS);const Bl=WS;var Dne=e=>/!(important)?$/.test(e),FM=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,jne=(e,t)=>n=>{const r=String(t),i=Dne(r),o=FM(r),a=e?`${e}.${o}`:o;let s=ko(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=FM(s),i?`${s} !important`:s};function k9(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var s;const l=jne(t,o)(a);let u=(s=n==null?void 0:n(l,a))!=null?s:l;return r&&(u=r(u,a)),u}}var Ib=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=k9({scale:e,transform:t}),r}}var Nne=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function $ne(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:Nne(t),transform:n?k9({scale:n,compose:r}):r}}var tF=["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 Fne(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...tF].join(" ")}function Bne(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...tF].join(" ")}var zne={"--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(" ")},Hne={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 Wne(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 Une={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},c_={"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"},Vne=new Set(Object.values(c_)),nF=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Gne=e=>e.trim();function qne(e,t){if(e==null||nF.has(e))return e;const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),i=r==null?void 0:r[1],o=r==null?void 0:r[2];if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(Gne).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const u=s in c_?c_[s]:s;l.unshift(u);const d=l.map(h=>{if(Vne.has(h))return h;const m=h.indexOf(" "),[y,b]=m!==-1?[h.substr(0,m),h.substr(m+1)]:[h],w=rF(b)?b:b&&b.split(" "),E=`colors.${y}`,_=E in t.__cssMap?t.__cssMap[E].varRef:y;return w?[_,...Array.isArray(w)?w:[w]].join(" "):_});return`${a}(${d.join(", ")})`}var rF=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),Kne=(e,t)=>qne(e,t??{});function Yne(e){return/^var\(--.+\)$/.test(e)}var Xne=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Pl=e=>t=>`${e}(${t})`,ln={filter(e){return e!=="auto"?e:zne},backdropFilter(e){return e!=="auto"?e:Hne},ring(e){return Wne(ln.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?Fne():e==="auto-gpu"?Bne():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=Xne(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(Yne(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:Kne,blur:Pl("blur"),opacity:Pl("opacity"),brightness:Pl("brightness"),contrast:Pl("contrast"),dropShadow:Pl("drop-shadow"),grayscale:Pl("grayscale"),hueRotate:Pl("hue-rotate"),invert:Pl("invert"),saturate:Pl("saturate"),sepia:Pl("sepia"),bgImage(e){return e==null||rF(e)||nF.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=Une[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},oe={borderWidths:Ds("borderWidths"),borderStyles:Ds("borderStyles"),colors:Ds("colors"),borders:Ds("borders"),radii:Ds("radii",ln.px),space:Ds("space",Ib(ln.vh,ln.px)),spaceT:Ds("space",Ib(ln.vh,ln.px)),degreeT(e){return{property:e,transform:ln.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:k9({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Ds("sizes",Ib(ln.vh,ln.px)),sizesT:Ds("sizes",Ib(ln.vh,ln.fraction)),shadows:Ds("shadows"),logical:$ne,blur:Ds("blur",ln.blur)},Ux={background:oe.colors("background"),backgroundColor:oe.colors("backgroundColor"),backgroundImage:oe.propT("backgroundImage",ln.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:ln.bgClip},bgSize:oe.prop("backgroundSize"),bgPosition:oe.prop("backgroundPosition"),bg:oe.colors("background"),bgColor:oe.colors("backgroundColor"),bgPos:oe.prop("backgroundPosition"),bgRepeat:oe.prop("backgroundRepeat"),bgAttachment:oe.prop("backgroundAttachment"),bgGradient:oe.propT("backgroundImage",ln.gradient),bgClip:{transform:ln.bgClip}};Object.assign(Ux,{bgImage:Ux.backgroundImage,bgImg:Ux.backgroundImage});var yn={border:oe.borders("border"),borderWidth:oe.borderWidths("borderWidth"),borderStyle:oe.borderStyles("borderStyle"),borderColor:oe.colors("borderColor"),borderRadius:oe.radii("borderRadius"),borderTop:oe.borders("borderTop"),borderBlockStart:oe.borders("borderBlockStart"),borderTopLeftRadius:oe.radii("borderTopLeftRadius"),borderStartStartRadius:oe.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:oe.radii("borderTopRightRadius"),borderStartEndRadius:oe.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:oe.borders("borderRight"),borderInlineEnd:oe.borders("borderInlineEnd"),borderBottom:oe.borders("borderBottom"),borderBlockEnd:oe.borders("borderBlockEnd"),borderBottomLeftRadius:oe.radii("borderBottomLeftRadius"),borderBottomRightRadius:oe.radii("borderBottomRightRadius"),borderLeft:oe.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:oe.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:oe.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:oe.borders(["borderLeft","borderRight"]),borderInline:oe.borders("borderInline"),borderY:oe.borders(["borderTop","borderBottom"]),borderBlock:oe.borders("borderBlock"),borderTopWidth:oe.borderWidths("borderTopWidth"),borderBlockStartWidth:oe.borderWidths("borderBlockStartWidth"),borderTopColor:oe.colors("borderTopColor"),borderBlockStartColor:oe.colors("borderBlockStartColor"),borderTopStyle:oe.borderStyles("borderTopStyle"),borderBlockStartStyle:oe.borderStyles("borderBlockStartStyle"),borderBottomWidth:oe.borderWidths("borderBottomWidth"),borderBlockEndWidth:oe.borderWidths("borderBlockEndWidth"),borderBottomColor:oe.colors("borderBottomColor"),borderBlockEndColor:oe.colors("borderBlockEndColor"),borderBottomStyle:oe.borderStyles("borderBottomStyle"),borderBlockEndStyle:oe.borderStyles("borderBlockEndStyle"),borderLeftWidth:oe.borderWidths("borderLeftWidth"),borderInlineStartWidth:oe.borderWidths("borderInlineStartWidth"),borderLeftColor:oe.colors("borderLeftColor"),borderInlineStartColor:oe.colors("borderInlineStartColor"),borderLeftStyle:oe.borderStyles("borderLeftStyle"),borderInlineStartStyle:oe.borderStyles("borderInlineStartStyle"),borderRightWidth:oe.borderWidths("borderRightWidth"),borderInlineEndWidth:oe.borderWidths("borderInlineEndWidth"),borderRightColor:oe.colors("borderRightColor"),borderInlineEndColor:oe.colors("borderInlineEndColor"),borderRightStyle:oe.borderStyles("borderRightStyle"),borderInlineEndStyle:oe.borderStyles("borderInlineEndStyle"),borderTopRadius:oe.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:oe.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:oe.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:oe.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(yn,{rounded:yn.borderRadius,roundedTop:yn.borderTopRadius,roundedTopLeft:yn.borderTopLeftRadius,roundedTopRight:yn.borderTopRightRadius,roundedTopStart:yn.borderStartStartRadius,roundedTopEnd:yn.borderStartEndRadius,roundedBottom:yn.borderBottomRadius,roundedBottomLeft:yn.borderBottomLeftRadius,roundedBottomRight:yn.borderBottomRightRadius,roundedBottomStart:yn.borderEndStartRadius,roundedBottomEnd:yn.borderEndEndRadius,roundedLeft:yn.borderLeftRadius,roundedRight:yn.borderRightRadius,roundedStart:yn.borderInlineStartRadius,roundedEnd:yn.borderInlineEndRadius,borderStart:yn.borderInlineStart,borderEnd:yn.borderInlineEnd,borderTopStartRadius:yn.borderStartStartRadius,borderTopEndRadius:yn.borderStartEndRadius,borderBottomStartRadius:yn.borderEndStartRadius,borderBottomEndRadius:yn.borderEndEndRadius,borderStartRadius:yn.borderInlineStartRadius,borderEndRadius:yn.borderInlineEndRadius,borderStartWidth:yn.borderInlineStartWidth,borderEndWidth:yn.borderInlineEndWidth,borderStartColor:yn.borderInlineStartColor,borderEndColor:yn.borderInlineEndColor,borderStartStyle:yn.borderInlineStartStyle,borderEndStyle:yn.borderInlineEndStyle});var Zne={color:oe.colors("color"),textColor:oe.colors("color"),fill:oe.colors("fill"),stroke:oe.colors("stroke")},d_={boxShadow:oe.shadows("boxShadow"),mixBlendMode:!0,blendMode:oe.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:oe.prop("backgroundBlendMode"),opacity:!0};Object.assign(d_,{shadow:d_.boxShadow});var Qne={filter:{transform:ln.filter},blur:oe.blur("--chakra-blur"),brightness:oe.propT("--chakra-brightness",ln.brightness),contrast:oe.propT("--chakra-contrast",ln.contrast),hueRotate:oe.degreeT("--chakra-hue-rotate"),invert:oe.propT("--chakra-invert",ln.invert),saturate:oe.propT("--chakra-saturate",ln.saturate),dropShadow:oe.propT("--chakra-drop-shadow",ln.dropShadow),backdropFilter:{transform:ln.backdropFilter},backdropBlur:oe.blur("--chakra-backdrop-blur"),backdropBrightness:oe.propT("--chakra-backdrop-brightness",ln.brightness),backdropContrast:oe.propT("--chakra-backdrop-contrast",ln.contrast),backdropHueRotate:oe.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:oe.propT("--chakra-backdrop-invert",ln.invert),backdropSaturate:oe.propT("--chakra-backdrop-saturate",ln.saturate)},US={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:ln.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:oe.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:oe.space("gap"),rowGap:oe.space("rowGap"),columnGap:oe.space("columnGap")};Object.assign(US,{flexDir:US.flexDirection});var iF={gridGap:oe.space("gridGap"),gridColumnGap:oe.space("gridColumnGap"),gridRowGap:oe.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},Jne={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:ln.outline},outlineOffset:!0,outlineColor:oe.colors("outlineColor")},Ka={width:oe.sizesT("width"),inlineSize:oe.sizesT("inlineSize"),height:oe.sizes("height"),blockSize:oe.sizes("blockSize"),boxSize:oe.sizes(["width","height"]),minWidth:oe.sizes("minWidth"),minInlineSize:oe.sizes("minInlineSize"),minHeight:oe.sizes("minHeight"),minBlockSize:oe.sizes("minBlockSize"),maxWidth:oe.sizes("maxWidth"),maxInlineSize:oe.sizes("maxInlineSize"),maxHeight:oe.sizes("maxHeight"),maxBlockSize:oe.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minWQuery)!=null?i:`@media screen and (min-width: ${e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.maxWQuery)!=null?i:`@media screen and (max-width: ${e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:oe.propT("float",ln.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ka,{w:Ka.width,h:Ka.height,minW:Ka.minWidth,maxW:Ka.maxWidth,minH:Ka.minHeight,maxH:Ka.maxHeight,overscroll:Ka.overscrollBehavior,overscrollX:Ka.overscrollBehaviorX,overscrollY:Ka.overscrollBehaviorY});var ere={listStyleType:!0,listStylePosition:!0,listStylePos:oe.prop("listStylePosition"),listStyleImage:!0,listStyleImg:oe.prop("listStyleImage")};function tre(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}},rre=nre(tre),ire={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},ore={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},R5=(e,t,n)=>{const r={},i=rre(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},are={srOnly:{transform(e){return e===!0?ire:e==="focusable"?ore:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>R5(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>R5(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>R5(t,e,n)}},O1={position:!0,pos:oe.prop("position"),zIndex:oe.prop("zIndex","zIndices"),inset:oe.spaceT("inset"),insetX:oe.spaceT(["left","right"]),insetInline:oe.spaceT("insetInline"),insetY:oe.spaceT(["top","bottom"]),insetBlock:oe.spaceT("insetBlock"),top:oe.spaceT("top"),insetBlockStart:oe.spaceT("insetBlockStart"),bottom:oe.spaceT("bottom"),insetBlockEnd:oe.spaceT("insetBlockEnd"),left:oe.spaceT("left"),insetInlineStart:oe.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:oe.spaceT("right"),insetInlineEnd:oe.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(O1,{insetStart:O1.insetInlineStart,insetEnd:O1.insetInlineEnd});var sre={ring:{transform:ln.ring},ringColor:oe.colors("--chakra-ring-color"),ringOffset:oe.prop("--chakra-ring-offset-width"),ringOffsetColor:oe.colors("--chakra-ring-offset-color"),ringInset:oe.prop("--chakra-ring-inset")},or={margin:oe.spaceT("margin"),marginTop:oe.spaceT("marginTop"),marginBlockStart:oe.spaceT("marginBlockStart"),marginRight:oe.spaceT("marginRight"),marginInlineEnd:oe.spaceT("marginInlineEnd"),marginBottom:oe.spaceT("marginBottom"),marginBlockEnd:oe.spaceT("marginBlockEnd"),marginLeft:oe.spaceT("marginLeft"),marginInlineStart:oe.spaceT("marginInlineStart"),marginX:oe.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:oe.spaceT("marginInline"),marginY:oe.spaceT(["marginTop","marginBottom"]),marginBlock:oe.spaceT("marginBlock"),padding:oe.space("padding"),paddingTop:oe.space("paddingTop"),paddingBlockStart:oe.space("paddingBlockStart"),paddingRight:oe.space("paddingRight"),paddingBottom:oe.space("paddingBottom"),paddingBlockEnd:oe.space("paddingBlockEnd"),paddingLeft:oe.space("paddingLeft"),paddingInlineStart:oe.space("paddingInlineStart"),paddingInlineEnd:oe.space("paddingInlineEnd"),paddingX:oe.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:oe.space("paddingInline"),paddingY:oe.space(["paddingTop","paddingBottom"]),paddingBlock:oe.space("paddingBlock")};Object.assign(or,{m:or.margin,mt:or.marginTop,mr:or.marginRight,me:or.marginInlineEnd,marginEnd:or.marginInlineEnd,mb:or.marginBottom,ml:or.marginLeft,ms:or.marginInlineStart,marginStart:or.marginInlineStart,mx:or.marginX,my:or.marginY,p:or.padding,pt:or.paddingTop,py:or.paddingY,px:or.paddingX,pb:or.paddingBottom,pl:or.paddingLeft,ps:or.paddingInlineStart,paddingStart:or.paddingInlineStart,pr:or.paddingRight,pe:or.paddingInlineEnd,paddingEnd:or.paddingInlineEnd});var lre={textDecorationColor:oe.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:oe.shadows("textShadow")},ure={clipPath:!0,transform:oe.propT("transform",ln.transform),transformOrigin:!0,translateX:oe.spaceT("--chakra-translate-x"),translateY:oe.spaceT("--chakra-translate-y"),skewX:oe.degreeT("--chakra-skew-x"),skewY:oe.degreeT("--chakra-skew-y"),scaleX:oe.prop("--chakra-scale-x"),scaleY:oe.prop("--chakra-scale-y"),scale:oe.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:oe.degreeT("--chakra-rotate")},cre={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:oe.prop("transitionDuration","transition.duration"),transitionProperty:oe.prop("transitionProperty","transition.property"),transitionTimingFunction:oe.prop("transitionTimingFunction","transition.easing")},dre={fontFamily:oe.prop("fontFamily","fonts"),fontSize:oe.prop("fontSize","fontSizes",ln.px),fontWeight:oe.prop("fontWeight","fontWeights"),lineHeight:oe.prop("lineHeight","lineHeights"),letterSpacing:oe.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"}},fre={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:oe.spaceT("scrollMargin"),scrollMarginTop:oe.spaceT("scrollMarginTop"),scrollMarginBottom:oe.spaceT("scrollMarginBottom"),scrollMarginLeft:oe.spaceT("scrollMarginLeft"),scrollMarginRight:oe.spaceT("scrollMarginRight"),scrollMarginX:oe.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:oe.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:oe.spaceT("scrollPadding"),scrollPaddingTop:oe.spaceT("scrollPaddingTop"),scrollPaddingBottom:oe.spaceT("scrollPaddingBottom"),scrollPaddingLeft:oe.spaceT("scrollPaddingLeft"),scrollPaddingRight:oe.spaceT("scrollPaddingRight"),scrollPaddingX:oe.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:oe.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function oF(e){return ko(e)&&e.reference?e.reference:String(e)}var ww=(e,...t)=>t.map(oF).join(` ${e} `).replace(/calc/g,""),BM=(...e)=>`calc(${ww("+",...e)})`,zM=(...e)=>`calc(${ww("-",...e)})`,f_=(...e)=>`calc(${ww("*",...e)})`,HM=(...e)=>`calc(${ww("/",...e)})`,WM=e=>{const t=oF(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:f_(t,-1)},bh=Object.assign(e=>({add:(...t)=>bh(BM(e,...t)),subtract:(...t)=>bh(zM(e,...t)),multiply:(...t)=>bh(f_(e,...t)),divide:(...t)=>bh(HM(e,...t)),negate:()=>bh(WM(e)),toString:()=>e.toString()}),{add:BM,subtract:zM,multiply:f_,divide:HM,negate:WM});function hre(e,t="-"){return e.replace(/\s+/g,t)}function pre(e){const t=hre(e.toString());return mre(gre(t))}function gre(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function mre(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function vre(e,t=""){return[t,e].filter(Boolean).join("-")}function yre(e,t){return`var(${e}${t?`, ${t}`:""})`}function bre(e,t=""){return pre(`--${vre(e,t)}`)}function gn(e,t,n){const r=bre(e,n);return{variable:r,reference:yre(r,t)}}function xre(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function Sre(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function h_(e){if(e==null)return e;const{unitless:t}=Sre(e);return t||typeof e=="number"?`${e}px`:e}var aF=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,E9=e=>Object.fromEntries(Object.entries(e).sort(aF));function UM(e){const t=E9(e);return Object.assign(Object.values(t),t)}function wre(e){const t=Object.keys(E9(e));return new Set(t)}function VM(e){var t;if(!e)return e;e=(t=h_(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function l1(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${h_(e)})`),t&&n.push("and",`(max-width: ${h_(t)})`),n.join(" ")}function Cre(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=UM(e),r=Object.entries(e).sort(aF).map(([a,s],l,u)=>{var d;let[,h]=(d=u[l+1])!=null?d:[];return h=parseFloat(h)>0?VM(h):void 0,{_minW:VM(s),breakpoint:a,minW:s,maxW:h,maxWQuery:l1(null,h),minWQuery:l1(s),minMaxQuery:l1(s,h)}}),i=wre(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:E9(e),asArray:UM(e),details:r,get(a){return r.find(s=>s.breakpoint===a)},media:[null,...n.map(a=>l1(a)).slice(1)],toArrayValue(a){if(!ko(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(;xre(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 d=o[u];return d!=null&&l!=null&&(s[d]=l),s},{})}}}var zi={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}`},ad=e=>sF(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Au=e=>sF(t=>e(t,"~ &"),"[data-peer]",".peer"),sF=(e,...t)=>t.map(e).join(", "),Cw={_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",_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:ad(zi.hover),_peerHover:Au(zi.hover),_groupFocus:ad(zi.focus),_peerFocus:Au(zi.focus),_groupFocusVisible:ad(zi.focusVisible),_peerFocusVisible:Au(zi.focusVisible),_groupActive:ad(zi.active),_peerActive:Au(zi.active),_groupDisabled:ad(zi.disabled),_peerDisabled:Au(zi.disabled),_groupInvalid:ad(zi.invalid),_peerInvalid:Au(zi.invalid),_groupChecked:ad(zi.checked),_peerChecked:Au(zi.checked),_groupFocusWithin:ad(zi.focusWithin),_peerFocusWithin:Au(zi.focusWithin),_peerPlaceholderShown:Au(zi.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]"},_re=Object.keys(Cw);function GM(e,t){return gn(String(e).replace(/\./g,"-"),void 0,t)}function kre(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=GM(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[y,...b]=m,w=`${y}.-${b.join(".")}`,E=bh.negate(s),_=bh.negate(u);r[w]={value:E,var:l,varRef:_}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const d=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=GM(b,t==null?void 0:t.cssVarPrefix);return E},h=ko(s)?s:{default:s};n=Bl(n,Object.entries(h).reduce((m,[y,b])=>{var w,E;const _=d(b);if(y==="default")return m[l]=_,m;const k=(E=(w=Cw)==null?void 0:w[y])!=null?E:y;return m[k]={[l]:_},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function Ere(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Pre(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Tre=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function Mre(e){return Pre(e,Tre)}function Lre(e){return e.semanticTokens}function Are(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function Ore({tokens:e,semanticTokens:t}){var n,r;const i=Object.entries((n=p_(e))!=null?n:{}).map(([a,s])=>[a,{isSemantic:!1,value:s}]),o=Object.entries((r=p_(t,1))!=null?r:{}).map(([a,s])=>[a,{isSemantic:!0,value:s}]);return Object.fromEntries([...i,...o])}function p_(e,t=1/0){return!ko(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ko(i)||Array.isArray(i)?Object.entries(p_(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function Rre(e){var t;const n=Are(e),r=Mre(n),i=Lre(n),o=Ore({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=kre(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:Cre(n.breakpoints)}),n}var P9=Bl({},Ux,yn,Zne,US,Ka,Qne,sre,Jne,iF,are,O1,d_,or,fre,dre,lre,ure,ere,cre),Ire=Object.assign({},or,Ka,US,iF,O1),lF=Object.keys(Ire),Dre=[...Object.keys(P9),..._re],jre={...P9,...Cw},Nre=e=>e in jre,$re=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=ts(e[a],t);if(s==null)continue;if(s=ko(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"&&!Bre(t),Hre=(e,t)=>{var n,r;if(t==null)return t;const i=l=>{var u,d;return(d=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:d.varRef},o=l=>{var u;return(u=i(l))!=null?u:l},[a,s]=Fre(t);return t=(r=(n=i(a))!=null?n:o(s))!=null?r:o(t),t};function Wre(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s,l,u;const d=ts(o,r),h=$re(d)(r);let m={};for(let y in h){const b=h[y];let w=ts(b,r);y in n&&(y=n[y]),zre(y,w)&&(w=Hre(r,w));let E=t[y];if(E===!0&&(E={property:y}),ko(w)){m[y]=(s=m[y])!=null?s:{},m[y]=Bl({},m[y],i(w,!0));continue}let _=(u=(l=E==null?void 0:E.transform)==null?void 0:l.call(E,w,r,d))!=null?u:w;_=E!=null&&E.processResult?i(_,!0):_;const k=ts(E==null?void 0:E.property,r);if(!a&&(E!=null&&E.static)){const T=ts(E.static,r);m=Bl({},m,T)}if(k&&Array.isArray(k)){for(const T of k)m[T]=_;continue}if(k){k==="&"&&ko(_)?m=Bl({},m,_):m[k]=_;continue}if(ko(_)){m=Bl({},m,_);continue}m[y]=_}return m};return i}var uF=e=>t=>Wre({theme:t,pseudos:Cw,configs:P9})(e);function dr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function Ure(e,t){if(Array.isArray(e))return e;if(ko(e))return t(e);if(e!=null)return[e]}function Vre(e,t){for(let n=t+1;n{Bl(u,{[T]:m?k[T]:{[_]:k[T]}})});continue}if(!y){m?Bl(u,k):u[_]=k;continue}u[_]=k}}return u}}function qre(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,a=Gre(o);return Bl({},ts((n=e.baseStyle)!=null?n:{},t),a(e,"sizes",i,t),a(e,"variants",r,t))}}function Kre(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 fr(e){return Ere(e,["styleConfig","size","variant","colorScheme"])}var Yre={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},Xre=Yre,Zre={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Qre=Zre,Jre={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"}},eie=Jre,tie={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},nie=tie,rie={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"},iie=rie,oie={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"},aie={"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)"},sie={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},lie={property:oie,easing:aie,duration:sie},uie=lie,cie={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},die=cie,fie={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},hie=fie,pie={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"}},cF=pie,dF={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"},gie={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"},mie={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},vie={...dF,...gie,container:mie},fF=vie,yie={breakpoints:Qre,zIndices:Xre,radii:nie,blur:die,colors:eie,...cF,sizes:fF,shadows:iie,space:dF,borders:hie,transition:uie};function En(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(...d){r();for(const h of d)t[h]=l(h);return En(e,t)}function o(...d){for(const h of d)h in t||(t[h]=l(h));return En(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([h,m])=>[h,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([h,m])=>[h,m.className]))}function l(d){const y=`chakra-${(["container","root"].includes(d??"")?[e]:[e,d]).filter(Boolean).join("__")}`;return{className:y,selector:`.${y}`,toString:()=>d}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var bie=En("accordion").parts("root","container","button","panel").extend("icon"),xie=En("alert").parts("title","description","container").extend("icon","spinner"),Sie=En("avatar").parts("label","badge","container").extend("excessLabel","group"),wie=En("breadcrumb").parts("link","item","container").extend("separator");En("button").parts();var Cie=En("checkbox").parts("control","icon","container").extend("label");En("progress").parts("track","filledTrack").extend("label");var _ie=En("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),kie=En("editable").parts("preview","input","textarea"),Eie=En("form").parts("container","requiredIndicator","helperText"),Pie=En("formError").parts("text","icon"),Tie=En("input").parts("addon","field","element"),Mie=En("list").parts("container","item","icon"),Lie=En("menu").parts("button","list","item").extend("groupTitle","command","divider"),Aie=En("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Oie=En("numberinput").parts("root","field","stepperGroup","stepper");En("pininput").parts("field");var Rie=En("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),Iie=En("progress").parts("label","filledTrack","track"),Die=En("radio").parts("container","control","label"),jie=En("select").parts("field","icon"),Nie=En("slider").parts("container","track","thumb","filledTrack","mark"),$ie=En("stat").parts("container","label","helpText","number","icon"),Fie=En("switch").parts("container","track","thumb"),Bie=En("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),zie=En("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Hie=En("tag").parts("container","label","closeButton"),Wie=En("card").parts("container","header","body","footer");function kh(e,t,n){return Math.min(Math.max(e,n),t)}class Uie extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var u1=Uie;function T9(e){if(typeof e!="string")throw new u1(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=Qie.test(e)?qie(e):e;const n=Kie.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(xy(s,2),16)),parseInt(xy(a[3]||"f",2),16)/255]}const r=Yie.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=Xie.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=Zie.exec(t);if(o){const[a,s,l,u]=Array.from(o).slice(1).map(parseFloat);if(kh(0,100,s)!==s)throw new u1(e);if(kh(0,100,l)!==l)throw new u1(e);return[...Jie(a,s,l),Number.isNaN(u)?1:u]}throw new u1(e)}function Vie(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const qM=e=>parseInt(e.replace(/_/g,""),36),Gie="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=qM(t.substring(0,3)),r=qM(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 qie(e){const t=e.toLowerCase().trim(),n=Gie[Vie(t)];if(!n)throw new u1(e);return`#${n}`}const xy=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),Kie=new RegExp(`^#${xy("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Yie=new RegExp(`^#${xy("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Xie=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${xy(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),Zie=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Qie=/^[a-z]+$/i,KM=e=>Math.round(e*255),Jie=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(KM);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 d=r-o/2,h=s+d,m=l+d,y=u+d;return[h,m,y].map(KM)};function eoe(e,t,n,r){return`rgba(${kh(0,255,e).toFixed()}, ${kh(0,255,t).toFixed()}, ${kh(0,255,n).toFixed()}, ${parseFloat(kh(0,1,r).toFixed(3))})`}function toe(e,t){const[n,r,i,o]=T9(e);return eoe(n,r,i,o-t)}function noe(e){const[t,n,r,i]=T9(e);let o=a=>{const s=kh(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 roe(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,wo=(e,t,n)=>{const r=roe(e,`colors.${t}`,t);try{return noe(r),r}catch{return n??"#000000"}},ooe=e=>{const[t,n,r]=T9(e);return(t*299+n*587+r*114)/1e3},aoe=e=>t=>{const n=wo(t,e);return ooe(n)<128?"dark":"light"},soe=e=>t=>aoe(e)(t)==="dark",Um=(e,t)=>n=>{const r=wo(n,e);return toe(r,1-t)};function YM(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 loe=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function uoe(e){const t=loe();return!e||ioe(e)?t:e.string&&e.colors?doe(e.string,e.colors):e.string&&!e.colors?coe(e.string):e.colors&&!e.string?foe(e.colors):t}function coe(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 doe(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function M9(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function hF(e){return ko(e)&&e.reference?e.reference:String(e)}var _w=(e,...t)=>t.map(hF).join(` ${e} `).replace(/calc/g,""),XM=(...e)=>`calc(${_w("+",...e)})`,ZM=(...e)=>`calc(${_w("-",...e)})`,g_=(...e)=>`calc(${_w("*",...e)})`,QM=(...e)=>`calc(${_w("/",...e)})`,JM=e=>{const t=hF(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:g_(t,-1)},Nu=Object.assign(e=>({add:(...t)=>Nu(XM(e,...t)),subtract:(...t)=>Nu(ZM(e,...t)),multiply:(...t)=>Nu(g_(e,...t)),divide:(...t)=>Nu(QM(e,...t)),negate:()=>Nu(JM(e)),toString:()=>e.toString()}),{add:XM,subtract:ZM,multiply:g_,divide:QM,negate:JM});function hoe(e){return!Number.isInteger(parseFloat(e.toString()))}function poe(e,t="-"){return e.replace(/\s+/g,t)}function pF(e){const t=poe(e.toString());return t.includes("\\.")?e:hoe(e)?t.replace(".","\\."):e}function goe(e,t=""){return[t,pF(e)].filter(Boolean).join("-")}function moe(e,t){return`var(${pF(e)}${t?`, ${t}`:""})`}function voe(e,t=""){return`--${goe(e,t)}`}function yi(e,t){const n=voe(e,t==null?void 0:t.prefix);return{variable:n,reference:moe(n,yoe(t==null?void 0:t.fallback))}}function yoe(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:boe,definePartsStyle:Vx}=dr(Fie.keys),R1=yi("switch-track-width"),Ah=yi("switch-track-height"),I5=yi("switch-track-diff"),xoe=Nu.subtract(R1,Ah),m_=yi("switch-thumb-x"),Bv=yi("switch-bg"),Soe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[R1.reference],height:[Ah.reference],transitionProperty:"common",transitionDuration:"fast",[Bv.variable]:"colors.gray.300",_dark:{[Bv.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Bv.variable]:`colors.${t}.500`,_dark:{[Bv.variable]:`colors.${t}.200`}},bg:Bv.reference}},woe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Ah.reference],height:[Ah.reference],_checked:{transform:`translateX(${m_.reference})`}},Coe=Vx(e=>({container:{[I5.variable]:xoe,[m_.variable]:I5.reference,_rtl:{[m_.variable]:Nu(I5).negate().toString()}},track:Soe(e),thumb:woe})),_oe={sm:Vx({container:{[R1.variable]:"1.375rem",[Ah.variable]:"sizes.3"}}),md:Vx({container:{[R1.variable]:"1.875rem",[Ah.variable]:"sizes.4"}}),lg:Vx({container:{[R1.variable]:"2.875rem",[Ah.variable]:"sizes.6"}})},koe=boe({baseStyle:Coe,sizes:_oe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eoe,definePartsStyle:ym}=dr(Bie.keys),Poe=ym({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"}}),VS={"&[data-is-numeric=true]":{textAlign:"end"}},Toe=ym(e=>{const{colorScheme:t}=e;return{th:{color:wt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:wt(`${t}.100`,`${t}.700`)(e),...VS},td:{borderBottom:"1px",borderColor:wt(`${t}.100`,`${t}.700`)(e),...VS},caption:{color:wt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Moe=ym(e=>{const{colorScheme:t}=e;return{th:{color:wt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:wt(`${t}.100`,`${t}.700`)(e),...VS},td:{borderBottom:"1px",borderColor:wt(`${t}.100`,`${t}.700`)(e),...VS},caption:{color:wt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:wt(`${t}.100`,`${t}.700`)(e)},td:{background:wt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Loe={simple:Toe,striped:Moe,unstyled:{}},Aoe={sm:ym({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:ym({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:ym({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Ooe=Eoe({baseStyle:Poe,variants:Loe,sizes:Aoe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Go=gn("tabs-color"),Us=gn("tabs-bg"),Db=gn("tabs-border-color"),{defineMultiStyleConfig:Roe,definePartsStyle:Kl}=dr(zie.keys),Ioe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Doe=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}}},joe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Noe={p:4},$oe=Kl(e=>({root:Ioe(e),tab:Doe(e),tablist:joe(e),tabpanel:Noe})),Foe={sm:Kl({tab:{py:1,px:4,fontSize:"sm"}}),md:Kl({tab:{fontSize:"md",py:2,px:4}}),lg:Kl({tab:{fontSize:"lg",py:3,px:4}})},Boe=Kl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Go.variable]:`colors.${t}.600`,_dark:{[Go.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Us.variable]:"colors.gray.200",_dark:{[Us.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Go.reference,bg:Us.reference}}}),zoe=Kl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Db.variable]:"transparent",_selected:{[Go.variable]:`colors.${t}.600`,[Db.variable]:"colors.white",_dark:{[Go.variable]:`colors.${t}.300`,[Db.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Db.reference},color:Go.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Hoe=Kl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Us.variable]:"colors.gray.50",_dark:{[Us.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Us.variable]:"colors.white",[Go.variable]:`colors.${t}.600`,_dark:{[Us.variable]:"colors.gray.800",[Go.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Go.reference,bg:Us.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Woe=Kl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:wo(n,`${t}.700`),bg:wo(n,`${t}.100`)}}}}),Uoe=Kl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Go.variable]:"colors.gray.600",_dark:{[Go.variable]:"inherit"},_selected:{[Go.variable]:"colors.white",[Us.variable]:`colors.${t}.600`,_dark:{[Go.variable]:"colors.gray.800",[Us.variable]:`colors.${t}.300`}},color:Go.reference,bg:Us.reference}}}),Voe=Kl({}),Goe={line:Boe,enclosed:zoe,"enclosed-colored":Hoe,"soft-rounded":Woe,"solid-rounded":Uoe,unstyled:Voe},qoe=Roe({baseStyle:$oe,sizes:Foe,variants:Goe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Koe={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},bm=gn("badge-bg"),zl=gn("badge-color"),Yoe=e=>{const{colorScheme:t,theme:n}=e,r=Um(`${t}.500`,.6)(n);return{[bm.variable]:`colors.${t}.500`,[zl.variable]:"colors.white",_dark:{[bm.variable]:r,[zl.variable]:"colors.whiteAlpha.800"},bg:bm.reference,color:zl.reference}},Xoe=e=>{const{colorScheme:t,theme:n}=e,r=Um(`${t}.200`,.16)(n);return{[bm.variable]:`colors.${t}.100`,[zl.variable]:`colors.${t}.800`,_dark:{[bm.variable]:r,[zl.variable]:`colors.${t}.200`},bg:bm.reference,color:zl.reference}},Zoe=e=>{const{colorScheme:t,theme:n}=e,r=Um(`${t}.200`,.8)(n);return{[zl.variable]:`colors.${t}.500`,_dark:{[zl.variable]:r},color:zl.reference,boxShadow:`inset 0 0 0px 1px ${zl.reference}`}},Qoe={solid:Yoe,subtle:Xoe,outline:Zoe},I1={baseStyle:Koe,variants:Qoe,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Joe,definePartsStyle:Oh}=dr(Hie.keys),eae={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},tae={lineHeight:1.2,overflow:"visible"},nae={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}},rae=Oh({container:eae,label:tae,closeButton:nae}),iae={sm:Oh({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Oh({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Oh({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},oae={subtle:Oh(e=>{var t;return{container:(t=I1.variants)==null?void 0:t.subtle(e)}}),solid:Oh(e=>{var t;return{container:(t=I1.variants)==null?void 0:t.solid(e)}}),outline:Oh(e=>{var t;return{container:(t=I1.variants)==null?void 0:t.outline(e)}})},aae=Joe({variants:oae,baseStyle:rae,sizes:iae,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:zu,defineMultiStyleConfig:sae}=dr(Tie.keys),lae=zu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),sd={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},uae={lg:zu({field:sd.lg,addon:sd.lg}),md:zu({field:sd.md,addon:sd.md}),sm:zu({field:sd.sm,addon:sd.sm}),xs:zu({field:sd.xs,addon:sd.xs})};function L9(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||wt("blue.500","blue.300")(e),errorBorderColor:n||wt("red.500","red.300")(e)}}var cae=zu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=L9(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:wt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wo(t,r),boxShadow:`0 0 0 1px ${wo(t,r)}`},_focusVisible:{zIndex:1,borderColor:wo(t,n),boxShadow:`0 0 0 1px ${wo(t,n)}`}},addon:{border:"1px solid",borderColor:wt("inherit","whiteAlpha.50")(e),bg:wt("gray.100","whiteAlpha.300")(e)}}}),dae=zu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=L9(e);return{field:{border:"2px solid",borderColor:"transparent",bg:wt("gray.100","whiteAlpha.50")(e),_hover:{bg:wt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wo(t,r)},_focusVisible:{bg:"transparent",borderColor:wo(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:wt("gray.100","whiteAlpha.50")(e)}}}),fae=zu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=L9(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wo(t,r),boxShadow:`0px 1px 0px 0px ${wo(t,r)}`},_focusVisible:{borderColor:wo(t,n),boxShadow:`0px 1px 0px 0px ${wo(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),hae=zu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),pae={outline:cae,filled:dae,flushed:fae,unstyled:hae},xn=sae({baseStyle:lae,sizes:uae,variants:pae,defaultProps:{size:"md",variant:"outline"}}),eL,gae={...(eL=xn.baseStyle)==null?void 0:eL.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},tL,nL,mae={outline:e=>{var t,n;return(n=(t=xn.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=xn.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=xn.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(nL=(tL=xn.variants)==null?void 0:tL.unstyled.field)!=null?nL:{}},rL,iL,oL,aL,sL,lL,uL,cL,vae={xs:(iL=(rL=xn.sizes)==null?void 0:rL.xs.field)!=null?iL:{},sm:(aL=(oL=xn.sizes)==null?void 0:oL.sm.field)!=null?aL:{},md:(lL=(sL=xn.sizes)==null?void 0:sL.md.field)!=null?lL:{},lg:(cL=(uL=xn.sizes)==null?void 0:uL.lg.field)!=null?cL:{}},yae={baseStyle:gae,sizes:vae,variants:mae,defaultProps:{size:"md",variant:"outline"}},jb=yi("tooltip-bg"),D5=yi("tooltip-fg"),bae=yi("popper-arrow-bg"),xae={bg:jb.reference,color:D5.reference,[jb.variable]:"colors.gray.700",[D5.variable]:"colors.whiteAlpha.900",_dark:{[jb.variable]:"colors.gray.300",[D5.variable]:"colors.gray.900"},[bae.variable]:jb.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Sae={baseStyle:xae},{defineMultiStyleConfig:wae,definePartsStyle:c1}=dr(Iie.keys),Cae=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=wt(YM(),YM("1rem","rgba(0,0,0,0.1)"))(e),a=wt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${wo(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},_ae={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},kae=e=>({bg:wt("gray.100","whiteAlpha.300")(e)}),Eae=e=>({transitionProperty:"common",transitionDuration:"slow",...Cae(e)}),Pae=c1(e=>({label:_ae,filledTrack:Eae(e),track:kae(e)})),Tae={xs:c1({track:{h:"1"}}),sm:c1({track:{h:"2"}}),md:c1({track:{h:"3"}}),lg:c1({track:{h:"4"}})},Mae=wae({sizes:Tae,baseStyle:Pae,defaultProps:{size:"md",colorScheme:"blue"}}),Lae=e=>typeof e=="function";function Eo(e,...t){return Lae(e)?e(...t):e}var{definePartsStyle:Gx,defineMultiStyleConfig:Aae}=dr(Cie.keys),D1=gn("checkbox-size"),Oae=e=>{const{colorScheme:t}=e;return{w:D1.reference,h:D1.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:wt(`${t}.500`,`${t}.200`)(e),borderColor:wt(`${t}.500`,`${t}.200`)(e),color:wt("white","gray.900")(e),_hover:{bg:wt(`${t}.600`,`${t}.300`)(e),borderColor:wt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:wt("gray.200","transparent")(e),bg:wt("gray.200","whiteAlpha.300")(e),color:wt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:wt(`${t}.500`,`${t}.200`)(e),borderColor:wt(`${t}.500`,`${t}.200`)(e),color:wt("white","gray.900")(e)},_disabled:{bg:wt("gray.100","whiteAlpha.100")(e),borderColor:wt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:wt("red.500","red.300")(e)}}},Rae={_disabled:{cursor:"not-allowed"}},Iae={userSelect:"none",_disabled:{opacity:.4}},Dae={transitionProperty:"transform",transitionDuration:"normal"},jae=Gx(e=>({icon:Dae,container:Rae,control:Eo(Oae,e),label:Iae})),Nae={sm:Gx({control:{[D1.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Gx({control:{[D1.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Gx({control:{[D1.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},GS=Aae({baseStyle:jae,sizes:Nae,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:$ae,definePartsStyle:qx}=dr(Die.keys),Fae=e=>{var t;const n=(t=Eo(GS.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"}}}},Bae=qx(e=>{var t,n,r,i;return{label:(n=(t=GS).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=GS).baseStyle)==null?void 0:i.call(r,e).container,control:Fae(e)}}),zae={md:qx({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:qx({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:qx({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Hae=$ae({baseStyle:Bae,sizes:zae,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Wae,definePartsStyle:Uae}=dr(jie.keys),Nb=gn("select-bg"),dL,Vae={...(dL=xn.baseStyle)==null?void 0:dL.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Nb.reference,[Nb.variable]:"colors.white",_dark:{[Nb.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Nb.reference}},Gae={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},qae=Uae({field:Vae,icon:Gae}),$b={paddingInlineEnd:"8"},fL,hL,pL,gL,mL,vL,yL,bL,Kae={lg:{...(fL=xn.sizes)==null?void 0:fL.lg,field:{...(hL=xn.sizes)==null?void 0:hL.lg.field,...$b}},md:{...(pL=xn.sizes)==null?void 0:pL.md,field:{...(gL=xn.sizes)==null?void 0:gL.md.field,...$b}},sm:{...(mL=xn.sizes)==null?void 0:mL.sm,field:{...(vL=xn.sizes)==null?void 0:vL.sm.field,...$b}},xs:{...(yL=xn.sizes)==null?void 0:yL.xs,field:{...(bL=xn.sizes)==null?void 0:bL.xs.field,...$b},icon:{insetEnd:"1"}}},Yae=Wae({baseStyle:qae,sizes:Kae,variants:xn.variants,defaultProps:xn.defaultProps}),j5=gn("skeleton-start-color"),N5=gn("skeleton-end-color"),Xae={[j5.variable]:"colors.gray.100",[N5.variable]:"colors.gray.400",_dark:{[j5.variable]:"colors.gray.800",[N5.variable]:"colors.gray.600"},background:j5.reference,borderColor:N5.reference,opacity:.7,borderRadius:"sm"},Zae={baseStyle:Xae},$5=gn("skip-link-bg"),Qae={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$5.variable]:"colors.white",_dark:{[$5.variable]:"colors.gray.700"},bg:$5.reference}},Jae={baseStyle:Qae},{defineMultiStyleConfig:ese,definePartsStyle:kw}=dr(Nie.keys),Sy=gn("slider-thumb-size"),wy=gn("slider-track-size"),bd=gn("slider-bg"),tse=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...M9({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nse=e=>({...M9({orientation:e.orientation,horizontal:{h:wy.reference},vertical:{w:wy.reference}}),overflow:"hidden",borderRadius:"sm",[bd.variable]:"colors.gray.200",_dark:{[bd.variable]:"colors.whiteAlpha.200"},_disabled:{[bd.variable]:"colors.gray.300",_dark:{[bd.variable]:"colors.whiteAlpha.300"}},bg:bd.reference}),rse=e=>{const{orientation:t}=e;return{...M9({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:Sy.reference,h:Sy.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"}}},ise=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[bd.variable]:`colors.${t}.500`,_dark:{[bd.variable]:`colors.${t}.200`},bg:bd.reference}},ose=kw(e=>({container:tse(e),track:nse(e),thumb:rse(e),filledTrack:ise(e)})),ase=kw({container:{[Sy.variable]:"sizes.4",[wy.variable]:"sizes.1"}}),sse=kw({container:{[Sy.variable]:"sizes.3.5",[wy.variable]:"sizes.1"}}),lse=kw({container:{[Sy.variable]:"sizes.2.5",[wy.variable]:"sizes.0.5"}}),use={lg:ase,md:sse,sm:lse},cse=ese({baseStyle:ose,sizes:use,defaultProps:{size:"md",colorScheme:"blue"}}),xh=yi("spinner-size"),dse={width:[xh.reference],height:[xh.reference]},fse={xs:{[xh.variable]:"sizes.3"},sm:{[xh.variable]:"sizes.4"},md:{[xh.variable]:"sizes.6"},lg:{[xh.variable]:"sizes.8"},xl:{[xh.variable]:"sizes.12"}},hse={baseStyle:dse,sizes:fse,defaultProps:{size:"md"}},{defineMultiStyleConfig:pse,definePartsStyle:gF}=dr($ie.keys),gse={fontWeight:"medium"},mse={opacity:.8,marginBottom:"2"},vse={verticalAlign:"baseline",fontWeight:"semibold"},yse={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},bse=gF({container:{},label:gse,helpText:mse,number:vse,icon:yse}),xse={md:gF({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Sse=pse({baseStyle:bse,sizes:xse,defaultProps:{size:"md"}}),F5=gn("kbd-bg"),wse={[F5.variable]:"colors.gray.100",_dark:{[F5.variable]:"colors.whiteAlpha.100"},bg:F5.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},Cse={baseStyle:wse},_se={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},kse={baseStyle:_se},{defineMultiStyleConfig:Ese,definePartsStyle:Pse}=dr(Mie.keys),Tse={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Mse=Pse({icon:Tse}),Lse=Ese({baseStyle:Mse}),{defineMultiStyleConfig:Ase,definePartsStyle:Ose}=dr(Lie.keys),Rl=gn("menu-bg"),B5=gn("menu-shadow"),Rse={[Rl.variable]:"#fff",[B5.variable]:"shadows.sm",_dark:{[Rl.variable]:"colors.gray.700",[B5.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Rl.reference,boxShadow:B5.reference},Ise={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Rl.variable]:"colors.gray.100",_dark:{[Rl.variable]:"colors.whiteAlpha.100"}},_active:{[Rl.variable]:"colors.gray.200",_dark:{[Rl.variable]:"colors.whiteAlpha.200"}},_expanded:{[Rl.variable]:"colors.gray.100",_dark:{[Rl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Rl.reference},Dse={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},jse={opacity:.6},Nse={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},$se={transitionProperty:"common",transitionDuration:"normal"},Fse=Ose({button:$se,list:Rse,item:Ise,groupTitle:Dse,command:jse,divider:Nse}),Bse=Ase({baseStyle:Fse}),{defineMultiStyleConfig:zse,definePartsStyle:v_}=dr(Aie.keys),Hse={bg:"blackAlpha.600",zIndex:"modal"},Wse=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"}},Use=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:wt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:wt("lg","dark-lg")(e)}},Vse={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Gse={position:"absolute",top:"2",insetEnd:"3"},qse=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Kse={px:"6",py:"4"},Yse=v_(e=>({overlay:Hse,dialogContainer:Eo(Wse,e),dialog:Eo(Use,e),header:Vse,closeButton:Gse,body:Eo(qse,e),footer:Kse}));function js(e){return v_(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Xse={xs:js("xs"),sm:js("sm"),md:js("md"),lg:js("lg"),xl:js("xl"),"2xl":js("2xl"),"3xl":js("3xl"),"4xl":js("4xl"),"5xl":js("5xl"),"6xl":js("6xl"),full:js("full")},Zse=zse({baseStyle:Yse,sizes:Xse,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Qse,definePartsStyle:mF}=dr(Oie.keys),A9=yi("number-input-stepper-width"),vF=yi("number-input-input-padding"),Jse=Nu(A9).add("0.5rem").toString(),z5=yi("number-input-bg"),H5=yi("number-input-color"),W5=yi("number-input-border-color"),ele={[A9.variable]:"sizes.6",[vF.variable]:Jse},tle=e=>{var t,n;return(n=(t=Eo(xn.baseStyle,e))==null?void 0:t.field)!=null?n:{}},nle={width:A9.reference},rle={borderStart:"1px solid",borderStartColor:W5.reference,color:H5.reference,bg:z5.reference,[H5.variable]:"colors.chakra-body-text",[W5.variable]:"colors.chakra-border-color",_dark:{[H5.variable]:"colors.whiteAlpha.800",[W5.variable]:"colors.whiteAlpha.300"},_active:{[z5.variable]:"colors.gray.200",_dark:{[z5.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},ile=mF(e=>{var t;return{root:ele,field:(t=Eo(tle,e))!=null?t:{},stepperGroup:nle,stepper:rle}});function Fb(e){var t,n,r;const i=(t=xn.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=cF.fontSizes[a];return mF({field:{...i.field,paddingInlineEnd:vF.reference,verticalAlign:"top"},stepper:{fontSize:Nu(s).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var ole={xs:Fb("xs"),sm:Fb("sm"),md:Fb("md"),lg:Fb("lg")},ale=Qse({baseStyle:ile,sizes:ole,variants:xn.variants,defaultProps:xn.defaultProps}),xL,sle={...(xL=xn.baseStyle)==null?void 0:xL.field,textAlign:"center"},lle={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"}},SL,wL,ule={outline:e=>{var t,n,r;return(r=(n=Eo((t=xn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=Eo((t=xn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=Eo((t=xn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(wL=(SL=xn.variants)==null?void 0:SL.unstyled.field)!=null?wL:{}},cle={baseStyle:sle,sizes:lle,variants:ule,defaultProps:xn.defaultProps},{defineMultiStyleConfig:dle,definePartsStyle:fle}=dr(Rie.keys),Bb=yi("popper-bg"),hle=yi("popper-arrow-bg"),CL=yi("popper-arrow-shadow-color"),ple={zIndex:10},gle={[Bb.variable]:"colors.white",bg:Bb.reference,[hle.variable]:Bb.reference,[CL.variable]:"colors.gray.200",_dark:{[Bb.variable]:"colors.gray.700",[CL.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},mle={px:3,py:2,borderBottomWidth:"1px"},vle={px:3,py:2},yle={px:3,py:2,borderTopWidth:"1px"},ble={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},xle=fle({popper:ple,content:gle,header:mle,body:vle,footer:yle,closeButton:ble}),Sle=dle({baseStyle:xle}),{definePartsStyle:y_,defineMultiStyleConfig:wle}=dr(_ie.keys),U5=gn("drawer-bg"),V5=gn("drawer-box-shadow");function bg(e){return y_(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Cle={bg:"blackAlpha.600",zIndex:"overlay"},_le={display:"flex",zIndex:"modal",justifyContent:"center"},kle=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[U5.variable]:"colors.white",[V5.variable]:"shadows.lg",_dark:{[U5.variable]:"colors.gray.700",[V5.variable]:"shadows.dark-lg"},bg:U5.reference,boxShadow:V5.reference}},Ele={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Ple={position:"absolute",top:"2",insetEnd:"3"},Tle={px:"6",py:"2",flex:"1",overflow:"auto"},Mle={px:"6",py:"4"},Lle=y_(e=>({overlay:Cle,dialogContainer:_le,dialog:Eo(kle,e),header:Ele,closeButton:Ple,body:Tle,footer:Mle})),Ale={xs:bg("xs"),sm:bg("md"),md:bg("lg"),lg:bg("2xl"),xl:bg("4xl"),full:bg("full")},Ole=wle({baseStyle:Lle,sizes:Ale,defaultProps:{size:"xs"}}),{definePartsStyle:Rle,defineMultiStyleConfig:Ile}=dr(kie.keys),Dle={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},jle={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Nle={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},$le=Rle({preview:Dle,input:jle,textarea:Nle}),Fle=Ile({baseStyle:$le}),{definePartsStyle:Ble,defineMultiStyleConfig:zle}=dr(Eie.keys),xm=gn("form-control-color"),Hle={marginStart:"1",[xm.variable]:"colors.red.500",_dark:{[xm.variable]:"colors.red.300"},color:xm.reference},Wle={mt:"2",[xm.variable]:"colors.gray.600",_dark:{[xm.variable]:"colors.whiteAlpha.600"},color:xm.reference,lineHeight:"normal",fontSize:"sm"},Ule=Ble({container:{width:"100%",position:"relative"},requiredIndicator:Hle,helperText:Wle}),Vle=zle({baseStyle:Ule}),{definePartsStyle:Gle,defineMultiStyleConfig:qle}=dr(Pie.keys),Sm=gn("form-error-color"),Kle={[Sm.variable]:"colors.red.500",_dark:{[Sm.variable]:"colors.red.300"},color:Sm.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Yle={marginEnd:"0.5em",[Sm.variable]:"colors.red.500",_dark:{[Sm.variable]:"colors.red.300"},color:Sm.reference},Xle=Gle({text:Kle,icon:Yle}),Zle=qle({baseStyle:Xle}),Qle={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Jle={baseStyle:Qle},eue={fontFamily:"heading",fontWeight:"bold"},tue={"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}},nue={baseStyle:eue,sizes:tue,defaultProps:{size:"xl"}},{defineMultiStyleConfig:rue,definePartsStyle:iue}=dr(wie.keys),oue={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},aue=iue({link:oue}),sue=rue({baseStyle:aue}),lue={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"}}},yF=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:wt("inherit","whiteAlpha.900")(e),_hover:{bg:wt("gray.100","whiteAlpha.200")(e)},_active:{bg:wt("gray.200","whiteAlpha.300")(e)}};const r=Um(`${t}.200`,.12)(n),i=Um(`${t}.200`,.24)(n);return{color:wt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:wt(`${t}.50`,r)(e)},_active:{bg:wt(`${t}.100`,i)(e)}}},uue=e=>{const{colorScheme:t}=e,n=wt("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"},...Eo(yF,e)}},cue={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},due=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const l=wt("gray.100","whiteAlpha.200")(e);return{bg:l,_hover:{bg:wt("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:wt("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:a=`${n}.700`}=(t=cue[n])!=null?t:{},s=wt(r,`${n}.200`)(e);return{bg:s,color:wt(i,"gray.800")(e),_hover:{bg:wt(o,`${n}.300`)(e),_disabled:{bg:s}},_active:{bg:wt(a,`${n}.400`)(e)}}},fue=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:wt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:wt(`${t}.700`,`${t}.500`)(e)}}},hue={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},pue={ghost:yF,outline:uue,solid:due,link:fue,unstyled:hue},gue={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"}},mue={baseStyle:lue,variants:pue,sizes:gue,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Rh,defineMultiStyleConfig:vue}=dr(Wie.keys),qS=gn("card-bg"),Vu=gn("card-padding"),bF=gn("card-shadow"),Kx=gn("card-radius"),xF=gn("card-border-width","0"),SF=gn("card-border-color"),yue=Rh({container:{[qS.variable]:"colors.chakra-body-bg",backgroundColor:qS.reference,boxShadow:bF.reference,borderRadius:Kx.reference,color:"chakra-body-text",borderWidth:xF.reference,borderColor:SF.reference},body:{padding:Vu.reference,flex:"1 1 0%"},header:{padding:Vu.reference},footer:{padding:Vu.reference}}),bue={sm:Rh({container:{[Kx.variable]:"radii.base",[Vu.variable]:"space.3"}}),md:Rh({container:{[Kx.variable]:"radii.md",[Vu.variable]:"space.5"}}),lg:Rh({container:{[Kx.variable]:"radii.xl",[Vu.variable]:"space.7"}})},xue={elevated:Rh({container:{[bF.variable]:"shadows.base",_dark:{[qS.variable]:"colors.gray.700"}}}),outline:Rh({container:{[xF.variable]:"1px",[SF.variable]:"colors.chakra-border-color"}}),filled:Rh({container:{[qS.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Vu.variable]:0},header:{[Vu.variable]:0},footer:{[Vu.variable]:0}}},Sue=vue({baseStyle:yue,variants:xue,sizes:bue,defaultProps:{variant:"elevated",size:"md"}}),j1=yi("close-button-size"),zv=yi("close-button-bg"),wue={w:[j1.reference],h:[j1.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[zv.variable]:"colors.blackAlpha.100",_dark:{[zv.variable]:"colors.whiteAlpha.100"}},_active:{[zv.variable]:"colors.blackAlpha.200",_dark:{[zv.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:zv.reference},Cue={lg:{[j1.variable]:"sizes.10",fontSize:"md"},md:{[j1.variable]:"sizes.8",fontSize:"xs"},sm:{[j1.variable]:"sizes.6",fontSize:"2xs"}},_ue={baseStyle:wue,sizes:Cue,defaultProps:{size:"md"}},{variants:kue,defaultProps:Eue}=I1,Pue={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Tue={baseStyle:Pue,variants:kue,defaultProps:Eue},Mue={w:"100%",mx:"auto",maxW:"prose",px:"4"},Lue={baseStyle:Mue},Aue={opacity:.6,borderColor:"inherit"},Oue={borderStyle:"solid"},Rue={borderStyle:"dashed"},Iue={solid:Oue,dashed:Rue},Due={baseStyle:Aue,variants:Iue,defaultProps:{variant:"solid"}},{definePartsStyle:jue,defineMultiStyleConfig:Nue}=dr(bie.keys),$ue={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Fue={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Bue={pt:"2",px:"4",pb:"5"},zue={fontSize:"1.25em"},Hue=jue({container:$ue,button:Fue,panel:Bue,icon:zue}),Wue=Nue({baseStyle:Hue}),{definePartsStyle:e2,defineMultiStyleConfig:Uue}=dr(xie.keys),Ta=gn("alert-fg"),nc=gn("alert-bg"),Vue=e2({container:{bg:nc.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Ta.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Ta.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function O9(e){const{theme:t,colorScheme:n}=e,r=Um(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Gue=e2(e=>{const{colorScheme:t}=e,n=O9(e);return{container:{[Ta.variable]:`colors.${t}.500`,[nc.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[nc.variable]:n.dark}}}}),que=e2(e=>{const{colorScheme:t}=e,n=O9(e);return{container:{[Ta.variable]:`colors.${t}.500`,[nc.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[nc.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Ta.reference}}}),Kue=e2(e=>{const{colorScheme:t}=e,n=O9(e);return{container:{[Ta.variable]:`colors.${t}.500`,[nc.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[nc.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Ta.reference}}}),Yue=e2(e=>{const{colorScheme:t}=e;return{container:{[Ta.variable]:"colors.white",[nc.variable]:`colors.${t}.500`,_dark:{[Ta.variable]:"colors.gray.900",[nc.variable]:`colors.${t}.200`},color:Ta.reference}}}),Xue={subtle:Gue,"left-accent":que,"top-accent":Kue,solid:Yue},Zue=Uue({baseStyle:Vue,variants:Xue,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:wF,defineMultiStyleConfig:Que}=dr(Sie.keys),wm=gn("avatar-border-color"),G5=gn("avatar-bg"),Jue={borderRadius:"full",border:"0.2em solid",[wm.variable]:"white",_dark:{[wm.variable]:"colors.gray.800"},borderColor:wm.reference},ece={[G5.variable]:"colors.gray.200",_dark:{[G5.variable]:"colors.whiteAlpha.400"},bgColor:G5.reference},_L=gn("avatar-background"),tce=e=>{const{name:t,theme:n}=e,r=t?uoe({string:t}):"colors.gray.400",i=soe(r)(n);let o="white";return i||(o="gray.800"),{bg:_L.reference,"&:not([data-loaded])":{[_L.variable]:r},color:o,[wm.variable]:"colors.white",_dark:{[wm.variable]:"colors.gray.800"},borderColor:wm.reference,verticalAlign:"top"}},nce=wF(e=>({badge:Eo(Jue,e),excessLabel:Eo(ece,e),container:Eo(tce,e)}));function ld(e){const t=e!=="100%"?fF[e]:void 0;return wF({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var rce={"2xs":ld(4),xs:ld(6),sm:ld(8),md:ld(12),lg:ld(16),xl:ld(24),"2xl":ld(32),full:ld("100%")},ice=Que({baseStyle:nce,sizes:rce,defaultProps:{size:"md"}}),oce={Accordion:Wue,Alert:Zue,Avatar:ice,Badge:I1,Breadcrumb:sue,Button:mue,Checkbox:GS,CloseButton:_ue,Code:Tue,Container:Lue,Divider:Due,Drawer:Ole,Editable:Fle,Form:Vle,FormError:Zle,FormLabel:Jle,Heading:nue,Input:xn,Kbd:Cse,Link:kse,List:Lse,Menu:Bse,Modal:Zse,NumberInput:ale,PinInput:cle,Popover:Sle,Progress:Mae,Radio:Hae,Select:Yae,Skeleton:Zae,SkipLink:Jae,Slider:cse,Spinner:hse,Stat:Sse,Switch:koe,Table:Ooe,Tabs:qoe,Tag:aae,Textarea:yae,Tooltip:Sae,Card:Sue},ace={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-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},sce={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",wordWrap:"break-word"}}},lce="ltr",uce={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},cce={semanticTokens:ace,direction:lce,...yie,components:oce,styles:sce,config:uce};function dce(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var fce=dce();function hce(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function pce(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}},CF=gce(pce);function _F(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var kF=e=>_F(e,t=>t!=null);function mce(e){return typeof e=="function"}function EF(e,...t){return mce(e)?e(...t):e}function vce(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}const PF=1/60*1e3,yce=typeof performance<"u"?()=>performance.now():()=>Date.now(),TF=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(yce()),PF);function bce(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,d=!1)=>{const h=d&&i,m=h?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),h&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=bce(()=>Cy=!0),e),{}),Sce=t2.reduce((e,t)=>{const n=Ew[t];return e[t]=(r,i=!1,o=!1)=>(Cy||_ce(),n.schedule(r,i,o)),e},{}),wce=t2.reduce((e,t)=>(e[t]=Ew[t].cancel,e),{});t2.reduce((e,t)=>(e[t]=()=>Ew[t].process(Cm),e),{});const Cce=e=>Ew[e].process(Cm),MF=e=>{Cy=!1,Cm.delta=b_?PF:Math.max(Math.min(e-Cm.timestamp,xce),1),Cm.timestamp=e,x_=!0,t2.forEach(Cce),x_=!1,Cy&&(b_=!1,TF(MF))},_ce=()=>{Cy=!0,b_=!0,x_||TF(MF)},kL=()=>Cm;var kce=typeof Element<"u",Ece=typeof Map=="function",Pce=typeof Set=="function",Tce=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Yx(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(!Yx(e[r],t[r]))return!1;return!0}var o;if(Ece&&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(!Yx(r.value[1],t.get(r.value[0])))return!1;return!0}if(Pce&&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(Tce&&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)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)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(kce&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!Yx(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Mce=function(t,n){try{return Yx(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function LF(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:a}=eF(),s=e?CF(o,`components.${e}`):void 0,l=r||s,u=Bl({theme:o,colorMode:a},(n=l==null?void 0:l.defaultProps)!=null?n:{},kF(hce(i,["children"]))),d=S.useRef({});if(l){const m=qre(l)(u);Mce(d.current,m)||(d.current=m)}return d.current}function au(e,t={}){return LF(e,t)}function Yi(e,t={}){return LF(e,t)}var Lce=new Set([...Dre,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ace=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function Oce(e){return Ace.has(e)||!Lce.has(e)}function Rce(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ice(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}var Dce=/^((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)-.*))$/,jce=$j(function(e){return Dce.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Nce=jce,$ce=function(t){return t!=="theme"},EL=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Nce:$ce},PL=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},Fce=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Uj(n,r,i),lee(function(){return Vj(n,r,i)}),null},Bce=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=PL(t,n,r),l=s||EL(i),u=!l("as");return function(){var d=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)h.push.apply(h,d);else{h.push(d[0][0]);for(var m=d.length,y=1;yt=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=_F(a,(h,m)=>Nre(m)),l=EF(e,t),u=Ice({},i,l,kF(s),o),d=uF(u)(t.theme);return r?[d,r]:d};function q5(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Oce);const i=Wce({baseStyle:n}),o=Hce(e,r)(i);return Ke.forwardRef(function(l,u){const{colorMode:d,forced:h}=Qy();return Ke.createElement(o,{ref:u,"data-theme":h?d:void 0,...l})})}function Uce(){const e=new Map;return new Proxy(q5,{apply(t,n,r){return q5(...r)},get(t,n){return e.has(n)||e.set(n,q5(n)),e.get(n)}})}var Ne=Uce();function Ze(e){return S.forwardRef(e)}function Vce(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=S.createContext(void 0);i.displayName=r;function o(){var a;const s=S.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 Gce(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=S.useMemo(()=>Rre(n),[n]);return g.jsxs(fee,{theme:i,children:[g.jsx(qce,{root:t}),r]})}function qce({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return g.jsx(ow,{styles:n=>({[t]:n.__cssVars})})}Vce({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Kce(){const{colorMode:e}=Qy();return g.jsx(ow,{styles:t=>{const n=CF(t,"styles.global"),r=EF(n,{theme:t,colorMode:e});return r?uF(r)(t):void 0}})}var AF=S.createContext({getDocument(){return document},getWindow(){return window}});AF.displayName="EnvironmentContext";function OF(e){const{children:t,environment:n,disabled:r}=e,i=S.useRef(null),o=S.useMemo(()=>n||{getDocument:()=>{var s,l;return(l=(s=i.current)==null?void 0:s.ownerDocument)!=null?l:document},getWindow:()=>{var s,l;return(l=(s=i.current)==null?void 0:s.ownerDocument.defaultView)!=null?l:window}},[n]),a=!r||!n;return g.jsxs(AF.Provider,{value:o,children:[t,a&&g.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}OF.displayName="EnvironmentProvider";var Yce=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s,disableEnvironment:l}=e,u=g.jsx(OF,{environment:a,disabled:l,children:t});return g.jsx(Gce,{theme:o,cssVarsRoot:s,children:g.jsxs(J$,{colorModeManager:n,options:o.config,children:[i?g.jsx(gee,{}):g.jsx(pee,{}),g.jsx(Kce,{}),r?g.jsx(Zj,{zIndex:r,children:u}):u]})})},Xce=(e,t)=>e.find(n=>n.id===t);function ML(e,t){const n=RF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function RF(e,t){for(const[n,r]of Object.entries(e))if(Xce(r,t))return n}function Zce(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 Qce(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:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}function Qr(e,t=[]){const n=S.useRef(e);return S.useEffect(()=>{n.current=e}),S.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Jce(e,t){const n=Qr(e);S.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function rc(e,t){const n=S.useRef(!1),r=S.useRef(!1);S.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),S.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const IF=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Pw=S.createContext({});function ede(){return S.useContext(Pw).visualElement}const n2=S.createContext(null),Tw=typeof document<"u",YS=Tw?S.useLayoutEffect:S.useEffect,DF=S.createContext({strict:!1});function tde(e,t,n,r){const i=ede(),o=S.useContext(DF),a=S.useContext(n2),s=S.useContext(IF).reducedMotion,l=S.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;return S.useInsertionEffect(()=>{u&&u.update(n,a)}),YS(()=>{u&&u.render()}),S.useEffect(()=>{u&&u.updateFeatures()}),(window.HandoffAppearAnimations?YS:S.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function Qg(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nde(e,t,n){return S.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Qg(n)&&(n.current=r))},[t])}function _y(e){return typeof e=="string"||Array.isArray(e)}function Mw(e){return typeof e=="object"&&typeof e.start=="function"}const rde=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Lw(e){return Mw(e.animate)||rde.some(t=>_y(e[t]))}function jF(e){return Boolean(Lw(e)||e.variants)}function ide(e,t){if(Lw(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_y(n)?n:void 0,animate:_y(r)?r:void 0}}return e.inherit!==!1?t:{}}function ode(e){const{initial:t,animate:n}=ide(e,S.useContext(Pw));return S.useMemo(()=>({initial:t,animate:n}),[LL(t),LL(n)])}function LL(e){return Array.isArray(e)?e.join(" "):e}const AL={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],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"]},ky={};for(const e in AL)ky[e]={isEnabled:t=>AL[e].some(n=>!!t[n])};function ade(e){for(const t in e)ky[t]={...ky[t],...e[t]}}function R9(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const N1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let sde=1;function lde(){return R9(()=>{if(N1.hasEverUpdated)return sde++})}const I9=S.createContext({}),NF=S.createContext({}),ude=Symbol.for("motionComponentSymbol");function cde({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&ade(e);function o(s,l){let u;const d={...S.useContext(IF),...s,layoutId:dde(s)},{isStatic:h}=d,m=ode(s),y=h?void 0:lde(),b=r(s,h);if(!h&&Tw){m.visualElement=tde(i,b,d,t);const w=S.useContext(NF),E=S.useContext(DF).strict;m.visualElement&&(u=m.visualElement.loadFeatures(d,E,e,y,w))}return S.createElement(Pw.Provider,{value:m},u&&m.visualElement?S.createElement(u,{visualElement:m.visualElement,...d}):null,n(i,s,y,nde(b,m.visualElement,l),b,h,m.visualElement))}const a=S.forwardRef(o);return a[ude]=i,a}function dde({layoutId:e}){const t=S.useContext(I9).id;return t&&e!==void 0?t+"-"+e:e}function fde(e){function t(r,i={}){return cde(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 hde=["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 D9(e){return typeof e!="string"||e.includes("-")?!1:!!(hde.indexOf(e)>-1||/[A-Z]/.test(e))}const XS={};function pde(e){Object.assign(XS,e)}const Aw=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],d0=new Set(Aw);function $F(e,{layout:t,layoutId:n}){return d0.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!XS[e]||e==="opacity")}const ta=e=>Boolean(e&&e.getVelocity),gde={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mde=Aw.length;function vde(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let a=0;at&&typeof e=="number"?t.transform(e):e,Vm=(e,t,n)=>Math.min(Math.max(n,e),t),np={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$1={...np,transform:e=>Vm(0,1,e)},zb={...np,default:1},F1=e=>Math.round(e*1e5)/1e5,Ey=/(-)?([\d]*\.?[\d])+/g,S_=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,bde=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function r2(e){return typeof e=="string"}const i2=e=>({test:t=>r2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),cd=i2("deg"),Yl=i2("%"),Pt=i2("px"),xde=i2("vh"),Sde=i2("vw"),OL={...Yl,parse:e=>Yl.parse(e)/100,transform:e=>Yl.transform(e*100)},RL={...np,transform:Math.round},BF={borderWidth:Pt,borderTopWidth:Pt,borderRightWidth:Pt,borderBottomWidth:Pt,borderLeftWidth:Pt,borderRadius:Pt,radius:Pt,borderTopLeftRadius:Pt,borderTopRightRadius:Pt,borderBottomRightRadius:Pt,borderBottomLeftRadius:Pt,width:Pt,maxWidth:Pt,height:Pt,maxHeight:Pt,size:Pt,top:Pt,right:Pt,bottom:Pt,left:Pt,padding:Pt,paddingTop:Pt,paddingRight:Pt,paddingBottom:Pt,paddingLeft:Pt,margin:Pt,marginTop:Pt,marginRight:Pt,marginBottom:Pt,marginLeft:Pt,rotate:cd,rotateX:cd,rotateY:cd,rotateZ:cd,scale:zb,scaleX:zb,scaleY:zb,scaleZ:zb,skew:cd,skewX:cd,skewY:cd,distance:Pt,translateX:Pt,translateY:Pt,translateZ:Pt,x:Pt,y:Pt,z:Pt,perspective:Pt,transformPerspective:Pt,opacity:$1,originX:OL,originY:OL,originZ:Pt,zIndex:RL,fillOpacity:$1,strokeOpacity:$1,numOctaves:RL};function j9(e,t,n,r){const{style:i,vars:o,transform:a,transformOrigin:s}=e;let l=!1,u=!1,d=!0;for(const h in t){const m=t[h];if(FF(h)){o[h]=m;continue}const y=BF[h],b=yde(m,y);if(d0.has(h)){if(l=!0,a[h]=b,!d)continue;m!==(y.default||0)&&(d=!1)}else h.startsWith("origin")?(u=!0,s[h]=b):i[h]=b}if(t.transform||(l||r?i.transform=vde(e.transform,n,d,r):i.transform&&(i.transform="none")),u){const{originX:h="50%",originY:m="50%",originZ:y=0}=s;i.transformOrigin=`${h} ${m} ${y}`}}const N9=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zF(e,t,n){for(const r in t)!ta(t[r])&&!$F(r,n)&&(e[r]=t[r])}function wde({transformTemplate:e},t,n){return S.useMemo(()=>{const r=N9();return j9(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cde(e,t,n){const r=e.style||{},i={};return zF(i,r,e),Object.assign(i,wde(e,t,n)),e.transformValues?e.transformValues(i):i}function _de(e,t,n){const r={},i=Cde(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 kde=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 ZS(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||kde.has(e)}let HF=e=>!ZS(e);function Ede(e){e&&(HF=t=>t.startsWith("on")?!ZS(t):e(t))}try{Ede(require("@emotion/is-prop-valid").default)}catch{}function Pde(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(HF(i)||n===!0&&ZS(i)||!t&&!ZS(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function IL(e,t,n){return typeof e=="string"?e:Pt.transform(t+n*e)}function Tde(e,t,n){const r=IL(t,e.x,e.width),i=IL(n,e.y,e.height);return`${r} ${i}`}const Mde={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lde={offset:"strokeDashoffset",array:"strokeDasharray"};function Ade(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Mde:Lde;e[o.offset]=Pt.transform(-r);const a=Pt.transform(t),s=Pt.transform(n);e[o.array]=`${a} ${s}`}function $9(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,d,h){if(j9(e,l,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:y,dimensions:b}=e;m.transform&&(b&&(y.transform=m.transform),delete m.transform),b&&(r!==void 0||i!==void 0||y.transform)&&(y.transformOrigin=Tde(b,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),o!==void 0&&Ade(m,o,a,s,!1)}const WF=()=>({...N9(),attrs:{}}),F9=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ode(e,t,n,r){const i=S.useMemo(()=>{const o=WF();return $9(o,t,{enableHardwareAcceleration:!1},F9(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};zF(o,e.style,e),i.style={...o,...i.style}}return i}function Rde(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(D9(n)?Ode:_de)(r,a,s,n),h={...Pde(r,typeof n=="string",e),...u,ref:o},{children:m}=r,y=S.useMemo(()=>ta(m)?m.get():m,[m]);return i&&(h["data-projection-id"]=i),S.createElement(n,{...h,children:y})}}const B9=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function UF(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 VF=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 GF(e,t,n,r){UF(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(VF.has(i)?i:B9(i),t.attrs[i])}function z9(e,t){const{style:n}=e,r={};for(const i in n)(ta(n[i])||t.style&&ta(t.style[i])||$F(i,e))&&(r[i]=n[i]);return r}function qF(e,t){const n=z9(e,t);for(const r in e)if(ta(e[r])||ta(t[r])){const i=r==="x"||r==="y"?"attr"+r.toUpperCase():r;n[i]=e[r]}return n}function H9(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}const QS=e=>Array.isArray(e),Ide=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),Dde=e=>QS(e)?e[e.length-1]||0:e;function Xx(e){const t=ta(e)?e.get():e;return Ide(t)?t.toValue():t}function jde({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Nde(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const KF=e=>(t,n)=>{const r=S.useContext(Pw),i=S.useContext(n2),o=()=>jde(e,t,r,i);return n?o():R9(o)};function Nde(e,t,n,r){const i={},o=r(e,{});for(const m in o)i[m]=Xx(o[m]);let{initial:a,animate:s}=e;const l=Lw(e),u=jF(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?s:a;return h&&typeof h!="boolean"&&!Mw(h)&&(Array.isArray(h)?h:[h]).forEach(y=>{const b=H9(e,y);if(!b)return;const{transitionEnd:w,transition:E,..._}=b;for(const k in _){let T=_[k];if(Array.isArray(T)){const L=d?T.length-1:0;T=T[L]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const $de={useVisualState:KF({scrapeMotionValuesFromProps:qF,createRenderState:WF,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}$9(n,r,{enableHardwareAcceleration:!1},F9(t.tagName),e.transformTemplate),GF(t,n)}})},Fde={useVisualState:KF({scrapeMotionValuesFromProps:z9,createRenderState:N9})};function Bde(e,{forwardMotionProps:t=!1},n,r){return{...D9(e)?$de:Fde,preloadedFeatures:n,useRender:Rde(t),createVisualElement:r,Component:e}}function Hu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const YF=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ow(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const zde=e=>t=>YF(t)&&e(t,Ow(t));function Gu(e,t,n,r){return Hu(e,t,zde(n),r)}var tr;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(tr||(tr={}));const Hde=(e,t)=>n=>t(e(n)),Nd=(...e)=>e.reduce(Hde);function XF(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const DL=XF("dragHorizontal"),jL=XF("dragVertical");function ZF(e){let t=!1;if(e==="y")t=jL();else if(e==="x")t=DL();else{const n=DL(),r=jL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function QF(){const e=ZF(!0);return e?(e(),!1):!0}let sf=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};function NL(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,a)=>{if(o.type==="touch"||QF())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive(tr.Hover,t),s[r]&&s[r](o,a)};return Gu(e.current,n,i,{passive:!e.getProps()[r]})}class Wde extends sf{mount(){this.unmount=Nd(NL(this.node,!0),NL(this.node,!1))}unmount(){}}class Ude extends sf{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(tr.Focus,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(tr.Focus,!1),this.isActive=!1)}mount(){this.unmount=Nd(Hu(this.node.current,"focus",()=>this.onFocus()),Hu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const JF=(e,t)=>t?e===t?!0:JF(e,t.parentElement):!1,Xl=e=>e;function K5(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ow(n))}class Vde extends sf{constructor(){super(...arguments),this.removeStartListeners=Xl,this.removeEndListeners=Xl,this.removeAccessibleListeners=Xl,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=Gu(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();JF(this.node.current,s.target)?u&&u(s,l):d&&d(s,l)},{passive:!(r.onTap||r.onPointerUp)}),a=Gu(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Nd(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()||K5("up",this.node.getProps().onTap)};this.removeEndListeners(),this.removeEndListeners=Hu(this.node.current,"keyup",a),K5("down",(s,l)=>{this.startPress(s,l)})},n=Hu(this.node.current,"keydown",t),r=()=>{this.isPressing&&K5("cancel",(o,a)=>this.cancelPress(o,a))},i=Hu(this.node.current,"blur",r);this.removeAccessibleListeners=Nd(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive(tr.Tap,!0),r&&r(t,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive(tr.Tap,!1),!QF()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&r(t,n)}mount(){const t=this.node.getProps(),n=Gu(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Hu(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Nd(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const w_=new WeakMap,Y5=new WeakMap,Gde=e=>{const t=w_.get(e.target);t&&t(e)},qde=e=>{e.forEach(Gde)};function Kde({root:e,...t}){const n=e||document;Y5.has(n)||Y5.set(n,{});const r=Y5.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(qde,{root:e,...t})),r[i]}function Yde(e,t,n){const r=Kde(t);return w_.set(e,n),r.observe(e),()=>{w_.delete(e),r.unobserve(e)}}const Xde={some:0,all:1};class Zde extends sf{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive(tr.InView,!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o,fallback:a=!0}=t;if(typeof IntersectionObserver>"u"){a&&this.viewportFallback();return}const s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Xde[i]},l=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(tr.InView,d);const{onViewportEnter:h,onViewportLeave:m}=this.node.getProps(),y=d?h:m;y&&y(u)};return Yde(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Qde(t,n))&&this.startObserver()}unmount(){}}function Qde({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Jde={inView:{Feature:Zde},tap:{Feature:Vde},focus:{Feature:Ude},hover:{Feature:Wde}};function eB(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r/^\-?\d*\.?\d+$/.test(e),tfe=e=>/^0[^.\s]+$/.test(e),qu={delta:0,timestamp:0},tB=1/60*1e3,nfe=typeof performance<"u"?()=>performance.now():()=>Date.now(),nB=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(nfe()),tB);function rfe(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,d=!1)=>{const h=d&&i,m=h?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),h&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=rfe(()=>Py=!0),e),{}),so=o2.reduce((e,t)=>{const n=Rw[t];return e[t]=(r,i=!1,o=!1)=>(Py||afe(),n.schedule(r,i,o)),e},{}),Gd=o2.reduce((e,t)=>(e[t]=Rw[t].cancel,e),{}),X5=o2.reduce((e,t)=>(e[t]=()=>Rw[t].process(qu),e),{}),ofe=e=>Rw[e].process(qu),rB=e=>{Py=!1,qu.delta=C_?tB:Math.max(Math.min(e-qu.timestamp,ife),1),qu.timestamp=e,__=!0,o2.forEach(ofe),__=!1,Py&&(C_=!1,nB(rB))},afe=()=>{Py=!0,C_=!0,__||nB(rB)};function W9(e,t){e.indexOf(t)===-1&&e.push(t)}function U9(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class V9{constructor(){this.subscriptions=[]}add(t){return W9(this.subscriptions,t),()=>U9(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 lfe{constructor(t,n={}){this.version="9.0.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}=qu;this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,so.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=()=>so.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=sfe(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new V9);const r=this.events[t].add(n);return t==="change"?()=>{r(),so.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?G9(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n)||null,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(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gm(e,t){return new lfe(e,t)}const q9=(e,t)=>n=>Boolean(r2(n)&&bde.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),iB=(e,t,n)=>r=>{if(!r2(r))return r;const[i,o,a,s]=r.match(Ey);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},ufe=e=>Vm(0,255,e),Z5={...np,transform:e=>Math.round(ufe(e))},Eh={test:q9("rgb","red"),parse:iB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Z5.transform(e)+", "+Z5.transform(t)+", "+Z5.transform(n)+", "+F1($1.transform(r))+")"};function cfe(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 k_={test:q9("#"),parse:cfe,transform:Eh.transform},Jg={test:q9("hsl","hue"),parse:iB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Yl.transform(F1(t))+", "+Yl.transform(F1(n))+", "+F1($1.transform(r))+")"},bo={test:e=>Eh.test(e)||k_.test(e)||Jg.test(e),parse:e=>Eh.test(e)?Eh.parse(e):Jg.test(e)?Jg.parse(e):k_.parse(e),transform:e=>r2(e)?e:e.hasOwnProperty("red")?Eh.transform(e):Jg.transform(e)},oB="${c}",aB="${n}";function dfe(e){var t,n;return isNaN(e)&&r2(e)&&(((t=e.match(Ey))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(S_))===null||n===void 0?void 0:n.length)||0)>0}function JS(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0,r=0;const i=e.match(S_);i&&(n=i.length,e=e.replace(S_,oB),t.push(...i.map(bo.parse)));const o=e.match(Ey);return o&&(r=o.length,e=e.replace(Ey,aB),t.push(...o.map(np.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function sB(e){return JS(e).values}function lB(e){const{values:t,numColors:n,tokenised:r}=JS(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function hfe(e){const t=sB(e);return lB(e)(t.map(ffe))}const qd={test:dfe,parse:sB,createTransformer:lB,getAnimatableNone:hfe},pfe=new Set(["brightness","contrast","saturate","opacity"]);function gfe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ey)||[];if(!r)return e;const i=n.replace(r,"");let o=pfe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const mfe=/([a-z-]*)\(.*?\)/g,E_={...qd,getAnimatableNone:e=>{const t=e.match(mfe);return t?t.map(gfe).join(" "):e}},vfe={...BF,color:bo,backgroundColor:bo,outlineColor:bo,fill:bo,stroke:bo,borderColor:bo,borderTopColor:bo,borderRightColor:bo,borderBottomColor:bo,borderLeftColor:bo,filter:E_,WebkitFilter:E_},K9=e=>vfe[e];function Y9(e,t){let n=K9(e);return n!==E_&&(n=qd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uB=e=>t=>t.test(e),yfe={test:e=>e==="auto",parse:e=>e},cB=[np,Pt,Yl,cd,Sde,xde,yfe],Hv=e=>cB.find(uB(e)),bfe=[...cB,bo,qd],xfe=e=>bfe.find(uB(e));function Sfe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function wfe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Iw(e,t,n){const r=e.getProps();return H9(r,t,n!==void 0?n:r.custom,Sfe(e),wfe(e))}function Cfe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gm(n))}function _fe(e,t){const n=Iw(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=Dde(o[a]);Cfe(e,a,s)}}function kfe(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;se*1e3,Afe={current:!1},X9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Z9=e=>t=>1-e(1-t),Q9=e=>e*e,Ofe=Z9(Q9),J9=X9(Q9),Fr=(e,t,n)=>-n*e+n*t+e;function Q5(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 Rfe({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=Q5(l,s,e+1/3),o=Q5(l,s,e),a=Q5(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const J5=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Ife=[k_,Eh,Jg],Dfe=e=>Ife.find(t=>t.test(e));function $L(e){const t=Dfe(e);let n=t.parse(e);return t===Jg&&(n=Rfe(n)),n}const dB=(e,t)=>{const n=$L(e),r=$L(t),i={...n};return o=>(i.red=J5(n.red,r.red,o),i.green=J5(n.green,r.green,o),i.blue=J5(n.blue,r.blue,o),i.alpha=Fr(n.alpha,r.alpha,o),Eh.transform(i))};function fB(e,t){return typeof e=="number"?n=>Fr(e,t,n):bo.test(e)?dB(e,t):pB(e,t)}const hB=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>fB(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]=fB(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},pB=(e,t)=>{const n=qd.createTransformer(t),r=JS(e),i=JS(t);return r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Nd(hB(r.values,i.values),n):a=>`${a>0?t:e}`},n3=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},FL=(e,t)=>n=>Fr(e,t,n);function Nfe(e){return typeof e=="number"?FL:typeof e=="string"?bo.test(e)?dB:pB:Array.isArray(e)?hB:typeof e=="object"?jfe:FL}function $fe(e,t,n){const r=[],i=n||Nfe(e[0]),o=e.length-1;for(let a=0;ae[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=$fe(t,r,i),s=a.length,l=u=>{let d=0;if(s>1)for(;dl(Vm(e[0],e[o-1],u)):l}const mB=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ffe=1e-7,Bfe=12;function zfe(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=mB(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Ffe&&++szfe(o,0,1,e,n);return o=>o===0||o===1?o:mB(i(o),t,r)}const yB=e=>1-Math.sin(Math.acos(e)),e8=Z9(yB),Hfe=X9(e8),bB=vB(.33,1.53,.69,.99),t8=Z9(bB),Wfe=X9(t8),Ufe=e=>(e*=2)<1?.5*t8(e):.5*(2-Math.pow(2,-10*(e-1))),Vfe={linear:Xl,easeIn:Q9,easeInOut:J9,easeOut:Ofe,circIn:yB,circInOut:Hfe,circOut:e8,backIn:t8,backInOut:Wfe,backOut:bB,anticipate:Ufe},BL=e=>{if(Array.isArray(e)){t3(e.length===4);const[t,n,r,i]=e;return vB(t,n,r,i)}else if(typeof e=="string")return Vfe[e];return e},Gfe=e=>Array.isArray(e)&&typeof e[0]!="number";function qfe(e,t){return e.map(()=>t||J9).splice(0,e.length-1)}function Kfe(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Yfe(e,t){return e.map(n=>n*t)}function P_({keyframes:e,ease:t=J9,times:n,duration:r=300}){e=[...e];const i=Gfe(t)?t.map(BL):BL(t),o={done:!1,value:e[0]},a=Yfe(n&&n.length===e.length?n:Kfe(e),r);function s(){return gB(a,e,{ease:Array.isArray(i)?i:qfe(e,i)})}let l=s();return{next:u=>(o.value=l(u),o.done=u>=r,o),flipTarget:()=>{e.reverse(),l=s()}}}const eC=.001,Xfe=.01,zL=10,Zfe=.05,Qfe=1;function Jfe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Lfe(e<=zL*1e3);let a=1-t;a=Vm(Zfe,Qfe,a),e=Vm(Xfe,zL,e/1e3),a<1?(i=u=>{const d=u*a,h=d*e,m=d-n,y=T_(u,a),b=Math.exp(-h);return eC-m/y*b},o=u=>{const h=u*a*e,m=h*n+n,y=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-h),w=T_(Math.pow(u,2),a);return(-i(u)+eC>0?-1:1)*((m-y)*b)/w}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-eC+d*h},o=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const s=5/e,l=the(i,o,s);if(e=e*1e3,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 ehe=12;function the(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ihe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!HL(e,rhe)&&HL(e,nhe)){const n=Jfe(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}const ohe=5;function xB({keyframes:e,restDelta:t,restSpeed:n,...r}){let i=e[0],o=e[e.length-1];const a={done:!1,value:i},{stiffness:s,damping:l,mass:u,velocity:d,duration:h,isResolvedFromDuration:m}=ihe(r);let y=ahe,b=d?-(d/1e3):0;const w=l/(2*Math.sqrt(s*u));function E(){const _=o-i,k=Math.sqrt(s/u)/1e3,T=Math.abs(_)<5;if(n||(n=T?.01:2),t||(t=T?.005:.5),w<1){const L=T_(k,w);y=O=>{const D=Math.exp(-w*k*O);return o-D*((b+w*k*_)/L*Math.sin(L*O)+_*Math.cos(L*O))}}else if(w===1)y=L=>o-Math.exp(-k*L)*(_+(b+k*_)*L);else{const L=k*Math.sqrt(w*w-1);y=O=>{const D=Math.exp(-w*k*O),I=Math.min(L*O,300);return o-D*((b+w*k*_)*Math.sinh(I)+L*_*Math.cosh(I))/L}}}return E(),{next:_=>{const k=y(_);if(m)a.done=_>=h;else{let T=b;if(_!==0)if(w<1){const D=Math.max(0,_-ohe);T=G9(k-y(D),_-D)}else T=0;const L=Math.abs(T)<=n,O=Math.abs(o-k)<=t;a.done=L&&O}return a.value=a.done?o:k,a},flipTarget:()=>{b=-b,[i,o]=[o,i],E()}}}xB.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const ahe=e=>0;function she({keyframes:e=[0],velocity:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a=e[0],s={done:!1,value:a};let l=n*t;const u=a+l,d=o===void 0?u:o(u);return d!==u&&(l=d-a),{next:h=>{const m=-l*Math.exp(-h/r);return s.done=!(m>i||m<-i),s.value=s.done?d:d+m,s},flipTarget:()=>{}}}const lhe={decay:she,keyframes:P_,tween:P_,spring:xB};function SB(e,t,n=0){return e-t-n}function uhe(e,t=0,n=0,r=!0){return r?SB(t+-e,t,n):t-(e-t)+n}function che(e,t,n,r){return r?e>=t+n:e<=-n}const dhe=e=>{const t=({delta:n})=>e(n);return{start:()=>so.update(t,!0),stop:()=>Gd.update(t)}};function r3({duration:e,driver:t=dhe,elapsed:n=0,repeat:r=0,repeatType:i="loop",repeatDelay:o=0,keyframes:a,autoplay:s=!0,onPlay:l,onStop:u,onComplete:d,onRepeat:h,onUpdate:m,type:y="keyframes",...b}){const w=n;let E,_=0,k=e,T=!1,L=!0,O;const D=lhe[a.length>2?"keyframes":y]||P_,I=a[0],N=a[a.length-1];let W={done:!1,value:I};const{needsInterpolation:B}=D;B&&B(I,N)&&(O=gB([0,100],[I,N],{clamp:!1}),a=[0,100]);const K=D({...b,duration:e,keyframes:a});function ne(){_++,i==="reverse"?(L=_%2===0,n=uhe(n,k,o,L)):(n=SB(n,k,o),i==="mirror"&&K.flipTarget()),T=!1,h&&h()}function z(){E&&E.stop(),d&&d()}function $(X){L||(X=-X),n+=X,T||(W=K.next(Math.max(0,n)),O&&(W.value=O(W.value)),T=L?W.done:n<=0),m&&m(W.value),T&&(_===0&&(k=k!==void 0?k:n),_{u&&u(),E&&E.stop()},set currentTime(X){n=w,$(X)},sample:X=>{n=w;const Q=e&&typeof e=="number"?Math.max(e*.5,50):50;let G=0;for($(0);G<=X;){const Y=X-G;$(Math.min(Y,Q)),G+=Q}return W}}}function fhe(e){return!e||Array.isArray(e)||typeof e=="string"&&wB[e]}const d1=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wB={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:d1([0,.65,.55,1]),circOut:d1([.55,0,1,.45]),backIn:d1([.31,.01,.66,-.59]),backOut:d1([.33,1.53,.69,.99])};function hhe(e){if(e)return Array.isArray(e)?d1(e):wB[e]}function phe(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){return e.animate({[t]:n,offset:l},{delay:r,duration:i,easing:hhe(s),fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const WL={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},tC={},CB={};for(const e in WL)CB[e]=()=>(tC[e]===void 0&&(tC[e]=WL[e]()),tC[e]);function ghe(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const mhe=new Set(["opacity"]),Hb=10;function vhe(e,t,{onUpdate:n,onComplete:r,...i}){if(!(CB.waapi()&&mhe.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:a,duration:s=300,elapsed:l=0,ease:u}=i;if(i.type==="spring"||!fhe(i.ease)){if(i.repeat===1/0)return;const h=r3({...i,elapsed:0});let m={done:!1,value:a[0]};const y=[];let b=0;for(;!m.done&&b<2e4;)m=h.sample(b),y.push(m.value),b+=Hb;a=y,s=b-Hb,u="linear"}const d=phe(e.owner.current,t,a,{...i,delay:-l,duration:s,ease:u});return d.onfinish=()=>{e.set(ghe(a,i)),so.update(()=>d.cancel()),r&&r()},{get currentTime(){return d.currentTime||0},set currentTime(h){d.currentTime=h},stop:()=>{const{currentTime:h}=d;if(h){const m=r3({...i,autoplay:!1});e.setWithVelocity(m.sample(h-Hb).value,m.sample(h).value,Hb)}so.update(()=>d.cancel())}}}function _B(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Gd.read(r),e(o-t))};return so.read(r,!0),()=>Gd.read(r)}function yhe({keyframes:e,elapsed:t,onUpdate:n,onComplete:r}){const i=()=>{n&&n(e[e.length-1]),r&&r()};return t?{stop:_B(i,-t)}:i()}function bhe({keyframes:e,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:d,onUpdate:h,onComplete:m,onStop:y}){const b=e[0];let w;function E(L){return n!==void 0&&Lr}function _(L){return n===void 0?r:r===void 0||Math.abs(n-L){h&&h(O),L.onUpdate&&L.onUpdate(O)},onComplete:m,onStop:y})}function T(L){k({type:"spring",stiffness:a,damping:s,restDelta:l,...L})}if(E(b))T({velocity:t,keyframes:[b,_(b)]});else{let L=i*t+b;typeof u<"u"&&(L=u(L));const O=_(L),D=O===n?-1:1;let I,N;const W=B=>{I=N,N=B,t=G9(B-I,qu.delta),(D===1&&B>O||D===-1&&Bw&&w.stop()}}const nh=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Wb=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nC=()=>({type:"keyframes",ease:"linear",duration:.3}),xhe={type:"keyframes",duration:.8},UL={x:nh,y:nh,z:nh,rotate:nh,rotateX:nh,rotateY:nh,rotateZ:nh,scaleX:Wb,scaleY:Wb,scale:Wb,opacity:nC,backgroundColor:nC,color:nC,default:Wb},She=(e,{keyframes:t})=>t.length>2?xhe:(UL[e]||UL.default)(t[1]),M_=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&qd.test(t)&&!t.startsWith("url("));function whe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,elapsed:u,...d}){return!!Object.keys(d).length}function VL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function GL(e){return typeof e=="number"?0:Y9("",e)}function kB(e,t){return e[t]||e.default||e}function Che(e,t,n,r){const i=M_(t,n);let o=r.from!==void 0?r.from:e.get();return o==="none"&&i&&typeof n=="string"?o=Y9(t,n):VL(o)&&typeof n=="string"?o=GL(n):!Array.isArray(n)&&VL(n)&&typeof o=="string"&&(n=GL(o)),Array.isArray(n)?(n[0]===null&&(n[0]=o),n):[o,n]}const n8=(e,t,n,r={})=>i=>{const o=kB(r,e)||{},a=o.delay||r.delay||0;let{elapsed:s=0}=r;s=s-Zx(a);const l=Che(t,e,n,o),u=l[0],d=l[l.length-1],h=M_(e,u),m=M_(e,d);let y={keyframes:l,velocity:t.getVelocity(),...o,elapsed:s,onUpdate:b=>{t.set(b),o.onUpdate&&o.onUpdate(b)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(!h||!m||Afe.current||o.type===!1)return yhe(y);if(o.type==="inertia")return bhe(y);if(whe(o)||(y={...y,...She(e,y)}),y.duration&&(y.duration=Zx(y.duration)),y.repeatDelay&&(y.repeatDelay=Zx(y.repeatDelay)),t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const b=vhe(t,e,y);if(b)return b}return r3(y)};function _he(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>L_(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=L_(e,t,n);else{const i=typeof t=="function"?Iw(e,t,n.custom):t;r=EB(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function L_(e,t,n={}){const r=Iw(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>EB(e,r,n):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return khe(e,t,u+l,d,h,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 EB(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const h in s){const m=e.getValue(h),y=s[h];if(!m||y===void 0||d&&Phe(d,h))continue;const b={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!m.hasAnimated){const E=e.getProps()[Mfe];E&&(b.elapsed=window.HandoffAppearAnimations(E,h,m,so))}let w=m.start(n8(h,m,y,e.shouldReduceMotion&&d0.has(h)?{type:!1}:b));e3(l)&&(l.add(h),w=w.then(()=>l.remove(h))),u.push(w)}return Promise.all(u).then(()=>{a&&_fe(e,a)})}function khe(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(Ehe).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(L_(u,t,{...o,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Ehe(e,t){return e.sortNodePosition(t)}function Phe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const r8=[tr.Animate,tr.InView,tr.Focus,tr.Hover,tr.Tap,tr.Drag,tr.Exit],The=[...r8].reverse(),Mhe=r8.length;function Lhe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>_he(e,n,r)))}function Ahe(e){let t=Lhe(e);const n=Rhe();let r=!0;const i=(l,u)=>{const d=Iw(e,u);if(d){const{transition:h,transitionEnd:m,...y}=d;l={...l,...y,...m}}return l};function o(l){t=l(e)}function a(l,u){const d=e.getProps(),h=e.getVariantContext(!0)||{},m=[],y=new Set;let b={},w=1/0;for(let _=0;_w&&O;const B=Array.isArray(L)?L:[L];let K=B.reduce(i,{});D===!1&&(K={});const{prevResolvedValues:ne={}}=T,z={...ne,...K},$=V=>{W=!0,y.delete(V),T.needsAnimating[V]=!0};for(const V in z){const X=K[V],Q=ne[V];b.hasOwnProperty(V)||(X!==Q?QS(X)&&QS(Q)?!eB(X,Q)||N?$(V):T.protectedKeys[V]=!0:X!==void 0?$(V):y.add(V):X!==void 0&&y.has(V)?$(V):T.protectedKeys[V]=!0)}T.prevProp=L,T.prevResolvedValues=K,T.isActive&&(b={...b,...K}),r&&e.blockInitialAnimation&&(W=!1),W&&!I&&m.push(...B.map(V=>({animation:V,options:{type:k,...l}})))}if(y.size){const _={};y.forEach(k=>{const T=e.getBaseTarget(k);T!==void 0&&(_[k]=T)}),m.push({animation:_})}let E=Boolean(m.length);return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(m):Promise.resolve()}function s(l,u,d){if(n[l].isActive===u)return Promise.resolve();e.variantChildren&&e.variantChildren.forEach(m=>{m.animationState&&m.animationState.setActive(l,u)}),n[l].isActive=u;const h=a(d,l);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Ohe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!eB(t,e):!1}function rh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rhe(){return{[tr.Animate]:rh(!0),[tr.InView]:rh(),[tr.Hover]:rh(),[tr.Tap]:rh(),[tr.Drag]:rh(),[tr.Focus]:rh(),[tr.Exit]:rh()}}class Ihe extends sf{constructor(t){super(t),t.animationState||(t.animationState=Ahe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Mw(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 Dhe=0;class jhe extends sf{constructor(){super(...arguments),this.id=Dhe++}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(tr.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 Nhe={animation:{Feature:Ihe},exit:{Feature:jhe}},qL=(e,t)=>Math.abs(e-t);function $he(e,t){const n=qL(e.x,t.x),r=qL(e.y,t.y);return Math.sqrt(n**2+r**2)}class PB{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=iC(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=$he(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=u,{timestamp:y}=qu;this.history.push({...m,timestamp:y});const{onStart:b,onMove:w}=this.handlers;d||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=rC(d,this.transformPagePoint),so.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:h,onSessionEnd:m}=this.handlers,y=iC(u.type==="pointercancel"?this.lastMoveEventInfo:rC(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,y),m&&m(u,y)},!YF(t))return;this.handlers=n,this.transformPagePoint=r;const i=Ow(t),o=rC(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=qu;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,iC(o,this.history)),this.removeListeners=Nd(Gu(window,"pointermove",this.handlePointerMove),Gu(window,"pointerup",this.handlePointerUp),Gu(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gd.update(this.updatePoint)}}function rC(e,t){return t?{point:t(e.point)}:e}function KL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function iC({point:e},t){return{point:e,delta:KL(e,TB(t)),offset:KL(e,Fhe(t)),velocity:Bhe(t,.1)}}function Fhe(e){return e[0]}function TB(e){return e[e.length-1]}function Bhe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=TB(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Zx(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;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 Aa(e){return e.max-e.min}function A_(e,t=0,n=.01){return Math.abs(e-t)<=n}function YL(e,t,n,r=.5){e.origin=r,e.originPoint=Fr(t.min,t.max,e.origin),e.scale=Aa(n)/Aa(t),(A_(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Fr(n.min,n.max,e.origin)-e.originPoint,(A_(e.translate)||isNaN(e.translate))&&(e.translate=0)}function B1(e,t,n,r){YL(e.x,t.x,n.x,r?r.originX:void 0),YL(e.y,t.y,n.y,r?r.originY:void 0)}function XL(e,t,n){e.min=n.min+t.min,e.max=e.min+Aa(t)}function zhe(e,t,n){XL(e.x,t.x,n.x),XL(e.y,t.y,n.y)}function ZL(e,t,n){e.min=t.min-n.min,e.max=e.min+Aa(t)}function z1(e,t,n){ZL(e.x,t.x,n.x),ZL(e.y,t.y,n.y)}function Hhe(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Fr(n,e,r.max):Math.min(e,n)),e}function QL(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 Whe(e,{top:t,left:n,bottom:r,right:i}){return{x:QL(e.x,n,i),y:QL(e.y,t,r)}}function JL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=n3(t.min,t.max-r,e.min):r>i&&(n=n3(e.min,e.max-i,t.min)),Vm(0,1,n)}function Ghe(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 O_=.35;function qhe(e=O_){return e===!1?e=0:e===!0&&(e=O_),{x:eA(e,"left","right"),y:eA(e,"top","bottom")}}function eA(e,t,n){return{min:tA(e,t),max:tA(e,n)}}function tA(e,t){return typeof e=="number"?e:e[t]||0}const nA=()=>({translate:0,scale:1,origin:0,originPoint:0}),H1=()=>({x:nA(),y:nA()}),rA=()=>({min:0,max:0}),gi=()=>({x:rA(),y:rA()});function Al(e){return[e("x"),e("y")]}function MB({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Khe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Yhe(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 oC(e){return e===void 0||e===1}function R_({scale:e,scaleX:t,scaleY:n}){return!oC(e)||!oC(t)||!oC(n)}function dh(e){return R_(e)||LB(e)||e.z||e.rotate||e.rotateX||e.rotateY}function LB(e){return iA(e.x)||iA(e.y)}function iA(e){return e&&e!=="0%"}function i3(e,t,n){const r=e-n,i=t*r;return n+i}function oA(e,t,n,r,i){return i!==void 0&&(e=i3(e,i,r)),i3(e,n,r)+t}function I_(e,t=0,n=1,r,i){e.min=oA(e.min,t,n,r,i),e.max=oA(e.max,t,n,r,i)}function AB(e,{x:t,y:n}){I_(e.x,t.translate,t.scale,t.originPoint),I_(e.y,n.translate,n.scale,n.originPoint)}function Xhe(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 gd(e,t){e.min=e.min+t,e.max=e.max+t}function sA(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=Fr(e.min,e.max,o);I_(e,t[n],t[r],a,t.scale)}const Zhe=["x","scaleX","originX"],Qhe=["y","scaleY","originY"];function em(e,t){sA(e.x,t,Zhe),sA(e.y,t,Qhe)}function OB(e,t){return MB(Yhe(e.getBoundingClientRect(),t))}function Jhe(e,t,n){const r=OB(e,n),{scroll:i}=t;return i&&(gd(r.x,i.offset.x),gd(r.y,i.offset.y)),r}const epe=new WeakMap;class tpe{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=gi(),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(Ow(l,"page").point)},o=(l,u)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ZF(d),!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),Al(b=>{let w=this.getAxisMotionValue(b).get()||0;if(Yl.test(w)){const{projection:E}=this.visualElement;if(E&&E.layout){const _=E.layout.layoutBox[b];_&&(w=Aa(_)*(parseFloat(w)/100))}}this.originPoint[b]=w}),m&&m(l,u);const{animationState:y}=this.visualElement;y&&y.setActive(tr.Drag,!0)},a=(l,u)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:y}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:b}=u;if(h&&this.currentDirection===null){this.currentDirection=npe(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",u.point,b),this.updateAxis("y",u.point,b),this.visualElement.render(),y&&y(l,u)},s=(l,u)=>this.stop(l,u);this.panSession=new PB(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&&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(tr.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ub(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Hhe(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&&Qg(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Whe(r.layoutBox,t):this.constraints=!1,this.elastic=qhe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Al(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Ghe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Qg(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Jhe(r,i.root,this.visualElement.getTransformPagePoint());let a=Uhe(i.layout.layoutBox,o);if(n){const s=n(Khe(a));this.hasMutatedConstraints=!!s,s&&(a=MB(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Al(d=>{if(!Ub(d,n,this.currentDirection))return;let h=l&&l[d]||{};a&&(h={min:0,max:0});const m=i?200:1e6,y=i?40:1e7,b={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(d,b)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(n8(t,r,0,n))}stopAnimation(){Al(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){Al(n=>{const{drag:r}=this.getProps();if(!Ub(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]-Fr(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Qg(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Al(a=>{const s=this.getAxisMotionValue(a);if(s){const l=s.get();i[a]=Vhe({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(),Al(a=>{if(!Ub(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(Fr(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;epe.set(this.visualElement,this);const t=this.visualElement.current,n=Gu(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Qg(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=Hu(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Al(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=l[d].translate,h.set(h.get()+l[d].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=O_,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Ub(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function npe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class rpe extends sf{constructor(t){super(t),this.removeGroupControls=Xl,this.removeListeners=Xl,this.controls=new tpe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xl}unmount(){this.removeGroupControls(),this.removeListeners()}}class ipe extends sf{constructor(){super(...arguments),this.removePointerDownListener=Xl}onPointerDown(t){this.session=new PB(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:t,onStart:n,onMove:r,onEnd:(o,a)=>{delete this.session,i&&i(o,a)}}}mount(){this.removePointerDownListener=Gu(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 RB(){const e=S.useContext(n2);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=S.useId();return S.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function ope(){return ape(S.useContext(n2))}function ape(e){return e===null?!0:e.isPresent}function lA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wv={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Pt.test(e))e=parseFloat(e);else return e;const n=lA(e,t.target.x),r=lA(e,t.target.y);return`${n}% ${r}%`}};function D_(e){return typeof e=="string"&&e.startsWith("var(--")}const IB=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function spe(e){const t=IB.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function j_(e,t,n=1){const[r,i]=spe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():D_(i)?j_(i,t,n+1):i}function lpe(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(!D_(o))return;const a=j_(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!D_(o))continue;const a=j_(o,r);a&&(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const uA="_$css",upe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(IB,y=>(o.push(y),uA)));const a=qd.parse(e);if(a.length>5)return r;const s=qd.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=d;const h=Fr(u,d,.5);typeof a[2+l]=="number"&&(a[2+l]/=h),typeof a[3+l]=="number"&&(a[3+l]/=h);let m=s(a);if(i){let y=0;m=m.replace(uA,()=>{const b=o[y];return y++,b})}return m}};class cpe extends Ke.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;pde(dpe),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()})),N1.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()||so.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!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 DB(e){const[t,n]=RB(),r=S.useContext(I9);return Ke.createElement(cpe,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(NF),isPresent:t,safeToRemove:n})}const dpe={borderRadius:{...Wv,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wv,borderTopRightRadius:Wv,borderBottomLeftRadius:Wv,borderBottomRightRadius:Wv,boxShadow:upe};function fpe(e,t,n={}){const r=ta(e)?e:Gm(e);return r.start(n8("",r,t,n)),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const jB=["TopLeft","TopRight","BottomLeft","BottomRight"],hpe=jB.length,cA=e=>typeof e=="string"?parseFloat(e):e,dA=e=>typeof e=="number"||Pt.test(e);function ppe(e,t,n,r,i,o){i?(e.opacity=Fr(0,n.opacity!==void 0?n.opacity:1,gpe(r)),e.opacityExit=Fr(t.opacity!==void 0?t.opacity:1,0,mpe(r))):o&&(e.opacity=Fr(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(n3(e,t,r))}function hA(e,t){e.min=t.min,e.max=t.max}function Ns(e,t){hA(e.x,t.x),hA(e.y,t.y)}function pA(e,t,n,r,i){return e-=t,e=i3(e,1/n,r),i!==void 0&&(e=i3(e,1/i,r)),e}function vpe(e,t=0,n=1,r=.5,i,o=e,a=e){if(Yl.test(t)&&(t=parseFloat(t),t=Fr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Fr(o.min,o.max,r);e===o&&(s-=t),e.min=pA(e.min,t,n,s,i),e.max=pA(e.max,t,n,s,i)}function gA(e,t,[n,r,i],o,a){vpe(e,t[n],t[r],t[i],t.scale,o,a)}const ype=["x","scaleX","originX"],bpe=["y","scaleY","originY"];function mA(e,t,n,r){gA(e.x,t,ype,n?n.x:void 0,r?r.x:void 0),gA(e.y,t,bpe,n?n.y:void 0,r?r.y:void 0)}function vA(e){return e.translate===0&&e.scale===1}function $B(e){return vA(e.x)&&vA(e.y)}function FB(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 yA(e){return Aa(e.x)/Aa(e.y)}class xpe{constructor(){this.members=[]}add(t){W9(this.members,t),t.scheduleRender()}remove(t){if(U9(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 bA(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:d}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}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 Spe=(e,t)=>e.depth-t.depth;class wpe{constructor(){this.children=[],this.isDirty=!1}add(t){W9(this.children,t),this.isDirty=!0}remove(t){U9(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Spe),this.isDirty=!1,this.children.forEach(t)}}const xA=["","X","Y","Z"],SA=1e3;let Cpe=0;function BB({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t==null?void 0:t()){this.id=Cpe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Epe),this.nodes.forEach(Mpe),this.nodes.forEach(Lpe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=_B(m,250),N1.hasAnimatedSinceResize&&(N1.hasAnimatedSinceResize=!1,this.nodes.forEach(CA))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:m,hasRelativeTargetChanged:y,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||d.getDefaultTransition()||Dpe,{onLayoutAnimationStart:E,onLayoutAnimationComplete:_}=d.getProps(),k=!this.targetLayout||!FB(this.targetLayout,b)||y,T=!m&&y;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||m&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,T);const L={...kB(w,"layout"),onPlay:E,onComplete:_};(d.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L)}else!m&&this.animationProgress===0&&CA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}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,Gd.preRender(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(Ape),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(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 d=0;d{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 L=T/1e3;_A(h.x,a.x,L),_A(h.y,a.y,L),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(z1(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Rpe(this.relativeTarget,this.relativeTargetOrigin,m,L)),w&&(this.animationValues=d,ppe(d,u,this.latestValues,L,k,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},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&&(Gd.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=so.update(()=>{N1.hasAnimatedSinceResize=!0,this.currentAnimation=fpe(0,SA,{...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(SA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:d}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&zB(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||gi();const h=Aa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+h;const m=Aa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}Ns(s,l),em(s,d),B1(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new xpe),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 d=0;d{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(wA),this.root.sharedNodes.clear()}}}function _pe(e){e.updateLayout()}function kpe(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"?Al(h=>{const m=a?n.measuredBox[h]:n.layoutBox[h],y=Aa(m);m.min=r[h].min,m.max=m.min+y}):zB(o,n.layoutBox,r)&&Al(h=>{const m=a?n.measuredBox[h]:n.layoutBox[h],y=Aa(r[h]);m.max=m.min+y});const s=H1();B1(s,r,n.layoutBox);const l=H1();a?B1(l,e.applyTransform(i,!0),n.measuredBox):B1(l,r,n.layoutBox);const u=!$B(s);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:y}=h;if(m&&y){const b=gi();z1(b,n.layoutBox,m.layoutBox);const w=gi();z1(w,r,y.layoutBox),FB(b,w)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Epe(e){e.isProjectionDirty||(e.isProjectionDirty=Boolean(e.parent&&e.parent.isProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=Boolean(e.parent&&e.parent.isTransformDirty))}function Ppe(e){e.clearSnapshot()}function wA(e){e.clearMeasurements()}function Tpe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function CA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Mpe(e){e.resolveTargetDelta()}function Lpe(e){e.calcProjection()}function Ape(e){e.resetRotation()}function Ope(e){e.removeLeadSnapshot()}function _A(e,t,n){e.translate=Fr(t.translate,0,n),e.scale=Fr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kA(e,t,n,r){e.min=Fr(t.min,n.min,r),e.max=Fr(t.max,n.max,r)}function Rpe(e,t,n,r){kA(e.x,t.x,n.x,r),kA(e.y,t.y,n.y,r)}function Ipe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Dpe={duration:.45,ease:[.4,0,.1,1]};function jpe(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function EA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Npe(e){EA(e.x),EA(e.y)}function zB(e,t,n){return e==="position"||e==="preserve-aspect"&&!A_(yA(t),yA(n),.2)}const $pe=BB({attachResizeListener:(e,t)=>Hu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),aC={current:void 0},HB=BB({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!aC.current){const e=new $pe(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),aC.current=e}return aC.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Fpe={pan:{Feature:ipe},drag:{Feature:rpe,ProjectionNode:HB,MeasureLayout:DB}},Bpe=new Set(["width","height","top","left","right","bottom","x","y"]),WB=e=>Bpe.has(e),zpe=e=>Object.keys(e).some(WB),PA=e=>e===np||e===Pt;var TA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(TA||(TA={}));const MA=(e,t)=>parseFloat(e.split(", ")[t]),LA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return MA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?MA(o[1],e):0}},Hpe=new Set(["x","y","z"]),Wpe=Aw.filter(e=>!Hpe.has(e));function Upe(e){const t=[];return Wpe.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 AA={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:LA(4,13),y:LA(5,14)},Vpe=(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]=AA[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(s[u]),e[u]=AA[u](l,o)}),e},Gpe=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(WB);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],h=Hv(d);const m=t[l];let y;if(QS(m)){const b=m.length,w=m[0]===null?1:0;d=m[w],h=Hv(d);for(let E=w;E=0?window.pageYOffset:null,u=Vpe(t,e,s);return o.length&&o.forEach(([d,h])=>{e.getValue(d).set(h)}),e.render(),Tw&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function qpe(e,t,n,r){return zpe(t)?Gpe(e,t,n,r):{target:t,transitionEnd:r}}const Kpe=(e,t,n,r)=>{const i=lpe(e,t,r);return t=i.target,r=i.transitionEnd,qpe(e,t,n,r)},N_={current:null},UB={current:!1};function Ype(){if(UB.current=!0,!!Tw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>N_.current=e.matches;e.addListener(t),t()}else N_.current=!1}function Xpe(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ta(o))e.addValue(i,o),e3(r)&&r.add(i);else if(ta(a))e.addValue(i,Gm(o,{owner:e})),e3(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,Gm(s!==void 0?s:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const VB=Object.keys(ky),Zpe=VB.length,OA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Qpe{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=()=>so.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=Lw(n),this.isVariantNode=jF(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const h in d){const m=d[h];s[h]!==void 0&&ta(m)&&(m.set(s[h],!1),e3(u)&&u.add(h))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,this.projection&&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)),UB.current||Ype(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:N_.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Gd.update(this.notifyUpdate),Gd.render(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=d0.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&so.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,a){let s,l;for(let u=0;uthis.scheduleRender(),animationType:typeof d=="string"?d:"both",initialPromotionConfig:a,layoutScroll:y,layoutRoot:b})}return l}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update(this.props,this.prevProps):(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):gi()}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=Gm(n,{owner:this}),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]: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=H9(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&&!ta(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 V9),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}const GB=["initial",...r8],Jpe=GB.length;class qB extends Qpe{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=Pfe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){kfe(this,r,a);const s=Kpe(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function ege(e){return window.getComputedStyle(e)}class tge extends qB{readValueFromInstance(t,n){if(d0.has(n)){const r=K9(n);return r&&r.default||0}else{const r=ege(t),i=(FF(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return OB(t,n)}build(t,n,r,i){j9(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return z9(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ta(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){UF(t,n,r,i)}}class nge extends qB{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(d0.has(n)){const r=K9(n);return r&&r.default||0}return n=VF.has(n)?n:B9(n),t.getAttribute(n)}measureInstanceViewportBox(){return gi()}scrapeMotionValuesFromProps(t,n){return qF(t,n)}build(t,n,r,i){$9(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){GF(t,n,r,i)}mount(t){this.isSVGTag=F9(t.tagName),super.mount(t)}}const rge=(e,t)=>D9(e)?new nge(t,{enableHardwareAcceleration:!1}):new tge(t,{enableHardwareAcceleration:!0}),ige={layout:{ProjectionNode:HB,MeasureLayout:DB}},oge={...Nhe,...Jde,...Fpe,...ige},su=fde((e,t)=>Bde(e,t,oge,rge));function KB(){const e=S.useRef(!1);return YS(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function age(){const e=KB(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>so.postRender(r),[r]),t]}class sge extends S.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 lge({children:e,isPresent:t}){const n=S.useId(),r=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0});return S.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]),S.createElement(sge,{isPresent:t,childRef:r,sizeRef:i},S.cloneElement(e,{ref:r}))}const sC=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=R9(uge),l=S.useId(),u=S.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:d=>{s.set(d,!0);for(const h of s.values())if(!h)return;r&&r()},register:d=>(s.set(d,!1),()=>s.delete(d))}),o?void 0:[n]);return S.useMemo(()=>{s.forEach((d,h)=>s.set(h,!1))},[n]),S.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=S.createElement(lge,{isPresent:n},e)),S.createElement(n2.Provider,{value:u},e)};function uge(){return new Map}function cge(e){return S.useEffect(()=>()=>e(),[])}const jg=e=>e.key||"";function dge(e,t){e.forEach(n=>{const r=jg(n);t.set(r,n)})}function fge(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const rp=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait");let[s]=age();const l=S.useContext(I9).forceRender;l&&(s=l);const u=KB(),d=fge(e);let h=d;const m=new Set,y=S.useRef(h),b=S.useRef(new Map).current,w=S.useRef(!0);if(YS(()=>{w.current=!1,dge(d,b),y.current=h}),cge(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return S.createElement(S.Fragment,null,h.map(T=>S.createElement(sC,{key:jg(T),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},T)));h=[...h];const E=y.current.map(jg),_=d.map(jg),k=E.length;for(let T=0;T{if(_.indexOf(T)!==-1)return;const L=b.get(T);if(!L)return;const O=E.indexOf(T),D=()=>{b.delete(T),m.delete(T);const I=y.current.findIndex(N=>N.key===T);if(y.current.splice(I,1),!m.size){if(y.current=d,u.current===!1)return;s(),r&&r()}};h.splice(O,0,S.createElement(sC,{key:jg(L),isPresent:!1,onExitComplete:D,custom:t,presenceAffectsLayout:o,mode:a},L))}),h=h.map(T=>{const L=T.key;return m.has(L)?T:S.createElement(sC,{key:jg(T),isPresent:!0,presenceAffectsLayout:o,mode:a},T)}),S.createElement(S.Fragment,null,m.size?h:h.map(T=>S.cloneElement(T)))};var Nl=function(){return Nl=Object.assign||function(t){for(var n,r=1,i=arguments.length;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]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function $_(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r{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]}}},XB=S.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=hge,toastSpacing:d="0.5rem"}=e,[h,m]=S.useState(s),y=ope();rc(()=>{y||r==null||r()},[y]),rc(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{y&&i()};S.useEffect(()=>{y&&o&&i()},[y,o,i]),Jce(E,h);const _=S.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:d,...l}),[l,d]),k=S.useMemo(()=>Zce(a),[a]);return g.jsx(su.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k,children:g.jsx(Ne.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:_,children:ts(n,{id:t,onClose:E})})})});XB.displayName="ToastComponent";function pge(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 IA={path:g.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[g.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"}),g.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"}),g.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ja=Ze((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,d=xt("chakra-icon",s),h=au("Icon",e),m={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l,...h},y={ref:t,focusable:o,className:d,__css:m},b=r??IA.viewBox;if(n&&typeof n!="string")return g.jsx(Ne.svg,{as:n,...y,...u});const w=a??IA.path;return g.jsx(Ne.svg,{verticalAlign:"middle",viewBox:b,...y,...u,children:w})});ja.displayName="Icon";function fc(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=S.Children.toArray(e.path),a=Ze((s,l)=>g.jsx(ja,{ref:l,viewBox:t,...i,...s,children:o.length?o:g.jsx("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function gge(e){return g.jsx(ja,{viewBox:"0 0 24 24",...e,children:g.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 mge(e){return g.jsx(ja,{viewBox:"0 0 24 24",...e,children:g.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 DA(e){return g.jsx(ja,{viewBox:"0 0 24 24",...e,children:g.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 vge=nf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),p0=Ze((e,t)=>{const n=au("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=fr(e),u=xt("chakra-spinner",s),d={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${vge} ${o} linear infinite`,...n};return g.jsx(Ne.div,{ref:t,__css:d,className:u,...l,children:r&&g.jsx(Ne.span,{srOnly:!0,children:r})})});p0.displayName="Spinner";var[yge,bge]=Pn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[xge,i8]=Pn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),ZB={info:{icon:mge,colorScheme:"blue"},warning:{icon:DA,colorScheme:"orange"},success:{icon:gge,colorScheme:"green"},error:{icon:DA,colorScheme:"red"},loading:{icon:p0,colorScheme:"blue"}};function Sge(e){return ZB[e].colorScheme}function wge(e){return ZB[e].icon}var QB=Ze(function(t,n){const i={display:"inline",...i8().description};return g.jsx(Ne.div,{ref:n,...t,className:xt("chakra-alert__desc",t.className),__css:i})});QB.displayName="AlertDescription";function JB(e){const{status:t}=bge(),n=wge(t),r=i8(),i=t==="loading"?r.spinner:r.icon;return g.jsx(Ne.span,{display:"inherit",...e,className:xt("chakra-alert__icon",e.className),__css:i,children:e.children||g.jsx(n,{h:"100%",w:"100%"})})}JB.displayName="AlertIcon";var ez=Ze(function(t,n){const r=i8();return g.jsx(Ne.div,{ref:n,...t,className:xt("chakra-alert__title",t.className),__css:r.title})});ez.displayName="AlertTitle";var tz=Ze(function(t,n){var r;const{status:i="info",addRole:o=!0,...a}=fr(t),s=(r=t.colorScheme)!=null?r:Sge(i),l=Yi("Alert",{...t,colorScheme:s}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return g.jsx(yge,{value:{status:i},children:g.jsx(xge,{value:l,children:g.jsx(Ne.div,{role:o?"alert":void 0,ref:n,...a,className:xt("chakra-alert",t.className),__css:u})})})});tz.displayName="Alert";function Cge(e){return g.jsx(ja,{focusable:"false","aria-hidden":!0,...e,children:g.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 o8=Ze(function(t,n){const r=au("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=fr(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return g.jsx(Ne.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s,children:i||g.jsx(Cge,{width:"1em",height:"1em"})})});o8.displayName="CloseButton";var _ge={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},$l=kge(_ge);function kge(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=Ege(i,o),{position:s,id:l}=a;return r(u=>{var d,h;const y=s.includes("top")?[a,...(d=u[s])!=null?d:[]]:[...(h=u[s])!=null?h:[],a];return{...u,[s]:y}}),l},update:(i,o)=>{i&&r(a=>{const s={...a},{position:l,index:u}=ML(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:nz(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(d=>({...d,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=RF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(ML($l.getState(),i).position)}}var jA=0;function Ege(e,t={}){var n,r;jA+=1;const i=(n=t.id)!=null?n:jA,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>$l.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Pge=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return g.jsxs(tz,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",children:[g.jsx(JB,{children:l}),g.jsxs(Ne.div,{flex:"1",maxWidth:"100%",children:[i&&g.jsx(ez,{id:u==null?void 0:u.title,children:i}),s&&g.jsx(QB,{id:u==null?void 0:u.description,display:"block",children:s})]}),o&&g.jsx(o8,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function nz(e={}){const{render:t,toastComponent:n=Pge}=e;return i=>typeof t=="function"?t({...i,...e}):g.jsx(n,{...i,...e})}function Tge(e,t){const n=i=>{var o;return{...t,...i,position:pge((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),a=nz(o);return $l.notify(a,o)};return r.update=(i,o)=>{$l.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,...ts(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...ts(o.error,s)}))},r.closeAll=$l.closeAll,r.close=$l.close,r.isActive=$l.isActive,r}var[Mge,Lge]=Pn({name:"ToastOptionsContext",strict:!1}),Age=e=>{const t=S.useSyncExternalStore($l.subscribe,$l.getState,$l.getState),{motionVariants:n,component:r=XB,portalProps:i}=e,a=Object.keys(t).map(s=>{const l=t[s];return g.jsx("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${s}`,style:Qce(s),children:g.jsx(rp,{initial:!1,children:l.map(u=>g.jsx(r,{motionVariants:n,...u},u.id))})},s)});return g.jsx(c0,{...i,children:a})};function a2(e){const{theme:t}=eF(),n=Lge();return S.useMemo(()=>Tge(t.direction,{...n,...e}),[e,t.direction,n])}var Oge=e=>function({children:n,theme:r=e,toastOptions:i,...o}){return g.jsxs(Yce,{theme:r,...o,children:[g.jsx(Mge,{value:i==null?void 0:i.defaultOptions,children:n}),g.jsx(Age,{...i})]})},Rge=Oge(cce),Ige=Object.defineProperty,Dge=(e,t,n)=>t in e?Ige(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nr=(e,t,n)=>(Dge(e,typeof t!="symbol"?t+"":t,n),n);function NA(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 jge=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function $A(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function FA(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var F_=typeof window<"u"?S.useLayoutEffect:S.useEffect,o3=e=>e,Nge=class{constructor(){Nr(this,"descendants",new Map),Nr(this,"register",e=>{if(e!=null)return jge(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Nr(this,"unregister",e=>{this.descendants.delete(e);const t=NA(Array.from(this.descendants.keys()));this.assignIndex(t)}),Nr(this,"destroy",()=>{this.descendants.clear()}),Nr(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Nr(this,"count",()=>this.descendants.size),Nr(this,"enabledCount",()=>this.enabledValues().length),Nr(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Nr(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Nr(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Nr(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Nr(this,"first",()=>this.item(0)),Nr(this,"firstEnabled",()=>this.enabledItem(0)),Nr(this,"last",()=>this.item(this.descendants.size-1)),Nr(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Nr(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Nr(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Nr(this,"next",(e,t=!0)=>{const n=$A(e,this.count(),t);return this.item(n)}),Nr(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=$A(r,this.enabledCount(),t);return this.enabledItem(i)}),Nr(this,"prev",(e,t=!0)=>{const n=FA(e,this.count()-1,t);return this.item(n)}),Nr(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=FA(r,this.enabledCount()-1,t);return this.enabledItem(i)}),Nr(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=NA(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function $ge(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 Rn(...e){return t=>{e.forEach(n=>{$ge(n,t)})}}function Fge(...e){return S.useMemo(()=>Rn(...e),e)}function Bge(){const e=S.useRef(new Nge);return F_(()=>()=>e.current.destroy()),e.current}var[zge,rz]=Pn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Hge(e){const t=rz(),[n,r]=S.useState(-1),i=S.useRef(null);F_(()=>()=>{i.current&&t.unregister(i.current)},[]),F_(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=o3(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Rn(o,i)}}function a8(){return[o3(zge),()=>o3(rz()),()=>Bge(),i=>Hge(i)]}var[Wge,Dw]=Pn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Uge,s8]=Pn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Vge,pNe,Gge,qge]=a8(),tm=Ze(function(t,n){const{getButtonProps:r}=s8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...Dw().button};return g.jsx(Ne.button,{...i,className:xt("chakra-accordion__button",t.className),__css:a})});tm.displayName="AccordionButton";function l8(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,y)=>m!==y}=e,o=Qr(r),a=Qr(i),[s,l]=S.useState(n),u=t!==void 0,d=u?t:s,h=Qr(m=>{const b=typeof m=="function"?m(d):m;a(d,b)&&(u||l(b),o(b))},[u,o,d,a]);return[d,h]}function Kge(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Zge(e),Qge(e);const s=Gge(),[l,u]=S.useState(-1);S.useEffect(()=>()=>{u(-1)},[]);const[d,h]=l8({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:d,setIndex:h,htmlProps:a,getAccordionItemProps:y=>{let b=!1;return y!==null&&(b=Array.isArray(d)?d.includes(y):d===y),{isOpen:b,onChange:E=>{if(y!==null)if(i&&Array.isArray(d)){const _=E?d.concat(y):d.filter(k=>k!==y);h(_)}else E?h(y):o&&h(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Yge,u8]=Pn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Xge(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=u8(),s=S.useRef(null),l=S.useId(),u=r??l,d=`accordion-button-${u}`,h=`accordion-panel-${u}`;Jge(e);const{register:m,index:y,descendants:b}=qge({disabled:t&&!n}),{isOpen:w,onChange:E}=o(y===-1?null:y);eme({isOpen:w,isDisabled:t});const _=()=>{E==null||E(!0)},k=()=>{E==null||E(!1)},T=S.useCallback(()=>{E==null||E(!w),a(y)},[y,a,w,E]),L=S.useCallback(N=>{const B={ArrowDown:()=>{const K=b.nextEnabled(y);K==null||K.node.focus()},ArrowUp:()=>{const K=b.prevEnabled(y);K==null||K.node.focus()},Home:()=>{const K=b.firstEnabled();K==null||K.node.focus()},End:()=>{const K=b.lastEnabled();K==null||K.node.focus()}}[N.key];B&&(N.preventDefault(),B(N))},[b,y]),O=S.useCallback(()=>{a(y)},[a,y]),D=S.useCallback(function(W={},B=null){return{...W,type:"button",ref:Rn(m,s,B),id:d,disabled:!!t,"aria-expanded":!!w,"aria-controls":h,onClick:ht(W.onClick,T),onFocus:ht(W.onFocus,O),onKeyDown:ht(W.onKeyDown,L)}},[d,t,w,T,O,L,h,m]),I=S.useCallback(function(W={},B=null){return{...W,ref:B,role:"region",id:h,"aria-labelledby":d,hidden:!w}},[d,w,h]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:_,onClose:k,getButtonProps:D,getPanelProps:I,htmlProps:i}}function Zge(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;Jy({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Qge(e){Jy({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 Jge(e){Jy({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 eme(e){Jy({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function nm(e){const{isOpen:t,isDisabled:n}=s8(),{reduceMotion:r}=u8(),i=xt("chakra-accordion__icon",e.className),o=Dw(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return g.jsx(ja,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:g.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}nm.displayName="AccordionIcon";var rm=Ze(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Xge(t),l={...Dw().container,overflowAnchor:"none"},u=S.useMemo(()=>a,[a]);return g.jsx(Uge,{value:u,children:g.jsx(Ne.div,{ref:n,...o,className:xt("chakra-accordion__item",i),__css:l,children:typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r})})});rm.displayName="AccordionItem";var im={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Ih={enter:{duration:.2,ease:im.easeOut},exit:{duration:.1,ease:im.easeIn}},Ku={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})},tme=e=>e!=null&&parseInt(e.toString(),10)>0,BA={exit:{height:{duration:.2,ease:im.ease},opacity:{duration:.3,ease:im.ease}},enter:{height:{duration:.3,ease:im.ease},opacity:{duration:.4,ease:im.ease}}},nme={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:tme(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(o=n==null?void 0:n.exit)!=null?o:Ku.exit(BA.exit,i)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(o=n==null?void 0:n.enter)!=null?o:Ku.enter(BA.enter,i)}}},iz=S.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:d,...h}=e,[m,y]=S.useState(!1);S.useEffect(()=>{const k=setTimeout(()=>{y(!0)});return()=>clearTimeout(k)},[]),Jy({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:d==null?void 0:d.enter,exit:r?d==null?void 0:d.exit:{...d==null?void 0:d.exit,display:b?"block":"none"}}},E=r?n:!0,_=n||r?"enter":"exit";return g.jsx(rp,{initial:!1,custom:w,children:E&&g.jsx(su.div,{ref:t,...h,className:xt("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:nme,initial:r?"exit":!1,animate:_,exit:"exit"})})});iz.displayName="Collapse";var rme={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Ku.enter(Ih.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:Ku.exit(Ih.exit,n),transitionEnd:t==null?void 0:t.exit}}},oz={initial:"exit",animate:"enter",exit:"exit",variants:rme},ime=S.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,d=i||r?"enter":"exit",h=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return g.jsx(rp,{custom:m,children:h&&g.jsx(su.div,{ref:n,className:xt("chakra-fade",o),custom:m,...oz,animate:d,...u})})});ime.displayName="Fade";var ome={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(o=n==null?void 0:n.exit)!=null?o:Ku.exit(Ih.exit,i)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:Ku.enter(Ih.enter,n),transitionEnd:e==null?void 0:e.enter}}},az={initial:"exit",animate:"enter",exit:"exit",variants:ome},ame=S.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:d,...h}=t,m=r?i&&r:!0,y=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:d};return g.jsx(rp,{custom:b,children:m&&g.jsx(su.div,{ref:n,className:xt("chakra-offset-slide",s),...az,animate:y,custom:b,...h})})});ame.displayName="ScaleFade";var sme={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,x:e,y:t,transition:(o=n==null?void 0:n.exit)!=null?o:Ku.exit(Ih.exit,i),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:Ku.enter(Ih.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{var a;const s={x:t,y:e};return{opacity:0,transition:(a=n==null?void 0:n.exit)!=null?a:Ku.exit(Ih.exit,o),...i?{...s,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...s,...r==null?void 0:r.exit}}}}},B_={initial:"initial",animate:"enter",exit:"exit",variants:sme},lme=S.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:d,delay:h,...m}=t,y=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:d,delay:h};return g.jsx(rp,{custom:w,children:y&&g.jsx(su.div,{ref:n,className:xt("chakra-offset-slide",a),custom:w,...B_,animate:b,...m})})});lme.displayName="SlideFade";var om=Ze(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=u8(),{getPanelProps:s,isOpen:l}=s8(),u=s(o,n),d=xt("chakra-accordion__panel",r),h=Dw();a||delete u.hidden;const m=g.jsx(Ne.div,{...u,__css:h.panel,className:d});return a?m:g.jsx(iz,{in:l,...i,children:m})});om.displayName="AccordionPanel";var c8=Ze(function({children:t,reduceMotion:n,...r},i){const o=Yi("Accordion",r),a=fr(r),{htmlProps:s,descendants:l,...u}=Kge(a),d=S.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return g.jsx(Vge,{value:l,children:g.jsx(Yge,{value:d,children:g.jsx(Wge,{value:o,children:g.jsx(Ne.div,{ref:i,...s,className:xt("chakra-accordion",r.className),__css:o.root,children:t})})})})});c8.displayName="Accordion";var z_=Ze(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return g.jsx("img",{width:r,height:i,ref:n,alt:o,...a})});z_.displayName="NativeImage";function ume(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,d]=S.useState("pending");S.useEffect(()=>{d(n?"loading":"pending")},[n]);const h=S.useRef(),m=S.useCallback(()=>{if(!n)return;y();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=w=>{y(),d("loaded"),i==null||i(w)},b.onerror=w=>{y(),d("failed"),o==null||o(w)},h.current=b},[n,a,r,s,i,o,t]),y=()=>{h.current&&(h.current.onload=null,h.current.onerror=null,h.current=null)};return Vl(()=>{if(!l)return u==="loading"&&m(),()=>{y()}},[u,m,l]),l?"loaded":u}var cme=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function dme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var jw=Ze(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:d,crossOrigin:h,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:y,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||d||!w,_=ume({...t,ignoreFallback:E}),k=cme(_,m),T={ref:n,objectFit:l,objectPosition:s,...E?b:dme(b,["onError","onLoad"])};return k?i||g.jsx(Ne.img,{as:z_,className:"chakra-image__placeholder",src:r,...T}):g.jsx(Ne.img,{as:z_,src:o,srcSet:a,crossOrigin:h,loading:u,referrerPolicy:y,className:"chakra-image",...T})});jw.displayName="Image";function d8(e){return S.Children.toArray(e).filter(t=>S.isValidElement(t))}var[fme,hme]=Pn({strict:!1,name:"ButtonGroupContext"}),pme={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}}},gme={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},Gi=Ze(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,orientation:d="horizontal",...h}=t,m=xt("chakra-button__group",a),y=S.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let b={display:"inline-flex",...l?pme[d]:gme[d](s)};const w=d==="vertical";return g.jsx(fme,{value:y,children:g.jsx(Ne.div,{ref:n,role:"group",__css:b,className:m,"data-attached":l?"":void 0,"data-orientation":d,flexDir:w?"column":void 0,...h})})});Gi.displayName="ButtonGroup";function mme(e){const[t,n]=S.useState(!e);return{ref:S.useCallback(o=>{o&&n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}function H_(e){const{children:t,className:n,...r}=e,i=S.isValidElement(t)?S.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=xt("chakra-button__icon",n);return g.jsx(Ne.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o,children:i})}H_.displayName="ButtonIcon";function a3(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=g.jsx(p0,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=xt("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",d=S.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return g.jsx(Ne.div,{className:l,...s,__css:d,children:i})}a3.displayName="ButtonSpinner";var ss=Ze((e,t)=>{const n=hme(),r=au("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:d,iconSpacing:h="0.5rem",type:m,spinner:y,spinnerPlacement:b="start",className:w,as:E,..._}=fr(e),k=S.useMemo(()=>{const D={...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:D}}},[r,n]),{ref:T,type:L}=mme(E),O={rightIcon:u,leftIcon:l,iconSpacing:h,children:s};return g.jsxs(Ne.button,{ref:Fge(t,T),as:E,type:m??L,"data-active":Bt(a),"data-loading":Bt(o),__css:k,className:xt("chakra-button",w),..._,disabled:i||o,children:[o&&b==="start"&&g.jsx(a3,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:h,children:y}),o?d||g.jsx(Ne.span,{opacity:0,children:g.jsx(zA,{...O})}):g.jsx(zA,{...O}),o&&b==="end"&&g.jsx(a3,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:h,children:y})]})});ss.displayName="Button";function zA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return g.jsxs(g.Fragment,{children:[t&&g.jsx(H_,{marginEnd:i,children:t}),r,n&&g.jsx(H_,{marginStart:i,children:n})]})}var ls=Ze((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=S.isValidElement(s)?S.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return g.jsx(ss,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});ls.displayName="IconButton";var[gNe,vme]=Pn({name:"CheckboxGroupContext",strict:!1});function yme(e){return g.jsx(Ne.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:g.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function bme(e){return g.jsx(Ne.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:g.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function xme(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?bme:yme;return n||t?g.jsx(Ne.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g.jsx(i,{...r})}):null}var[Sme,sz]=Pn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[wme,ip]=Pn({strict:!1,name:"FormControlContext"});function Cme(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=S.useId(),l=t||`field-${s}`,u=`${l}-label`,d=`${l}-feedback`,h=`${l}-helptext`,[m,y]=S.useState(!1),[b,w]=S.useState(!1),[E,_]=S.useState(!1),k=S.useCallback((I={},N=null)=>({id:h,...I,ref:Rn(N,W=>{W&&w(!0)})}),[h]),T=S.useCallback((I={},N=null)=>{var W,B;return{...I,ref:N,"data-focus":Bt(E),"data-disabled":Bt(i),"data-invalid":Bt(r),"data-readonly":Bt(o),id:(W=I.id)!=null?W:u,htmlFor:(B=I.htmlFor)!=null?B:l}},[l,i,E,r,o,u]),L=S.useCallback((I={},N=null)=>({id:d,...I,ref:Rn(N,W=>{W&&y(!0)}),"aria-live":"polite"}),[d]),O=S.useCallback((I={},N=null)=>({...I,...a,ref:N,role:"group"}),[a]),D=S.useCallback((I={},N=null)=>({...I,ref:N,role:"presentation","aria-hidden":!0,children:I.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>_(!0),onBlur:()=>_(!1),hasFeedbackText:m,setHasFeedbackText:y,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:d,helpTextId:h,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:L,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:D}}var sn=Ze(function(t,n){const r=Yi("Form",t),i=fr(t),{getRootProps:o,htmlProps:a,...s}=Cme(i),l=xt("chakra-form-control",t.className);return g.jsx(wme,{value:s,children:g.jsx(Sme,{value:r,children:g.jsx(Ne.div,{...o({},n),className:l,__css:r.container})})})});sn.displayName="FormControl";var sr=Ze(function(t,n){const r=ip(),i=sz(),o=xt("chakra-form__helper-text",t.className);return g.jsx(Ne.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});sr.displayName="FormHelperText";var[_me,kme]=Pn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),lr=Ze((e,t)=>{const n=Yi("FormError",e),r=fr(e),i=ip();return i!=null&&i.isInvalid?g.jsx(_me,{value:n,children:g.jsx(Ne.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:xt("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})}):null});lr.displayName="FormErrorMessage";var Eme=Ze((e,t)=>{const n=kme(),r=ip();if(!(r!=null&&r.isInvalid))return null;const i=xt("chakra-form__error-icon",e.className);return g.jsx(ja,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:g.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"})})});Eme.displayName="FormErrorIcon";var Sn=Ze(function(t,n){var r;const i=au("FormLabel",t),o=fr(t),{className:a,children:s,requiredIndicator:l=g.jsx(lz,{}),optionalIndicator:u=null,...d}=o,h=ip(),m=(r=h==null?void 0:h.getLabelProps(d,n))!=null?r:{ref:n,...d};return g.jsxs(Ne.label,{...m,className:xt("chakra-form__label",o.className),__css:{display:"block",textAlign:"start",...i},children:[s,h!=null&&h.isRequired?l:u]})});Sn.displayName="FormLabel";var lz=Ze(function(t,n){const r=ip(),i=sz();if(!(r!=null&&r.isRequired))return null;const o=xt("chakra-form__required-indicator",t.className);return g.jsx(Ne.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});lz.displayName="RequiredIndicator";function f8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=h8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Uu(n),"aria-required":Uu(i),"aria-readonly":Uu(r)}}function h8(e){var t,n,r;const i=ip(),{id:o,disabled:a,readOnly:s,required:l,isRequired:u,isInvalid:d,isReadOnly:h,isDisabled:m,onFocus:y,onBlur:b,...w}=e,E=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&E.push(i.feedbackId),i!=null&&i.hasHelpText&&E.push(i.helpTextId),{...w,"aria-describedby":E.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=a??m)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=s??h)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=l??u)!=null?r:i==null?void 0:i.isRequired,isInvalid:d??(i==null?void 0:i.isInvalid),onFocus:ht(i==null?void 0:i.onFocus,y),onBlur:ht(i==null?void 0:i.onBlur,b)}}var Pme={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},HA=!1,s2=null,qh=!1,W_=!1,U_=new Set;function p8(e,t){U_.forEach(n=>n(e,t))}var Tme=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Mme(e){return!(e.metaKey||!Tme&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function WA(e){qh=!0,Mme(e)&&(s2="keyboard",p8("keyboard",e))}function xg(e){if(s2="pointer",e.type==="mousedown"||e.type==="pointerdown"){qh=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;p8("pointer",e)}}function Lme(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function Ame(e){Lme(e)&&(qh=!0,s2="virtual")}function Ome(e){e.target===window||e.target===document||(!qh&&!W_&&(s2="virtual",p8("virtual",e)),qh=!1,W_=!1)}function Rme(){qh=!1,W_=!0}function UA(){return s2!=="pointer"}function Ime(){if(typeof window>"u"||HA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){qh=!0,e.apply(this,n)},document.addEventListener("keydown",WA,!0),document.addEventListener("keyup",WA,!0),document.addEventListener("click",Ame,!0),window.addEventListener("focus",Ome,!0),window.addEventListener("blur",Rme,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",xg,!0),document.addEventListener("pointermove",xg,!0),document.addEventListener("pointerup",xg,!0)):(document.addEventListener("mousedown",xg,!0),document.addEventListener("mousemove",xg,!0),document.addEventListener("mouseup",xg,!0)),HA=!0}function uz(e){Ime(),e(UA());const t=()=>e(UA());return U_.add(t),()=>{U_.delete(t)}}function Dme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function cz(e={}){const t=h8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:d,isChecked:h,isFocusable:m,onChange:y,isIndeterminate:b,name:w,value:E,tabIndex:_=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":L,...O}=e,D=Dme(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),I=Qr(y),N=Qr(s),W=Qr(l),[B,K]=S.useState(!1),[ne,z]=S.useState(!1),[$,V]=S.useState(!1),[X,Q]=S.useState(!1);S.useEffect(()=>uz(K),[]);const G=S.useRef(null),[Y,ee]=S.useState(!0),[fe,Ce]=S.useState(!!d),we=h!==void 0,xe=we?h:fe,Le=S.useCallback(Fe=>{if(r||n){Fe.preventDefault();return}we||Ce(xe?Fe.target.checked:b?!0:Fe.target.checked),I==null||I(Fe)},[r,n,xe,we,b,I]);Vl(()=>{G.current&&(G.current.indeterminate=Boolean(b))},[b]),rc(()=>{n&&z(!1)},[n,z]),Vl(()=>{const Fe=G.current;Fe!=null&&Fe.form&&(Fe.form.onreset=()=>{Ce(!!d)})},[]);const Se=n&&!m,Qe=S.useCallback(Fe=>{Fe.key===" "&&Q(!0)},[Q]),Xe=S.useCallback(Fe=>{Fe.key===" "&&Q(!1)},[Q]);Vl(()=>{if(!G.current)return;G.current.checked!==xe&&Ce(G.current.checked)},[G.current]);const tt=S.useCallback((Fe={},at=null)=>{const jt=mt=>{ne&&mt.preventDefault(),Q(!0)};return{...Fe,ref:at,"data-active":Bt(X),"data-hover":Bt($),"data-checked":Bt(xe),"data-focus":Bt(ne),"data-focus-visible":Bt(ne&&B),"data-indeterminate":Bt(b),"data-disabled":Bt(n),"data-invalid":Bt(o),"data-readonly":Bt(r),"aria-hidden":!0,onMouseDown:ht(Fe.onMouseDown,jt),onMouseUp:ht(Fe.onMouseUp,()=>Q(!1)),onMouseEnter:ht(Fe.onMouseEnter,()=>V(!0)),onMouseLeave:ht(Fe.onMouseLeave,()=>V(!1))}},[X,xe,n,ne,B,$,b,o,r]),yt=S.useCallback((Fe={},at=null)=>({...D,...Fe,ref:Rn(at,jt=>{jt&&ee(jt.tagName==="LABEL")}),onClick:ht(Fe.onClick,()=>{var jt;Y||((jt=G.current)==null||jt.click(),requestAnimationFrame(()=>{var mt;(mt=G.current)==null||mt.focus()}))}),"data-disabled":Bt(n),"data-checked":Bt(xe),"data-invalid":Bt(o)}),[D,n,xe,o,Y]),Be=S.useCallback((Fe={},at=null)=>({...Fe,ref:Rn(G,at),type:"checkbox",name:w,value:E,id:a,tabIndex:_,onChange:ht(Fe.onChange,Le),onBlur:ht(Fe.onBlur,N,()=>z(!1)),onFocus:ht(Fe.onFocus,W,()=>z(!0)),onKeyDown:ht(Fe.onKeyDown,Qe),onKeyUp:ht(Fe.onKeyUp,Xe),required:i,checked:xe,disabled:Se,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":L?Boolean(L):o,"aria-describedby":u,"aria-disabled":n,style:Pme}),[w,E,a,Le,N,W,Qe,Xe,i,xe,Se,r,k,T,L,o,u,n,_]),Ae=S.useCallback((Fe={},at=null)=>({...Fe,ref:at,onMouseDown:ht(Fe.onMouseDown,VA),onTouchStart:ht(Fe.onTouchStart,VA),"data-disabled":Bt(n),"data-checked":Bt(xe),"data-invalid":Bt(o)}),[xe,n,o]);return{state:{isInvalid:o,isFocused:ne,isChecked:xe,isActive:X,isHovered:$,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:yt,getCheckboxProps:tt,getInputProps:Be,getLabelProps:Ae,htmlProps:D}}function VA(e){e.preventDefault(),e.stopPropagation()}var jme={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Nme={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},$me=nf({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Fme=nf({from:{opacity:0},to:{opacity:1}}),Bme=nf({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),dz=Ze(function(t,n){const r=vme(),i={...r,...t},o=Yi("Checkbox",i),a=fr(t),{spacing:s="0.5rem",className:l,children:u,iconColor:d,iconSize:h,icon:m=g.jsx(xme,{}),isChecked:y,isDisabled:b=r==null?void 0:r.isDisabled,onChange:w,inputProps:E,..._}=a;let k=y;r!=null&&r.value&&a.value&&(k=r.value.includes(a.value));let T=w;r!=null&&r.onChange&&a.value&&(T=Sw(r.onChange,w));const{state:L,getInputProps:O,getCheckboxProps:D,getLabelProps:I,getRootProps:N}=cz({..._,isDisabled:b,isChecked:k,onChange:T}),W=S.useMemo(()=>({animation:L.isIndeterminate?`${Fme} 20ms linear, ${Bme} 200ms linear`:`${$me} 200ms linear`,fontSize:h,color:d,...o.icon}),[d,h,,L.isIndeterminate,o.icon]),B=S.cloneElement(m,{__css:W,isIndeterminate:L.isIndeterminate,isChecked:L.isChecked});return g.jsxs(Ne.label,{__css:{...Nme,...o.container},className:xt("chakra-checkbox",l),...N(),children:[g.jsx("input",{className:"chakra-checkbox__input",...O(E,n)}),g.jsx(Ne.span,{__css:{...jme,...o.control},className:"chakra-checkbox__control",...D(),children:B}),u&&g.jsx(Ne.span,{className:"chakra-checkbox__label",...I(),__css:{marginStart:s,...o.label},children:u})]})});dz.displayName="Checkbox";function zme(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function g8(e,t){let n=zme(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function V_(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 GA(e,t,n){return(e-t)*100/(n-t)}function Hme(e,t,n){return(n-t)*e+t}function qA(e,t,n){const r=Math.round((e-t)/n)*n+t,i=V_(n);return g8(r,i)}function Qx(e,t,n){return e==null?e:(n{var B;return r==null?"":(B=lC(r,o,n))!=null?B:""}),m=typeof i<"u",y=m?i:d,b=fz(dd(y),o),w=n??b,E=S.useCallback(B=>{B!==y&&(m||h(B.toString()),u==null||u(B.toString(),dd(B)))},[u,m,y]),_=S.useCallback(B=>{let K=B;return l&&(K=Qx(K,a,s)),g8(K,w)},[w,l,s,a]),k=S.useCallback((B=o)=>{let K;y===""?K=dd(B):K=dd(y)+B,K=_(K),E(K)},[_,o,E,y]),T=S.useCallback((B=o)=>{let K;y===""?K=dd(-B):K=dd(y)-B,K=_(K),E(K)},[_,o,E,y]),L=S.useCallback(()=>{var B;let K;r==null?K="":K=(B=lC(r,o,n))!=null?B:a,E(K)},[r,n,o,E,a]),O=S.useCallback(B=>{var K;const ne=(K=lC(B,o,w))!=null?K:a;E(ne)},[w,o,E,a]),D=dd(y);return{isOutOfRange:D>s||D{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o==null||o.removeEventListener(t,i,r)}}function Ume(e){return"current"in e}var hz=()=>typeof window<"u";function Vme(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var Gme=e=>hz()&&e.test(navigator.vendor),qme=e=>hz()&&e.test(Vme()),Kme=()=>qme(/mac|iphone|ipad|ipod/i),Yme=()=>Kme()&&Gme(/apple/i);function Xme(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o,a;return(a=(o=t.current)==null?void 0:o.ownerDocument)!=null?a:document};Dh(i,"pointerdown",o=>{if(!Yme()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const d=Ume(u)?u.current:u;return(d==null?void 0:d.contains(a))||d===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}function m8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var An={},Zme={get exports(){return An},set exports(e){An=e}},Qme="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Jme=Qme,e0e=Jme;function pz(){}function gz(){}gz.resetWarningCache=pz;var t0e=function(){function e(r,i,o,a,s,l){if(l!==e0e){var u=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 u.name="Invariant Violation",u}}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:gz,resetWarningCache:pz};return n.PropTypes=n,n};Zme.exports=t0e();var G_="data-focus-lock",mz="data-focus-lock-disabled",n0e="data-no-focus-lock",r0e="data-autofocus-inside",i0e="data-no-autofocus";function o0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function a0e(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function vz(e,t){return a0e(t||null,function(n){return e.forEach(function(r){return o0e(r,n)})})}var uC={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function yz(e){return e}function bz(e,t){t===void 0&&(t=yz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return i}function v8(e,t){return t===void 0&&(t=yz),bz(e,t)}function xz(e){e===void 0&&(e={});var t=bz(null);return t.options=Nl({async:!0,ssr:!1},e),t}var Sz=function(e){var t=e.sideCar,n=YB(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,Nl({},n))};Sz.isSideCarExport=!0;function s0e(e,t){return e.useMedium(t),Sz}var wz=v8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),Cz=v8(),l0e=v8(),u0e=xz({async:!0}),c0e=[],y8=S.forwardRef(function(t,n){var r,i=S.useState(),o=i[0],a=i[1],s=S.useRef(),l=S.useRef(!1),u=S.useRef(null),d=t.children,h=t.disabled,m=t.noFocusGuards,y=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,_=t.className,k=t.whiteList,T=t.hasPositiveIndices,L=t.shards,O=L===void 0?c0e:L,D=t.as,I=D===void 0?"div":D,N=t.lockProps,W=N===void 0?{}:N,B=t.sideCar,K=t.returnFocus,ne=t.focusOptions,z=t.onActivation,$=t.onDeactivation,V=S.useState({}),X=V[0],Q=S.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&z&&z(s.current),l.current=!0},[z]),G=S.useCallback(function(){l.current=!1,$&&$(s.current)},[$]);S.useEffect(function(){h||(u.current=null)},[]);var Y=S.useCallback(function(Qe){var Xe=u.current;if(Xe&&Xe.focus){var tt=typeof K=="function"?K(Xe):K;if(tt){var yt=typeof tt=="object"?tt:void 0;u.current=null,Qe?Promise.resolve().then(function(){return Xe.focus(yt)}):Xe.focus(yt)}}},[K]),ee=S.useCallback(function(Qe){l.current&&wz.useMedium(Qe)},[]),fe=Cz.useMedium,Ce=S.useCallback(function(Qe){s.current!==Qe&&(s.current=Qe,a(Qe))},[]),we=pn((r={},r[mz]=h&&"disabled",r[G_]=E,r),W),xe=m!==!0,Le=xe&&m!=="tail",Se=vz([n,Ce]);return S.createElement(S.Fragment,null,xe&&[S.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:h?-1:0,style:uC}),T?S.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:h?-1:1,style:uC}):null],!h&&S.createElement(B,{id:X,sideCar:u0e,observed:o,disabled:h,persistentFocus:y,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:Q,onDeactivation:G,returnFocus:Y,focusOptions:ne}),S.createElement(I,pn({ref:Se},we,{className:_,onBlur:fe,onFocus:ee}),d),Le&&S.createElement("div",{"data-focus-guard":!0,tabIndex:h?-1:0,style:uC}))});y8.propTypes={};y8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const _z=y8;function s3(e,t){return s3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},s3(e,t)}function b8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s3(e,t)}function Ks(e){return Ks=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},Ks(e)}function d0e(e,t){if(Ks(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ks(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kz(e){var t=d0e(e,"string");return Ks(t)==="symbol"?t:String(t)}function fs(e,t,n){return t=kz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){b8(d,u);function d(){return u.apply(this,arguments)||this}d.peek=function(){return a};var h=d.prototype;return h.componentDidMount=function(){o.push(this),s()},h.componentDidUpdate=function(){s()},h.componentWillUnmount=function(){var y=o.indexOf(this);o.splice(y,1),s()},h.render=function(){return Ke.createElement(i,this.props)},d}(S.PureComponent);return fs(l,"displayName","SideEffect("+n(i)+")"),l}}var lu=function(e){for(var t=Array(e.length),n=0;n=0}).sort(x0e)},S0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],S8=S0e.join(","),w0e="".concat(S8,", [data-focus-guard]"),Dz=function(e,t){return lu((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?w0e:S8)?[r]:[],Dz(r))},[])},C0e=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?Nw([e.contentDocument.body],t):[e]},Nw=function(e,t){return e.reduce(function(n,r){var i,o=Dz(r,t),a=(i=[]).concat.apply(i,o.map(function(s){return C0e(s,t)}));return n.concat(a,r.parentNode?lu(r.parentNode.querySelectorAll(S8)).filter(function(s){return s===r}):[])},[])},_0e=function(e){var t=e.querySelectorAll("[".concat(r0e,"]"));return lu(t).map(function(n){return Nw([n])}).reduce(function(n,r){return n.concat(r)},[])},w8=function(e,t){return lu(e).filter(function(n){return Mz(t,n)}).filter(function(n){return v0e(n)})},KA=function(e,t){return t===void 0&&(t=new Map),lu(e).filter(function(n){return Lz(t,n)})},q_=function(e,t,n){return Iz(w8(Nw(e,n),t),!0,n)},YA=function(e,t){return Iz(w8(Nw(e),t),!1)},k0e=function(e,t){return w8(_0e(e),t)},_m=function(e,t){return e.shadowRoot?_m(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:lu(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var i=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return i?_m(i,t):!1}return _m(n,t)})},E0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},jz=function(e){return e.parentNode?jz(e.parentNode):e},C8=function(e){var t=l3(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(G_);return n.push.apply(n,i?E0e(lu(jz(r).querySelectorAll("[".concat(G_,'="').concat(i,'"]:not([').concat(mz,'="disabled"])')))):[r]),n},[])},P0e=function(e){try{return e()}catch{return}},Ty=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Ty(t.shadowRoot):t instanceof HTMLIFrameElement&&P0e(function(){return t.contentWindow.document})?Ty(t.contentWindow.document):t}},T0e=function(e,t){return e===t},M0e=function(e,t){return Boolean(lu(e.querySelectorAll("iframe")).some(function(n){return T0e(n,t)}))},Nz=function(e,t){return t===void 0&&(t=Ty(Ez(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:C8(e).some(function(n){return _m(n,t)||M0e(n,t)})},L0e=function(e){e===void 0&&(e=document);var t=Ty(e);return t?lu(e.querySelectorAll("[".concat(n0e,"]"))).some(function(n){return _m(n,t)}):!1},A0e=function(e,t){return t.filter(Rz).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},_8=function(e,t){return Rz(e)&&e.name?A0e(e,t):e},O0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(_8(n,e))}),e.filter(function(n){return t.has(n)})},XA=function(e){return e[0]&&e.length>1?_8(e[0],e):e[0]},ZA=function(e,t){return e.length>1?e.indexOf(_8(e[t],e)):t},$z="NEW_FOCUS",R0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=x8(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,d=r?e.indexOf(r):-1,h=l-u,m=t.indexOf(o),y=t.indexOf(a),b=O0e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),_=ZA(e,0),k=ZA(e,i-1);if(l===-1||d===-1)return $z;if(!h&&d>=0)return d;if(l<=m&&s&&Math.abs(h)>1)return k;if(l>=y&&s&&Math.abs(h)>1)return _;if(h&&Math.abs(E)>1)return d;if(l<=m)return k;if(l>y)return _;if(h)return Math.abs(h)>1?d:(i+d+h)%i}},I0e=function(e){return function(t){var n,r=(n=Az(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},D0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=KA(r.filter(I0e(n)));return i&&i.length?XA(i):XA(KA(t))},K_=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&K_(e.parentNode.host||e.parentNode,t),t},cC=function(e,t){for(var n=K_(e),r=K_(t),i=0;i=0)return o}return!1},Fz=function(e,t,n){var r=l3(e),i=l3(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=cC(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=cC(o,l);u&&(!a||_m(u,a)?a=u:a=cC(u,a))})}),a},j0e=function(e,t){return e.reduce(function(n,r){return n.concat(k0e(r,t))},[])},N0e=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(b0e)},$0e=function(e,t){var n=Ty(l3(e).length>0?document:Ez(e).ownerDocument),r=C8(e).filter(u3),i=Fz(n||e,e,r),o=new Map,a=YA(r,o),s=q_(r,o).filter(function(y){var b=y.node;return u3(b)});if(!(!s[0]&&(s=a,!s[0]))){var l=YA([i],o).map(function(y){var b=y.node;return b}),u=N0e(l,s),d=u.map(function(y){var b=y.node;return b}),h=R0e(d,l,n,t);if(h===$z){var m=D0e(a,d,j0e(r,o));if(m)return{node:m};console.warn("focus-lock: cannot find any node to move focus into");return}return h===void 0?h:u[h]}},F0e=function(e){var t=C8(e).filter(u3),n=Fz(e,e,t),r=new Map,i=q_([n],r,!0),o=q_(t,r).filter(function(a){var s=a.node;return u3(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:x8(s)}})},B0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},dC=0,fC=!1,Bz=function(e,t,n){n===void 0&&(n={});var r=$0e(e,t);if(!fC&&r){if(dC>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),fC=!0,setTimeout(function(){fC=!1},1);return}dC++,B0e(r.node,n.focusOptions),dC--}};function zz(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var z0e=function(){return document&&document.activeElement===document.body},H0e=function(){return z0e()||L0e()},km=null,am=null,Em=null,My=!1,W0e=function(){return!0},U0e=function(t){return(km.whiteList||W0e)(t)},V0e=function(t,n){Em={observerNode:t,portaledElement:n}},G0e=function(t){return Em&&Em.portaledElement===t};function QA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var q0e=function(t){return t&&"current"in t?t.current:t},K0e=function(t){return t?Boolean(My):My==="meanwhile"},Y0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},X0e=function(t,n){return n.some(function(r){return Y0e(t,r,r)})},c3=function(){var t=!1;if(km){var n=km,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||Em&&Em.portaledElement,d=document&&document.activeElement;if(u){var h=[u].concat(a.map(q0e).filter(Boolean));if((!d||U0e(d))&&(i||K0e(s)||!H0e()||!am&&o)&&(u&&!(Nz(h)||d&&X0e(d,h)||G0e(d))&&(document&&!am&&d&&!o?(d.blur&&d.blur(),document.body.focus()):(t=Bz(h,am,{focusOptions:l}),Em={})),My=!1,am=document&&document.activeElement),document){var m=document&&document.activeElement,y=F0e(h),b=y.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(y.filter(function(w){var E=w.guard,_=w.node;return E&&_.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),QA(b,y.length,1,y),QA(b,-1,-1,y))}}}return t},Hz=function(t){c3()&&t&&(t.stopPropagation(),t.preventDefault())},k8=function(){return zz(c3)},Z0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||V0e(r,n)},Q0e=function(){return null},Wz=function(){My="just",setTimeout(function(){My="meanwhile"},0)},J0e=function(){document.addEventListener("focusin",Hz),document.addEventListener("focusout",k8),window.addEventListener("blur",Wz)},eve=function(){document.removeEventListener("focusin",Hz),document.removeEventListener("focusout",k8),window.removeEventListener("blur",Wz)};function tve(e){return e.filter(function(t){var n=t.disabled;return!n})}function nve(e){var t=e.slice(-1)[0];t&&!km&&J0e();var n=km,r=n&&t&&t.id===n.id;km=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(am=null,(!r||n.observed!==t.observed)&&t.onActivation(),c3(),zz(c3)):(eve(),am=null)}wz.assignSyncMedium(Z0e);Cz.assignMedium(k8);l0e.assignMedium(function(e){return e({moveFocusInside:Bz,focusInside:Nz})});const rve=f0e(tve,nve)(Q0e);var Uz=S.forwardRef(function(t,n){return S.createElement(_z,pn({sideCar:rve,ref:n},t))}),Vz=_z.propTypes||{};Vz.sideCar;m8(Vz,["sideCar"]);Uz.propTypes={};const JA=Uz;function Gz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function qz(e){var t;if(!Gz(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function ive(e){var t,n;return(n=(t=Kz(e))==null?void 0:t.defaultView)!=null?n:window}function Kz(e){return Gz(e)?e.ownerDocument:document}function ove(e){return Kz(e).activeElement}var Yz=e=>e.hasAttribute("tabindex"),ave=e=>Yz(e)&&e.tabIndex===-1;function sve(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Xz(e){return e.parentElement&&Xz(e.parentElement)?!0:e.hidden}function lve(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Zz(e){if(!qz(e)||Xz(e)||sve(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]():lve(e)?!0:Yz(e)}function uve(e){return e?qz(e)&&Zz(e)&&!ave(e):!1}var cve=["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]"],dve=cve.join(),fve=e=>e.offsetWidth>0&&e.offsetHeight>0;function Qz(e){const t=Array.from(e.querySelectorAll(dve));return t.unshift(e),t.filter(n=>Zz(n)&&fve(n))}var eO,hve=(eO=JA.default)!=null?eO:JA,Jz=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,d=S.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&Qz(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),h=S.useCallback(()=>{var y;(y=n==null?void 0:n.current)==null||y.focus()},[n]),m=i&&!n;return g.jsx(hve,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:d,onDeactivation:h,returnFocus:m,children:o})};Jz.displayName="FocusLock";var pve=fce?S.useLayoutEffect:S.useEffect;function tO(e,t=[]){const n=S.useRef(e);return pve(()=>{n.current=e}),S.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function gve(e,t){const n=S.useId();return S.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function mve(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Kd(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=tO(n),a=tO(t),[s,l]=S.useState(e.defaultIsOpen||!1),[u,d]=mve(r,s),h=gve(i,"disclosure"),m=S.useCallback(()=>{u||l(!1),a==null||a()},[u,a]),y=S.useCallback(()=>{u||l(!0),o==null||o()},[u,o]),b=S.useCallback(()=>{(d?m:y)()},[d,y,m]);return{isOpen:!!d,onOpen:y,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":d,"aria-controls":h,onClick:vce(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!d,id:h})}}var E8=Ze(function(t,n){const{htmlSize:r,...i}=t,o=Yi("Input",i),a=fr(i),s=f8(a),l=xt("chakra-input",t.className);return g.jsx(Ne.input,{size:r,...s,__css:o.field,ref:n,className:l})});E8.displayName="Input";E8.id="Input";var[vve,eH]=Pn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P8=Ze(function(t,n){const r=Yi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=fr(t),u=d8(i),h=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return g.jsx(vve,{value:r,children:g.jsx(Ne.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...h},...l,children:u})})});P8.displayName="List";var yve=Ze((e,t)=>{const{as:n,...r}=e;return g.jsx(P8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});yve.displayName="OrderedList";var tH=Ze(function(t,n){const{as:r,...i}=t;return g.jsx(P8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});tH.displayName="UnorderedList";var f1=Ze(function(t,n){const r=eH();return g.jsx(Ne.li,{ref:n,...t,__css:r.item})});f1.displayName="ListItem";var bve=Ze(function(t,n){const r=eH();return g.jsx(ja,{ref:n,role:"presentation",...t,__css:r.icon})});bve.displayName="ListIcon";function nH(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ko(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var rH=Ne("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});rH.displayName="Spacer";var Dt=Ze(function(t,n){const r=au("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=fr(t),u=Rce({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return g.jsx(Ne.p,{ref:n,className:xt("chakra-text",t.className),...u,...l,__css:r})});Dt.displayName="Text";var iH=e=>g.jsx(Ne.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});iH.displayName="StackItem";var Y_="& > *:not(style) ~ *:not(style)";function xve(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[Y_]:nH(n,i=>r[i])}}function Sve(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{"&":nH(n,i=>r[i])}}var T8=Ze((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:d,shouldWrapChildren:h,...m}=e,y=n?"row":r??"column",b=S.useMemo(()=>xve({direction:y,spacing:a}),[y,a]),w=S.useMemo(()=>Sve({spacing:a,direction:y}),[a,y]),E=!!u,_=!h&&!E,k=S.useMemo(()=>{const L=d8(l);return _?L:L.map((O,D)=>{const I=typeof O.key<"u"?O.key:D,N=D+1===L.length,B=h?g.jsx(iH,{children:O},I):O;if(!E)return B;const K=S.cloneElement(u,{__css:w}),ne=N?null:K;return g.jsxs(S.Fragment,{children:[B,ne]},I)})},[u,w,E,_,h,l]),T=xt("chakra-stack",d);return g.jsx(Ne.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:E?{}:{[Y_]:b[Y_]},...m,children:k})});T8.displayName="Stack";var hn=Ze((e,t)=>g.jsx(T8,{align:"center",...e,direction:"column",ref:t}));hn.displayName="VStack";var l2=Ze((e,t)=>g.jsx(T8,{align:"center",...e,direction:"row",ref:t}));l2.displayName="HStack";var jh=Ze(function(t,n){const r=au("Heading",t),{className:i,...o}=fr(t);return g.jsx(Ne.h2,{ref:n,className:xt("chakra-heading",t.className),...o,__css:r})});jh.displayName="Heading";var ao=Ne("div");ao.displayName="Box";var oH=Ze(function(t,n){const{size:r,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return g.jsx(ao,{ref:n,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});oH.displayName="Square";var wve=Ze(function(t,n){const{size:r,...i}=t;return g.jsx(oH,{size:r,ref:n,borderRadius:"9999px",...i})});wve.displayName="Circle";var Nh=Ze(function(t,n){const r=au("Link",t),{className:i,isExternal:o,...a}=fr(t);return g.jsx(Ne.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:xt("chakra-link",i),...a,__css:r})});Nh.displayName="Link";var aH=Ne("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});aH.displayName="Center";var Cve={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ze(function(t,n){const{axis:r="both",...i}=t;return g.jsx(Ne.div,{ref:n,__css:Cve[r],...i,position:"absolute"})});var ke=Ze(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...d}=t,h={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return g.jsx(Ne.div,{ref:n,__css:h,...d})});ke.displayName="Flex";function _ve(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function kve(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,i]=S.useState([]),o=S.useRef(),a=()=>{o.current&&(clearTimeout(o.current),o.current=null)},s=()=>{a(),o.current=setTimeout(()=>{i([]),o.current=null},t)};S.useEffect(()=>a,[]);function l(u){return d=>{if(d.key==="Backspace"){const h=[...r];h.pop(),i(h);return}if(_ve(d)){const h=r.concat(d.key);n(d)&&(d.preventDefault(),d.stopPropagation()),i(h),u(h.join("")),s()}}}return l}function Eve(e,t,n,r){if(t==null)return r;if(!r)return e.find(a=>n(a).toLowerCase().startsWith(t.toLowerCase()));const i=e.filter(o=>n(o).toLowerCase().startsWith(t.toLowerCase()));if(i.length>0){let o;return i.includes(r)?(o=i.indexOf(r)+1,o===i.length&&(o=0),i[o]):(o=e.indexOf(i[0]),e[o])}return r}function Pve(){const e=S.useRef(new Map),t=e.current,n=S.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=S.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return S.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function hC(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function sH(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:d,tabIndex:h,onMouseOver:m,onMouseLeave:y,...b}=e,[w,E]=S.useState(!0),[_,k]=S.useState(!1),T=Pve(),L=Q=>{Q&&Q.tagName!=="BUTTON"&&E(!1)},O=w?h:h||0,D=n&&!r,I=S.useCallback(Q=>{if(n){Q.stopPropagation(),Q.preventDefault();return}Q.currentTarget.focus(),l==null||l(Q)},[n,l]),N=S.useCallback(Q=>{_&&hC(Q)&&(Q.preventDefault(),Q.stopPropagation(),k(!1),T.remove(document,"keyup",N,!1))},[_,T]),W=S.useCallback(Q=>{if(u==null||u(Q),n||Q.defaultPrevented||Q.metaKey||!hC(Q.nativeEvent)||w)return;const G=i&&Q.key==="Enter";o&&Q.key===" "&&(Q.preventDefault(),k(!0)),G&&(Q.preventDefault(),Q.currentTarget.click()),T.add(document,"keyup",N,!1)},[n,w,u,i,o,T,N]),B=S.useCallback(Q=>{if(d==null||d(Q),n||Q.defaultPrevented||Q.metaKey||!hC(Q.nativeEvent)||w)return;o&&Q.key===" "&&(Q.preventDefault(),k(!1),Q.currentTarget.click())},[o,w,n,d]),K=S.useCallback(Q=>{Q.button===0&&(k(!1),T.remove(document,"mouseup",K,!1))},[T]),ne=S.useCallback(Q=>{if(Q.button!==0)return;if(n){Q.stopPropagation(),Q.preventDefault();return}w||k(!0),Q.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",K,!1),a==null||a(Q)},[n,w,a,T,K]),z=S.useCallback(Q=>{Q.button===0&&(w||k(!1),s==null||s(Q))},[s,w]),$=S.useCallback(Q=>{if(n){Q.preventDefault();return}m==null||m(Q)},[n,m]),V=S.useCallback(Q=>{_&&(Q.preventDefault(),k(!1)),y==null||y(Q)},[_,y]),X=Rn(t,L);return w?{...b,ref:X,type:"button","aria-disabled":D?void 0:n,disabled:D,onClick:I,onMouseDown:a,onMouseUp:s,onKeyUp:d,onKeyDown:u,onMouseOver:m,onMouseLeave:y}:{...b,ref:X,role:"button","data-active":Bt(_),"aria-disabled":n?"true":void 0,tabIndex:D?void 0:O,onClick:I,onMouseDown:ne,onMouseUp:z,onKeyUp:B,onKeyDown:W,onMouseOver:$,onMouseLeave:V}}function Tve(e){const t=e.current;if(!t)return!1;const n=ove(t);return!n||t.contains(n)?!1:!!uve(n)}function lH(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;rc(()=>{if(!o||Tve(e))return;const a=(i==null?void 0:i.current)||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Mve={preventScroll:!0,shouldFocus:!1};function Lve(e,t=Mve){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Ave(e)?e.current:e,s=i&&o,l=S.useRef(s),u=S.useRef(o);Vl(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const d=S.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var h;(h=n.current)==null||h.focus({preventScroll:r})});else{const h=Qz(a);h.length>0&&requestAnimationFrame(()=>{h[0].focus({preventScroll:r})})}},[o,r,a,n]);rc(()=>{d()},[d]),Dh(a,"transitionend",d)}function Ave(e){return"current"in e}var Sg=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),ii={arrowShadowColor:Sg("--popper-arrow-shadow-color"),arrowSize:Sg("--popper-arrow-size","8px"),arrowSizeHalf:Sg("--popper-arrow-size-half"),arrowBg:Sg("--popper-arrow-bg"),transformOrigin:Sg("--popper-transform-origin"),arrowOffset:Sg("--popper-arrow-offset")};function Ove(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Rve={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"},Ive=e=>Rve[e],nO={scroll:!0,resize:!0};function Dve(e){let t;return typeof e=="object"?t={enabled:!0,options:{...nO,...e}}:t={enabled:e,options:nO},t}var jve={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`}},Nve={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{rO(e)},effect:({state:e})=>()=>{rO(e)}},rO=e=>{e.elements.popper.style.setProperty(ii.transformOrigin.var,Ive(e.placement))},$ve={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Fve(e)}},Fve=e=>{var t;if(!e.placement)return;const n=Bve(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:ii.arrowSize.varRef,height:ii.arrowSize.varRef,zIndex:-1});const r={[ii.arrowSizeHalf.var]:`calc(${ii.arrowSize.varRef} / 2)`,[ii.arrowOffset.var]:`calc(${ii.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Bve=e=>{if(e.startsWith("top"))return{property:"bottom",value:ii.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:ii.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:ii.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:ii.arrowOffset.varRef}},zve={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{iO(e)},effect:({state:e})=>()=>{iO(e)}},iO=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=Ove(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:ii.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},Hve={"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"}},Wve={"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 Uve(e,t="ltr"){var n,r;const i=((n=Hve[e])==null?void 0:n[t])||e;return t==="ltr"?i:(r=Wve[e])!=null?r:i}var Zo="top",us="bottom",cs="right",Qo="left",M8="auto",u2=[Zo,us,cs,Qo],qm="start",Ly="end",Vve="clippingParents",uH="viewport",Uv="popper",Gve="reference",oO=u2.reduce(function(e,t){return e.concat([t+"-"+qm,t+"-"+Ly])},[]),cH=[].concat(u2,[M8]).reduce(function(e,t){return e.concat([t,t+"-"+qm,t+"-"+Ly])},[]),qve="beforeRead",Kve="read",Yve="afterRead",Xve="beforeMain",Zve="main",Qve="afterMain",Jve="beforeWrite",e1e="write",t1e="afterWrite",n1e=[qve,Kve,Yve,Xve,Zve,Qve,Jve,e1e,t1e];function nu(e){return e?(e.nodeName||"").toLowerCase():null}function hs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Kh(e){var t=hs(e).Element;return e instanceof t||e instanceof Element}function is(e){var t=hs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L8(e){if(typeof ShadowRoot>"u")return!1;var t=hs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function r1e(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!is(o)||!nu(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function i1e(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 i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!is(i)||!nu(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const o1e={name:"applyStyles",enabled:!0,phase:"write",fn:r1e,effect:i1e,requires:["computeStyles"]};function Zl(e){return e.split("-")[0]}var $h=Math.max,d3=Math.min,Km=Math.round;function X_(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function dH(){return!/^((?!chrome|android).)*safari/i.test(X_())}function Ym(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&is(e)&&(i=e.offsetWidth>0&&Km(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Km(r.height)/e.offsetHeight||1);var a=Kh(e)?hs(e):window,s=a.visualViewport,l=!dH()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,h=r.width/i,m=r.height/o;return{width:h,height:m,top:d,right:u+h,bottom:d+m,left:u,x:u,y:d}}function A8(e){var t=Ym(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 fH(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ic(e){return hs(e).getComputedStyle(e)}function a1e(e){return["table","td","th"].indexOf(nu(e))>=0}function lf(e){return((Kh(e)?e.ownerDocument:e.document)||window.document).documentElement}function $w(e){return nu(e)==="html"?e:e.assignedSlot||e.parentNode||(L8(e)?e.host:null)||lf(e)}function aO(e){return!is(e)||ic(e).position==="fixed"?null:e.offsetParent}function s1e(e){var t=/firefox/i.test(X_()),n=/Trident/i.test(X_());if(n&&is(e)){var r=ic(e);if(r.position==="fixed")return null}var i=$w(e);for(L8(i)&&(i=i.host);is(i)&&["html","body"].indexOf(nu(i))<0;){var o=ic(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function c2(e){for(var t=hs(e),n=aO(e);n&&a1e(n)&&ic(n).position==="static";)n=aO(n);return n&&(nu(n)==="html"||nu(n)==="body"&&ic(n).position==="static")?t:n||s1e(e)||t}function O8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function W1(e,t,n){return $h(e,d3(t,n))}function l1e(e,t,n){var r=W1(e,t,n);return r>n?n:r}function hH(){return{top:0,right:0,bottom:0,left:0}}function pH(e){return Object.assign({},hH(),e)}function gH(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var u1e=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,pH(typeof t!="number"?t:gH(t,u2))};function c1e(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Zl(n.placement),l=O8(s),u=[Qo,cs].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var h=u1e(i.padding,n),m=A8(o),y=l==="y"?Zo:Qo,b=l==="y"?us:cs,w=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],E=a[l]-n.rects.reference[l],_=c2(o),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,T=w/2-E/2,L=h[y],O=k-m[d]-h[b],D=k/2-m[d]/2+T,I=W1(L,D,O),N=l;n.modifiersData[r]=(t={},t[N]=I,t.centerOffset=I-D,t)}}function d1e(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||fH(t.elements.popper,i)&&(t.elements.arrow=i))}const f1e={name:"arrow",enabled:!0,phase:"main",fn:c1e,effect:d1e,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xm(e){return e.split("-")[1]}var h1e={top:"auto",right:"auto",bottom:"auto",left:"auto"};function p1e(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Km(t*i)/i||0,y:Km(n*i)/i||0}}function sO(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,m=a.x,y=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof d=="function"?d({x:y,y:w}):{x:y,y:w};y=E.x,w=E.y;var _=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Qo,L=Zo,O=window;if(u){var D=c2(n),I="clientHeight",N="clientWidth";if(D===hs(n)&&(D=lf(n),ic(D).position!=="static"&&s==="absolute"&&(I="scrollHeight",N="scrollWidth")),D=D,i===Zo||(i===Qo||i===cs)&&o===Ly){L=us;var W=h&&D===O&&O.visualViewport?O.visualViewport.height:D[I];w-=W-r.height,w*=l?1:-1}if(i===Qo||(i===Zo||i===us)&&o===Ly){T=cs;var B=h&&D===O&&O.visualViewport?O.visualViewport.width:D[N];y-=B-r.width,y*=l?1:-1}}var K=Object.assign({position:s},u&&h1e),ne=d===!0?p1e({x:y,y:w}):{x:y,y:w};if(y=ne.x,w=ne.y,l){var z;return Object.assign({},K,(z={},z[L]=k?"0":"",z[T]=_?"0":"",z.transform=(O.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",z))}return Object.assign({},K,(t={},t[L]=k?w+"px":"",t[T]=_?y+"px":"",t.transform="",t))}function g1e(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Zl(t.placement),variation:Xm(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,sO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,sO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const m1e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g1e,data:{}};var Vb={passive:!0};function v1e(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=hs(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",n.update,Vb)}),s&&l.addEventListener("resize",n.update,Vb),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Vb)}),s&&l.removeEventListener("resize",n.update,Vb)}}const y1e={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:v1e,data:{}};var b1e={left:"right",right:"left",bottom:"top",top:"bottom"};function Jx(e){return e.replace(/left|right|bottom|top/g,function(t){return b1e[t]})}var x1e={start:"end",end:"start"};function lO(e){return e.replace(/start|end/g,function(t){return x1e[t]})}function R8(e){var t=hs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function I8(e){return Ym(lf(e)).left+R8(e).scrollLeft}function S1e(e,t){var n=hs(e),r=lf(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=dH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+I8(e),y:l}}function w1e(e){var t,n=lf(e),r=R8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=$h(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=$h(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+I8(e),l=-r.scrollTop;return ic(i||n).direction==="rtl"&&(s+=$h(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function D8(e){var t=ic(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function mH(e){return["html","body","#document"].indexOf(nu(e))>=0?e.ownerDocument.body:is(e)&&D8(e)?e:mH($w(e))}function U1(e,t){var n;t===void 0&&(t=[]);var r=mH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=hs(r),a=i?[o].concat(o.visualViewport||[],D8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(U1($w(a)))}function Z_(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function C1e(e,t){var n=Ym(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 uO(e,t,n){return t===uH?Z_(S1e(e,n)):Kh(t)?C1e(t,n):Z_(w1e(lf(e)))}function _1e(e){var t=U1($w(e)),n=["absolute","fixed"].indexOf(ic(e).position)>=0,r=n&&is(e)?c2(e):e;return Kh(r)?t.filter(function(i){return Kh(i)&&fH(i,r)&&nu(i)!=="body"}):[]}function k1e(e,t,n,r){var i=t==="clippingParents"?_1e(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var d=uO(e,u,r);return l.top=$h(d.top,l.top),l.right=d3(d.right,l.right),l.bottom=d3(d.bottom,l.bottom),l.left=$h(d.left,l.left),l},uO(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function vH(e){var t=e.reference,n=e.element,r=e.placement,i=r?Zl(r):null,o=r?Xm(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Zo:l={x:a,y:t.y-n.height};break;case us:l={x:a,y:t.y+t.height};break;case cs:l={x:t.x+t.width,y:s};break;case Qo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?O8(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case qm:l[u]=l[u]-(t[d]/2-n[d]/2);break;case Ly:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function Ay(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Vve:s,u=n.rootBoundary,d=u===void 0?uH:u,h=n.elementContext,m=h===void 0?Uv:h,y=n.altBoundary,b=y===void 0?!1:y,w=n.padding,E=w===void 0?0:w,_=pH(typeof E!="number"?E:gH(E,u2)),k=m===Uv?Gve:Uv,T=e.rects.popper,L=e.elements[b?k:m],O=k1e(Kh(L)?L:L.contextElement||lf(e.elements.popper),l,d,a),D=Ym(e.elements.reference),I=vH({reference:D,element:T,strategy:"absolute",placement:i}),N=Z_(Object.assign({},T,I)),W=m===Uv?N:D,B={top:O.top-W.top+_.top,bottom:W.bottom-O.bottom+_.bottom,left:O.left-W.left+_.left,right:W.right-O.right+_.right},K=e.modifiersData.offset;if(m===Uv&&K){var ne=K[i];Object.keys(B).forEach(function(z){var $=[cs,us].indexOf(z)>=0?1:-1,V=[Zo,us].indexOf(z)>=0?"y":"x";B[z]+=ne[V]*$})}return B}function E1e(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?cH:l,d=Xm(r),h=d?s?oO:oO.filter(function(b){return Xm(b)===d}):u2,m=h.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=h);var y=m.reduce(function(b,w){return b[w]=Ay(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Zl(w)],b},{});return Object.keys(y).sort(function(b,w){return y[b]-y[w]})}function P1e(e){if(Zl(e)===M8)return[];var t=Jx(e);return[lO(e),t,lO(t)]}function T1e(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,y=n.flipVariations,b=y===void 0?!0:y,w=n.allowedAutoPlacements,E=t.options.placement,_=Zl(E),k=_===E,T=l||(k||!b?[Jx(E)]:P1e(E)),L=[E].concat(T).reduce(function(xe,Le){return xe.concat(Zl(Le)===M8?E1e(t,{placement:Le,boundary:d,rootBoundary:h,padding:u,flipVariations:b,allowedAutoPlacements:w}):Le)},[]),O=t.rects.reference,D=t.rects.popper,I=new Map,N=!0,W=L[0],B=0;B=0,V=$?"width":"height",X=Ay(t,{placement:K,boundary:d,rootBoundary:h,altBoundary:m,padding:u}),Q=$?z?cs:Qo:z?us:Zo;O[V]>D[V]&&(Q=Jx(Q));var G=Jx(Q),Y=[];if(o&&Y.push(X[ne]<=0),s&&Y.push(X[Q]<=0,X[G]<=0),Y.every(function(xe){return xe})){W=K,N=!1;break}I.set(K,Y)}if(N)for(var ee=b?3:1,fe=function(Le){var Se=L.find(function(Qe){var Xe=I.get(Qe);if(Xe)return Xe.slice(0,Le).every(function(tt){return tt})});if(Se)return W=Se,"break"},Ce=ee;Ce>0;Ce--){var we=fe(Ce);if(we==="break")break}t.placement!==W&&(t.modifiersData[r]._skip=!0,t.placement=W,t.reset=!0)}}const M1e={name:"flip",enabled:!0,phase:"main",fn:T1e,requiresIfExists:["offset"],data:{_skip:!1}};function cO(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 dO(e){return[Zo,cs,us,Qo].some(function(t){return e[t]>=0})}function L1e(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ay(t,{elementContext:"reference"}),s=Ay(t,{altBoundary:!0}),l=cO(a,r),u=cO(s,i,o),d=dO(l),h=dO(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const A1e={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:L1e};function O1e(e,t,n){var r=Zl(e),i=[Qo,Zo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Qo,cs].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function R1e(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=cH.reduce(function(d,h){return d[h]=O1e(h,t.rects,o),d},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const I1e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:R1e};function D1e(e){var t=e.state,n=e.name;t.modifiersData[n]=vH({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const j1e={name:"popperOffsets",enabled:!0,phase:"read",fn:D1e,data:{}};function N1e(e){return e==="x"?"y":"x"}function $1e(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,m=n.tether,y=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=Ay(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:d}),_=Zl(t.placement),k=Xm(t.placement),T=!k,L=O8(_),O=N1e(L),D=t.modifiersData.popperOffsets,I=t.rects.reference,N=t.rects.popper,W=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,B=typeof W=="number"?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),K=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ne={x:0,y:0};if(D){if(o){var z,$=L==="y"?Zo:Qo,V=L==="y"?us:cs,X=L==="y"?"height":"width",Q=D[L],G=Q+E[$],Y=Q-E[V],ee=y?-N[X]/2:0,fe=k===qm?I[X]:N[X],Ce=k===qm?-N[X]:-I[X],we=t.elements.arrow,xe=y&&we?A8(we):{width:0,height:0},Le=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:hH(),Se=Le[$],Qe=Le[V],Xe=W1(0,I[X],xe[X]),tt=T?I[X]/2-ee-Xe-Se-B.mainAxis:fe-Xe-Se-B.mainAxis,yt=T?-I[X]/2+ee+Xe+Qe+B.mainAxis:Ce+Xe+Qe+B.mainAxis,Be=t.elements.arrow&&c2(t.elements.arrow),Ae=Be?L==="y"?Be.clientTop||0:Be.clientLeft||0:0,bt=(z=K==null?void 0:K[L])!=null?z:0,Fe=Q+tt-bt-Ae,at=Q+yt-bt,jt=W1(y?d3(G,Fe):G,Q,y?$h(Y,at):Y);D[L]=jt,ne[L]=jt-Q}if(s){var mt,Zt=L==="x"?Zo:Qo,on=L==="x"?us:cs,se=D[O],Ie=O==="y"?"height":"width",He=se+E[Zt],Ue=se-E[on],ye=[Zo,Qo].indexOf(_)!==-1,je=(mt=K==null?void 0:K[O])!=null?mt:0,vt=ye?He:se-I[Ie]-N[Ie]-je+B.altAxis,Mt=ye?se+I[Ie]+N[Ie]-je-B.altAxis:Ue,Me=y&&ye?l1e(vt,se,Mt):W1(y?vt:He,se,y?Mt:Ue);D[O]=Me,ne[O]=Me-se}t.modifiersData[r]=ne}}const F1e={name:"preventOverflow",enabled:!0,phase:"main",fn:$1e,requiresIfExists:["offset"]};function B1e(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function z1e(e){return e===hs(e)||!is(e)?R8(e):B1e(e)}function H1e(e){var t=e.getBoundingClientRect(),n=Km(t.width)/e.offsetWidth||1,r=Km(t.height)/e.offsetHeight||1;return n!==1||r!==1}function W1e(e,t,n){n===void 0&&(n=!1);var r=is(t),i=is(t)&&H1e(t),o=lf(t),a=Ym(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((nu(t)!=="body"||D8(o))&&(s=z1e(t)),is(t)?(l=Ym(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=I8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function U1e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function V1e(e){var t=U1e(e);return n1e.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function G1e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function q1e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var fO={placement:"bottom",modifiers:[],strategy:"absolute"};function hO(){for(var e=arguments.length,t=new Array(e),n=0;n{}),T=S.useCallback(()=>{var B;!t||!b.current||!w.current||((B=k.current)==null||B.call(k),E.current=X1e(b.current,w.current,{placement:_,modifiers:[zve,$ve,Nve,{...jve,enabled:!!m},{name:"eventListeners",...Dve(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!h,options:{boundary:d}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[_,t,n,m,a,o,s,l,u,h,d,i]);S.useEffect(()=>()=>{var B;!b.current&&!w.current&&((B=E.current)==null||B.destroy(),E.current=null)},[]);const L=S.useCallback(B=>{b.current=B,T()},[T]),O=S.useCallback((B={},K=null)=>({...B,ref:Rn(L,K)}),[L]),D=S.useCallback(B=>{w.current=B,T()},[T]),I=S.useCallback((B={},K=null)=>({...B,ref:Rn(D,K),style:{...B.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,D,m]),N=S.useCallback((B={},K=null)=>{const{size:ne,shadowColor:z,bg:$,style:V,...X}=B;return{...X,ref:K,"data-popper-arrow":"",style:Z1e(B)}},[]),W=S.useCallback((B={},K=null)=>({...B,ref:K,"data-popper-arrow-inner":""}),[]);return{update(){var B;(B=E.current)==null||B.update()},forceUpdate(){var B;(B=E.current)==null||B.forceUpdate()},transformOrigin:ii.transformOrigin.varRef,referenceRef:L,popperRef:D,getPopperProps:I,getArrowProps:N,getArrowInnerProps:W,getReferenceProps:O}}function Z1e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function N8(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=Qr(n),a=Qr(t),[s,l]=S.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,d=r!==void 0,h=S.useId(),m=i??`disclosure-${h}`,y=S.useCallback(()=>{d||l(!1),a==null||a()},[d,a]),b=S.useCallback(()=>{d||l(!0),o==null||o()},[d,o]),w=S.useCallback(()=>{u?y():b()},[u,b,y]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var L;(L=k.onClick)==null||L.call(k,T),w()}}}function _(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:y,onToggle:w,isControlled:d,getButtonProps:E,getDisclosureProps:_}}function Q1e(e){const{ref:t,handler:n,enabled:r=!0}=e,i=Qr(n),a=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;S.useEffect(()=>{if(!r)return;const s=h=>{pC(h,t)&&(a.isPointerDown=!0)},l=h=>{if(a.ignoreEmulatedMouseEvents){a.ignoreEmulatedMouseEvents=!1;return}a.isPointerDown&&n&&pC(h,t)&&(a.isPointerDown=!1,i(h))},u=h=>{a.ignoreEmulatedMouseEvents=!0,n&&a.isPointerDown&&pC(h,t)&&(a.isPointerDown=!1,i(h))},d=yH(t.current);return d.addEventListener("mousedown",s,!0),d.addEventListener("mouseup",l,!0),d.addEventListener("touchstart",s,!0),d.addEventListener("touchend",u,!0),()=>{d.removeEventListener("mousedown",s,!0),d.removeEventListener("mouseup",l,!0),d.removeEventListener("touchstart",s,!0),d.removeEventListener("touchend",u,!0)}},[n,t,i,a,r])}function pC(e,t){var n;const r=e.target;return e.button>0||r&&!yH(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function yH(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function bH(e){const{isOpen:t,ref:n}=e,[r,i]=S.useState(t),[o,a]=S.useState(!1);return S.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Dh(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=ive(n.current),d=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(d)}}}function $8(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[J1e,eye,tye,nye]=a8(),[rye,d2]=Pn({strict:!1,name:"MenuContext"});function iye(e,...t){const n=S.useId(),r=e||n;return S.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}function xH(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function pO(e){return xH(e).activeElement===e}function oye(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:i,autoSelect:o=!0,isLazy:a,isOpen:s,defaultIsOpen:l,onClose:u,onOpen:d,placement:h="bottom-start",lazyBehavior:m="unmount",direction:y,computePositionOnMount:b=!1,...w}=e,E=S.useRef(null),_=S.useRef(null),k=tye(),T=S.useCallback(()=>{requestAnimationFrame(()=>{var we;(we=E.current)==null||we.focus({preventScroll:!1})})},[]),L=S.useCallback(()=>{const we=setTimeout(()=>{var xe;if(i)(xe=i.current)==null||xe.focus();else{const Le=k.firstEnabled();Le&&z(Le.index)}});G.current.add(we)},[k,i]),O=S.useCallback(()=>{const we=setTimeout(()=>{const xe=k.lastEnabled();xe&&z(xe.index)});G.current.add(we)},[k]),D=S.useCallback(()=>{d==null||d(),o?L():T()},[o,L,T,d]),{isOpen:I,onOpen:N,onClose:W,onToggle:B}=N8({isOpen:s,defaultIsOpen:l,onClose:u,onOpen:D});Q1e({enabled:I&&r,ref:E,handler:we=>{var xe;(xe=_.current)!=null&&xe.contains(we.target)||W()}});const K=j8({...w,enabled:I||b,placement:h,direction:y}),[ne,z]=S.useState(-1);rc(()=>{I||z(-1)},[I]),lH(E,{focusRef:_,visible:I,shouldFocus:!0});const $=bH({isOpen:I,ref:E}),[V,X]=iye(t,"menu-button","menu-list"),Q=S.useCallback(()=>{N(),T()},[N,T]),G=S.useRef(new Set([]));fye(()=>{G.current.forEach(we=>clearTimeout(we)),G.current.clear()});const Y=S.useCallback(()=>{N(),L()},[L,N]),ee=S.useCallback(()=>{N(),O()},[N,O]),fe=S.useCallback(()=>{var we,xe;const Le=xH(E.current),Se=(we=E.current)==null?void 0:we.contains(Le.activeElement);if(!(I&&!Se))return;const Xe=(xe=k.item(ne))==null?void 0:xe.node;Xe==null||Xe.focus()},[I,ne,k]),Ce=S.useRef(null);return{openAndFocusMenu:Q,openAndFocusFirstItem:Y,openAndFocusLastItem:ee,onTransitionEnd:fe,unstable__animationState:$,descendants:k,popper:K,buttonId:V,menuId:X,forceUpdate:K.forceUpdate,orientation:"vertical",isOpen:I,onToggle:B,onOpen:N,onClose:W,menuRef:E,buttonRef:_,focusedIndex:ne,closeOnSelect:n,closeOnBlur:r,autoSelect:o,setFocusedIndex:z,isLazy:a,lazyBehavior:m,initialFocusRef:i,rafId:Ce}}function aye(e={},t=null){const n=d2(),{onToggle:r,popper:i,openAndFocusFirstItem:o,openAndFocusLastItem:a}=n,s=S.useCallback(l=>{const u=l.key,h={Enter:o,ArrowDown:o,ArrowUp:a}[u];h&&(l.preventDefault(),l.stopPropagation(),h(l))},[o,a]);return{...e,ref:Rn(n.buttonRef,t,i.referenceRef),id:n.buttonId,"data-active":Bt(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:ht(e.onClick,r),onKeyDown:ht(e.onKeyDown,s)}}function Q_(e){var t;return cye(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function sye(e={},t=null){const n=d2();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:i,menuRef:o,isOpen:a,onClose:s,menuId:l,isLazy:u,lazyBehavior:d,unstable__animationState:h}=n,m=eye(),y=kve({preventDefault:_=>_.key!==" "&&Q_(_.target)}),b=S.useCallback(_=>{const k=_.key,L={Tab:D=>D.preventDefault(),Escape:s,ArrowDown:()=>{const D=m.nextEnabled(r);D&&i(D.index)},ArrowUp:()=>{const D=m.prevEnabled(r);D&&i(D.index)}}[k];if(L){_.preventDefault(),L(_);return}const O=y(D=>{const I=Eve(m.values(),D,N=>{var W,B;return(B=(W=N==null?void 0:N.node)==null?void 0:W.textContent)!=null?B:""},m.item(r));if(I){const N=m.indexOf(I.node);i(N)}});Q_(_.target)&&O(_)},[m,r,y,s,i]),w=S.useRef(!1);a&&(w.current=!0);const E=$8({wasSelected:w.current,enabled:u,mode:d,isSelected:h.present});return{...e,ref:Rn(o,t),children:E?e.children:null,tabIndex:-1,role:"menu",id:l,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:ht(e.onKeyDown,b)}}function lye(e={}){const{popper:t,isOpen:n}=d2();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function uye(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onClick:o,onFocus:a,isDisabled:s,isFocusable:l,closeOnSelect:u,type:d,...h}=e,m=d2(),{setFocusedIndex:y,focusedIndex:b,closeOnSelect:w,onClose:E,menuRef:_,isOpen:k,menuId:T,rafId:L}=m,O=S.useRef(null),D=`${T}-menuitem-${S.useId()}`,{index:I,register:N}=nye({disabled:s&&!l}),W=S.useCallback(Q=>{n==null||n(Q),!s&&y(I)},[y,I,s,n]),B=S.useCallback(Q=>{r==null||r(Q),O.current&&!pO(O.current)&&W(Q)},[W,r]),K=S.useCallback(Q=>{i==null||i(Q),!s&&y(-1)},[y,s,i]),ne=S.useCallback(Q=>{o==null||o(Q),Q_(Q.currentTarget)&&(u??w)&&E()},[E,o,w,u]),z=S.useCallback(Q=>{a==null||a(Q),y(I)},[y,a,I]),$=I===b,V=s&&!l;rc(()=>{k&&($&&!V&&O.current?(L.current&&cancelAnimationFrame(L.current),L.current=requestAnimationFrame(()=>{var Q;(Q=O.current)==null||Q.focus(),L.current=null})):_.current&&!pO(_.current)&&_.current.focus())},[$,V,_,k]);const X=sH({onClick:ne,onFocus:z,onMouseEnter:W,onMouseMove:B,onMouseLeave:K,ref:Rn(N,O,t),isDisabled:s,isFocusable:l});return{...h,...X,type:d??X.type,id:D,role:"menuitem",tabIndex:$?0:-1}}function cye(e){var t;if(!dye(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function dye(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function fye(e,t=[]){return S.useEffect(()=>()=>e(),t)}var[hye,Fw]=Pn({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),SH=e=>{const{children:t}=e,n=Yi("Menu",e),r=fr(e),{direction:i}=Zy(),{descendants:o,...a}=oye({...r,direction:i}),s=S.useMemo(()=>a,[a]),{isOpen:l,onClose:u,forceUpdate:d}=s;return g.jsx(J1e,{value:o,children:g.jsx(rye,{value:s,children:g.jsx(hye,{value:n,children:ts(t,{isOpen:l,onClose:u,forceUpdate:d})})})})};SH.displayName="Menu";var wH=Ze((e,t)=>{const n=Fw();return g.jsx(Ne.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});wH.displayName="MenuCommand";var pye=Ze((e,t)=>{const{type:n,...r}=e,i=Fw(),o=r.as||n?n??void 0:"button",a=S.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...i.item}),[i.item]);return g.jsx(Ne.button,{ref:t,type:o,...r,__css:a})}),CH=e=>{const{className:t,children:n,...r}=e,i=S.Children.only(n),o=S.isValidElement(i)?S.cloneElement(i,{focusable:"false","aria-hidden":!0,className:xt("chakra-menu__icon",i.props.className)}):null,a=xt("chakra-menu__icon-wrapper",t);return g.jsx(Ne.span,{className:a,...r,__css:{flexShrink:0},children:o})};CH.displayName="MenuIcon";var _H=Ze((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:i,commandSpacing:o="0.75rem",children:a,...s}=e,l=uye(s,t),d=n||i?g.jsx("span",{style:{pointerEvents:"none",flex:1},children:a}):a;return g.jsxs(pye,{...l,className:xt("chakra-menu__menuitem",l.className),children:[n&&g.jsx(CH,{fontSize:"0.8em",marginEnd:r,children:n}),d,i&&g.jsx(wH,{marginStart:o,children:i})]})});_H.displayName="MenuItem";var gye={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"}}},mye=Ne(su.div),kH=Ze(function(t,n){var r,i;const{rootProps:o,motionProps:a,...s}=t,{isOpen:l,onTransitionEnd:u,unstable__animationState:d}=d2(),h=sye(s,n),m=lye(o),y=Fw();return g.jsx(Ne.div,{...m,__css:{zIndex:(i=t.zIndex)!=null?i:(r=y.list)==null?void 0:r.zIndex},children:g.jsx(mye,{variants:gye,initial:!1,animate:l?"enter":"exit",__css:{outline:0,...y.list},...a,className:xt("chakra-menu__menu-list",h.className),...h,onUpdate:u,onAnimationComplete:Sw(d.onComplete,h.onAnimationComplete)})})});kH.displayName="MenuList";var vye=Ze((e,t)=>{const n=Fw();return g.jsx(Ne.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),EH=Ze((e,t)=>{const{children:n,as:r,...i}=e,o=aye(i,t),a=r||vye;return g.jsx(a,{...o,className:xt("chakra-menu__menu-button",e.className),children:g.jsx(Ne.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});EH.displayName="MenuButton";var yye={slideInBottom:{...B_,custom:{offsetY:16,reverse:!0}},slideInRight:{...B_,custom:{offsetX:16,reverse:!0}},scale:{...az,custom:{initialScale:.95,reverse:!0}},none:{}},bye=Ne(su.section),xye=e=>yye[e||"none"],PH=S.forwardRef((e,t)=>{const{preset:n,motionProps:r=xye(n),...i}=e;return g.jsx(bye,{ref:t,...r,...i})});PH.displayName="ModalTransition";var Sye=Object.defineProperty,wye=(e,t,n)=>t in e?Sye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cye=(e,t,n)=>(wye(e,typeof t!="symbol"?t+"":t,n),n),_ye=class{constructor(){Cye(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}},J_=new _ye;function TH(e,t){const[n,r]=S.useState(0);return S.useEffect(()=>{const i=e.current;if(i){if(t){const o=J_.add(i);r(o)}return()=>{J_.remove(i),r(0)}}},[t,e]),n}var kye=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wg=new WeakMap,Gb=new WeakMap,qb={},gC=0,MH=function(e){return e&&(e.host||MH(e.parentNode))},Eye=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=MH(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},Pye=function(e,t,n,r){var i=Eye(t,Array.isArray(e)?e:[e]);qb[n]||(qb[n]=new WeakMap);var o=qb[n],a=[],s=new Set,l=new Set(i),u=function(h){!h||s.has(h)||(s.add(h),u(h.parentNode))};i.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(m){if(s.has(m))d(m);else{var y=m.getAttribute(r),b=y!==null&&y!=="false",w=(wg.get(m)||0)+1,E=(o.get(m)||0)+1;wg.set(m,w),o.set(m,E),a.push(m),w===1&&b&&Gb.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return d(t),s.clear(),gC++,function(){a.forEach(function(h){var m=wg.get(h)-1,y=o.get(h)-1;wg.set(h,m),o.set(h,y),m||(Gb.has(h)||h.removeAttribute(r),Gb.delete(h)),y||h.removeAttribute(n)}),gC--,gC||(wg=new WeakMap,wg=new WeakMap,Gb=new WeakMap,qb={})}},LH=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||kye(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Pye(r,i,n,"aria-hidden")):function(){return null}};function Tye(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=S.useRef(null),d=S.useRef(null),[h,m,y]=Lye(r,"chakra-modal","chakra-modal--header","chakra-modal--body");Mye(u,t&&a),TH(u,t);const b=S.useRef(null),w=S.useCallback(N=>{b.current=N.target},[]),E=S.useCallback(N=>{N.key==="Escape"&&(N.stopPropagation(),o&&(n==null||n()),l==null||l())},[o,n,l]),[_,k]=S.useState(!1),[T,L]=S.useState(!1),O=S.useCallback((N={},W=null)=>({role:"dialog",...N,ref:Rn(W,u),id:h,tabIndex:-1,"aria-modal":!0,"aria-labelledby":_?m:void 0,"aria-describedby":T?y:void 0,onClick:ht(N.onClick,B=>B.stopPropagation())}),[y,T,h,m,_]),D=S.useCallback(N=>{N.stopPropagation(),b.current===N.target&&J_.isTopModal(u.current)&&(i&&(n==null||n()),s==null||s())},[n,i,s]),I=S.useCallback((N={},W=null)=>({...N,ref:Rn(W,d),onClick:ht(N.onClick,D),onKeyDown:ht(N.onKeyDown,E),onMouseDown:ht(N.onMouseDown,w)}),[E,w,D]);return{isOpen:t,onClose:n,headerId:m,bodyId:y,setBodyMounted:L,setHeaderMounted:k,dialogRef:u,overlayRef:d,getDialogProps:O,getDialogContainerProps:I}}function Mye(e,t){const n=e.current;S.useEffect(()=>{if(!(!e.current||!t))return LH(e.current)},[t,e,n])}function Lye(e,...t){const n=S.useId(),r=e||n;return S.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[Aye,g0]=Pn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Oye,Yh]=Pn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),Yd=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:i,trapFocus:o,initialFocusRef:a,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:u,allowPinchZoom:d,preserveScrollBarGap:h,motionPreset:m,lockFocusAcrossFrames:y,onCloseComplete:b}=t,w=Yi("Modal",t),_={...Tye(t),autoFocus:i,trapFocus:o,initialFocusRef:a,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:u,allowPinchZoom:d,preserveScrollBarGap:h,motionPreset:m,lockFocusAcrossFrames:y};return g.jsx(Oye,{value:_,children:g.jsx(Aye,{value:w,children:g.jsx(rp,{onExitComplete:b,children:_.isOpen&&g.jsx(c0,{...n,children:r})})})})};Yd.displayName="Modal";var eS="right-scroll-bar-position",tS="width-before-scroll-bar",Rye="with-scroll-bars-hidden",Iye="--removed-body-scroll-bar-size",AH=xz(),mC=function(){},Bw=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:mC,onWheelCapture:mC,onTouchMoveCapture:mC}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,y=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,k=YB(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,L=vz([n,t]),O=Nl(Nl({},k),i);return S.createElement(S.Fragment,null,d&&S.createElement(T,{sideCar:AH,removeScrollBar:u,shards:h,noIsolation:y,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?S.cloneElement(S.Children.only(s),Nl(Nl({},O),{ref:L})):S.createElement(_,Nl({},O,{className:l,ref:L}),s))});Bw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bw.classNames={fullWidth:tS,zeroRight:eS};var gO,Dye=function(){if(gO)return gO;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jye(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Dye();return t&&e.setAttribute("nonce",t),e}function Nye(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $ye(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fye=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jye())&&(Nye(t,n),$ye(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bye=function(){var e=Fye();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},OH=function(){var e=Bye(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},zye={left:0,top:0,right:0,gap:0},vC=function(e){return parseInt(e||"",10)||0},Hye=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[vC(n),vC(r),vC(i)]},Wye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zye;var t=Hye(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])}},Uye=OH(),Vye=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Rye,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(eS,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(tS,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(eS," .").concat(eS,` { - right: 0 `).concat(r,`; - } - - .`).concat(tS," .").concat(tS,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(Iye,": ").concat(s,`px; - } -`)},Gye=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=S.useMemo(function(){return Wye(i)},[i]);return S.createElement(Uye,{styles:Vye(o,!t,i,n?"":"!important")})},ek=!1;if(typeof window<"u")try{var Kb=Object.defineProperty({},"passive",{get:function(){return ek=!0,!0}});window.addEventListener("test",Kb,Kb),window.removeEventListener("test",Kb,Kb)}catch{ek=!1}var Cg=ek?{passive:!1}:!1,qye=function(e){return e.tagName==="TEXTAREA"},RH=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!qye(e)&&n[t]==="visible")},Kye=function(e){return RH(e,"overflowY")},Yye=function(e){return RH(e,"overflowX")},mO=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=IH(e,n);if(r){var i=DH(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Xye=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Zye=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},IH=function(e,t){return e==="v"?Kye(t):Yye(t)},DH=function(e,t){return e==="v"?Xye(t):Zye(t)},Qye=function(e,t){return e==="h"&&t==="rtl"?-1:1},Jye=function(e,t,n,r,i){var o=Qye(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,d=a>0,h=0,m=0;do{var y=DH(e,s),b=y[0],w=y[1],E=y[2],_=w-E-o*b;(b||_)&&IH(e,s)&&(h+=_,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(i&&h===0||!i&&a>h)||!d&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Yb=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vO=function(e){return[e.deltaX,e.deltaY]},yO=function(e){return e&&"current"in e?e.current:e},e2e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},t2e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},n2e=0,_g=[];function r2e(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),i=S.useState(n2e++)[0],o=S.useState(function(){return OH()})[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=$_([e.lockRef.current],(e.shards||[]).map(yO),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=S.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var _=Yb(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-_[0],L="deltaY"in w?w.deltaY:k[1]-_[1],O,D=w.target,I=Math.abs(T)>Math.abs(L)?"h":"v";if("touches"in w&&I==="h"&&D.type==="range")return!1;var N=mO(I,D);if(!N)return!0;if(N?O=I:(O=I==="v"?"h":"v",N=mO(I,D)),!N)return!1;if(!r.current&&"changedTouches"in w&&(T||L)&&(r.current=O),!O)return!0;var W=r.current||O;return Jye(W,E,w,W==="h"?T:L,!0)},[]),l=S.useCallback(function(w){var E=w;if(!(!_g.length||_g[_g.length-1]!==o)){var _="deltaY"in E?vO(E):Yb(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&e2e(O.delta,_)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(yO).filter(Boolean).filter(function(O){return O.contains(E.target)}),L=T.length>0?s(E,T[0]):!a.current.noIsolation;L&&E.cancelable&&E.preventDefault()}}},[]),u=S.useCallback(function(w,E,_,k){var T={name:w,delta:E,target:_,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(L){return L!==T})},1)},[]),d=S.useCallback(function(w){n.current=Yb(w),r.current=void 0},[]),h=S.useCallback(function(w){u(w.type,vO(w),w.target,s(w,e.lockRef.current))},[]),m=S.useCallback(function(w){u(w.type,Yb(w),w.target,s(w,e.lockRef.current))},[]);S.useEffect(function(){return _g.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cg),document.addEventListener("touchmove",l,Cg),document.addEventListener("touchstart",d,Cg),function(){_g=_g.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cg),document.removeEventListener("touchmove",l,Cg),document.removeEventListener("touchstart",d,Cg)}},[]);var y=e.removeScrollBar,b=e.inert;return S.createElement(S.Fragment,null,b?S.createElement(o,{styles:t2e(i)}):null,y?S.createElement(Gye,{gapMode:"margin"}):null)}const i2e=s0e(AH,r2e);var jH=S.forwardRef(function(e,t){return S.createElement(Bw,Nl({},e,{ref:t,sideCar:i2e}))});jH.classNames=Bw.classNames;const NH=jH;function o2e(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:d,isOpen:h}=Yh(),[m,y]=RB();S.useEffect(()=>{!m&&y&&setTimeout(y)},[m,y]);const b=TH(r,h);return g.jsx(Jz,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:d,children:g.jsx(NH,{removeScrollBar:!u,allowPinchZoom:a,enabled:b===1&&o,forwardProps:!0,children:e.children})})}var Xd=Ze((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=Yh(),u=s(a,t),d=l(i),h=xt("chakra-modal__content",n),m=g0(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=Yh();return g.jsx(o2e,{children:g.jsx(Ne.div,{...d,className:"chakra-modal__content-container",tabIndex:-1,__css:b,children:g.jsx(PH,{preset:w,motionProps:o,className:h,...u,__css:y,children:r})})})});Xd.displayName="ModalContent";function $H(e){const{leastDestructiveRef:t,...n}=e;return g.jsx(Yd,{...n,initialFocusRef:t})}var FH=Ze((e,t)=>g.jsx(Xd,{ref:t,role:"alertdialog",...e})),zw=Ze((e,t)=>{const{className:n,...r}=e,i=xt("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...g0().footer};return g.jsx(Ne.footer,{ref:t,...r,__css:a,className:i})});zw.displayName="ModalFooter";var op=Ze((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=Yh();S.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=xt("chakra-modal__header",n),l={flex:0,...g0().header};return g.jsx(Ne.header,{ref:t,className:a,id:i,...r,__css:l})});op.displayName="ModalHeader";var a2e=Ne(su.div),oc=Ze((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=xt("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...g0().overlay},{motionPreset:u}=Yh(),h=i||(u==="none"?{}:oz);return g.jsx(a2e,{...h,__css:l,ref:t,className:a,...o})});oc.displayName="ModalOverlay";var Zm=Ze((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=Yh();S.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=xt("chakra-modal__body",n),s=g0();return g.jsx(Ne.div,{ref:t,className:a,id:i,...r,__css:s.body})});Zm.displayName="ModalBody";var m0=Ze((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=Yh(),a=xt("chakra-modal__close-btn",r),s=g0();return g.jsx(o8,{ref:t,__css:s.closeButton,className:a,onClick:ht(n,l=>{l.stopPropagation(),o()}),...i})});m0.displayName="ModalCloseButton";var s2e=e=>g.jsx(ja,{viewBox:"0 0 24 24",...e,children:g.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"})}),l2e=e=>g.jsx(ja,{viewBox:"0 0 24 24",...e,children:g.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 bO(e,t,n,r){S.useEffect(()=>{var i;if(!e.current||!r)return;const o=(i=e.current.ownerDocument.defaultView)!=null?i:window,a=Array.isArray(t)?t:[t],s=new o.MutationObserver(l=>{for(const u of l)u.type==="attributes"&&u.attributeName&&a.includes(u.attributeName)&&n(u)});return s.observe(e.current,{attributes:!0,attributeFilter:a}),()=>s.disconnect()})}function u2e(e,t){const n=Qr(e);S.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var c2e=50,xO=300;function d2e(e,t){const[n,r]=S.useState(!1),[i,o]=S.useState(null),[a,s]=S.useState(!0),l=S.useRef(null),u=()=>clearTimeout(l.current);u2e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?c2e:null);const d=S.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},xO)},[e,a]),h=S.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},xO)},[t,a]),m=S.useCallback(()=>{s(!0),r(!1),u()},[]);return S.useEffect(()=>()=>u(),[]),{up:d,down:h,stop:m,isSpinning:n}}var f2e=/^[Ee0-9+\-.]$/;function h2e(e){return f2e.test(e)}function p2e(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 g2e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:d,pattern:h="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:y,id:b,onChange:w,precision:E,name:_,"aria-describedby":k,"aria-label":T,"aria-labelledby":L,onFocus:O,onBlur:D,onInvalid:I,getAriaValueText:N,isValidCharacter:W,format:B,parse:K,...ne}=e,z=Qr(O),$=Qr(D),V=Qr(I),X=Qr(W??h2e),Q=Qr(N),G=Wme(e),{update:Y,increment:ee,decrement:fe}=G,[Ce,we]=S.useState(!1),xe=!(s||l),Le=S.useRef(null),Se=S.useRef(null),Qe=S.useRef(null),Xe=S.useRef(null),tt=S.useCallback(Me=>Me.split("").filter(X).join(""),[X]),yt=S.useCallback(Me=>{var Ct;return(Ct=K==null?void 0:K(Me))!=null?Ct:Me},[K]),Be=S.useCallback(Me=>{var Ct;return((Ct=B==null?void 0:B(Me))!=null?Ct:Me).toString()},[B]);rc(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Le.current)return;if(Le.current.value!=G.value){const Ct=yt(Le.current.value);G.setValue(tt(Ct))}},[yt,tt]);const Ae=S.useCallback((Me=a)=>{xe&&ee(Me)},[ee,xe,a]),bt=S.useCallback((Me=a)=>{xe&&fe(Me)},[fe,xe,a]),Fe=d2e(Ae,bt);bO(Qe,"disabled",Fe.stop,Fe.isSpinning),bO(Xe,"disabled",Fe.stop,Fe.isSpinning);const at=S.useCallback(Me=>{if(Me.nativeEvent.isComposing)return;const zt=yt(Me.currentTarget.value);Y(tt(zt)),Se.current={start:Me.currentTarget.selectionStart,end:Me.currentTarget.selectionEnd}},[Y,tt,yt]),jt=S.useCallback(Me=>{var Ct,zt,$n;z==null||z(Me),Se.current&&(Me.target.selectionStart=(zt=Se.current.start)!=null?zt:(Ct=Me.currentTarget.value)==null?void 0:Ct.length,Me.currentTarget.selectionEnd=($n=Se.current.end)!=null?$n:Me.currentTarget.selectionStart)},[z]),mt=S.useCallback(Me=>{if(Me.nativeEvent.isComposing)return;p2e(Me,X)||Me.preventDefault();const Ct=Zt(Me)*a,zt=Me.key,qe={ArrowUp:()=>Ae(Ct),ArrowDown:()=>bt(Ct),Home:()=>Y(i),End:()=>Y(o)}[zt];qe&&(Me.preventDefault(),qe(Me))},[X,a,Ae,bt,Y,i,o]),Zt=Me=>{let Ct=1;return(Me.metaKey||Me.ctrlKey)&&(Ct=.1),Me.shiftKey&&(Ct=10),Ct},on=S.useMemo(()=>{const Me=Q==null?void 0:Q(G.value);if(Me!=null)return Me;const Ct=G.value.toString();return Ct||void 0},[G.value,Q]),se=S.useCallback(()=>{let Me=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(Me=o),G.cast(Me))},[G,o,i]),Ie=S.useCallback(()=>{we(!1),n&&se()},[n,we,se]),He=S.useCallback(()=>{t&&requestAnimationFrame(()=>{var Me;(Me=Le.current)==null||Me.focus()})},[t]),Ue=S.useCallback(Me=>{Me.preventDefault(),Fe.up(),He()},[He,Fe]),ye=S.useCallback(Me=>{Me.preventDefault(),Fe.down(),He()},[He,Fe]);Dh(()=>Le.current,"wheel",Me=>{var Ct,zt;const qe=((zt=(Ct=Le.current)==null?void 0:Ct.ownerDocument)!=null?zt:document).activeElement===Le.current;if(!y||!qe)return;Me.preventDefault();const pt=Zt(Me)*a,zr=Math.sign(Me.deltaY);zr===-1?Ae(pt):zr===1&&bt(pt)},{passive:!1});const je=S.useCallback((Me={},Ct=null)=>{const zt=l||r&&G.isAtMax;return{...Me,ref:Rn(Ct,Qe),role:"button",tabIndex:-1,onPointerDown:ht(Me.onPointerDown,$n=>{$n.button!==0||zt||Ue($n)}),onPointerLeave:ht(Me.onPointerLeave,Fe.stop),onPointerUp:ht(Me.onPointerUp,Fe.stop),disabled:zt,"aria-disabled":Uu(zt)}},[G.isAtMax,r,Ue,Fe.stop,l]),vt=S.useCallback((Me={},Ct=null)=>{const zt=l||r&&G.isAtMin;return{...Me,ref:Rn(Ct,Xe),role:"button",tabIndex:-1,onPointerDown:ht(Me.onPointerDown,$n=>{$n.button!==0||zt||ye($n)}),onPointerLeave:ht(Me.onPointerLeave,Fe.stop),onPointerUp:ht(Me.onPointerUp,Fe.stop),disabled:zt,"aria-disabled":Uu(zt)}},[G.isAtMin,r,ye,Fe.stop,l]),Mt=S.useCallback((Me={},Ct=null)=>{var zt,$n,qe,pt;return{name:_,inputMode:m,type:"text",pattern:h,"aria-labelledby":L,"aria-label":T,"aria-describedby":k,id:b,disabled:l,...Me,readOnly:(zt=Me.readOnly)!=null?zt:s,"aria-readonly":($n=Me.readOnly)!=null?$n:s,"aria-required":(qe=Me.required)!=null?qe:u,required:(pt=Me.required)!=null?pt:u,ref:Rn(Le,Ct),value:Be(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Uu(d??G.isOutOfRange),"aria-valuetext":on,autoComplete:"off",autoCorrect:"off",onChange:ht(Me.onChange,at),onKeyDown:ht(Me.onKeyDown,mt),onFocus:ht(Me.onFocus,jt,()=>we(!0)),onBlur:ht(Me.onBlur,$,Ie)}},[_,m,h,L,T,Be,k,b,l,u,s,d,G.value,G.valueAsNumber,G.isOutOfRange,i,o,on,at,mt,jt,$,Ie]);return{value:Be(G.value),valueAsNumber:G.valueAsNumber,isFocused:Ce,isDisabled:l,isReadOnly:s,getIncrementButtonProps:je,getDecrementButtonProps:vt,getInputProps:Mt,htmlProps:ne}}var[m2e,Hw]=Pn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[v2e,F8]=Pn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),B8=Ze(function(t,n){const r=Yi("NumberInput",t),i=fr(t),o=h8(i),{htmlProps:a,...s}=g2e(o),l=S.useMemo(()=>s,[s]);return g.jsx(v2e,{value:l,children:g.jsx(m2e,{value:r,children:g.jsx(Ne.div,{...a,ref:n,className:xt("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});B8.displayName="NumberInput";var BH=Ze(function(t,n){const r=Hw();return g.jsx(Ne.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}})});BH.displayName="NumberInputStepper";var z8=Ze(function(t,n){const{getInputProps:r}=F8(),i=r(t,n),o=Hw();return g.jsx(Ne.input,{...i,className:xt("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});z8.displayName="NumberInputField";var zH=Ne("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),H8=Ze(function(t,n){var r;const i=Hw(),{getDecrementButtonProps:o}=F8(),a=o(t,n);return g.jsx(zH,{...a,__css:i.stepper,children:(r=t.children)!=null?r:g.jsx(s2e,{})})});H8.displayName="NumberDecrementStepper";var W8=Ze(function(t,n){var r;const{getIncrementButtonProps:i}=F8(),o=i(t,n),a=Hw();return g.jsx(zH,{...o,__css:a.stepper,children:(r=t.children)!=null?r:g.jsx(l2e,{})})});W8.displayName="NumberIncrementStepper";var[y2e,Ww]=Pn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[b2e,HH]=Pn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `});function U8(e){const t=S.Children.only(e.children),{getTriggerProps:n}=Ww();return S.cloneElement(t,n(t.props,t.ref))}U8.displayName="PopoverTrigger";var kg={click:"click",hover:"hover"};function x2e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kg.click,openDelay:d=200,closeDelay:h=200,isLazy:m,lazyBehavior:y="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:_,onOpen:k,onToggle:T}=N8(e),L=S.useRef(null),O=S.useRef(null),D=S.useRef(null),I=S.useRef(!1),N=S.useRef(!1);E&&(N.current=!0);const[W,B]=S.useState(!1),[K,ne]=S.useState(!1),z=S.useId(),$=i??z,[V,X,Q,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(at=>`${at}-${$}`),{referenceRef:Y,getArrowProps:ee,getPopperProps:fe,getArrowInnerProps:Ce,forceUpdate:we}=j8({...w,enabled:E||!!b}),xe=bH({isOpen:E,ref:D});Xme({enabled:E,ref:O}),lH(D,{focusRef:O,visible:E,shouldFocus:o&&u===kg.click}),Lve(D,{focusRef:r,visible:E,shouldFocus:a&&u===kg.click});const Le=$8({wasSelected:N.current,enabled:m,mode:y,isSelected:xe.present}),Se=S.useCallback((at={},jt=null)=>{const mt={...at,style:{...at.style,transformOrigin:ii.transformOrigin.varRef,[ii.arrowSize.var]:s?`${s}px`:void 0,[ii.arrowShadowColor.var]:l},ref:Rn(D,jt),children:Le?at.children:null,id:X,tabIndex:-1,role:"dialog",onKeyDown:ht(at.onKeyDown,Zt=>{n&&Zt.key==="Escape"&&_()}),onBlur:ht(at.onBlur,Zt=>{const on=SO(Zt),se=yC(D.current,on),Ie=yC(O.current,on);E&&t&&(!se&&!Ie)&&_()}),"aria-labelledby":W?Q:void 0,"aria-describedby":K?G:void 0};return u===kg.hover&&(mt.role="tooltip",mt.onMouseEnter=ht(at.onMouseEnter,()=>{I.current=!0}),mt.onMouseLeave=ht(at.onMouseLeave,Zt=>{Zt.nativeEvent.relatedTarget!==null&&(I.current=!1,setTimeout(()=>_(),h))})),mt},[Le,X,W,Q,K,G,u,n,_,E,t,h,l,s]),Qe=S.useCallback((at={},jt=null)=>fe({...at,style:{visibility:E?"visible":"hidden",...at.style}},jt),[E,fe]),Xe=S.useCallback((at,jt=null)=>({...at,ref:Rn(jt,L,Y)}),[L,Y]),tt=S.useRef(),yt=S.useRef(),Be=S.useCallback(at=>{L.current==null&&Y(at)},[Y]),Ae=S.useCallback((at={},jt=null)=>{const mt={...at,ref:Rn(O,jt,Be),id:V,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":X};return u===kg.click&&(mt.onClick=ht(at.onClick,T)),u===kg.hover&&(mt.onFocus=ht(at.onFocus,()=>{tt.current===void 0&&k()}),mt.onBlur=ht(at.onBlur,Zt=>{const on=SO(Zt),se=!yC(D.current,on);E&&t&&se&&_()}),mt.onKeyDown=ht(at.onKeyDown,Zt=>{Zt.key==="Escape"&&_()}),mt.onMouseEnter=ht(at.onMouseEnter,()=>{I.current=!0,tt.current=window.setTimeout(()=>k(),d)}),mt.onMouseLeave=ht(at.onMouseLeave,()=>{I.current=!1,tt.current&&(clearTimeout(tt.current),tt.current=void 0),yt.current=window.setTimeout(()=>{I.current===!1&&_()},h)})),mt},[V,E,X,u,Be,T,k,t,_,d,h]);S.useEffect(()=>()=>{tt.current&&clearTimeout(tt.current),yt.current&&clearTimeout(yt.current)},[]);const bt=S.useCallback((at={},jt=null)=>({...at,id:Q,ref:Rn(jt,mt=>{B(!!mt)})}),[Q]),Fe=S.useCallback((at={},jt=null)=>({...at,id:G,ref:Rn(jt,mt=>{ne(!!mt)})}),[G]);return{forceUpdate:we,isOpen:E,onAnimationComplete:xe.onComplete,onClose:_,getAnchorProps:Xe,getArrowProps:ee,getArrowInnerProps:Ce,getPopoverPositionerProps:Qe,getPopoverProps:Se,getTriggerProps:Ae,getHeaderProps:bt,getBodyProps:Fe}}function yC(e,t){return e===t||(e==null?void 0:e.contains(t))}function SO(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:n}function V8(e){const t=Yi("Popover",e),{children:n,...r}=fr(e),i=Zy(),o=x2e({...r,direction:i.direction});return g.jsx(y2e,{value:o,children:g.jsx(b2e,{value:t,children:ts(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}V8.displayName="Popover";function G8(e){var t;const{bg:n,bgColor:r,backgroundColor:i,shadow:o,boxShadow:a}=e,{getArrowProps:s,getArrowInnerProps:l}=Ww(),u=HH(),d=(t=n??r)!=null?t:i,h=o??a;return g.jsx(Ne.div,{...s(),className:"chakra-popover__arrow-positioner",children:g.jsx(Ne.div,{className:xt("chakra-popover__arrow",e.className),...l(e),__css:{"--popper-arrow-bg":d?`colors.${d}, ${d}`:void 0,"--popper-arrow-shadow":h?`shadows.${h}, ${h}`:void 0,...u.arrow}})})}G8.displayName="PopoverArrow";function S2e(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var w2e={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]}}},C2e=Ne(su.section),WH=Ze(function(t,n){const{variants:r=w2e,...i}=t,{isOpen:o}=Ww();return g.jsx(C2e,{ref:n,variants:S2e(r),initial:!1,animate:o?"enter":"exit",...i})});WH.displayName="PopoverTransition";var q8=Ze(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=Ww(),u=HH(),d={position:"relative",display:"flex",flexDirection:"column",...u.content};return g.jsx(Ne.div,{...s(r),__css:u.popper,className:"chakra-popover__popper",children:g.jsx(WH,{...i,...a(o,n),onAnimationComplete:Sw(l,o.onAnimationComplete),className:xt("chakra-popover__content",t.className),__css:d})})});q8.displayName="PopoverContent";function _2e(e,t,n){return(e-t)*100/(n-t)}nf({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}});nf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});var k2e=nf({"0%":{left:"-40%"},"100%":{left:"100%"}}),E2e=nf({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function P2e(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=_2e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var[T2e,M2e]=Pn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),L2e=Ze((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=P2e({value:i,min:n,max:r,isIndeterminate:o,role:a}),d={height:"100%",...M2e().filledTrack};return g.jsx(Ne.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:d})}),UH=Ze((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:d,"aria-label":h,"aria-labelledby":m,"aria-valuetext":y,title:b,role:w,...E}=fr(e),_=Yi("Progress",e),k=u??((n=_.track)==null?void 0:n.borderRadius),T={animation:`${E2e} 1s linear infinite`},D={...!d&&a&&s&&T,...d&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${k2e} 1s ease infinite normal none running`}},I={overflow:"hidden",position:"relative",..._.track};return g.jsx(Ne.div,{ref:t,borderRadius:k,__css:I,...E,children:g.jsxs(T2e,{value:_,children:[g.jsx(L2e,{"aria-label":h,"aria-labelledby":m,"aria-valuetext":y,min:i,max:o,value:r,isIndeterminate:d,css:D,borderRadius:k,title:b,role:w}),l]})})});UH.displayName="Progress";function A2e(e){return e&&ko(e)&&ko(e.target)}function O2e(e={}){const{onChange:t,value:n,defaultValue:r,name:i,isDisabled:o,isFocusable:a,isNative:s,...l}=e,[u,d]=S.useState(r||""),h=typeof n<"u",m=h?n:u,y=S.useRef(null),b=S.useCallback(()=>{const O=y.current;if(!O)return;let D="input:not(:disabled):checked";const I=O.querySelector(D);if(I){I.focus();return}D="input:not(:disabled)";const N=O.querySelector(D);N==null||N.focus()},[]),E=`radio-${S.useId()}`,_=i||E,k=S.useCallback(O=>{const D=A2e(O)?O.target.value:O;h||d(D),t==null||t(String(D))},[t,h]),T=S.useCallback((O={},D=null)=>({...O,ref:Rn(D,y),role:"radiogroup"}),[]),L=S.useCallback((O={},D=null)=>({...O,ref:D,name:_,[s?"checked":"isChecked"]:m!=null?O.value===m:void 0,onChange(N){k(N)},"data-radiogroup":!0}),[s,_,k,m]);return{getRootProps:T,getRadioProps:L,name:_,ref:y,focus:b,setValue:d,value:m,onChange:k,isDisabled:o,isFocusable:a,htmlProps:l}}var[R2e,VH]=Pn({name:"RadioGroupContext",strict:!1}),Oy=Ze((e,t)=>{const{colorScheme:n,size:r,variant:i,children:o,className:a,isDisabled:s,isFocusable:l,...u}=e,{value:d,onChange:h,getRootProps:m,name:y,htmlProps:b}=O2e(u),w=S.useMemo(()=>({name:y,size:r,onChange:h,colorScheme:n,value:d,variant:i,isDisabled:s,isFocusable:l}),[y,r,h,n,d,i,s,l]);return g.jsx(R2e,{value:w,children:g.jsx(Ne.div,{...m(b,t),className:xt("chakra-radio-group",a),children:o})})});Oy.displayName="RadioGroup";var I2e={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function D2e(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:i,isReadOnly:o,isRequired:a,onChange:s,isInvalid:l,name:u,value:d,id:h,"data-radiogroup":m,"aria-describedby":y,...b}=e,w=`radio-${S.useId()}`,E=ip(),k=!!VH()||!!m;let L=!!E&&!k?E.id:w;L=h??L;const O=i??(E==null?void 0:E.isDisabled),D=o??(E==null?void 0:E.isReadOnly),I=a??(E==null?void 0:E.isRequired),N=l??(E==null?void 0:E.isInvalid),[W,B]=S.useState(!1),[K,ne]=S.useState(!1),[z,$]=S.useState(!1),[V,X]=S.useState(!1),[Q,G]=S.useState(Boolean(t)),Y=typeof n<"u",ee=Y?n:Q;S.useEffect(()=>uz(B),[]);const fe=S.useCallback(Be=>{if(D||O){Be.preventDefault();return}Y||G(Be.target.checked),s==null||s(Be)},[Y,O,D,s]),Ce=S.useCallback(Be=>{Be.key===" "&&X(!0)},[X]),we=S.useCallback(Be=>{Be.key===" "&&X(!1)},[X]),xe=S.useCallback((Be={},Ae=null)=>({...Be,ref:Ae,"data-active":Bt(V),"data-hover":Bt(z),"data-disabled":Bt(O),"data-invalid":Bt(N),"data-checked":Bt(ee),"data-focus":Bt(K),"data-focus-visible":Bt(K&&W),"data-readonly":Bt(D),"aria-hidden":!0,onMouseDown:ht(Be.onMouseDown,()=>X(!0)),onMouseUp:ht(Be.onMouseUp,()=>X(!1)),onMouseEnter:ht(Be.onMouseEnter,()=>$(!0)),onMouseLeave:ht(Be.onMouseLeave,()=>$(!1))}),[V,z,O,N,ee,K,D,W]),{onFocus:Le,onBlur:Se}=E??{},Qe=S.useCallback((Be={},Ae=null)=>{const bt=O&&!r;return{...Be,id:L,ref:Ae,type:"radio",name:u,value:d,onChange:ht(Be.onChange,fe),onBlur:ht(Se,Be.onBlur,()=>ne(!1)),onFocus:ht(Le,Be.onFocus,()=>ne(!0)),onKeyDown:ht(Be.onKeyDown,Ce),onKeyUp:ht(Be.onKeyUp,we),checked:ee,disabled:bt,readOnly:D,required:I,"aria-invalid":Uu(N),"aria-disabled":Uu(bt),"aria-required":Uu(I),"data-readonly":Bt(D),"aria-describedby":y,style:I2e}},[O,r,L,u,d,fe,Se,Le,Ce,we,ee,D,I,N,y]);return{state:{isInvalid:N,isFocused:K,isChecked:ee,isActive:V,isHovered:z,isDisabled:O,isReadOnly:D,isRequired:I},getCheckboxProps:xe,getInputProps:Qe,getLabelProps:(Be={},Ae=null)=>({...Be,ref:Ae,onMouseDown:ht(Be.onMouseDown,wO),onTouchStart:ht(Be.onTouchStart,wO),"data-disabled":Bt(O),"data-checked":Bt(ee),"data-invalid":Bt(N)}),getRootProps:(Be,Ae=null)=>({...Be,ref:Ae,"data-disabled":Bt(O),"data-checked":Bt(ee),"data-invalid":Bt(N)}),htmlProps:b}}function wO(e){e.preventDefault(),e.stopPropagation()}function j2e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var Vo=Ze((e,t)=>{var n;const r=VH(),{onChange:i,value:o}=e,a=Yi("Radio",{...r,...e}),s=fr(e),{spacing:l="0.5rem",children:u,isDisabled:d=r==null?void 0:r.isDisabled,isFocusable:h=r==null?void 0:r.isFocusable,inputProps:m,...y}=s;let b=e.isChecked;(r==null?void 0:r.value)!=null&&o!=null&&(b=r.value===o);let w=i;r!=null&&r.onChange&&o!=null&&(w=Sw(r.onChange,i));const E=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:_,getCheckboxProps:k,getLabelProps:T,getRootProps:L,htmlProps:O}=D2e({...y,isChecked:b,isFocusable:h,isDisabled:d,onChange:w,name:E}),[D,I]=j2e(O,lF),N=k(I),W=_(m,t),B=T(),K=Object.assign({},D,L()),ne={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...a.container},z={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...a.control},$={userSelect:"none",marginStart:l,...a.label};return g.jsxs(Ne.label,{className:"chakra-radio",...K,__css:ne,children:[g.jsx("input",{className:"chakra-radio__input",...W}),g.jsx(Ne.span,{className:"chakra-radio__control",...N,__css:z}),u&&g.jsx(Ne.span,{className:"chakra-radio__label",...B,__css:$,children:u})]})});Vo.displayName="Radio";var GH=Ze(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return g.jsxs(Ne.select,{...a,ref:n,className:xt("chakra-select",o),children:[i&&g.jsx("option",{value:"",children:i}),r]})});GH.displayName="SelectField";function N2e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var qH=Ze((e,t)=>{var n;const r=Yi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:d,minHeight:h,iconColor:m,iconSize:y,...b}=fr(e),[w,E]=N2e(b,lF),_=f8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return g.jsxs(Ne.div,{className:"chakra-select__wrapper",__css:k,...w,...i,children:[g.jsx(GH,{ref:t,height:u??l,minH:d??h,placeholder:o,..._,__css:T,children:e.children}),g.jsx(KH,{"data-disabled":Bt(_.disabled),...(m||s)&&{color:m||s},__css:r.icon,...y&&{fontSize:y},children:a})]})});qH.displayName="Select";var $2e=e=>g.jsx("svg",{viewBox:"0 0 24 24",...e,children:g.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),F2e=Ne("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),KH=e=>{const{children:t=g.jsx($2e,{}),...n}=e,r=S.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return g.jsx(F2e,{...n,className:"chakra-select__icon-wrapper",children:S.isValidElement(t)?r:null})};KH.displayName="SelectIcon";var Eg=e=>e?"":void 0,bC=e=>e?!0:void 0,f2=(...e)=>e.filter(Boolean).join(" ");function xC(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Xb(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var nS={width:0,height:0},Zb=e=>e||nS;function B2e(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{var E;const _=(E=r[w])!=null?E:nS;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Xb({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${_.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${_.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Zb(w).height>Zb(E).height?w:E,nS):r.reduce((w,E)=>Zb(w).width>Zb(E).width?w:E,nS),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Xb({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Xb({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,d=[0,i?100-n[0]:n[0]],h=u?d:n;let m=h[0];!u&&i&&(m=100-m);const y=Math.abs(h[h.length-1]-h[0]),b={...l,...Xb({orientation:t,vertical:i?{height:`${y}%`,top:`${m}%`}:{height:`${y}%`,bottom:`${m}%`},horizontal:i?{width:`${y}%`,right:`${m}%`}:{width:`${y}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function z2e(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function H2e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function W2e(e){const t=V2e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function YH(e){return!!e.touches}function U2e(e){return YH(e)&&e.touches.length>1}function V2e(e){var t;return(t=e.view)!=null?t:window}function G2e(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function q2e(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function XH(e,t="page"){return YH(e)?G2e(e,t):q2e(e,t)}function K2e(e){return t=>{const n=W2e(t);(!n||n&&t.button===0)&&e(t)}}function Y2e(e,t=!1){function n(i){e(i,{point:XH(i)})}return t?K2e(n):n}function rS(e,t,n,r){return H2e(e,t,Y2e(n,t==="pointerdown"),r)}var X2e=Object.defineProperty,Z2e=(e,t,n)=>t in e?X2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$s=(e,t,n)=>(Z2e(e,typeof t!="symbol"?t+"":t,n),n),Q2e=class{constructor(e,t,n){$s(this,"history",[]),$s(this,"startEvent",null),$s(this,"lastEvent",null),$s(this,"lastEventInfo",null),$s(this,"handlers",{}),$s(this,"removeListeners",()=>{}),$s(this,"threshold",3),$s(this,"win"),$s(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const s=SC(this.lastEventInfo,this.history),l=this.startEvent!==null,u=nbe(s.offset,{x:0,y:0})>=this.threshold;if(!l&&!u)return;const{timestamp:d}=kL();this.history.push({...s.point,timestamp:d});const{onStart:h,onMove:m}=this.handlers;l||(h==null||h(this.lastEvent,s),this.startEvent=this.lastEvent),m==null||m(this.lastEvent,s)}),$s(this,"onPointerMove",(s,l)=>{this.lastEvent=s,this.lastEventInfo=l,Sce.update(this.updatePoint,!0)}),$s(this,"onPointerUp",(s,l)=>{const u=SC(l,this.history),{onEnd:d,onSessionEnd:h}=this.handlers;h==null||h(s,u),this.end(),!(!d||!this.startEvent)&&(d==null||d(s,u))});var r;if(this.win=(r=e.view)!=null?r:window,U2e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const i={point:XH(e)},{timestamp:o}=kL();this.history=[{...i.point,timestamp:o}];const{onSessionStart:a}=t;a==null||a(e,SC(i,this.history)),this.removeListeners=tbe(rS(this.win,"pointermove",this.onPointerMove),rS(this.win,"pointerup",this.onPointerUp),rS(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),wce.update(this.updatePoint)}};function CO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function SC(e,t){return{point:e.point,delta:CO(e.point,t[t.length-1]),offset:CO(e.point,t[0]),velocity:ebe(t,.1)}}var J2e=e=>e*1e3;function ebe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>J2e(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;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 tbe(...e){return t=>e.reduce((n,r)=>r(n),t)}function wC(e,t){return Math.abs(e-t)}function _O(e){return"x"in e&&"y"in e}function nbe(e,t){if(typeof e=="number"&&typeof t=="number")return wC(e,t);if(_O(e)&&_O(t)){const n=wC(e.x,t.x),r=wC(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function ZH(e){const t=S.useRef(null);return t.current=e,t}function rbe(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=S.useRef(null),d=ZH({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(h,m){u.current=null,i==null||i(h,m)}});S.useEffect(()=>{var h;(h=u.current)==null||h.updateHandlers(d.current)}),S.useEffect(()=>{const h=e.current;if(!h||!l)return;function m(y){u.current=new Q2e(y,d.current,s)}return rS(h,"pointerdown",m)},[e,l,d,s]),S.useEffect(()=>()=>{var h;(h=u.current)==null||h.end(),u.current=null},[])}function ibe(e,t){var n;if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const r=(n=e.ownerDocument.defaultView)!=null?n:window,i=new r.ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const[a]=o;let s,l;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;s=d.inlineSize,l=d.blockSize}else s=e.offsetWidth,l=e.offsetHeight;t({width:s,height:l})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}var obe=Boolean(globalThis==null?void 0:globalThis.document)?S.useLayoutEffect:S.useEffect;function abe(e,t){var n,r;if(!e||!e.parentElement)return;const i=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window,o=new i.MutationObserver(()=>{t()});return o.observe(e.parentElement,{childList:!0}),()=>{o.disconnect()}}function sbe({getNodes:e,observeMutation:t=!0}){const[n,r]=S.useState([]),[i,o]=S.useState(0);return obe(()=>{const a=e(),s=a.map((l,u)=>ibe(l,d=>{r(h=>[...h.slice(0,u),d,...h.slice(u+1)])}));if(t){const l=a[0];s.push(abe(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l==null||l()})}},[i]),n}function lbe(e){return typeof e=="object"&&e!==null&&"current"in e}function ube(e){const[t]=sbe({observeMutation:!1,getNodes(){return[lbe(e)?e.current:e]}});return t}function cbe(e){var t;const{min:n=0,max:r=100,onChange:i,value:o,defaultValue:a,isReversed:s,direction:l="ltr",orientation:u="horizontal",id:d,isDisabled:h,isReadOnly:m,onChangeStart:y,onChangeEnd:b,step:w=1,getAriaValueText:E,"aria-valuetext":_,"aria-label":k,"aria-labelledby":T,name:L,focusThumbOnChange:O=!0,...D}=e,I=Qr(y),N=Qr(b),W=Qr(E),B=z2e({isReversed:s,direction:l,orientation:u}),[K,ne]=l8({value:o,defaultValue:a??fbe(n,r),onChange:i}),[z,$]=S.useState(!1),[V,X]=S.useState(!1),Q=!(h||m),G=(r-n)/10,Y=w||(r-n)/100,ee=Qx(K,n,r),fe=r-ee+n,we=GA(B?fe:ee,n,r),xe=u==="vertical",Le=ZH({min:n,max:r,step:w,isDisabled:h,value:ee,isInteractive:Q,isReversed:B,isVertical:xe,eventSource:null,focusThumbOnChange:O,orientation:u}),Se=S.useRef(null),Qe=S.useRef(null),Xe=S.useRef(null),tt=S.useId(),yt=d??tt,[Be,Ae]=[`slider-thumb-${yt}`,`slider-track-${yt}`],bt=S.useCallback(qe=>{var pt,zr;if(!Se.current)return;const rr=Le.current;rr.eventSource="pointer";const Bn=Se.current.getBoundingClientRect(),{clientX:li,clientY:vs}=(zr=(pt=qe.touches)==null?void 0:pt[0])!=null?zr:qe,tl=xe?Bn.bottom-vs:li-Bn.left,gf=xe?Bn.height:Bn.width;let ys=tl/gf;B&&(ys=1-ys);let Xi=Hme(ys,rr.min,rr.max);return rr.step&&(Xi=parseFloat(qA(Xi,rr.min,rr.step))),Xi=Qx(Xi,rr.min,rr.max),Xi},[xe,B,Le]),Fe=S.useCallback(qe=>{const pt=Le.current;pt.isInteractive&&(qe=parseFloat(qA(qe,pt.min,Y)),qe=Qx(qe,pt.min,pt.max),ne(qe))},[Y,ne,Le]),at=S.useMemo(()=>({stepUp(qe=Y){const pt=B?ee-qe:ee+qe;Fe(pt)},stepDown(qe=Y){const pt=B?ee+qe:ee-qe;Fe(pt)},reset(){Fe(a||0)},stepTo(qe){Fe(qe)}}),[Fe,B,ee,Y,a]),jt=S.useCallback(qe=>{const pt=Le.current,rr={ArrowRight:()=>at.stepUp(),ArrowUp:()=>at.stepUp(),ArrowLeft:()=>at.stepDown(),ArrowDown:()=>at.stepDown(),PageUp:()=>at.stepUp(G),PageDown:()=>at.stepDown(G),Home:()=>Fe(pt.min),End:()=>Fe(pt.max)}[qe.key];rr&&(qe.preventDefault(),qe.stopPropagation(),rr(qe),pt.eventSource="keyboard")},[at,Fe,G,Le]),mt=(t=W==null?void 0:W(ee))!=null?t:_,Zt=ube(Qe),{getThumbStyle:on,rootStyle:se,trackStyle:Ie,innerTrackStyle:He}=S.useMemo(()=>{const qe=Le.current,pt=Zt??{width:0,height:0};return B2e({isReversed:B,orientation:qe.orientation,thumbRects:[pt],thumbPercents:[we]})},[B,Zt,we,Le]),Ue=S.useCallback(()=>{Le.current.focusThumbOnChange&&setTimeout(()=>{var pt;return(pt=Qe.current)==null?void 0:pt.focus()})},[Le]);rc(()=>{const qe=Le.current;Ue(),qe.eventSource==="keyboard"&&(N==null||N(qe.value))},[ee,N]);function ye(qe){const pt=bt(qe);pt!=null&&pt!==Le.current.value&&ne(pt)}rbe(Xe,{onPanSessionStart(qe){const pt=Le.current;pt.isInteractive&&($(!0),Ue(),ye(qe),I==null||I(pt.value))},onPanSessionEnd(){const qe=Le.current;qe.isInteractive&&($(!1),N==null||N(qe.value))},onPan(qe){Le.current.isInteractive&&ye(qe)}});const je=S.useCallback((qe={},pt=null)=>({...qe,...D,ref:Rn(pt,Xe),tabIndex:-1,"aria-disabled":bC(h),"data-focused":Eg(V),style:{...qe.style,...se}}),[D,h,V,se]),vt=S.useCallback((qe={},pt=null)=>({...qe,ref:Rn(pt,Se),id:Ae,"data-disabled":Eg(h),style:{...qe.style,...Ie}}),[h,Ae,Ie]),Mt=S.useCallback((qe={},pt=null)=>({...qe,ref:pt,style:{...qe.style,...He}}),[He]),Me=S.useCallback((qe={},pt=null)=>({...qe,ref:Rn(pt,Qe),role:"slider",tabIndex:Q?0:void 0,id:Be,"data-active":Eg(z),"aria-valuetext":mt,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":ee,"aria-orientation":u,"aria-disabled":bC(h),"aria-readonly":bC(m),"aria-label":k,"aria-labelledby":k?void 0:T,style:{...qe.style,...on(0)},onKeyDown:xC(qe.onKeyDown,jt),onFocus:xC(qe.onFocus,()=>X(!0)),onBlur:xC(qe.onBlur,()=>X(!1))}),[Q,Be,z,mt,n,r,ee,u,h,m,k,T,on,jt]),Ct=S.useCallback((qe,pt=null)=>{const zr=!(qe.valuer),rr=ee>=qe.value,Bn=GA(qe.value,n,r),li={position:"absolute",pointerEvents:"none",...dbe({orientation:u,vertical:{bottom:B?`${100-Bn}%`:`${Bn}%`},horizontal:{left:B?`${100-Bn}%`:`${Bn}%`}})};return{...qe,ref:pt,role:"presentation","aria-hidden":!0,"data-disabled":Eg(h),"data-invalid":Eg(!zr),"data-highlighted":Eg(rr),style:{...qe.style,...li}}},[h,B,r,n,u,ee]),zt=S.useCallback((qe={},pt=null)=>({...qe,ref:pt,type:"hidden",value:ee,name:L}),[L,ee]);return{state:{value:ee,isFocused:V,isDragging:z},actions:at,getRootProps:je,getTrackProps:vt,getInnerTrackProps:Mt,getThumbProps:Me,getMarkerProps:Ct,getInputProps:zt}}function dbe(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function fbe(e,t){return t"}),[pbe,Vw]=Pn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),QH=Ze((e,t)=>{const n={orientation:"horizontal",...e},r=Yi("Slider",n),i=fr(n),{direction:o}=Zy();i.direction=o;const{getInputProps:a,getRootProps:s,...l}=cbe(i),u=s(),d=a({},t);return g.jsx(hbe,{value:l,children:g.jsx(pbe,{value:r,children:g.jsxs(Ne.div,{...u,className:f2("chakra-slider",n.className),__css:r.container,children:[n.children,g.jsx("input",{...d})]})})})});QH.displayName="Slider";var JH=Ze((e,t)=>{const{getThumbProps:n}=Uw(),r=Vw(),i=n(e,t);return g.jsx(Ne.div,{...i,className:f2("chakra-slider__thumb",e.className),__css:r.thumb})});JH.displayName="SliderThumb";var eW=Ze((e,t)=>{const{getTrackProps:n}=Uw(),r=Vw(),i=n(e,t);return g.jsx(Ne.div,{...i,className:f2("chakra-slider__track",e.className),__css:r.track})});eW.displayName="SliderTrack";var tW=Ze((e,t)=>{const{getInnerTrackProps:n}=Uw(),r=Vw(),i=n(e,t);return g.jsx(Ne.div,{...i,className:f2("chakra-slider__filled-track",e.className),__css:r.filledTrack})});tW.displayName="SliderFilledTrack";var tk=Ze((e,t)=>{const{getMarkerProps:n}=Uw(),r=Vw(),i=n(e,t);return g.jsx(Ne.div,{...i,className:f2("chakra-slider__marker",e.className),__css:r.mark})});tk.displayName="SliderMark";var K8=Ze(function(t,n){const r=Yi("Switch",t),{spacing:i="0.5rem",children:o,...a}=fr(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:d,getLabelProps:h}=cz(a),m=S.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),y=S.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=S.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return g.jsxs(Ne.label,{...d(),className:xt("chakra-switch",t.className),__css:m,children:[g.jsx("input",{className:"chakra-switch__input",...l({},n)}),g.jsx(Ne.span,{...u(),className:"chakra-switch__track",__css:y,children:g.jsx(Ne.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":Bt(s.isChecked),"data-hover":Bt(s.isHovered)})}),o&&g.jsx(Ne.span,{className:"chakra-switch__label",...h(),__css:b,children:o})]})});K8.displayName="Switch";var[gbe,mNe,mbe,vbe]=a8();function ybe(e){var t;const{defaultIndex:n,onChange:r,index:i,isManual:o,isLazy:a,lazyBehavior:s="unmount",orientation:l="horizontal",direction:u="ltr",...d}=e,[h,m]=S.useState(n??0),[y,b]=l8({defaultValue:n??0,value:i,onChange:r});S.useEffect(()=>{i!=null&&m(i)},[i]);const w=mbe(),E=S.useId();return{id:`tabs-${(t=e.id)!=null?t:E}`,selectedIndex:y,focusedIndex:h,setSelectedIndex:b,setFocusedIndex:m,isManual:o,isLazy:a,lazyBehavior:s,orientation:l,descendants:w,direction:u,htmlProps:d}}var[bbe,Y8]=Pn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function xbe(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Y8(),{index:u,register:d}=vbe({disabled:t&&!n}),h=u===l,m=()=>{i(u)},y=()=>{s(u),!o&&!(t&&n)&&i(u)},b=sH({...r,ref:Rn(d,e.ref),isDisabled:t,isFocusable:n,onClick:ht(e.onClick,m)}),w="button";return{...b,id:nW(a,u),role:"tab",tabIndex:h?0:-1,type:w,"aria-selected":h,"aria-controls":rW(a,u),onFocus:t?void 0:ht(e.onFocus,y)}}var[Sbe,wbe]=Pn({});function Cbe(e){const t=Y8(),{id:n,selectedIndex:r}=t,o=d8(e.children).map((a,s)=>S.createElement(Sbe,{key:s,value:{isSelected:s===r,id:rW(n,s),tabId:nW(n,s),selectedIndex:r}},a));return{...e,children:o}}function _be(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Y8(),{isSelected:o,id:a,tabId:s}=wbe(),l=S.useRef(!1);o&&(l.current=!0);const u=$8({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function nW(e,t){return`${e}--tab-${t}`}function rW(e,t){return`${e}--tabpanel-${t}`}var[kbe,X8]=Pn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),iW=Ze(function(t,n){const r=Yi("Tabs",t),{children:i,className:o,...a}=fr(t),{htmlProps:s,descendants:l,...u}=ybe(a),d=S.useMemo(()=>u,[u]),{isFitted:h,...m}=s;return g.jsx(gbe,{value:l,children:g.jsx(bbe,{value:d,children:g.jsx(kbe,{value:r,children:g.jsx(Ne.div,{className:xt("chakra-tabs",o),ref:n,...m,__css:r.root,children:i})})})})});iW.displayName="Tabs";var oW=Ze(function(t,n){const r=_be({...t,ref:n}),i=X8();return g.jsx(Ne.div,{outline:"0",...r,className:xt("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});oW.displayName="TabPanel";var aW=Ze(function(t,n){const r=Cbe(t),i=X8();return g.jsx(Ne.div,{...r,width:"100%",ref:n,className:xt("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});aW.displayName="TabPanels";var sW=Ze(function(t,n){const r=X8(),i=xbe({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return g.jsx(Ne.button,{...i,className:xt("chakra-tabs__tab",t.className),__css:o})});sW.displayName="Tab";function Ebe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Pbe=["h","minH","height","minHeight"],Z8=Ze((e,t)=>{const n=au("Textarea",e),{className:r,rows:i,...o}=fr(e),a=f8(o),s=i?Ebe(n,Pbe):n;return g.jsx(Ne.textarea,{ref:t,rows:i,...a,className:xt("chakra-textarea",r),__css:s})});Z8.displayName="Textarea";var Tbe={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]}}}},f3=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},nk=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Mbe(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:d,id:h,isOpen:m,defaultIsOpen:y,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:_,isDisabled:k,gutter:T,offset:L,direction:O,...D}=e,{isOpen:I,onOpen:N,onClose:W}=N8({isOpen:m,defaultIsOpen:y,onOpen:l,onClose:u}),{referenceRef:B,getPopperProps:K,getArrowInnerProps:ne,getArrowProps:z}=j8({enabled:I,placement:d,arrowPadding:E,modifiers:_,gutter:T,offset:L,direction:O}),$=S.useId(),X=`tooltip-${h??$}`,Q=S.useRef(null),G=S.useRef(),Y=S.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ee=S.useRef(),fe=S.useCallback(()=>{ee.current&&(clearTimeout(ee.current),ee.current=void 0)},[]),Ce=S.useCallback(()=>{fe(),W()},[W,fe]),we=Lbe(Q,Ce),xe=S.useCallback(()=>{if(!k&&!G.current){we();const Ae=nk(Q);G.current=Ae.setTimeout(N,t)}},[we,k,N,t]),Le=S.useCallback(()=>{Y();const Ae=nk(Q);ee.current=Ae.setTimeout(Ce,n)},[n,Ce,Y]),Se=S.useCallback(()=>{I&&r&&Le()},[r,Le,I]),Qe=S.useCallback(()=>{I&&a&&Le()},[a,Le,I]),Xe=S.useCallback(Ae=>{I&&Ae.key==="Escape"&&Le()},[I,Le]);Dh(()=>f3(Q),"keydown",s?Xe:void 0),Dh(()=>f3(Q),"scroll",()=>{I&&o&&Ce()}),S.useEffect(()=>{k&&(Y(),I&&W())},[k,I,W,Y]),S.useEffect(()=>()=>{Y(),fe()},[Y,fe]),Dh(()=>Q.current,"pointerleave",Le);const tt=S.useCallback((Ae={},bt=null)=>({...Ae,ref:Rn(Q,bt,B),onPointerEnter:ht(Ae.onPointerEnter,at=>{at.pointerType!=="touch"&&xe()}),onClick:ht(Ae.onClick,Se),onPointerDown:ht(Ae.onPointerDown,Qe),onFocus:ht(Ae.onFocus,xe),onBlur:ht(Ae.onBlur,Le),"aria-describedby":I?X:void 0}),[xe,Le,Qe,I,X,Se,B]),yt=S.useCallback((Ae={},bt=null)=>K({...Ae,style:{...Ae.style,[ii.arrowSize.var]:b?`${b}px`:void 0,[ii.arrowShadowColor.var]:w}},bt),[K,b,w]),Be=S.useCallback((Ae={},bt=null)=>{const Fe={...Ae.style,position:"relative",transformOrigin:ii.transformOrigin.varRef};return{ref:bt,...D,...Ae,id:X,role:"tooltip",style:Fe}},[D,X]);return{isOpen:I,show:xe,hide:Le,getTriggerProps:tt,getTooltipProps:Be,getTooltipPositionerProps:yt,getArrowProps:z,getArrowInnerProps:ne}}var CC="chakra-ui:close-tooltip";function Lbe(e,t){return S.useEffect(()=>{const n=f3(e);return n.addEventListener(CC,t),()=>n.removeEventListener(CC,t)},[t,e]),()=>{const n=f3(e),r=nk(e);n.dispatchEvent(new r.CustomEvent(CC))}}function Abe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Obe(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Rbe=Ne(su.div),si=Ze((e,t)=>{var n,r;const i=au("Tooltip",e),o=fr(e),a=Zy(),{children:s,label:l,shouldWrapChildren:u,"aria-label":d,hasArrow:h,bg:m,portalProps:y,background:b,backgroundColor:w,bgColor:E,motionProps:_,...k}=o,T=(r=(n=b??w)!=null?n:m)!=null?r:E;if(T){i.bg=T;const K=Kre(a,"colors",T);i[ii.arrowBg.var]=K}const L=Mbe({...k,direction:a.direction}),O=typeof s=="string"||u;let D;if(O)D=g.jsx(Ne.span,{display:"inline-block",tabIndex:0,...L.getTriggerProps(),children:s});else{const K=S.Children.only(s);D=S.cloneElement(K,L.getTriggerProps(K.props,K.ref))}const I=!!d,N=L.getTooltipProps({},t),W=I?Abe(N,["role","id"]):N,B=Obe(N,["role","id"]);return l?g.jsxs(g.Fragment,{children:[D,g.jsx(rp,{children:L.isOpen&&g.jsx(c0,{...y,children:g.jsx(Ne.div,{...L.getTooltipPositionerProps(),__css:{zIndex:i.zIndex,pointerEvents:"none"},children:g.jsxs(Rbe,{variants:Tbe,initial:"exit",animate:"enter",exit:"exit",..._,...W,__css:i,children:[l,I&&g.jsx(Ne.span,{srOnly:!0,...B,children:d}),h&&g.jsx(Ne.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:g.jsx(Ne.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]})})})})]}):g.jsx(g.Fragment,{children:s})});si.displayName="Tooltip";var rk={},kO=Xs;rk.createRoot=kO.createRoot,rk.hydrateRoot=kO.hydrateRoot;var ik={},Ibe={get exports(){return ik},set exports(e){ik=e}},lW={};/** - * @license React - * use-sync-external-store-shim.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 Qm=S;function Dbe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jbe=typeof Object.is=="function"?Object.is:Dbe,Nbe=Qm.useState,$be=Qm.useEffect,Fbe=Qm.useLayoutEffect,Bbe=Qm.useDebugValue;function zbe(e,t){var n=t(),r=Nbe({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Fbe(function(){i.value=n,i.getSnapshot=t,_C(i)&&o({inst:i})},[e,n,t]),$be(function(){return _C(i)&&o({inst:i}),e(function(){_C(i)&&o({inst:i})})},[e]),Bbe(n),n}function _C(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jbe(e,n)}catch{return!0}}function Hbe(e,t){return t()}var Wbe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Hbe:zbe;lW.useSyncExternalStore=Qm.useSyncExternalStore!==void 0?Qm.useSyncExternalStore:Wbe;(function(e){e.exports=lW})(Ibe);var ok={},Ube={get exports(){return ok},set exports(e){ok=e}},uW={};/** - * @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 Gw=S,Vbe=ik;function Gbe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qbe=typeof Object.is=="function"?Object.is:Gbe,Kbe=Vbe.useSyncExternalStore,Ybe=Gw.useRef,Xbe=Gw.useEffect,Zbe=Gw.useMemo,Qbe=Gw.useDebugValue;uW.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Ybe(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Zbe(function(){function l(y){if(!u){if(u=!0,d=y,y=r(y),i!==void 0&&a.hasValue){var b=a.value;if(i(b,y))return h=b}return h=y}if(b=h,qbe(d,y))return b;var w=r(y);return i!==void 0&&i(b,w)?b:(d=y,h=w)}var u=!1,d,h,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Kbe(e,o[0],o[1]);return Xbe(function(){a.hasValue=!0,a.value=s},[s]),Qbe(s),s};(function(e){e.exports=uW})(Ube);function Jbe(e){e()}let cW=Jbe;const exe=e=>cW=e,txe=()=>cW,Zd=S.createContext(null);function dW(){return S.useContext(Zd)}const nxe=()=>{throw new Error("uSES not initialized!")};let fW=nxe;const rxe=e=>{fW=e},ixe=(e,t)=>e===t;function oxe(e=Zd){const t=e===Zd?dW:()=>S.useContext(e);return function(r,i=ixe){const{store:o,subscription:a,getServerState:s}=t(),l=fW(a.addNestedSub,o.getState,s||o.getState,r,i);return S.useDebugValue(l),l}}const axe=oxe();var EO={},sxe={get exports(){return EO},set exports(e){EO=e}},Nn={};/** - * @license React - * react-is.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 Q8=Symbol.for("react.element"),J8=Symbol.for("react.portal"),qw=Symbol.for("react.fragment"),Kw=Symbol.for("react.strict_mode"),Yw=Symbol.for("react.profiler"),Xw=Symbol.for("react.provider"),Zw=Symbol.for("react.context"),lxe=Symbol.for("react.server_context"),Qw=Symbol.for("react.forward_ref"),Jw=Symbol.for("react.suspense"),e4=Symbol.for("react.suspense_list"),t4=Symbol.for("react.memo"),n4=Symbol.for("react.lazy"),uxe=Symbol.for("react.offscreen"),hW;hW=Symbol.for("react.module.reference");function ps(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Q8:switch(e=e.type,e){case qw:case Yw:case Kw:case Jw:case e4:return e;default:switch(e=e&&e.$$typeof,e){case lxe:case Zw:case Qw:case n4:case t4:case Xw:return e;default:return t}}case J8:return t}}}Nn.ContextConsumer=Zw;Nn.ContextProvider=Xw;Nn.Element=Q8;Nn.ForwardRef=Qw;Nn.Fragment=qw;Nn.Lazy=n4;Nn.Memo=t4;Nn.Portal=J8;Nn.Profiler=Yw;Nn.StrictMode=Kw;Nn.Suspense=Jw;Nn.SuspenseList=e4;Nn.isAsyncMode=function(){return!1};Nn.isConcurrentMode=function(){return!1};Nn.isContextConsumer=function(e){return ps(e)===Zw};Nn.isContextProvider=function(e){return ps(e)===Xw};Nn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Q8};Nn.isForwardRef=function(e){return ps(e)===Qw};Nn.isFragment=function(e){return ps(e)===qw};Nn.isLazy=function(e){return ps(e)===n4};Nn.isMemo=function(e){return ps(e)===t4};Nn.isPortal=function(e){return ps(e)===J8};Nn.isProfiler=function(e){return ps(e)===Yw};Nn.isStrictMode=function(e){return ps(e)===Kw};Nn.isSuspense=function(e){return ps(e)===Jw};Nn.isSuspenseList=function(e){return ps(e)===e4};Nn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===qw||e===Yw||e===Kw||e===Jw||e===e4||e===uxe||typeof e=="object"&&e!==null&&(e.$$typeof===n4||e.$$typeof===t4||e.$$typeof===Xw||e.$$typeof===Zw||e.$$typeof===Qw||e.$$typeof===hW||e.getModuleId!==void 0)};Nn.typeOf=ps;(function(e){e.exports=Nn})(sxe);function cxe(){const e=txe();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{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 PO={notify(){},get:()=>[]};function dxe(e,t){let n,r=PO;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function a(){d.onStateChange&&d.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=cxe())}function u(){n&&(n(),n=void 0,r.clear(),r=PO)}const d={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return d}const fxe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hxe=fxe?S.useLayoutEffect:S.useEffect;function pxe({store:e,context:t,children:n,serverState:r}){const i=S.useMemo(()=>{const s=dxe(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=S.useMemo(()=>e.getState(),[e]);hxe(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]);const a=t||Zd;return Ke.createElement(a.Provider,{value:i},n)}function pW(e=Zd){const t=e===Zd?dW:()=>S.useContext(e);return function(){const{store:r}=t();return r}}const gxe=pW();function mxe(e=Zd){const t=e===Zd?gxe:pW(e);return function(){return t().dispatch}}const vxe=mxe();rxe(ok.useSyncExternalStoreWithSelector);exe(Xs.unstable_batchedUpdates);function iS(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?iS=function(n){return typeof n}:iS=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},iS(e)}function yxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TO(e,t){for(var n=0;n1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:eE(e)?2:tE(e)?3:0}function Pm(e,t){return v0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wxe(e,t){return v0(e)===2?e.get(t):e[t]}function mW(e,t,n){var r=v0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function vW(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function eE(e){return Txe&&e instanceof Map}function tE(e){return Mxe&&e instanceof Set}function fh(e){return e.o||e.t}function nE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=bW(e);delete t[vr];for(var n=Tm(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Cxe),Object.freeze(e),t&&Xh(e,function(n,r){return rE(r,!0)},!0)),e}function Cxe(){Vs(2)}function iE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ql(e){var t=dk[e];return t||Vs(18,e),t}function _xe(e,t){dk[e]||(dk[e]=t)}function lk(){return Ry}function kC(e,t){t&&(Ql("Patches"),e.u=[],e.s=[],e.v=t)}function h3(e){uk(e),e.p.forEach(kxe),e.p=null}function uk(e){e===Ry&&(Ry=e.l)}function MO(e){return Ry={p:[],l:Ry,h:e,m:!0,_:0}}function kxe(e){var t=e[vr];t.i===0||t.i===1?t.j():t.O=!0}function EC(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ql("ES5").S(t,e,r),r?(n[vr].P&&(h3(t),Vs(4)),ac(e)&&(e=p3(t,e),t.l||g3(t,e)),t.u&&Ql("Patches").M(n[vr].t,e,t.u,t.s)):e=p3(t,n,[]),h3(t),t.u&&t.v(t.u,t.s),e!==yW?e:void 0}function p3(e,t,n){if(iE(t))return t;var r=t[vr];if(!r)return Xh(t,function(s,l){return LO(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return g3(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=nE(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),Xh(o,function(s,l){return LO(e,r,i,s,l,n,a)}),g3(e,i,!1),n&&e.u&&Ql("Patches").N(r,n,e.u,e.s)}return r.o}function LO(e,t,n,r,i,o,a){if(Qd(i)){var s=p3(e,i,o&&t&&t.i!==3&&!Pm(t.R,r)?o.concat(r):void 0);if(mW(n,r,s),!Qd(s))return;e.m=!1}else a&&n.add(i);if(ac(i)&&!iE(i)){if(!e.h.D&&e._<1)return;p3(e,i),t&&t.A.l||g3(e,i)}}function g3(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&rE(t,n)}function PC(e,t){var n=e[vr];return(n?fh(n):e)[t]}function AO(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 xd(e){e.P||(e.P=!0,e.l&&xd(e.l))}function TC(e){e.o||(e.o=nE(e.t))}function ck(e,t,n){var r=eE(t)?Ql("MapSet").F(t,n):tE(t)?Ql("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:lk(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Iy;a&&(l=[s],u=h1);var d=Proxy.revocable(l,u),h=d.revoke,m=d.proxy;return s.k=m,s.j=h,m}(t,n):Ql("ES5").J(t,n);return(n?n.A:lk()).p.push(r),r}function Exe(e){return Qd(e)||Vs(22,e),function t(n){if(!ac(n))return n;var r,i=n[vr],o=v0(n);if(i){if(!i.P&&(i.i<4||!Ql("ES5").K(i)))return i.t;i.I=!0,r=OO(n,o),i.I=!1}else r=OO(n,o);return Xh(r,function(a,s){i&&wxe(i.t,a)===s||mW(r,a,t(s))}),o===3?new Set(r):r}(e)}function OO(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return nE(e)}function Pxe(){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[vr];return Iy.get(l,o)},set:function(l){var u=this[vr];Iy.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][vr];if(!s.P)switch(s.i){case 5:r(s)&&xd(s);break;case 4:n(s)&&xd(s)}}}function n(o){for(var a=o.t,s=o.k,l=Tm(s),u=l.length-1;u>=0;u--){var d=l[u];if(d!==vr){var h=a[d];if(h===void 0&&!Pm(a,d))return!0;var m=s[d],y=m&&m[vr];if(y?y.t!==h:!vW(m,h))return!0}}var b=!!a[vr];return l.length!==Tm(a).length+(b?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?_-1:0),T=1;T<_;T++)k[T-1]=arguments[T];return l.produce(w,function(L){var O;return(O=o).call.apply(O,[E,L].concat(k))})}}var u;if(typeof o!="function"&&Vs(6),a!==void 0&&typeof a!="function"&&Vs(7),ac(i)){var d=MO(r),h=ck(r,i,void 0),m=!0;try{u=o(h),m=!1}finally{m?h3(d):uk(d)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(w){return kC(d,a),EC(w,d)},function(w){throw h3(d),w}):(kC(d,a),EC(u,d))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===yW&&(u=void 0),r.D&&rE(u,!0),a){var y=[],b=[];Ql("Patches").M(i,u,y,b),a(y,b)}return u}Vs(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var d=arguments.length,h=Array(d>1?d-1:0),m=1;m=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=Ql("Patches").$;return Qd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Oa=new Axe,xW=Oa.produce;Oa.produceWithPatches.bind(Oa);Oa.setAutoFreeze.bind(Oa);Oa.setUseProxies.bind(Oa);Oa.applyPatches.bind(Oa);Oa.createDraft.bind(Oa);Oa.finishDraft.bind(Oa);function jO(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 NO(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ro(1));return n(aE)(e,t)}if(typeof e!="function")throw new Error(ro(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(ro(3));return o}function h(w){if(typeof w!="function")throw new Error(ro(4));if(l)throw new Error(ro(5));var E=!0;return u(),s.push(w),function(){if(E){if(l)throw new Error(ro(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Oxe(w))throw new Error(ro(7));if(typeof w.type>"u")throw new Error(ro(8));if(l)throw new Error(ro(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,_=0;_"u")throw new Error(ro(12));if(typeof n(void 0,{type:m3.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ro(13))})}function SW(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(ro(14));h[y]=E,d=d||E!==w}return d=d||o.length!==Object.keys(l).length,d?h:l}}function v3(){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 y3}function i(s,l){r(s)===y3&&(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 Nxe=function(t,n){return t===n};function $xe(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]{Object.keys(D).forEach(function(I){T(I)&&d[I]!==D[I]&&m.indexOf(I)===-1&&m.push(I)}),Object.keys(d).forEach(function(I){D[I]===void 0&&T(I)&&m.indexOf(I)===-1&&d[I]!==void 0&&m.push(I)}),y===null&&(y=setInterval(_,i)),d=D},o)}function _(){if(m.length===0){y&&clearInterval(y),y=null;return}var D=m.shift(),I=r.reduce(function(N,W){return W.in(N,D,d)},d[D]);if(I!==void 0)try{h[D]=l(I)}catch(N){console.error("redux-persist/createPersistoid: error serializing state",N)}else delete h[D];m.length===0&&k()}function k(){Object.keys(h).forEach(function(D){d[D]===void 0&&delete h[D]}),b=s.setItem(a,l(h)).catch(L)}function T(D){return!(n&&n.indexOf(D)===-1&&D!=="_persist"||t&&t.indexOf(D)!==-1)}function L(D){u&&u(D)}var O=function(){for(;m.length!==0;)_();return b||Promise.resolve()};return{update:E,flush:O}}function ySe(e){return JSON.stringify(e)}function bSe(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:lE).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=xSe,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,d){return d.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function xSe(e){return JSON.parse(e)}function SSe(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:lE).concat(e.key);return t.removeItem(n,wSe)}function wSe(e){}function VO(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 Ou(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kSe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ESe=5e3;function PSe(e,t){var n=e.version!==void 0?e.version:hSe;e.debug;var r=e.stateReconciler===void 0?mSe:e.stateReconciler,i=e.getStoredState||bSe,o=e.timeout!==void 0?e.timeout:ESe,a=null,s=!1,l=!0,u=function(h){return h._persist.rehydrated&&a&&!l&&a.update(h),h};return function(d,h){var m=d||{},y=m._persist,b=_Se(m,["_persist"]),w=b;if(h.type===PW){var E=!1,_=function(N,W){E||(h.rehydrate(e.key,N,W),E=!0)};if(o&&setTimeout(function(){!E&&_(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=vSe(e)),y)return Ou({},t(w,h),{_persist:y});if(typeof h.rehydrate!="function"||typeof h.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return h.register(e.key),i(e).then(function(I){var N=e.migrate||function(W,B){return Promise.resolve(W)};N(I,n).then(function(W){_(W)},function(W){_(void 0,W)})},function(I){_(void 0,I)}),Ou({},t(w,h),{_persist:{version:n,rehydrated:!1}})}else{if(h.type===TW)return s=!0,h.result(SSe(e)),Ou({},t(w,h),{_persist:y});if(h.type===kW)return h.result(a&&a.flush()),Ou({},t(w,h),{_persist:y});if(h.type===EW)l=!0;else if(h.type===uE){if(s)return Ou({},w,{_persist:Ou({},y,{rehydrated:!0})});if(h.key===e.key){var k=t(w,h),T=h.payload,L=r!==!1&&T!==void 0?r(T,d,k,e):k,O=Ou({},L,{_persist:Ou({},y,{rehydrated:!0})});return u(O)}}}if(!y)return t(d,h);var D=t(w,h);return D===w?d:u(Ou({},D,{_persist:y}))}}function GO(e){return LSe(e)||MSe(e)||TSe()}function TSe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function MSe(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function LSe(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:LW,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case MW:return hk({},t,{registry:[].concat(GO(t.registry),[n.key])});case uE:var r=t.registry.indexOf(n.key),i=GO(t.registry);return i.splice(r,1),hk({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function RSe(e,t,n){var r=n||!1,i=aE(OSe,LW,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:MW,key:u})},a=function(u,d,h){var m={type:uE,payload:d,err:h,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=hk({},i,{purge:function(){var u=[];return e.dispatch({type:TW,result:function(h){u.push(h)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:kW,result:function(h){u.push(h)}}),Promise.all(u)},pause:function(){e.dispatch({type:EW})},persist:function(){e.dispatch({type:PW,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var cE={},dE={};dE.__esModule=!0;dE.default=jSe;function lS(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?lS=function(n){return typeof n}:lS=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lS(e)}function OC(){}var ISe={getItem:OC,setItem:OC,removeItem:OC};function DSe(e){if((typeof self>"u"?"undefined":lS(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function jSe(e){var t="".concat(e,"Storage");return DSe(t)?self[t]:ISe}cE.__esModule=!0;cE.default=FSe;var NSe=$Se(dE);function $Se(e){return e&&e.__esModule?e:{default:e}}function FSe(e){var t=(0,NSe.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var AW=void 0,BSe=zSe(cE);function zSe(e){return e&&e.__esModule?e:{default:e}}var HSe=(0,BSe.default)("local");AW=HSe;var OW={},RW={},Zh={};Object.defineProperty(Zh,"__esModule",{value:!0});Zh.PLACEHOLDER_UNDEFINED=Zh.PACKAGE_NAME=void 0;Zh.PACKAGE_NAME="redux-deep-persist";Zh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var fE={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(fE);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Zh,n=fE,r=function(z){return typeof z=="object"&&z!==null};e.isObjectLike=r;const i=function(z){return typeof z=="number"&&z>-1&&z%1==0&&z<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(z){return(0,e.isLength)(z&&z.length)&&Object.prototype.toString.call(z)==="[object Array]"};const o=function(z){return!!z&&typeof z=="object"&&!(0,e.isArray)(z)};e.isPlainObject=o;const a=function(z){return String(~~z)===z&&Number(z)>=0};e.isIntegerString=a;const s=function(z){return Object.prototype.toString.call(z)==="[object String]"};e.isString=s;const l=function(z){return Object.prototype.toString.call(z)==="[object Date]"};e.isDate=l;const u=function(z){return Object.keys(z).length===0};e.isEmpty=u;const d=Object.prototype.hasOwnProperty,h=function(z,$,V){V||(V=new Set([z])),$||($="");for(const X in z){const Q=$?`${$}.${X}`:X,G=z[X];if((0,e.isObjectLike)(G))return V.has(G)?`${$}.${X}:`:(V.add(G),(0,e.getCircularPath)(G,Q,V))}return null};e.getCircularPath=h;const m=function(z){if(!(0,e.isObjectLike)(z))return z;if((0,e.isDate)(z))return new Date(+z);const $=(0,e.isArray)(z)?[]:{};for(const V in z){const X=z[V];$[V]=(0,e._cloneDeep)(X)}return $};e._cloneDeep=m;const y=function(z){const $=(0,e.getCircularPath)(z);if($)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${$}' of object you're trying to persist: ${z}`);return(0,e._cloneDeep)(z)};e.cloneDeep=y;const b=function(z,$){if(z===$)return{};if(!(0,e.isObjectLike)(z)||!(0,e.isObjectLike)($))return $;const V=(0,e.cloneDeep)(z),X=(0,e.cloneDeep)($),Q=Object.keys(V).reduce((Y,ee)=>(d.call(X,ee)||(Y[ee]=void 0),Y),{});if((0,e.isDate)(V)||(0,e.isDate)(X))return V.valueOf()===X.valueOf()?{}:X;const G=Object.keys(X).reduce((Y,ee)=>{if(!d.call(V,ee))return Y[ee]=X[ee],Y;const fe=(0,e.difference)(V[ee],X[ee]);return(0,e.isObjectLike)(fe)&&(0,e.isEmpty)(fe)&&!(0,e.isDate)(fe)?(0,e.isArray)(V)&&!(0,e.isArray)(X)||!(0,e.isArray)(V)&&(0,e.isArray)(X)?X:Y:(Y[ee]=fe,Y)},Q);return delete G._persist,G};e.difference=b;const w=function(z,$){return $.reduce((V,X)=>{if(V){const Q=parseInt(X,10),G=(0,e.isIntegerString)(X)&&Q<0?V.length+Q:X;return(0,e.isString)(V)?V.charAt(G):V[G]}},z)};e.path=w;const E=function(z,$){return[...z].reverse().reduce((Q,G,Y)=>{const ee=(0,e.isIntegerString)(G)?[]:{};return ee[G]=Y===0?$:Q,ee},{})};e.assocPath=E;const _=function(z,$){const V=(0,e.cloneDeep)(z);return $.reduce((X,Q,G)=>(G===$.length-1&&X&&(0,e.isObjectLike)(X)&&delete X[Q],X&&X[Q]),V),V};e.dissocPath=_;const k=function(z,$,...V){if(!V||!V.length)return $;const X=V.shift(),{preservePlaceholder:Q,preserveUndefined:G}=z;if((0,e.isObjectLike)($)&&(0,e.isObjectLike)(X))for(const Y in X)if((0,e.isObjectLike)(X[Y])&&(0,e.isObjectLike)($[Y]))$[Y]||($[Y]={}),k(z,$[Y],X[Y]);else if((0,e.isArray)($)){let ee=X[Y];const fe=Q?t.PLACEHOLDER_UNDEFINED:void 0;G||(ee=typeof ee<"u"?ee:$[parseInt(Y,10)]),ee=ee!==t.PLACEHOLDER_UNDEFINED?ee:fe,$[parseInt(Y,10)]=ee}else{const ee=X[Y]!==t.PLACEHOLDER_UNDEFINED?X[Y]:void 0;$[Y]=ee}return k(z,$,...V)},T=function(z,$,V){return k({preservePlaceholder:V==null?void 0:V.preservePlaceholder,preserveUndefined:V==null?void 0:V.preserveUndefined},(0,e.cloneDeep)(z),(0,e.cloneDeep)($))};e.mergeDeep=T;const L=function(z,$=[],V,X,Q){if(!(0,e.isObjectLike)(z))return z;for(const G in z){const Y=z[G],ee=(0,e.isArray)(z),fe=X?X+"."+G:G;Y===null&&(V===n.ConfigType.WHITELIST&&$.indexOf(fe)===-1||V===n.ConfigType.BLACKLIST&&$.indexOf(fe)!==-1)&&ee&&(z[parseInt(G,10)]=void 0),Y===void 0&&Q&&V===n.ConfigType.BLACKLIST&&$.indexOf(fe)===-1&&ee&&(z[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),L(Y,$,V,fe,Q)}},O=function(z,$,V,X){const Q=(0,e.cloneDeep)(z);return L(Q,$,V,"",X),Q};e.preserveUndefined=O;const D=function(z,$,V){return V.indexOf(z)===$};e.unique=D;const I=function(z){return z.reduce(($,V)=>{const X=z.filter(Ce=>Ce===V),Q=z.filter(Ce=>(V+".").indexOf(Ce+".")===0),{duplicates:G,subsets:Y}=$,ee=X.length>1&&G.indexOf(V)===-1,fe=Q.length>1;return{duplicates:[...G,...ee?X:[]],subsets:[...Y,...fe?Q:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=I;const N=function(z,$,V){const X=V===n.ConfigType.WHITELIST?"whitelist":"blacklist",Q=`${t.PACKAGE_NAME}: incorrect ${X} configuration.`,G=`Check your create${V===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)($)||$.length<1)throw new Error(`${Q} Name (key) of reducer is required. ${G}`);if(!z||!z.length)return;const{duplicates:Y,subsets:ee}=(0,e.findDuplicatesAndSubsets)(z);if(Y.length>1)throw new Error(`${Q} Duplicated paths. - - ${JSON.stringify(Y)} - - ${G}`);if(ee.length>1)throw new Error(`${Q} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(ee)} - - ${G}`)};e.singleTransformValidator=N;const W=function(z){if(!(0,e.isArray)(z))return;const $=(z==null?void 0:z.map(V=>V.deepPersistKey).filter(V=>V))||[];if($.length){const V=$.filter((X,Q)=>$.indexOf(X)!==Q);if(V.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(V)}`)}};e.transformsValidator=W;const B=function({whitelist:z,blacklist:$}){if(z&&z.length&&$&&$.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(z){const{duplicates:V,subsets:X}=(0,e.findDuplicatesAndSubsets)(z);(0,e.throwError)({duplicates:V,subsets:X},"whitelist")}if($){const{duplicates:V,subsets:X}=(0,e.findDuplicatesAndSubsets)($);(0,e.throwError)({duplicates:V,subsets:X},"blacklist")}};e.configValidator=B;const K=function({duplicates:z,subsets:$},V){if(z.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${V}. - - ${JSON.stringify(z)}`);if($.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${V}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify($)}`)};e.throwError=K;const ne=function(z){return(0,e.isArray)(z)?z.filter(e.unique).reduce(($,V)=>{const X=V.split("."),Q=X[0],G=X.slice(1).join(".")||void 0,Y=$.filter(fe=>Object.keys(fe)[0]===Q)[0],ee=Y?Object.values(Y)[0]:void 0;return Y||$.push({[Q]:G?[G]:void 0}),Y&&!ee&&G&&(Y[Q]=[G]),Y&&ee&&G&&ee.push(G),$},[]):[]};e.getRootKeysGroup=ne})(RW);(function(e){var t=So&&So.__rest||function(h,m){var y={};for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&m.indexOf(b)<0&&(y[b]=h[b]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(h);w!E(k)&&h?h(_,k,T):_,out:(_,k,T)=>!E(k)&&m?m(_,k,T):_,deepPersistKey:b&&b[0]}},a=(h,m,y,{debug:b,whitelist:w,blacklist:E,transforms:_})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(_);const k=(0,n.cloneDeep)(y);let T=h;if(T&&(0,n.isObjectLike)(T)){const L=(0,n.difference)(m,y);(0,n.isEmpty)(L)||(T=(0,n.mergeDeep)(h,L,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(L)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(h,m)=>((0,n.singleTransformValidator)(m,h,i.ConfigType.WHITELIST),o(y=>{if(!m||!m.length)return y;let b=null,w;return m.forEach(E=>{const _=E.split(".");w=(0,n.path)(y,_),typeof w>"u"&&(0,n.isIntegerString)(_[_.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(_,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||y},y=>(0,n.preserveUndefined)(y,m,i.ConfigType.WHITELIST),{whitelist:[h]}));e.createWhitelist=s;const l=(h,m)=>((0,n.singleTransformValidator)(m,h,i.ConfigType.BLACKLIST),o(y=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(y,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,_)=>(0,n.dissocPath)(E,_),b)},y=>(0,n.preserveUndefined)(y,m,i.ConfigType.BLACKLIST),{whitelist:[h]}));e.createBlacklist=l;const u=function(h,m){return m.map(y=>{const b=Object.keys(y)[0],w=y[b];return h===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const d=h=>{var{key:m,whitelist:y,blacklist:b,storage:w,transforms:E,rootReducer:_}=h,k=t(h,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:y,blacklist:b});const T=(0,n.getRootKeysGroup)(y),L=(0,n.getRootKeysGroup)(b),O=Object.keys(_(void 0,{type:""})),D=T.map(ne=>Object.keys(ne)[0]),I=L.map(ne=>Object.keys(ne)[0]),N=O.filter(ne=>D.indexOf(ne)===-1&&I.indexOf(ne)===-1),W=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),B=(0,e.getTransforms)(i.ConfigType.BLACKLIST,L),K=(0,n.isArray)(y)?N.map(ne=>(0,e.createBlacklist)(ne)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...W,...B,...K,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=d})(OW);const Cd=(e,t)=>Math.floor(e/t)*t,Hl=(e,t)=>Math.round(e/t)*t;var Pe={},WSe={get exports(){return Pe},set exports(e){Pe=e}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",h=1,m=2,y=4,b=1,w=2,E=1,_=2,k=4,T=8,L=16,O=32,D=64,I=128,N=256,W=512,B=30,K="...",ne=800,z=16,$=1,V=2,X=3,Q=1/0,G=9007199254740991,Y=17976931348623157e292,ee=0/0,fe=4294967295,Ce=fe-1,we=fe>>>1,xe=[["ary",I],["bind",E],["bindKey",_],["curry",T],["curryRight",L],["flip",W],["partial",O],["partialRight",D],["rearg",N]],Le="[object Arguments]",Se="[object Array]",Qe="[object AsyncFunction]",Xe="[object Boolean]",tt="[object Date]",yt="[object DOMException]",Be="[object Error]",Ae="[object Function]",bt="[object GeneratorFunction]",Fe="[object Map]",at="[object Number]",jt="[object Null]",mt="[object Object]",Zt="[object Promise]",on="[object Proxy]",se="[object RegExp]",Ie="[object Set]",He="[object String]",Ue="[object Symbol]",ye="[object Undefined]",je="[object WeakMap]",vt="[object WeakSet]",Mt="[object ArrayBuffer]",Me="[object DataView]",Ct="[object Float32Array]",zt="[object Float64Array]",$n="[object Int8Array]",qe="[object Int16Array]",pt="[object Int32Array]",zr="[object Uint8Array]",rr="[object Uint8ClampedArray]",Bn="[object Uint16Array]",li="[object Uint32Array]",vs=/\b__p \+= '';/g,tl=/\b(__p \+=) '' \+/g,gf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ys=/&(?:amp|lt|gt|quot|#39);/g,Xi=/[&<>"']/g,_0=RegExp(ys.source),Na=RegExp(Xi.source),wp=/<%-([\s\S]+?)%>/g,k0=/<%([\s\S]+?)%>/g,bc=/<%=([\s\S]+?)%>/g,Cp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_p=/^\w*$/,na=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mf=/[\\^$.*+?()[\]{}|]/g,E0=RegExp(mf.source),xc=/^\s+/,vf=/\s/,P0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nl=/\{\n\/\* \[wrapped with (.+)\] \*/,Sc=/,? & /,T0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,M0=/[()=,{}\[\]\/\s]/,L0=/\\(\\)?/g,A0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,bs=/\w*$/,O0=/^[-+]0x[0-9a-f]+$/i,R0=/^0b[01]+$/i,I0=/^\[object .+?Constructor\]$/,D0=/^0o[0-7]+$/i,j0=/^(?:0|[1-9]\d*)$/,N0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rl=/($^)/,$0=/['\n\r\u2028\u2029\\]/g,xs="\\ud800-\\udfff",fu="\\u0300-\\u036f",hu="\\ufe20-\\ufe2f",il="\\u20d0-\\u20ff",pu=fu+hu+il,kp="\\u2700-\\u27bf",wc="a-z\\xdf-\\xf6\\xf8-\\xff",ol="\\xac\\xb1\\xd7\\xf7",ra="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mn="\\u2000-\\u206f",wn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ia="A-Z\\xc0-\\xd6\\xd8-\\xde",Hr="\\ufe0e\\ufe0f",ui=ol+ra+Mn+wn,oa="['’]",al="["+xs+"]",ci="["+ui+"]",Ss="["+pu+"]",yf="\\d+",gu="["+kp+"]",ws="["+wc+"]",bf="[^"+xs+ui+yf+kp+wc+ia+"]",Ri="\\ud83c[\\udffb-\\udfff]",Ep="(?:"+Ss+"|"+Ri+")",Pp="[^"+xs+"]",xf="(?:\\ud83c[\\udde6-\\uddff]){2}",sl="[\\ud800-\\udbff][\\udc00-\\udfff]",Mo="["+ia+"]",ll="\\u200d",mu="(?:"+ws+"|"+bf+")",F0="(?:"+Mo+"|"+bf+")",Cc="(?:"+oa+"(?:d|ll|m|re|s|t|ve))?",_c="(?:"+oa+"(?:D|LL|M|RE|S|T|VE))?",Sf=Ep+"?",kc="["+Hr+"]?",$a="(?:"+ll+"(?:"+[Pp,xf,sl].join("|")+")"+kc+Sf+")*",wf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Gt=kc+Sf+$a,Tp="(?:"+[gu,xf,sl].join("|")+")"+Gt,Ec="(?:"+[Pp+Ss+"?",Ss,xf,sl,al].join("|")+")",Pc=RegExp(oa,"g"),Mp=RegExp(Ss,"g"),aa=RegExp(Ri+"(?="+Ri+")|"+Ec+Gt,"g"),Xn=RegExp([Mo+"?"+ws+"+"+Cc+"(?="+[ci,Mo,"$"].join("|")+")",F0+"+"+_c+"(?="+[ci,Mo+mu,"$"].join("|")+")",Mo+"?"+mu+"+"+Cc,Mo+"+"+_c,vu,wf,yf,Tp].join("|"),"g"),Cf=RegExp("["+ll+xs+pu+Hr+"]"),Lp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_f=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ap=-1,cn={};cn[Ct]=cn[zt]=cn[$n]=cn[qe]=cn[pt]=cn[zr]=cn[rr]=cn[Bn]=cn[li]=!0,cn[Le]=cn[Se]=cn[Mt]=cn[Xe]=cn[Me]=cn[tt]=cn[Be]=cn[Ae]=cn[Fe]=cn[at]=cn[mt]=cn[se]=cn[Ie]=cn[He]=cn[je]=!1;var qt={};qt[Le]=qt[Se]=qt[Mt]=qt[Me]=qt[Xe]=qt[tt]=qt[Ct]=qt[zt]=qt[$n]=qt[qe]=qt[pt]=qt[Fe]=qt[at]=qt[mt]=qt[se]=qt[Ie]=qt[He]=qt[Ue]=qt[zr]=qt[rr]=qt[Bn]=qt[li]=!0,qt[Be]=qt[Ae]=qt[je]=!1;var Op={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},B0={"&":"&","<":"<",">":">",'"':""","'":"'"},q={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,ot=parseInt,Ht=typeof So=="object"&&So&&So.Object===Object&&So,mn=typeof self=="object"&&self&&self.Object===Object&&self,St=Ht||mn||Function("return this")(),Ot=t&&!t.nodeType&&t,Kt=Ot&&!0&&e&&!e.nodeType&&e,Jr=Kt&&Kt.exports===Ot,Ar=Jr&&Ht.process,vn=function(){try{var ie=Kt&&Kt.require&&Kt.require("util").types;return ie||Ar&&Ar.binding&&Ar.binding("util")}catch{}}(),di=vn&&vn.isArrayBuffer,Lo=vn&&vn.isDate,uo=vn&&vn.isMap,Fa=vn&&vn.isRegExp,ul=vn&&vn.isSet,z0=vn&&vn.isTypedArray;function Ii(ie,be,me){switch(me.length){case 0:return ie.call(be);case 1:return ie.call(be,me[0]);case 2:return ie.call(be,me[0],me[1]);case 3:return ie.call(be,me[0],me[1],me[2])}return ie.apply(be,me)}function H0(ie,be,me,rt){for(var Lt=-1,en=ie==null?0:ie.length;++Lt-1}function Rp(ie,be,me){for(var rt=-1,Lt=ie==null?0:ie.length;++rt-1;);return me}function Cs(ie,be){for(var me=ie.length;me--&&Lc(be,ie[me],0)>-1;);return me}function U0(ie,be){for(var me=ie.length,rt=0;me--;)ie[me]===be&&++rt;return rt}var A2=Tf(Op),_s=Tf(B0);function dl(ie){return"\\"+re[ie]}function Dp(ie,be){return ie==null?n:ie[be]}function bu(ie){return Cf.test(ie)}function jp(ie){return Lp.test(ie)}function O2(ie){for(var be,me=[];!(be=ie.next()).done;)me.push(be.value);return me}function Np(ie){var be=-1,me=Array(ie.size);return ie.forEach(function(rt,Lt){me[++be]=[Lt,rt]}),me}function $p(ie,be){return function(me){return ie(be(me))}}function ua(ie,be){for(var me=-1,rt=ie.length,Lt=0,en=[];++me-1}function Z2(c,v){var C=this.__data__,A=Ur(C,c);return A<0?(++this.size,C.push([c,v])):C[A][1]=v,this}ca.prototype.clear=Y2,ca.prototype.delete=X2,ca.prototype.get=ov,ca.prototype.has=av,ca.prototype.set=Z2;function da(c){var v=-1,C=c==null?0:c.length;for(this.clear();++v=v?c:v)),c}function wi(c,v,C,A,j,H){var Z,te=v&h,ce=v&m,_e=v&y;if(C&&(Z=j?C(c,A,j,H):C(c)),Z!==n)return Z;if(!Cr(c))return c;var Ee=$t(c);if(Ee){if(Z=kK(c),!te)return Bi(c,Z)}else{var Re=ki(c),nt=Re==Ae||Re==bt;if(id(c))return wl(c,te);if(Re==mt||Re==Le||nt&&!j){if(Z=ce||nt?{}:AP(c),!te)return ce?_v(c,Kc(Z,c)):No(c,st(Z,c))}else{if(!qt[Re])return j?c:{};Z=EK(c,Re,te)}}H||(H=new Rr);var gt=H.get(c);if(gt)return gt;H.set(c,Z),aT(c)?c.forEach(function(kt){Z.add(wi(kt,v,C,kt,c,H))}):iT(c)&&c.forEach(function(kt,Xt){Z.set(Xt,wi(kt,v,C,Xt,c,H))});var _t=_e?ce?ge:ma:ce?Fo:Ei,Vt=Ee?n:_t(c);return Zn(Vt||c,function(kt,Xt){Vt&&(Xt=kt,kt=c[Xt]),pl(Z,Xt,wi(kt,v,C,Xt,c,H))}),Z}function Gp(c){var v=Ei(c);return function(C){return qp(C,c,v)}}function qp(c,v,C){var A=C.length;if(c==null)return!A;for(c=dn(c);A--;){var j=C[A],H=v[j],Z=c[j];if(Z===n&&!(j in c)||!H(Z))return!1}return!0}function cv(c,v,C){if(typeof c!="function")throw new Di(a);return Mv(function(){c.apply(n,C)},v)}function Yc(c,v,C,A){var j=-1,H=Zi,Z=!0,te=c.length,ce=[],_e=v.length;if(!te)return ce;C&&(v=Hn(v,Wr(C))),A?(H=Rp,Z=!1):v.length>=i&&(H=Oc,Z=!1,v=new Wa(v));e:for(;++jj?0:j+C),A=A===n||A>j?j:Ft(A),A<0&&(A+=j),A=C>A?0:lT(A);C0&&C(te)?v>1?Vr(te,v-1,C,A,j):Ba(j,te):A||(j[j.length]=te)}return j}var Yp=Cl(),Io=Cl(!0);function ga(c,v){return c&&Yp(c,v,Ei)}function Do(c,v){return c&&Io(c,v,Ei)}function Xp(c,v){return Oo(v,function(C){return Tu(c[C])})}function gl(c,v){v=Sl(v,c);for(var C=0,A=v.length;c!=null&&Cv}function Qp(c,v){return c!=null&&an.call(c,v)}function Jp(c,v){return c!=null&&v in dn(c)}function eg(c,v,C){return c>=hi(v,C)&&c=120&&Ee.length>=120)?new Wa(Z&&Ee):n}Ee=c[0];var Re=-1,nt=te[0];e:for(;++Re-1;)te!==c&&jf.call(te,ce,1),jf.call(c,ce,1);return c}function Vf(c,v){for(var C=c?v.length:0,A=C-1;C--;){var j=v[C];if(C==A||j!==H){var H=j;Pu(j)?jf.call(c,j,1):cg(c,j)}}return c}function Gf(c,v){return c+Su(J0()*(v-c+1))}function bl(c,v,C,A){for(var j=-1,H=Or(Ff((v-c)/(C||1)),0),Z=me(H);H--;)Z[A?H:++j]=c,c+=C;return Z}function td(c,v){var C="";if(!c||v<1||v>G)return C;do v%2&&(C+=c),v=Su(v/2),v&&(c+=c);while(v);return C}function Tt(c,v){return U4(IP(c,v,Bo),c+"")}function og(c){return qc(vg(c))}function qf(c,v){var C=vg(c);return ob(C,Cu(v,0,C.length))}function ku(c,v,C,A){if(!Cr(c))return c;v=Sl(v,c);for(var j=-1,H=v.length,Z=H-1,te=c;te!=null&&++jj?0:j+v),C=C>j?j:C,C<0&&(C+=j),j=v>C?0:C-v>>>0,v>>>=0;for(var H=me(j);++A>>1,Z=c[H];Z!==null&&!va(Z)&&(C?Z<=v:Z=i){var _e=v?null:U(c);if(_e)return Of(_e);Z=!1,j=Oc,ce=new Wa}else ce=v?[]:te;e:for(;++A=A?c:qr(c,v,C)}var xv=N2||function(c){return St.clearTimeout(c)};function wl(c,v){if(v)return c.slice();var C=c.length,A=Nc?Nc(C):new c.constructor(C);return c.copy(A),A}function Sv(c){var v=new c.constructor(c.byteLength);return new ji(v).set(new ji(c)),v}function Eu(c,v){var C=v?Sv(c.buffer):c.buffer;return new c.constructor(C,c.byteOffset,c.byteLength)}function tb(c){var v=new c.constructor(c.source,bs.exec(c));return v.lastIndex=c.lastIndex,v}function Qn(c){return zf?dn(zf.call(c)):{}}function nb(c,v){var C=v?Sv(c.buffer):c.buffer;return new c.constructor(C,c.byteOffset,c.length)}function wv(c,v){if(c!==v){var C=c!==n,A=c===null,j=c===c,H=va(c),Z=v!==n,te=v===null,ce=v===v,_e=va(v);if(!te&&!_e&&!H&&c>v||H&&Z&&ce&&!te&&!_e||A&&Z&&ce||!C&&ce||!j)return 1;if(!A&&!H&&!_e&&c=te)return ce;var _e=C[A];return ce*(_e=="desc"?-1:1)}}return c.index-v.index}function rb(c,v,C,A){for(var j=-1,H=c.length,Z=C.length,te=-1,ce=v.length,_e=Or(H-Z,0),Ee=me(ce+_e),Re=!A;++te1?C[j-1]:n,Z=j>2?C[2]:n;for(H=c.length>3&&typeof H=="function"?(j--,H):n,Z&&mo(C[0],C[1],Z)&&(H=j<3?n:H,j=1),v=dn(v);++A-1?j[H?v[Z]:Z]:n}}function Ev(c){return gr(function(v){var C=v.length,A=C,j=fo.prototype.thru;for(c&&v.reverse();A--;){var H=v[A];if(typeof H!="function")throw new Di(a);if(j&&!Z&&ve(H)=="wrapper")var Z=new fo([],!0)}for(A=Z?A:C;++A1&&tn.reverse(),Ee&&cete))return!1;var _e=H.get(c),Ee=H.get(v);if(_e&&Ee)return _e==v&&Ee==c;var Re=-1,nt=!0,gt=C&w?new Wa:n;for(H.set(c,v),H.set(v,c);++Re1?"& ":"")+v[A],v=v.join(C>2?", ":" "),c.replace(P0,`{ -/* [wrapped with `+v+`] */ -`)}function TK(c){return $t(c)||th(c)||!!(Z0&&c&&c[Z0])}function Pu(c,v){var C=typeof c;return v=v??G,!!v&&(C=="number"||C!="symbol"&&j0.test(c))&&c>-1&&c%1==0&&c0){if(++v>=ne)return arguments[0]}else v=0;return c.apply(n,arguments)}}function ob(c,v){var C=-1,A=c.length,j=A-1;for(v=v===n?A:v;++C1?c[v-1]:n;return C=typeof C=="function"?(c.pop(),C):n,GP(c,C)});function qP(c){var v=F(c);return v.__chain__=!0,v}function FY(c,v){return v(c),c}function ab(c,v){return v(c)}var BY=gr(function(c){var v=c.length,C=v?c[0]:0,A=this.__wrapped__,j=function(H){return Vp(H,c)};return v>1||this.__actions__.length||!(A instanceof Yt)||!Pu(C)?this.thru(j):(A=A.slice(C,+C+(v?1:0)),A.__actions__.push({func:ab,args:[j],thisArg:n}),new fo(A,this.__chain__).thru(function(H){return v&&!H.length&&H.push(n),H}))});function zY(){return qP(this)}function HY(){return new fo(this.value(),this.__chain__)}function WY(){this.__values__===n&&(this.__values__=sT(this.value()));var c=this.__index__>=this.__values__.length,v=c?n:this.__values__[this.__index__++];return{done:c,value:v}}function UY(){return this}function VY(c){for(var v,C=this;C instanceof Hf;){var A=BP(C);A.__index__=0,A.__values__=n,v?j.__wrapped__=A:v=A;var j=A;C=C.__wrapped__}return j.__wrapped__=c,v}function GY(){var c=this.__wrapped__;if(c instanceof Yt){var v=c;return this.__actions__.length&&(v=new Yt(this)),v=v.reverse(),v.__actions__.push({func:ab,args:[V4],thisArg:n}),new fo(v,this.__chain__)}return this.thru(V4)}function qY(){return xl(this.__wrapped__,this.__actions__)}var KY=fg(function(c,v,C){an.call(c,C)?++c[C]:fa(c,C,1)});function YY(c,v,C){var A=$t(c)?zn:dv;return C&&mo(c,v,C)&&(v=n),A(c,Oe(v,3))}function XY(c,v){var C=$t(c)?Oo:pa;return C(c,Oe(v,3))}var ZY=kv(zP),QY=kv(HP);function JY(c,v){return Vr(sb(c,v),1)}function eX(c,v){return Vr(sb(c,v),Q)}function tX(c,v,C){return C=C===n?1:Ft(C),Vr(sb(c,v),C)}function KP(c,v){var C=$t(c)?Zn:Ps;return C(c,Oe(v,3))}function YP(c,v){var C=$t(c)?Ao:Kp;return C(c,Oe(v,3))}var nX=fg(function(c,v,C){an.call(c,C)?c[C].push(v):fa(c,C,[v])});function rX(c,v,C,A){c=$o(c)?c:vg(c),C=C&&!A?Ft(C):0;var j=c.length;return C<0&&(C=Or(j+C,0)),fb(c)?C<=j&&c.indexOf(v,C)>-1:!!j&&Lc(c,v,C)>-1}var iX=Tt(function(c,v,C){var A=-1,j=typeof v=="function",H=$o(c)?me(c.length):[];return Ps(c,function(Z){H[++A]=j?Ii(v,Z,C):Ts(Z,v,C)}),H}),oX=fg(function(c,v,C){fa(c,C,v)});function sb(c,v){var C=$t(c)?Hn:Dr;return C(c,Oe(v,3))}function aX(c,v,C,A){return c==null?[]:($t(v)||(v=v==null?[]:[v]),C=A?n:C,$t(C)||(C=C==null?[]:[C]),$i(c,v,C))}var sX=fg(function(c,v,C){c[C?0:1].push(v)},function(){return[[],[]]});function lX(c,v,C){var A=$t(c)?kf:Ip,j=arguments.length<3;return A(c,Oe(v,4),C,j,Ps)}function uX(c,v,C){var A=$t(c)?P2:Ip,j=arguments.length<3;return A(c,Oe(v,4),C,j,Kp)}function cX(c,v){var C=$t(c)?Oo:pa;return C(c,cb(Oe(v,3)))}function dX(c){var v=$t(c)?qc:og;return v(c)}function fX(c,v,C){(C?mo(c,v,C):v===n)?v=1:v=Ft(v);var A=$t(c)?Si:qf;return A(c,v)}function hX(c){var v=$t(c)?j4:_i;return v(c)}function pX(c){if(c==null)return 0;if($o(c))return fb(c)?za(c):c.length;var v=ki(c);return v==Fe||v==Ie?c.size:Gr(c).length}function gX(c,v,C){var A=$t(c)?Tc:jo;return C&&mo(c,v,C)&&(v=n),A(c,Oe(v,3))}var mX=Tt(function(c,v){if(c==null)return[];var C=v.length;return C>1&&mo(c,v[0],v[1])?v=[]:C>2&&mo(v[0],v[1],v[2])&&(v=[v[0]]),$i(c,Vr(v,1),[])}),lb=$2||function(){return St.Date.now()};function vX(c,v){if(typeof v!="function")throw new Di(a);return c=Ft(c),function(){if(--c<1)return v.apply(this,arguments)}}function XP(c,v,C){return v=C?n:v,v=c&&v==null?c.length:v,he(c,I,n,n,n,n,v)}function ZP(c,v){var C;if(typeof v!="function")throw new Di(a);return c=Ft(c),function(){return--c>0&&(C=v.apply(this,arguments)),c<=1&&(v=n),C}}var q4=Tt(function(c,v,C){var A=E;if(C.length){var j=ua(C,et(q4));A|=O}return he(c,A,v,C,j)}),QP=Tt(function(c,v,C){var A=E|_;if(C.length){var j=ua(C,et(QP));A|=O}return he(v,A,c,C,j)});function JP(c,v,C){v=C?n:v;var A=he(c,T,n,n,n,n,n,v);return A.placeholder=JP.placeholder,A}function eT(c,v,C){v=C?n:v;var A=he(c,L,n,n,n,n,n,v);return A.placeholder=eT.placeholder,A}function tT(c,v,C){var A,j,H,Z,te,ce,_e=0,Ee=!1,Re=!1,nt=!0;if(typeof c!="function")throw new Di(a);v=Ga(v)||0,Cr(C)&&(Ee=!!C.leading,Re="maxWait"in C,H=Re?Or(Ga(C.maxWait)||0,v):H,nt="trailing"in C?!!C.trailing:nt);function gt(Yr){var Rs=A,Lu=j;return A=j=n,_e=Yr,Z=c.apply(Lu,Rs),Z}function _t(Yr){return _e=Yr,te=Mv(Xt,v),Ee?gt(Yr):Z}function Vt(Yr){var Rs=Yr-ce,Lu=Yr-_e,xT=v-Rs;return Re?hi(xT,H-Lu):xT}function kt(Yr){var Rs=Yr-ce,Lu=Yr-_e;return ce===n||Rs>=v||Rs<0||Re&&Lu>=H}function Xt(){var Yr=lb();if(kt(Yr))return tn(Yr);te=Mv(Xt,Vt(Yr))}function tn(Yr){return te=n,nt&&A?gt(Yr):(A=j=n,Z)}function ya(){te!==n&&xv(te),_e=0,A=ce=j=te=n}function vo(){return te===n?Z:tn(lb())}function ba(){var Yr=lb(),Rs=kt(Yr);if(A=arguments,j=this,ce=Yr,Rs){if(te===n)return _t(ce);if(Re)return xv(te),te=Mv(Xt,v),gt(ce)}return te===n&&(te=Mv(Xt,v)),Z}return ba.cancel=ya,ba.flush=vo,ba}var yX=Tt(function(c,v){return cv(c,1,v)}),bX=Tt(function(c,v,C){return cv(c,Ga(v)||0,C)});function xX(c){return he(c,W)}function ub(c,v){if(typeof c!="function"||v!=null&&typeof v!="function")throw new Di(a);var C=function(){var A=arguments,j=v?v.apply(this,A):A[0],H=C.cache;if(H.has(j))return H.get(j);var Z=c.apply(this,A);return C.cache=H.set(j,Z)||H,Z};return C.cache=new(ub.Cache||da),C}ub.Cache=da;function cb(c){if(typeof c!="function")throw new Di(a);return function(){var v=arguments;switch(v.length){case 0:return!c.call(this);case 1:return!c.call(this,v[0]);case 2:return!c.call(this,v[0],v[1]);case 3:return!c.call(this,v[0],v[1],v[2])}return!c.apply(this,v)}}function SX(c){return ZP(2,c)}var wX=F4(function(c,v){v=v.length==1&&$t(v[0])?Hn(v[0],Wr(Oe())):Hn(Vr(v,1),Wr(Oe()));var C=v.length;return Tt(function(A){for(var j=-1,H=hi(A.length,C);++j=v}),th=ng(function(){return arguments}())?ng:function(c){return jr(c)&&an.call(c,"callee")&&!X0.call(c,"callee")},$t=me.isArray,NX=di?Wr(di):hv;function $o(c){return c!=null&&db(c.length)&&!Tu(c)}function Kr(c){return jr(c)&&$o(c)}function $X(c){return c===!0||c===!1||jr(c)&&Ci(c)==Xe}var id=F2||o5,FX=Lo?Wr(Lo):pv;function BX(c){return jr(c)&&c.nodeType===1&&!Lv(c)}function zX(c){if(c==null)return!0;if($o(c)&&($t(c)||typeof c=="string"||typeof c.splice=="function"||id(c)||mg(c)||th(c)))return!c.length;var v=ki(c);if(v==Fe||v==Ie)return!c.size;if(Tv(c))return!Gr(c).length;for(var C in c)if(an.call(c,C))return!1;return!0}function HX(c,v){return Zc(c,v)}function WX(c,v,C){C=typeof C=="function"?C:n;var A=C?C(c,v):n;return A===n?Zc(c,v,n,C):!!A}function Y4(c){if(!jr(c))return!1;var v=Ci(c);return v==Be||v==yt||typeof c.message=="string"&&typeof c.name=="string"&&!Lv(c)}function UX(c){return typeof c=="number"&&zp(c)}function Tu(c){if(!Cr(c))return!1;var v=Ci(c);return v==Ae||v==bt||v==Qe||v==on}function rT(c){return typeof c=="number"&&c==Ft(c)}function db(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function Cr(c){var v=typeof c;return c!=null&&(v=="object"||v=="function")}function jr(c){return c!=null&&typeof c=="object"}var iT=uo?Wr(uo):$4;function VX(c,v){return c===v||Qc(c,v,At(v))}function GX(c,v,C){return C=typeof C=="function"?C:n,Qc(c,v,At(v),C)}function qX(c){return oT(c)&&c!=+c}function KX(c){if(AK(c))throw new Lt(o);return rg(c)}function YX(c){return c===null}function XX(c){return c==null}function oT(c){return typeof c=="number"||jr(c)&&Ci(c)==at}function Lv(c){if(!jr(c)||Ci(c)!=mt)return!1;var v=$c(c);if(v===null)return!0;var C=an.call(v,"constructor")&&v.constructor;return typeof C=="function"&&C instanceof C&&xr.call(C)==xi}var X4=Fa?Wr(Fa):Sr;function ZX(c){return rT(c)&&c>=-G&&c<=G}var aT=ul?Wr(ul):Wt;function fb(c){return typeof c=="string"||!$t(c)&&jr(c)&&Ci(c)==He}function va(c){return typeof c=="symbol"||jr(c)&&Ci(c)==Ue}var mg=z0?Wr(z0):ei;function QX(c){return c===n}function JX(c){return jr(c)&&ki(c)==je}function eZ(c){return jr(c)&&Ci(c)==vt}var tZ=P(ml),nZ=P(function(c,v){return c<=v});function sT(c){if(!c)return[];if($o(c))return fb(c)?Qi(c):Bi(c);if(Fc&&c[Fc])return O2(c[Fc]());var v=ki(c),C=v==Fe?Np:v==Ie?Of:vg;return C(c)}function Mu(c){if(!c)return c===0?c:0;if(c=Ga(c),c===Q||c===-Q){var v=c<0?-1:1;return v*Y}return c===c?c:0}function Ft(c){var v=Mu(c),C=v%1;return v===v?C?v-C:v:0}function lT(c){return c?Cu(Ft(c),0,fe):0}function Ga(c){if(typeof c=="number")return c;if(va(c))return ee;if(Cr(c)){var v=typeof c.valueOf=="function"?c.valueOf():c;c=Cr(v)?v+"":v}if(typeof c!="string")return c===0?c:+c;c=co(c);var C=R0.test(c);return C||D0.test(c)?ot(c.slice(2),C?2:8):O0.test(c)?ee:+c}function uT(c){return Ua(c,Fo(c))}function rZ(c){return c?Cu(Ft(c),-G,G):c===0?c:0}function _n(c){return c==null?"":po(c)}var iZ=go(function(c,v){if(Tv(v)||$o(v)){Ua(v,Ei(v),c);return}for(var C in v)an.call(v,C)&&pl(c,C,v[C])}),cT=go(function(c,v){Ua(v,Fo(v),c)}),hb=go(function(c,v,C,A){Ua(v,Fo(v),c,A)}),oZ=go(function(c,v,C,A){Ua(v,Ei(v),c,A)}),aZ=gr(Vp);function sZ(c,v){var C=wu(c);return v==null?C:st(C,v)}var lZ=Tt(function(c,v){c=dn(c);var C=-1,A=v.length,j=A>2?v[2]:n;for(j&&mo(v[0],v[1],j)&&(A=1);++C1),H}),Ua(c,ge(c),C),A&&(C=wi(C,h|m|y,Rt));for(var j=v.length;j--;)cg(C,v[j]);return C});function EZ(c,v){return fT(c,cb(Oe(v)))}var PZ=gr(function(c,v){return c==null?{}:vv(c,v)});function fT(c,v){if(c==null)return{};var C=Hn(ge(c),function(A){return[A]});return v=Oe(v),ig(c,C,function(A,j){return v(A,j[0])})}function TZ(c,v,C){v=Sl(v,c);var A=-1,j=v.length;for(j||(j=1,c=n);++Av){var A=c;c=v,v=A}if(C||c%1||v%1){var j=J0();return hi(c+j*(v-c+pe("1e-"+((j+"").length-1))),v)}return Gf(c,v)}var FZ=_l(function(c,v,C){return v=v.toLowerCase(),c+(C?gT(v):v)});function gT(c){return J4(_n(c).toLowerCase())}function mT(c){return c=_n(c),c&&c.replace(N0,A2).replace(Mp,"")}function BZ(c,v,C){c=_n(c),v=po(v);var A=c.length;C=C===n?A:Cu(Ft(C),0,A);var j=C;return C-=v.length,C>=0&&c.slice(C,j)==v}function zZ(c){return c=_n(c),c&&Na.test(c)?c.replace(Xi,_s):c}function HZ(c){return c=_n(c),c&&E0.test(c)?c.replace(mf,"\\$&"):c}var WZ=_l(function(c,v,C){return c+(C?"-":"")+v.toLowerCase()}),UZ=_l(function(c,v,C){return c+(C?" ":"")+v.toLowerCase()}),VZ=pg("toLowerCase");function GZ(c,v,C){c=_n(c),v=Ft(v);var A=v?za(c):0;if(!v||A>=v)return c;var j=(v-A)/2;return f(Su(j),C)+c+f(Ff(j),C)}function qZ(c,v,C){c=_n(c),v=Ft(v);var A=v?za(c):0;return v&&A>>0,C?(c=_n(c),c&&(typeof v=="string"||v!=null&&!X4(v))&&(v=po(v),!v&&bu(c))?Ls(Qi(c),0,C):c.split(v,C)):[]}var eQ=_l(function(c,v,C){return c+(C?" ":"")+J4(v)});function tQ(c,v,C){return c=_n(c),C=C==null?0:Cu(Ft(C),0,c.length),v=po(v),c.slice(C,C+v.length)==v}function nQ(c,v,C){var A=F.templateSettings;C&&mo(c,v,C)&&(v=n),c=_n(c),v=hb({},v,A,We);var j=hb({},v.imports,A.imports,We),H=Ei(j),Z=Af(j,H),te,ce,_e=0,Ee=v.interpolate||rl,Re="__p += '",nt=If((v.escape||rl).source+"|"+Ee.source+"|"+(Ee===bc?A0:rl).source+"|"+(v.evaluate||rl).source+"|$","g"),gt="//# sourceURL="+(an.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ap+"]")+` -`;c.replace(nt,function(kt,Xt,tn,ya,vo,ba){return tn||(tn=ya),Re+=c.slice(_e,ba).replace($0,dl),Xt&&(te=!0,Re+=`' + -__e(`+Xt+`) + -'`),vo&&(ce=!0,Re+=`'; -`+vo+`; -__p += '`),tn&&(Re+=`' + -((__t = (`+tn+`)) == null ? '' : __t) + -'`),_e=ba+kt.length,kt}),Re+=`'; -`;var _t=an.call(v,"variable")&&v.variable;if(!_t)Re=`with (obj) { -`+Re+` -} -`;else if(M0.test(_t))throw new Lt(s);Re=(ce?Re.replace(vs,""):Re).replace(tl,"$1").replace(gf,"$1;"),Re="function("+(_t||"obj")+`) { -`+(_t?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(te?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Re+`return __p -}`;var Vt=yT(function(){return en(H,gt+"return "+Re).apply(n,Z)});if(Vt.source=Re,Y4(Vt))throw Vt;return Vt}function rQ(c){return _n(c).toLowerCase()}function iQ(c){return _n(c).toUpperCase()}function oQ(c,v,C){if(c=_n(c),c&&(C||v===n))return co(c);if(!c||!(v=po(v)))return c;var A=Qi(c),j=Qi(v),H=la(A,j),Z=Cs(A,j)+1;return Ls(A,H,Z).join("")}function aQ(c,v,C){if(c=_n(c),c&&(C||v===n))return c.slice(0,G0(c)+1);if(!c||!(v=po(v)))return c;var A=Qi(c),j=Cs(A,Qi(v))+1;return Ls(A,0,j).join("")}function sQ(c,v,C){if(c=_n(c),c&&(C||v===n))return c.replace(xc,"");if(!c||!(v=po(v)))return c;var A=Qi(c),j=la(A,Qi(v));return Ls(A,j).join("")}function lQ(c,v){var C=B,A=K;if(Cr(v)){var j="separator"in v?v.separator:j;C="length"in v?Ft(v.length):C,A="omission"in v?po(v.omission):A}c=_n(c);var H=c.length;if(bu(c)){var Z=Qi(c);H=Z.length}if(C>=H)return c;var te=C-za(A);if(te<1)return A;var ce=Z?Ls(Z,0,te).join(""):c.slice(0,te);if(j===n)return ce+A;if(Z&&(te+=ce.length-te),X4(j)){if(c.slice(te).search(j)){var _e,Ee=ce;for(j.global||(j=If(j.source,_n(bs.exec(j))+"g")),j.lastIndex=0;_e=j.exec(Ee);)var Re=_e.index;ce=ce.slice(0,Re===n?te:Re)}}else if(c.indexOf(po(j),te)!=te){var nt=ce.lastIndexOf(j);nt>-1&&(ce=ce.slice(0,nt))}return ce+A}function uQ(c){return c=_n(c),c&&_0.test(c)?c.replace(ys,D2):c}var cQ=_l(function(c,v,C){return c+(C?" ":"")+v.toUpperCase()}),J4=pg("toUpperCase");function vT(c,v,C){return c=_n(c),v=C?n:v,v===n?jp(c)?Rf(c):W0(c):c.match(v)||[]}var yT=Tt(function(c,v){try{return Ii(c,n,v)}catch(C){return Y4(C)?C:new Lt(C)}}),dQ=gr(function(c,v){return Zn(v,function(C){C=kl(C),fa(c,C,q4(c[C],c))}),c});function fQ(c){var v=c==null?0:c.length,C=Oe();return c=v?Hn(c,function(A){if(typeof A[1]!="function")throw new Di(a);return[C(A[0]),A[1]]}):[],Tt(function(A){for(var j=-1;++jG)return[];var C=fe,A=hi(c,fe);v=Oe(v),c-=fe;for(var j=Lf(A,v);++C0||v<0)?new Yt(C):(c<0?C=C.takeRight(-c):c&&(C=C.drop(c)),v!==n&&(v=Ft(v),C=v<0?C.dropRight(-v):C.take(v-c)),C)},Yt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Yt.prototype.toArray=function(){return this.take(fe)},ga(Yt.prototype,function(c,v){var C=/^(?:filter|find|map|reject)|While$/.test(v),A=/^(?:head|last)$/.test(v),j=F[A?"take"+(v=="last"?"Right":""):v],H=A||/^find/.test(v);j&&(F.prototype[v]=function(){var Z=this.__wrapped__,te=A?[1]:arguments,ce=Z instanceof Yt,_e=te[0],Ee=ce||$t(Z),Re=function(Xt){var tn=j.apply(F,Ba([Xt],te));return A&&nt?tn[0]:tn};Ee&&C&&typeof _e=="function"&&_e.length!=1&&(ce=Ee=!1);var nt=this.__chain__,gt=!!this.__actions__.length,_t=H&&!nt,Vt=ce&&!gt;if(!H&&Ee){Z=Vt?Z:new Yt(this);var kt=c.apply(Z,te);return kt.__actions__.push({func:ab,args:[Re],thisArg:n}),new fo(kt,nt)}return _t&&Vt?c.apply(this,te):(kt=this.thru(Re),_t?A?kt.value()[0]:kt.value():kt)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(c){var v=Ic[c],C=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);F.prototype[c]=function(){var j=arguments;if(A&&!this.__chain__){var H=this.value();return v.apply($t(H)?H:[],j)}return this[C](function(Z){return v.apply($t(Z)?Z:[],j)})}}),ga(Yt.prototype,function(c,v){var C=F[v];if(C){var A=C.name+"";an.call(ks,A)||(ks[A]=[]),ks[A].push({name:v,func:C})}}),ks[Qf(n,_).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=Ji,Yt.prototype.reverse=Ni,Yt.prototype.value=U2,F.prototype.at=BY,F.prototype.chain=zY,F.prototype.commit=HY,F.prototype.next=WY,F.prototype.plant=VY,F.prototype.reverse=GY,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=qY,F.prototype.first=F.prototype.head,Fc&&(F.prototype[Fc]=UY),F},Ha=Ro();Kt?((Kt.exports=Ha)._=Ha,Ot._=Ha):St._=Ha}).call(So)})(WSe,Pe);const Pg=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Tg=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},USe=.999,VSe=.1,GSe=20,Vv=.95,KO=30,pk=10,YO=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),ih=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=Hl(s/o,64)):o<1&&(r.height=s,r.width=Hl(s*o,64)),a=r.width*r.height;return r},qSe=e=>({width:Hl(e.width,64),height:Hl(e.height,64)}),IW=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],KSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],hE=e=>e.kind==="line"&&e.layer==="mask",YSe=e=>e.kind==="line"&&e.layer==="base",x3=e=>e.kind==="image"&&e.layer==="base",XSe=e=>e.kind==="fillRect"&&e.layer==="base",ZSe=e=>e.kind==="eraseRect"&&e.layer==="base",QSe=e=>e.kind==="line",p1={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},JSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:p1,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},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"},DW=ap({name:"canvas",initialState:JSe,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(Pe.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!hE(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,{stageDimensions:r}=e,i={width:Cd(Pe.clamp(n.width,64,512),64),height:Cd(Pe.clamp(n.height,64,512),64)},o={x:Hl(n.width/2-i.width/2,64),y:Hl(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const l=ih(i);e.scaledBoundingBoxDimensions=l}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(Pe.cloneDeep(e.layerState)),e.layerState={...p1,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Tg(r.width,r.height,n.width,n.height,Vv),s=Pg(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=qSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=ih(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=YO(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=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},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(Pe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Pe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...p1.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(Pe.cloneDeep(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(Pe.cloneDeep(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(Pe.cloneDeep(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(QSe);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(Pe.cloneDeep(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(Pe.cloneDeep(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(Pe.cloneDeep(e.layerState)),e.layerState=p1,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(x3),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const d=Tg(i.width,i.height,512,512,Vv),h=Pg(i.width,i.height,0,0,512,512,d),m={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=h,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const y=ih(m);e.scaledBoundingBoxDimensions=y}return}const{width:o,height:a}=r,l=Tg(t,n,o,a,.95),u=Pg(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=YO(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(x3)){const i=Tg(r.width,r.height,512,512,Vv),o=Pg(r.width,r.height,0,0,512,512,i),a={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=a,e.boundingBoxScaleMethod==="auto"){const s=ih(a);e.scaledBoundingBoxDimensions=s}}},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 d=r?1:Tg(i,o,l,u,Vv),h=Pg(i,o,a,s,l,u,d);e.stageScale=d,e.stageCoordinates=h}else{const d=Tg(i,o,512,512,Vv),h=Pg(i,o,0,0,512,512,d),m={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const y=ih(m);e.scaledBoundingBoxDimensions=y}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Pe.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...p1.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},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:Cd(Pe.clamp(o,64,512),64),height:Cd(Pe.clamp(a,64,512),64)},l={x:Hl(o/2-s.width/2,64),y:Hl(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=ih(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=ih(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},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(Pe.cloneDeep(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}}}),{addEraseRect:jW,addFillRect:NW,addImageToStagingArea:e3e,addLine:t3e,addPointToCurrentLine:$W,clearCanvasHistory:FW,clearMask:pE,commitColorPickerColor:n3e,commitStagingAreaImage:r3e,discardStagedImages:i3e,fitBoundingBoxToStage:vNe,mouseLeftCanvas:o3e,nextStagingAreaImage:a3e,prevStagingAreaImage:s3e,redo:l3e,resetCanvas:gE,resetCanvasInteractionState:u3e,resetCanvasView:BW,resizeAndScaleCanvas:r4,resizeCanvas:c3e,setBoundingBoxCoordinates:RC,setBoundingBoxDimensions:g1,setBoundingBoxPreviewFill:yNe,setBoundingBoxScaleMethod:d3e,setBrushColor:Mm,setBrushSize:Lm,setCanvasContainerDimensions:f3e,setColorPickerColor:h3e,setCursorPosition:p3e,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:i4,setIsDrawing:zW,setIsMaskEnabled:h2,setIsMouseOverBoundingBox:Qb,setIsMoveBoundingBoxKeyHeld:bNe,setIsMoveStageKeyHeld:xNe,setIsMovingBoundingBox:IC,setIsMovingStage:S3,setIsTransformingBoundingBox:DC,setLayer:w3,setMaskColor:HW,setMergedCanvas:g3e,setShouldAutoSave:WW,setShouldCropToBoundingBoxOnSave:UW,setShouldDarkenOutsideBoundingBox:VW,setShouldLockBoundingBox:SNe,setShouldPreserveMaskedArea:GW,setShouldShowBoundingBox:m3e,setShouldShowBrush:wNe,setShouldShowBrushPreview:CNe,setShouldShowCanvasDebugInfo:qW,setShouldShowCheckboardTransparency:_Ne,setShouldShowGrid:KW,setShouldShowIntermediates:YW,setShouldShowStagingImage:v3e,setShouldShowStagingOutline:XO,setShouldSnapToGrid:C3,setStageCoordinates:XW,setStageScale:y3e,setTool:Jl,toggleShouldLockBoundingBox:kNe,toggleTool:ENe,undo:b3e,setScaledBoundingBoxDimensions:Jb,setShouldRestrictStrokesToBox:ZW}=DW.actions,x3e=DW.reducer,S3e={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},QW=ap({name:"gallery",initialState:S3e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Pe.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:sm,clearIntermediateImage:jC,removeImage:JW,setCurrentImage:ZO,addGalleryImages:w3e,setIntermediateImage:C3e,selectNextImage:mE,selectPrevImage:vE,setShouldPinGallery:_3e,setShouldShowGallery:Am,setGalleryScrollPosition:k3e,setGalleryImageMinimumWidth:Gv,setGalleryImageObjectFit:E3e,setShouldHoldGalleryOpen:eU,setShouldAutoSwitchToNewImages:P3e,setCurrentCategory:ex,setGalleryWidth:T3e,setShouldUseSingleGalleryColumn:M3e}=QW.actions,L3e=QW.reducer,A3e={isLightboxOpen:!1},O3e=A3e,tU=ap({name:"lightbox",initialState:O3e,reducers:{setIsLightboxOpen:(e,t)=>{e.isLightboxOpen=t.payload}}}),{setIsLightboxOpen:Om}=tU.actions,R3e=tU.reducer,Rm=e=>typeof e=="string"?e:e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" ");function nU(e){let t=typeof e=="string"?e:Rm(e),n="";const r=new RegExp(/\[([^\][]*)]/,"gi"),i=[...t.matchAll(r)].map(o=>o[1]);return i.length&&(n=i.join(" "),i.forEach(o=>{t=t.replace(`[${o}]`,"").replaceAll("[]","").trim()})),[t,n]}const I3e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return yE(r)?r:!1},yE=e=>Boolean(typeof e=="string"?I3e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),_3=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),D3e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0],10),parseFloat(r[1])]),rU={cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,maskPath:"",perlin:0,prompt:"",negativePrompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:30,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,tileSize:32,variationAmount:.1,width:512,shouldUseSymmetry:!1,horizontalSymmetryTimePercentage:0,verticalSymmetryTimePercentage:0},j3e=rU,iU=ap({name:"generation",initialState:j3e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=Rm(n)},setNegativePrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.negativePrompt=n:e.negativePrompt=Rm(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},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},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},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},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:d,hires_fix:h,width:m,height:y}=t.payload.image;o&&o.length>0?(e.seedWeights=_3(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=Rm(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),typeof l>"u"?e.threshold=0:e.threshold=l,typeof u>"u"?e.perlin=0:e.perlin=u,typeof d=="boolean"&&(e.seamless=d),m&&(e.width=m),y&&(e.height=y)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:d,seamless:h,hires_fix:m,width:y,height:b,strength:w,fit:E,init_image_path:_,mask_image_path:k}=t.payload.image;if(n==="img2img"&&(_&&(e.initialImage=_),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=_3(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i){const[T,L]=nU(i);T&&(e.prompt=T),L?e.negativePrompt=L:e.negativePrompt=""}r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),typeof u>"u"?e.threshold=0:e.threshold=u,typeof d>"u"?e.perlin=0:e.perlin=d,typeof h=="boolean"&&(e.seamless=h),y&&(e.width=y),b&&(e.height=b)},resetParametersState:e=>({...e,...rU}),setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload},setShouldUseSymmetry:(e,t)=>{e.shouldUseSymmetry=t.payload},setHorizontalSymmetryTimePercentage:(e,t)=>{e.horizontalSymmetryTimePercentage=t.payload},setVerticalSymmetryTimePercentage:(e,t)=>{e.verticalSymmetryTimePercentage=t.payload}}}),{clearInitialImage:oU,resetParametersState:PNe,resetSeed:TNe,setAllImageToImageParameters:N3e,setAllParameters:aU,setAllTextToImageParameters:MNe,setCfgScale:gk,setHeight:uS,setImg2imgStrength:mk,setInfillMethod:sU,setInitialImage:y0,setIterations:QO,setMaskPath:lU,setParameter:LNe,setPerlin:vk,setPrompt:uU,setNegativePrompt:cU,setSampler:dU,setSeamBlur:JO,setSeamless:fU,setSeamSize:eR,setSeamSteps:tR,setSeamStrength:nR,setSeed:p2,setSeedWeights:hU,setShouldFitToWidthHeight:pU,setShouldGenerateVariations:$3e,setShouldRandomizeSeed:F3e,setSteps:yk,setThreshold:bk,setTileSize:rR,setVariationAmount:iR,setWidth:cS,setShouldUseSymmetry:B3e,setHorizontalSymmetryTimePercentage:oR,setVerticalSymmetryTimePercentage:aR}=iU.actions,z3e=iU.reducer,gU={codeformerFidelity:.75,facetoolStrength:.75,facetoolType:"gfpgan",hiresFix:!1,hiresStrength:.75,shouldLoopback:!1,shouldRunESRGAN:!1,shouldRunFacetool:!1,upscalingLevel:4,upscalingDenoising:.75,upscalingStrength:.75},H3e=gU,mU=ap({name:"postprocessing",initialState:H3e,reducers:{setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingDenoising:(e,t)=>{e.upscalingDenoising=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setHiresStrength:(e,t)=>{e.hiresStrength=t.payload},resetPostprocessingState:e=>({...e,...gU}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload}}}),{resetPostprocessingState:ANe,setCodeformerFidelity:xk,setFacetoolStrength:k3,setFacetoolType:dS,setHiresFix:vU,setHiresStrength:sR,setShouldLoopback:W3e,setShouldRunESRGAN:U3e,setShouldRunFacetool:V3e,setUpscalingLevel:yU,setUpscalingDenoising:Sk,setUpscalingStrength:wk}=mU.actions,G3e=mU.reducer;function gs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lR(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{};gs(this,e),this.init(t,n)}return ms(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||Y3e,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i1?r-1:0),o=1;o-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var 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 hR(e,t,n){var r=bE(e,t,Object),i=r.obj,o=r.k;i[o]=n}function Q3e(e,t,n,r){var i=bE(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}function E3(e,t){var n=bE(e,t),r=n.obj,i=n.k;if(r)return r[i]}function pR(e,t,n){var r=E3(e,n);return r!==void 0?r:E3(t,n)}function wU(e,t,n){for(var 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]):wU(e[r],t[r],n):e[r]=t[r]);return e}function Mg(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var J3e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function ewe(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return J3e[t]}):e}var a4=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,twe=[" ",",","?","!",";"];function nwe(e,t,n){t=t||"",n=n||"";var r=twe.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function gR(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 tx(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function CU(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,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]}var u=r.slice(o+a).join(n);return u?CU(l,u,n):void 0}i=i[r[o]]}return i}}var owe=function(e){o4(n,e);var t=rwe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return gs(this,n),i=t.call(this),a4&&Jd.call(Fd(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return ms(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,d=[i,o];a&&typeof a!="string"&&(d=d.concat(a)),a&&typeof a=="string"&&(d=d.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(d=i.split("."));var h=E3(this.data,d);return h||!u||typeof a!="string"?h:CU(this.data&&this.data[i]&&this.data[i][o],a,l)}},{key:"addResource",value:function(i,o,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var d=[i,o];a&&(d=d.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(d=i.split("."),s=o,o=d[1]),this.addNamespaces(o),hR(this.data,d,s),l.silent||this.emit("added",i,o,a,s)}},{key:"addResources",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(i,o,l,a[l],{silent:!0});s.silent||this.emit("added",i,o,a)}},{key:"addResourceBundle",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},d=[i,o];i.indexOf(".")>-1&&(d=i.split("."),s=a,a=o,o=d[1]),this.addNamespaces(o);var h=E3(this.data,d)||{};s?wU(h,a,l):h=tx(tx({},h),a),hR(this.data,d,h),u.silent||this.emit("added",i,o,a)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?tx(tx({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Jd),_U={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,i,o))}),n}};function mR(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 yo(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var vR={},yR=function(e){o4(n,e);var t=awe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return gs(this,n),i=t.call(this),a4&&Jd.call(Fd(i)),Z3e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Fd(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Wl.create("translator"),i}return ms(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=a&&i.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!nwe(i,a,s);if(u&&!d){var h=i.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:i,namespaces:l};var m=i.split(a);(a!==s||a===s&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),i=m.join(s)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,a){var s=this;if(Ks(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,d=this.extractFromKey(i[i.length-1],o),h=d.key,m=d.namespaces,y=m[m.length-1],b=o.lng||this.language,w=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b&&b.toLowerCase()==="cimode"){if(w){var E=o.nsSeparator||this.options.nsSeparator;return l?{res:"".concat(y).concat(E).concat(h),usedKey:h,exactUsedKey:h,usedLng:b,usedNS:y}:"".concat(y).concat(E).concat(h)}return l?{res:h,usedKey:h,exactUsedKey:h,usedLng:b,usedNS:y}:h}var _=this.resolve(i,o),k=_&&_.res,T=_&&_.usedKey||h,L=_&&_.exactUsedKey||h,O=Object.prototype.toString.apply(k),D=["[object Number]","[object Function]","[object RegExp]"],I=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject,W=typeof k!="string"&&typeof k!="boolean"&&typeof k!="number";if(N&&k&&W&&D.indexOf(O)<0&&!(typeof I=="string"&&O==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,k,yo(yo({},o),{},{ns:m})):"key '".concat(h," (").concat(this.language,")' returned an object instead of string.");return l?(_.res=B,_):B}if(u){var K=O==="[object Array]",ne=K?[]:{},z=K?L:T;for(var $ in k)if(Object.prototype.hasOwnProperty.call(k,$)){var V="".concat(z).concat(u).concat($);ne[$]=this.translate(V,yo(yo({},o),{joinArrays:!1,ns:m})),ne[$]===V&&(ne[$]=k[$])}k=ne}}else if(N&&typeof I=="string"&&O==="[object Array]")k=k.join(I),k&&(k=this.extendTranslation(k,i,o,a));else{var X=!1,Q=!1,G=o.count!==void 0&&typeof o.count!="string",Y=n.hasDefaultValue(o),ee=G?this.pluralResolver.getSuffix(b,o.count,o):"",fe=o["defaultValue".concat(ee)]||o.defaultValue;!this.isValidLookup(k)&&Y&&(X=!0,k=fe),this.isValidLookup(k)||(Q=!0,k=h);var Ce=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,we=Ce&&Q?void 0:k,xe=Y&&fe!==k&&this.options.updateMissing;if(Q||X||xe){if(this.logger.log(xe?"updateKey":"missingKey",b,y,h,xe?fe:k),u){var Le=this.resolve(h,yo(yo({},o),{},{keySeparator:!1}));Le&&Le.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.")}var Se=[],Qe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Qe&&Qe[0])for(var Xe=0;Xe1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,d,h;return typeof i=="string"&&(i=[i]),i.forEach(function(m){if(!o.isValidLookup(s)){var y=o.extractFromKey(m,a),b=y.key;l=b;var w=y.namespaces;o.options.fallbackNS&&(w=w.concat(o.options.fallbackNS));var E=a.count!==void 0&&typeof a.count!="string",_=E&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),k=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",T=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);w.forEach(function(L){o.isValidLookup(s)||(h=L,!vR["".concat(T[0],"-").concat(L)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(h)&&(vR["".concat(T[0],"-").concat(L)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(T.join(", "),`" won't get resolved as namespace "`).concat(h,'" 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!!!")),T.forEach(function(O){if(!o.isValidLookup(s)){d=O;var D=[b];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(D,b,O,L,a);else{var I;E&&(I=o.pluralResolver.getSuffix(O,a.count,a));var N="".concat(o.options.pluralSeparator,"zero");if(E&&(D.push(b+I),_&&D.push(b+N)),k){var W="".concat(b).concat(o.options.contextSeparator).concat(a.context);D.push(W),E&&(D.push(W+I),_&&D.push(W+N))}}for(var B;B=D.pop();)o.isValidLookup(s)||(u=B,s=o.getResource(O,L,B,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:d,usedNS:h}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,a,s):this.resourceStore.getResource(i,o,a,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&o===a.substring(0,o.length)&&i[a]!==void 0)return!0;return!1}}]),n}(Jd);function NC(e){return e.charAt(0).toUpperCase()+e.slice(1)}var bR=function(){function e(t){gs(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wl.create("languageUtils")}return ms(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=NC(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=NC(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=NC(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var a=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var a=r.getLanguagePartFromCode(o);if(r.isSupportedCode(a))return i=a;i=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(u){u&&(i.isSupportedCode(u)?a.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),o.forEach(function(l){a.indexOf(l)<0&&s(i.formatLanguageCode(l))}),a}}]),e}(),lwe=[{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}],uwe={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},cwe=["v1","v2","v3"],xR={zero:0,one:1,two:2,few:3,many:4,other:5};function dwe(){var e={};return lwe.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:uwe[t.fc]}})}),e}var fwe=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gs(this,e),this.languageUtils=t,this.options=n,this.logger=Wl.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(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=dwe()}return ms(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return xR[a]-xR[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):o.numbers.map(function(a){return r.getSuffix(n,a,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!cwe.includes(this.options.compatibilityJSON)}}]),e}();function SR(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 Fs(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};gs(this,e),this.logger=Wl.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return ms(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:ewe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Mg(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Mg(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Mg(r.nestingPrefix):r.nestingPrefixEscaped||Mg("$t("),this.nestingSuffix=r.nestingSuffix?Mg(r.nestingSuffix):r.nestingSuffixEscaped||Mg(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var a=this,s,l,u,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function h(E){return E.replace(/\$/g,"$$$$")}var m=function(_){if(_.indexOf(a.formatSeparator)<0){var k=pR(r,d,_);return a.alwaysFormat?a.format(k,void 0,i,Fs(Fs(Fs({},o),r),{},{interpolationkey:_})):k}var T=_.split(a.formatSeparator),L=T.shift().trim(),O=T.join(a.formatSeparator).trim();return a.format(pR(r,d,L),O,i,Fs(Fs(Fs({},o),r),{},{interpolationkey:L}))};this.resetRegExp();var y=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,b=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,w=[{regex:this.regexpUnescape,safeValue:function(_){return h(_)}},{regex:this.regexp,safeValue:function(_){return a.escapeValue?h(a.escape(_)):h(_)}}];return w.forEach(function(E){for(u=0;s=E.regex.exec(n);){var _=s[1].trim();if(l=m(_),l===void 0)if(typeof y=="function"){var k=y(n,s,o);l=typeof k=="string"?k:""}else if(o&&Object.prototype.hasOwnProperty.call(o,_))l="";else if(b){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(_," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=fR(l));var T=E.safeValue(l);if(n=n.replace(s[0],T),b?(E.regex.lastIndex+=l.length,E.regex.lastIndex-=s[0].length):E.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;function u(y,b){var w=this.nestingOptionsSeparator;if(y.indexOf(w)<0)return y;var E=y.split(new RegExp("".concat(w,"[ ]*{"))),_="{".concat(E[1]);y=E[0],_=this.interpolate(_,l);var k=_.match(/'/g),T=_.match(/"/g);(k&&k.length%2===0&&!T||T.length%2!==0)&&(_=_.replace(/'/g,'"'));try{l=JSON.parse(_),b&&(l=Fs(Fs({},b),l))}catch(L){return this.logger.warn("failed parsing options string in nesting for key ".concat(y),L),"".concat(y).concat(w).concat(_)}return delete l.defaultValue,y}for(;a=this.nestingRegexp.exec(n);){var d=[];l=Fs({},o),l=l.replace&&typeof l.replace!="string"?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;var h=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var m=a[1].split(this.formatSeparator).map(function(y){return y.trim()});a[1]=m.shift(),d=m,h=!0}if(s=r(u.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=fR(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),h&&(s=d.reduce(function(y,b){return i.format(y,b,o.lng,Fs(Fs({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function wR(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 Ru(e){for(var t=1;t-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(a){if(a){var s=a.split(":"),l=K3e(s),u=l[0],d=l.slice(1),h=d.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=h),h==="false"&&(n[u.trim()]=!1),h==="true"&&(n[u.trim()]=!0),isNaN(h)||(n[u.trim()]=parseInt(h,10))}})}}return{formatName:t,formatOptions:n}}function Lg(e){var t={};return function(r,i,o){var a=i+JSON.stringify(o),s=t[a];return s||(s=e(i,o),t[a]=s),s(r)}}var gwe=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gs(this,e),this.logger=Wl.create("formatter"),this.options=t,this.formats={number:Lg(function(n,r){var i=new Intl.NumberFormat(n,Ru({},r));return function(o){return i.format(o)}}),currency:Lg(function(n,r){var i=new Intl.NumberFormat(n,Ru(Ru({},r),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:Lg(function(n,r){var i=new Intl.DateTimeFormat(n,Ru({},r));return function(o){return i.format(o)}}),relativetime:Lg(function(n,r){var i=new Intl.RelativeTimeFormat(n,Ru({},r));return function(o){return i.format(o,r.range||"day")}}),list:Lg(function(n,r){var i=new Intl.ListFormat(n,Ru({},r));return function(o){return i.format(o)}})},this.init(t)}return ms(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=Lg(r)}},{key:"format",value:function(n,r,i){var o=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=r.split(this.formatSeparator),l=s.reduce(function(u,d){var h=pwe(d),m=h.formatName,y=h.formatOptions;if(o.formats[m]){var b=u;try{var w=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},E=w.locale||w.lng||a.locale||a.lng||i;b=o.formats[m](u,E,Ru(Ru(Ru({},y),a),w))}catch(_){o.logger.warn(_)}return b}else o.logger.warn("there was no format function for ".concat(m));return u},n);return l}}]),e}();function CR(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 _R(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ywe(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var bwe=function(e){o4(n,e);var t=mwe(n);function n(r,i,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return gs(this,n),a=t.call(this),a4&&Jd.call(Fd(a)),a.backend=r,a.store=i,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=Wl.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return ms(n,[{key:"queueLoad",value:function(i,o,a,s){var l=this,u={},d={},h={},m={};return i.forEach(function(y){var b=!0;o.forEach(function(w){var E="".concat(y,"|").concat(w);!a.reload&&l.store.hasResourceBundle(y,w)?l.state[E]=2:l.state[E]<0||(l.state[E]===1?d[E]===void 0&&(d[E]=!0):(l.state[E]=1,b=!1,d[E]===void 0&&(d[E]=!0),u[E]===void 0&&(u[E]=!0),m[w]===void 0&&(m[w]=!0)))}),b||(h[y]=!0)}),(Object.keys(u).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(d),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(m)}}},{key:"loaded",value:function(i,o,a){var s=i.split("|"),l=s[0],u=s[1];o&&this.emit("failedLoading",l,u,o),a&&this.store.addResourceBundle(l,u,a),this.state[i]=o?-1:2;var d={};this.queue.forEach(function(h){Q3e(h.loaded,[l],u),ywe(h,i),o&&h.errors.push(o),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(function(m){d[m]||(d[m]={});var y=h.loaded[m];y.length&&y.forEach(function(b){d[m][b]===void 0&&(d[m][b]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(h){return!h.done})}},{key:"read",value:function(i,o,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,d=arguments.length>5?arguments[5]:void 0;if(!i.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:a,tried:l,wait:u,callback:d});return}this.readingCalls++;var h=function(w,E){if(s.readingCalls--,s.waitingReads.length>0){var _=s.waitingReads.shift();s.read(_.lng,_.ns,_.fcName,_.tried,_.wait,_.callback)}if(w&&E&&l2&&arguments[2]!==void 0?arguments[2]:{},l=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."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(d){a.loadOne(d)})}},{key:"load",value:function(i,o,a){this.prepareLoading(i,o,{},a)}},{key:"reload",value:function(i,o,a){this.prepareLoading(i,o,{reload:!0},a)}},{key:"loadOne",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(d,h){d&&o.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),d),!d&&h&&o.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),h),o.loaded(i,d,h)})}},{key:"saveMissing",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" 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(!(a==null||a==="")){if(this.backend&&this.backend.create){var h=_R(_R({},u),{},{isUpdate:l}),m=this.backend.create.bind(this.backend);if(m.length<6)try{var y;m.length===5?y=m(i,o,a,s,h):y=m(i,o,a,s),y&&typeof y.then=="function"?y.then(function(b){return d(null,b)}).catch(d):d(null,y)}catch(b){d(b)}else m(i,o,a,s,d,h)}!i||!i[0]||this.store.addResource(i[0],o,a,s)}}}]),n}(Jd);function kR(){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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Ks(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Ks(t[2])==="object"||Ks(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ER(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 PR(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 Tl(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nx(){}function wwe(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var P3=function(e){o4(n,e);var t=xwe(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(gs(this,n),r=t.call(this),a4&&Jd.call(Fd(r)),r.options=ER(i),r.services={},r.logger=Wl,r.modules={external:[]},wwe(Fd(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),g2(r,Fd(r));setTimeout(function(){r.init(i,o)},0)}return r}return ms(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=kR();this.options=Tl(Tl(Tl({},s),this.options),ER(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Tl(Tl({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(_){return _?typeof _=="function"?new _:_:null}if(!this.options.isClone){this.modules.logger?Wl.init(l(this.modules.logger),this.options):Wl.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=gwe);var d=new bR(this.options);this.store=new owe(this.options.resources,this.options);var h=this.services;h.logger=Wl,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new fwe(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=l(u),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new hwe(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new bwe(l(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(_){for(var k=arguments.length,T=new Array(k>1?k-1:0),L=1;L1?k-1:0),L=1;L0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var y=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];y.forEach(function(_){i[_]=function(){var k;return(k=i.store)[_].apply(k,arguments)}});var b=["addResource","addResources","addResourceBundle","removeResourceBundle"];b.forEach(function(_){i[_]=function(){var k;return(k=i.store)[_].apply(k,arguments),i}});var w=qv(),E=function(){var k=function(L,O){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),w.resolve(O),a(L,O)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return k(null,i.t.bind(i));i.changeLanguage(i.options.lng,k)};return this.options.resources||!this.options.initImmediate?E():setTimeout(E,0),w}},{key:"loadResources",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nx,s=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],d=function(y){if(y){var b=o.services.languageUtils.toResolveHierarchy(y);b.forEach(function(w){u.indexOf(w)<0&&u.push(w)})}};if(l)d(l);else{var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.forEach(function(m){return d(m)})}this.options.preload&&this.options.preload.forEach(function(m){return d(m)}),this.services.backendConnector.load(u,this.options.ns,function(m){!m&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(m)})}else s(null)}},{key:"reloadResources",value:function(i,o,a){var s=qv();return i||(i=this.languages),o||(o=this.options.ns),a||(a=nx),this.services.backendConnector.reload(i,o,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&_U.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,o){var a=this;this.isLanguageChangingTo=i;var s=qv();this.emit("languageChanging",i);var l=function(m){a.language=m,a.languages=a.services.languageUtils.toResolveHierarchy(m),a.resolvedLanguage=void 0,a.setResolvedLanguage(m)},u=function(m,y){y?(l(y),a.translator.changeLanguage(y),a.isLanguageChangingTo=void 0,a.emit("languageChanged",y),a.logger.log("languageChanged",y)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(m,function(){return a.t.apply(a,arguments)})},d=function(m){!i&&!m&&a.services.languageDetector&&(m=[]);var y=typeof m=="string"?m:a.services.languageUtils.getBestMatchFromCodes(m);y&&(a.language||l(y),a.translator.language||a.translator.changeLanguage(y),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(y)),a.loadResources(y,function(b){u(b,y)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(i),s}},{key:"getFixedT",value:function(i,o,a){var s=this,l=function u(d,h){var m;if(Ks(h)!=="object"){for(var y=arguments.length,b=new Array(y>2?y-2:0),w=2;w1&&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;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var d=function(y,b){var w=o.services.backendConnector.state["".concat(y,"|").concat(b)];return w===-1||w===2};if(a.precheck){var h=a.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(s,i)&&(!l||d(u,i)))}},{key:"loadNamespaces",value:function(i,o){var a=this,s=qv();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),o&&o(l)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var a=qv();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],l=i.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),o&&o(u)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["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"],a=this.services&&this.services.languageUtils||new bR(kR());return o.indexOf(a.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nx,s=Tl(Tl(Tl({},this.options),o),{isClone:!0}),l=new n(s);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(d){l[d]=i[d]}),l.services=Tl({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new yR(l.services,l.options),l.translator.on("*",function(d){for(var h=arguments.length,m=new Array(h>1?h-1:0),y=1;y0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new P3(e,t)});var Et=P3.createInstance();Et.createInstance=P3.createInstance;Et.createInstance;Et.dir;Et.init;Et.loadResources;Et.reloadResources;Et.use;Et.changeLanguage;Et.getFixedT;Et.t;Et.exists;Et.setDefaultNamespace;Et.hasLoadedNamespace;Et.loadNamespaces;Et.loadLanguages;var kU=[],Cwe=kU.forEach,_we=kU.slice;function kwe(e){return Cwe.call(_we.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var TR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ewe=function(t,n,r){var i=r||{};i.path=i.path||"/";var o=encodeURIComponent(n),a="".concat(t,"=").concat(o);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!TR.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!TR.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},MR={create:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),i&&(o.domain=i),document.cookie=Ewe(t,encodeURIComponent(n),o)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),o=i.split("&"),a=0;a0){var l=o[a].substring(0,s);l===t.lookupQuerystring&&(n=o[a].substring(s+1))}}}return n}},Kv=null,LR=function(){if(Kv!==null)return Kv;try{Kv=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Kv=!1}return Kv},Mwe={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&LR()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&LR()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Yv=null,AR=function(){if(Yv!==null)return Yv;try{Yv=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Yv=!1}return Yv},Lwe={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&AR()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&AR()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},Awe={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},Owe={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Rwe={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},Iwe={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function Dwe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var EU=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gs(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return ms(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=kwe(r,this.options||{},Dwe()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Pwe),this.addDetector(Twe),this.addDetector(Mwe),this.addDetector(Lwe),this.addDetector(Awe),this.addDetector(Owe),this.addDetector(Rwe),this.addDetector(Iwe)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(o){if(r.detectors[o]){var a=r.detectors[o].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(o){i.detectors[o]&&i.detectors[o].cacheUserLanguage(n,i.options)}))}}]),e}();EU.type="languageDetector";function Ck(e){return Ck=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},Ck(e)}var PU=[],jwe=PU.forEach,Nwe=PU.slice;function _k(e){return jwe.call(Nwe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function TU(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Ck(XMLHttpRequest))==="object"}function $we(e){return!!e&&typeof e.then=="function"}function Fwe(e){return $we(e)?e:Promise.resolve(e)}function Bwe(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 Dy={},zwe={get exports(){return Dy},set exports(e){Dy=e}},V1={},Hwe={get exports(){return V1},set exports(e){V1=e}},OR;function Wwe(){return OR||(OR=1,function(e,t){var n=typeof self<"u"?self:So,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l($){return $&&DataView.prototype.isPrototypeOf($)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function($){return $&&u.indexOf(Object.prototype.toString.call($))>-1};function h($){if(typeof $!="string"&&($=String($)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test($))throw new TypeError("Invalid character in header field name");return $.toLowerCase()}function m($){return typeof $!="string"&&($=String($)),$}function y($){var V={next:function(){var X=$.shift();return{done:X===void 0,value:X}}};return s.iterable&&(V[Symbol.iterator]=function(){return V}),V}function b($){this.map={},$ instanceof b?$.forEach(function(V,X){this.append(X,V)},this):Array.isArray($)?$.forEach(function(V){this.append(V[0],V[1])},this):$&&Object.getOwnPropertyNames($).forEach(function(V){this.append(V,$[V])},this)}b.prototype.append=function($,V){$=h($),V=m(V);var X=this.map[$];this.map[$]=X?X+", "+V:V},b.prototype.delete=function($){delete this.map[h($)]},b.prototype.get=function($){return $=h($),this.has($)?this.map[$]:null},b.prototype.has=function($){return this.map.hasOwnProperty(h($))},b.prototype.set=function($,V){this.map[h($)]=m(V)},b.prototype.forEach=function($,V){for(var X in this.map)this.map.hasOwnProperty(X)&&$.call(V,this.map[X],X,this)},b.prototype.keys=function(){var $=[];return this.forEach(function(V,X){$.push(X)}),y($)},b.prototype.values=function(){var $=[];return this.forEach(function(V){$.push(V)}),y($)},b.prototype.entries=function(){var $=[];return this.forEach(function(V,X){$.push([X,V])}),y($)},s.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function w($){if($.bodyUsed)return Promise.reject(new TypeError("Already read"));$.bodyUsed=!0}function E($){return new Promise(function(V,X){$.onload=function(){V($.result)},$.onerror=function(){X($.error)}})}function _($){var V=new FileReader,X=E(V);return V.readAsArrayBuffer($),X}function k($){var V=new FileReader,X=E(V);return V.readAsText($),X}function T($){for(var V=new Uint8Array($),X=new Array(V.length),Q=0;Q-1?V:$}function N($,V){V=V||{};var X=V.body;if($ instanceof N){if($.bodyUsed)throw new TypeError("Already read");this.url=$.url,this.credentials=$.credentials,V.headers||(this.headers=new b($.headers)),this.method=$.method,this.mode=$.mode,this.signal=$.signal,!X&&$._bodyInit!=null&&(X=$._bodyInit,$.bodyUsed=!0)}else this.url=String($);if(this.credentials=V.credentials||this.credentials||"same-origin",(V.headers||!this.headers)&&(this.headers=new b(V.headers)),this.method=I(V.method||this.method||"GET"),this.mode=V.mode||this.mode||null,this.signal=V.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function W($){var V=new FormData;return $.trim().split("&").forEach(function(X){if(X){var Q=X.split("="),G=Q.shift().replace(/\+/g," "),Y=Q.join("=").replace(/\+/g," ");V.append(decodeURIComponent(G),decodeURIComponent(Y))}}),V}function B($){var V=new b,X=$.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(Q){var G=Q.split(":"),Y=G.shift().trim();if(Y){var ee=G.join(":").trim();V.append(Y,ee)}}),V}O.call(N.prototype);function K($,V){V||(V={}),this.type="default",this.status=V.status===void 0?200:V.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in V?V.statusText:"OK",this.headers=new b(V.headers),this.url=V.url||"",this._initBody($)}O.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},K.error=function(){var $=new K(null,{status:0,statusText:""});return $.type="error",$};var ne=[301,302,303,307,308];K.redirect=function($,V){if(ne.indexOf(V)===-1)throw new RangeError("Invalid status code");return new K(null,{status:V,headers:{location:$}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(V,X){this.message=V,this.name=X;var Q=Error(V);this.stack=Q.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function z($,V){return new Promise(function(X,Q){var G=new N($,V);if(G.signal&&G.signal.aborted)return Q(new a.DOMException("Aborted","AbortError"));var Y=new XMLHttpRequest;function ee(){Y.abort()}Y.onload=function(){var fe={status:Y.status,statusText:Y.statusText,headers:B(Y.getAllResponseHeaders()||"")};fe.url="responseURL"in Y?Y.responseURL:fe.headers.get("X-Request-URL");var Ce="response"in Y?Y.response:Y.responseText;X(new K(Ce,fe))},Y.onerror=function(){Q(new TypeError("Network request failed"))},Y.ontimeout=function(){Q(new TypeError("Network request failed"))},Y.onabort=function(){Q(new a.DOMException("Aborted","AbortError"))},Y.open(G.method,G.url,!0),G.credentials==="include"?Y.withCredentials=!0:G.credentials==="omit"&&(Y.withCredentials=!1),"responseType"in Y&&s.blob&&(Y.responseType="blob"),G.headers.forEach(function(fe,Ce){Y.setRequestHeader(Ce,fe)}),G.signal&&(G.signal.addEventListener("abort",ee),Y.onreadystatechange=function(){Y.readyState===4&&G.signal.removeEventListener("abort",ee)}),Y.send(typeof G._bodyInit>"u"?null:G._bodyInit)})}return z.polyfill=!0,o.fetch||(o.fetch=z,o.Headers=b,o.Request=N,o.Response=K),a.Headers=b,a.Request=N,a.Response=K,a.fetch=z,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=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}(Hwe,V1)),V1}(function(e,t){var n;if(typeof fetch=="function"&&(typeof So<"u"&&So.fetch?n=So.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof Bwe<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||Wwe();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(zwe,Dy);const MU=Dy,RR=Cj({__proto__:null,default:MU},[Dy]);function T3(e){return T3=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},T3(e)}var Yu;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Yu=global.fetch:typeof window<"u"&&window.fetch?Yu=window.fetch:Yu=fetch);var jy;TU()&&(typeof global<"u"&&global.XMLHttpRequest?jy=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(jy=window.XMLHttpRequest));var M3;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?M3=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(M3=window.ActiveXObject));!Yu&&RR&&!jy&&!M3&&(Yu=MU||RR);typeof Yu!="function"&&(Yu=void 0);var kk=function(t,n){if(n&&T3(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},IR=function(t,n,r){Yu(t,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(o){r(null,{status:i.status,data:o})}).catch(r)}).catch(r)},DR=!1,Uwe=function(t,n,r,i){t.queryStringParams&&(n=kk(n,t.queryStringParams));var o=_k({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=_k({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},DR?{}:a);try{IR(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]}),IR(n,s,i),DR=!0}catch(u){i(u)}}},Vwe=function(t,n,r,i){r&&T3(r)==="object"&&(r=kk("",r).slice(1)),t.queryStringParams&&(n=kk(n,t.queryStringParams));try{var o;jy?o=new jy:o=new M3("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)}},Gwe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Yu&&n.indexOf("file:")!==0)return Uwe(t,n,r,i);if(TU()||typeof ActiveXObject=="function")return Vwe(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Ny(e){return Ny=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},Ny(e)}function qwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jR(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};qwe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Kwe(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=_k(i,this.options||{},Zwe()),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=Fwe(l),l.then(function(u){if(!u)return a(null,{});var d=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(d,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this;this.options.request(this.options,n,void 0,function(s,l){if(l&&(l.status>=500&&l.status<600||!l.status))return r("failed loading "+n+"; status code: "+l.status,!0);if(l&&l.status>=400&&l.status<500)return r("failed loading "+n+"; status code: "+l.status,!1);if(!l&&s&&s.message&&s.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+s.message,!0);if(s)return r(s,!1);var u,d;try{typeof l.data=="string"?u=a.options.parse(l.data,i,o):u=l.data}catch{d="failed parsing "+n+" to json"}if(d)return r(d,!1);r(null,u)})}},{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,d=[],h=[];n.forEach(function(m){var y=s.options.addPath;typeof s.options.addPath=="function"&&(y=s.options.addPath(m,r));var b=s.services.interpolator.interpolate(y,{lng:m,ns:r});s.options.request(s.options,b,l,function(w,E){u+=1,d.push(w),h.push(E),u===n.length&&typeof a=="function"&&a(d,h)})})}}},{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(h){var m=o.toResolveHierarchy(h);m.forEach(function(y){l.indexOf(y)<0&&l.push(y)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return u(d)}),l.forEach(function(d){n.allOptions.ns.forEach(function(h){i.read(d,h,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(h," for language ").concat(d," failed"),m),!m&&y&&a.log("loaded namespace ".concat(h," for language ").concat(d),y),i.loaded("".concat(d,"|").concat(h),m,y)})})})}}}]),e}();AU.type="backend";function Qwe(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,u){var d=t.services.backendConnector.state["".concat(l,"|").concat(u)];return d===-1||d===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 e4e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Ek("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):Jwe(e,t,n)}var t4e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,n4e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},r4e=function(t){return n4e[t]},i4e=function(t){return t.replace(t4e,r4e)};function FR(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 BR(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};Pk=BR(BR({},Pk),e)}function a4e(){return Pk}var OU;function s4e(e){OU=e}function l4e(){return OU}var u4e={type:"3rdParty",init:function(t){o4e(t.options.react),s4e(t)}},c4e=S.createContext(),d4e=function(){function e(){gs(this,e),this.usedNamespaces={}}return ms(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function f4e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function h4e(e,t){return bU(e)||f4e(e,t)||xU(e,t)||SU()}function zR(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 $C(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=S.useContext(c4e)||{},i=r.i18n,o=r.defaultNS,a=n||i||l4e();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new d4e),!a){Ek("You will need to pass in an i18next instance by using initReactI18next");var s=function(W){return Array.isArray(W)?W[W.length-1]:W},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&Ek("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=$C($C($C({},a4e()),a.options.react),t),d=u.useSuspense,h=u.keyPrefix,m=e||o||a.options&&a.options.defaultNS;m=typeof m=="string"?[m]:m||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(m);var y=(a.isInitialized||a.initializedStoreOnce)&&m.every(function(N){return e4e(N,a,u)});function b(){return a.getFixedT(null,u.nsMode==="fallback"?m:m[0],h)}var w=S.useState(b),E=h4e(w,2),_=E[0],k=E[1],T=m.join(),L=p4e(T),O=S.useRef(!0);S.useEffect(function(){var N=u.bindI18n,W=u.bindI18nStore;O.current=!0,!y&&!d&&$R(a,m,function(){O.current&&k(b)}),y&&L&&L!==T&&O.current&&k(b);function B(){O.current&&k(b)}return N&&a&&a.on(N,B),W&&a&&a.store.on(W,B),function(){O.current=!1,N&&a&&N.split(" ").forEach(function(K){return a.off(K,B)}),W&&a&&W.split(" ").forEach(function(K){return a.store.off(K,B)})}},[a,T]);var D=S.useRef(!0);S.useEffect(function(){O.current&&!D.current&&k(b),D.current=!1},[a,h]);var I=[_,a,y];if(I.t=_,I.i18n=a,I.ready=y,y||!y&&!d)return I;throw new Promise(function(N){$R(a,m,function(){N()})})}Et.use(AU).use(EU).use(u4e).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const g4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:Et.isInitialized?Et.t("common.statusDisconnected"):"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[],searchFolder:null,foundModels:null,openModel:null,cancelOptions:{cancelType:"immediate",cancelAfter:null}},RU=ap({name:"system",initialState:g4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=Et.t("common.statusError"),e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?Et.t("common.statusConnected"):Et.t("common.statusDisconnected")},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=Et.t("common.statusProcessingCanceled")},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=Et.t("common.statusPreparing")},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus=Et.t("common.statusLoadingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},modelConvertRequested:e=>{e.currentStatus=Et.t("common.statusConvertingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},modelMergingRequested:e=>{e.currentStatus=Et.t("common.statusMergingModels"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1},setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setFoundModels:(e,t)=>{e.foundModels=t.payload},setOpenModel:(e,t)=>{e.openModel=t.payload},setCancelType:(e,t)=>{e.cancelOptions.cancelType=t.payload},setCancelAfter:(e,t)=>{e.cancelOptions.cancelAfter=t.payload}}}),{setShouldDisplayInProgressType:m4e,setIsProcessing:wa,addLogEntry:Pi,setShouldShowLogViewer:FC,setIsConnected:HR,setSocketId:ONe,setShouldConfirmOnDelete:IU,setOpenAccordions:v4e,setSystemStatus:y4e,setCurrentStatus:hh,setSystemConfig:b4e,setShouldDisplayGuides:x4e,processingCanceled:S4e,errorOccurred:WR,errorSeen:DU,setModelList:Ag,setIsCancelable:_d,modelChangeRequested:w4e,modelConvertRequested:C4e,modelMergingRequested:_4e,setSaveIntermediatesInterval:k4e,setEnableImageDebugging:E4e,generationRequested:P4e,addToast:$u,clearToastQueue:T4e,setProcessingIndeterminateTask:M4e,setSearchFolder:jU,setFoundModels:NU,setOpenModel:UR,setCancelType:VR,setCancelAfter:BC}=RU.actions,L4e=RU.reducer,xE=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],A4e={activeTab:0,currentTheme:"dark",parametersPanelScrollPosition:0,shouldHoldParametersPanelOpen:!1,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowDualDisplay:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,addNewModelUIOption:null},O4e=A4e,$U=ap({name:"ui",initialState:O4e,reducers:{setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=xE.indexOf(t.payload)},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setParametersPanelScrollPosition:(e,t)=>{e.parametersPanelScrollPosition=t.payload},setShouldPinParametersPanel:(e,t)=>{e.shouldPinParametersPanel=t.payload},setShouldShowParametersPanel:(e,t)=>{e.shouldShowParametersPanel=t.payload},setShouldHoldParametersPanelOpen:(e,t)=>{e.shouldHoldParametersPanelOpen=t.payload},setShouldShowDualDisplay:(e,t)=>{e.shouldShowDualDisplay=t.payload},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload},setShouldUseSliders:(e,t)=>{e.shouldUseSliders=t.payload},setAddNewModelUIOption:(e,t)=>{e.addNewModelUIOption=t.payload}}}),{setActiveTab:Wo,setCurrentTheme:R4e,setParametersPanelScrollPosition:I4e,setShouldHoldParametersPanelOpen:D4e,setShouldPinParametersPanel:j4e,setShouldShowParametersPanel:Fh,setShouldShowDualDisplay:N4e,setShouldShowImageDetails:FU,setShouldUseCanvasBetaLayout:$4e,setShouldShowExistingModelsInSearch:F4e,setShouldUseSliders:B4e,setAddNewModelUIOption:Bh}=$U.actions,z4e=$U.reducer,iu=Object.create(null);iu.open="0";iu.close="1";iu.ping="2";iu.pong="3";iu.message="4";iu.upgrade="5";iu.noop="6";const fS=Object.create(null);Object.keys(iu).forEach(e=>{fS[iu[e]]=e});const H4e={type:"error",data:"parser error"},W4e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",U4e=typeof ArrayBuffer=="function",V4e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,BU=({type:e,data:t},n,r)=>W4e&&t instanceof Blob?n?r(t):GR(t,r):U4e&&(t instanceof ArrayBuffer||V4e(t))?n?r(t):GR(new Blob([t]),r):r(iu[e]+(t||"")),GR=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)},qR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m1=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),d=new Uint8Array(u);for(r=0;r>4,d[i++]=(a&15)<<4|s>>2,d[i++]=(s&3)<<6|l&63;return u},q4e=typeof ArrayBuffer=="function",zU=(e,t)=>{if(typeof e!="string")return{type:"message",data:HU(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:K4e(e.substring(1),t)}:fS[n]?e.length>1?{type:fS[n],data:e.substring(1)}:{type:fS[n]}:H4e},K4e=(e,t)=>{if(q4e){const n=G4e(e);return HU(n,t)}else return{base64:!0,data:e}},HU=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},WU=String.fromCharCode(30),Y4e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{BU(o,!1,s=>{r[a]=s,++i===n&&t(r.join(WU))})})},X4e=(e,t)=>{const n=e.split(WU),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function VU(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Q4e=Za.setTimeout,J4e=Za.clearTimeout;function s4(e,t){t.useNativeTimers?(e.setTimeoutFn=Q4e.bind(Za),e.clearTimeoutFn=J4e.bind(Za)):(e.setTimeoutFn=Za.setTimeout.bind(Za),e.clearTimeoutFn=Za.clearTimeout.bind(Za))}const e5e=1.33;function t5e(e){return typeof e=="string"?n5e(e):Math.ceil((e.byteLength||e.size)*e5e)}function n5e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class r5e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class GU extends ai{constructor(t){super(),this.writable=!1,s4(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new r5e(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=zU(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}}const qU="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Tk=64,i5e={};let KR=0,rx=0,YR;function XR(e){let t="";do t=qU[e%Tk]+t,e=Math.floor(e/Tk);while(e>0);return t}function KU(){const e=XR(+new Date);return e!==YR?(KR=0,YR=e):e+"."+XR(KR++)}for(;rx{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)};X4e(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,Y4e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=KU()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=YU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new eu(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}}class eu extends ai{constructor(t,n){super(),s4(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=VU(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new ZU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=eu.requestsCount++,eu.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=s5e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete eu.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()}}eu.requestsCount=0;eu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ZR);else if(typeof addEventListener=="function"){const e="onpagehide"in Za?"pagehide":"unload";addEventListener(e,ZR,!1)}}function ZR(){for(let e in eu.requests)eu.requests.hasOwnProperty(e)&&eu.requests[e].abort()}const QU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),ix=Za.WebSocket||Za.MozWebSocket,QR=!0,c5e="arraybuffer",JR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class d5e extends GU{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=JR?{}:VU(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=QR&&!JR?n?new ix(t,n):new ix(t):new ix(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||c5e,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{QR&&this.ws.send(o)}catch{}i&&QU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=KU()),this.supportsBinary||(t.b64=1);const i=YU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!ix}}const f5e={websocket:d5e,polling:u5e},h5e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,p5e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Mk(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=h5e.exec(e||""),o={},a=14;for(;a--;)o[p5e[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=g5e(o,o.path),o.queryKey=m5e(o,o.query),o}function g5e(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 m5e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let JU=class Ng extends ai{constructor(t,n={}){super(),this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=Mk(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=Mk(n.host).host),s4(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"],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:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=o5e(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=UU,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new f5e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ng.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;Ng.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ng.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const a=h=>{const m=new Error("probe error: "+h);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(h){n&&h.name!==n.name&&o()}const d=()=>{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),n.open()}onOpen(){if(this.readyState="open",Ng.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){Ng.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,eV=Object.prototype.toString,x5e=typeof Blob=="function"||typeof Blob<"u"&&eV.call(Blob)==="[object BlobConstructor]",S5e=typeof File=="function"||typeof File<"u"&&eV.call(File)==="[object FileConstructor]";function SE(e){return y5e&&(e instanceof ArrayBuffer||b5e(e))||x5e&&e instanceof Blob||S5e&&e instanceof File}function hS(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class E5e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=C5e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const P5e=Object.freeze(Object.defineProperty({__proto__:null,Decoder:wE,Encoder:k5e,get PacketType(){return nn},protocol:_5e},Symbol.toStringTag,{value:"Module"}));function Hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const T5e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tV extends ai{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Hs(t,"open",this.onopen.bind(this)),Hs(t,"packet",this.onpacket.bind(this)),Hs(t,"error",this.onerror.bind(this)),Hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(T5e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:nn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{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.ids++,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(){if(this._queue.length===0)return;const t=this._queue[0];if(t.pending)return;t.pending=!0,t.tryCount++;const n=this.ids;this.ids=t.id,this.flags=t.flags,this.emit.apply(this,t.args),this.ids=n}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:nn.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 nn.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 nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.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:nn.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")}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:nn.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}b0.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};b0.prototype.reset=function(){this.attempts=0};b0.prototype.setMin=function(e){this.ms=e};b0.prototype.setMax=function(e){this.max=e};b0.prototype.setJitter=function(e){this.jitter=e};class Ok extends ai{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,s4(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 b0({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||P5e;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 JU(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Hs(n,"open",function(){r.onopen(),t&&t()}),o=Hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Hs(t,"ping",this.onping.bind(this)),Hs(t,"data",this.ondata.bind(this)),Hs(t,"error",this.onerror.bind(this)),Hs(t,"close",this.onclose.bind(this)),Hs(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){QU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new tV(this,t,n),this.nsps[t]=r),this._autoConnect&&r.connect(),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(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Xv={};function pS(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=v5e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Xv[i]&&o in Xv[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new Ok(r,t):(Xv[i]||(Xv[i]=new Ok(r,t)),l=Xv[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(pS,{Manager:Ok,Socket:tV,io:pS,connect:pS});const M5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_dpmpp_2_a","k_euler","k_euler_a","k_heun"],L5e=["ddim","plms","k_lms","dpmpp_2","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_euler","k_euler_a","k_heun"],A5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],O5e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],R5e=[{key:"2x",value:2},{key:"4x",value:4}],CE=0,_E=4294967295,I5e=["gfpgan","codeformer"],D5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}];var j5e=Math.PI/180;function N5e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Im=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ft={_global:Im,version:"8.4.2",isBrowser:N5e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ft.angleDeg?e*j5e:e},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 ft.DD.isDragging},isDragReady(){return!!ft.DD.node},releaseCanvasOnDestroy:!0,document:Im.document,_injectGlobal(e){Im.Konva=e}},Mr=e=>{ft[e.prototype.getClassName()]=e};ft._injectGlobal(ft);class Ca{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.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 Ca(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var d=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/d):-Math.acos(r/d)),l.scaleX=s/d,l.scaleY=d,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var $5e="[object Array]",F5e="[object Number]",B5e="[object String]",z5e="[object Boolean]",H5e=Math.PI/180,W5e=180/Math.PI,zC="#",U5e="",V5e="0",G5e="Konva warning: ",eI="Konva error: ",q5e="rgb(",HC={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]},K5e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,ox=[];const Y5e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===$5e},_isNumber(e){return Object.prototype.toString.call(e)===F5e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===B5e},_isBoolean(e){return Object.prototype.toString.call(e)===z5e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){ox.push(e),ox.length===1&&Y5e(function(){const t=ox;ox=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(zC,U5e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=V5e+e;return zC+e},getRGB(e){var t;return e in HC?(t=HC[e],{r:t[0],g:t[1],b:t[2]}):e[0]===zC?this._hexToRgb(e.substring(1)):e.substr(0,4)===q5e?(t=K5e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex4ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._hex8ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=HC[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(e){if(e[0]==="#"&&e.length===9)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if(e[0]==="#"&&e.length===5)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,d=[0,0,0];for(let h=0;h<3;h++)s=r+1/3*-(h-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,d[h]=l*255;return{r:Math.round(d[0]),g:Math.round(d[1]),b:Math.round(d[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+d*(n-e),s=t+d*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],d=l[1],h=l[2];ht.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})},drawRoundedRectPath(e,t,n,r){let i=0,o=0,a=0,s=0;typeof r=="number"?i=o=a=s=Math.min(r,t/2,n/2):(i=Math.min(r[0]||0,t/2,n/2),o=Math.min(r[1]||0,t/2,n/2),s=Math.min(r[2]||0,t/2,n/2),a=Math.min(r[3]||0,t/2,n/2)),e.moveTo(i,0),e.lineTo(t-o,0),e.arc(t-o,o,o,Math.PI*3/2,0,!1),e.lineTo(t,n-s),e.arc(t-s,n-s,s,0,Math.PI/2,!1),e.lineTo(a,n),e.arc(a,n-a,a,Math.PI/2,Math.PI,!1),e.lineTo(0,i),e.arc(i,i,i,Math.PI,Math.PI*3/2,!1)}};function uf(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function nV(e){return e>255?255:e<0?0:Math.round(e)}function Ve(){if(ft.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(uf(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function kE(e){if(ft.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(uf(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function EE(){if(ft.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(uf(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function x0(){if(ft.isUnminified)return function(e,t){return de._isString(e)||de.warn(uf(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function rV(){if(ft.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(uf(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function X5e(){if(ft.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(uf(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function el(){if(ft.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(uf(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Z5e(e){if(ft.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(uf(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Zv="get",Qv="set";const J={addGetterSetter(e,t,n,r,i){J.addGetter(e,t,n),J.addSetter(e,t,r,i),J.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Zv+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Qv+de._capitalize(t);e.prototype[i]||J.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Qv+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=Zv+a(t),l=Qv+a(t),u,d;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,y,m),i&&i.call(this),this},J.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=Qv+n,i=Zv+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=Zv+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},J.addSetter(e,t,r,function(){de.error(o)}),J.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=Zv+de._capitalize(n),a=Qv+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function Q5e(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof d=="number"?Math.floor(d):d)),o+=J5e+u.join(tI)+eCe)):(o+=s.property,t||(o+=oCe+s.val)),o+=rCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=sCe&&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){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var 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(){this._context.clip()}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 d=arguments,h=this._context;d.length===3?h.drawImage(t,n,r):d.length===5?h.drawImage(t,n,r,i,o):d.length===9&&h.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){t?this._context.fill(t):this._context.fill()}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=nI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=Q5e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return fn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];fn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];fn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(fn.justDragged=!0,ft._mouseListenClick=!1,ft._touchListenClick=!1,ft._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ft.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){fn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&fn._dragElements.delete(n)})}};ft.isBrowser&&(window.addEventListener("mouseup",fn._endDragBefore,!0),window.addEventListener("touchend",fn._endDragBefore,!0),window.addEventListener("mousemove",fn._drag),window.addEventListener("touchmove",fn._drag),window.addEventListener("mouseup",fn._endDragAfter,!1),window.addEventListener("touchend",fn._endDragAfter,!1));var gS="absoluteOpacity",sx="allEventListeners",Iu="absoluteTransform",rI="absoluteScale",oh="canvas",dCe="Change",fCe="children",hCe="konva",Rk="listening",iI="mouseenter",oI="mouseleave",aI="set",sI="Shape",mS=" ",lI="stage",fd="transform",pCe="Stage",Ik="visible",gCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(mS);let mCe=1,Ge=class Dk{constructor(t){this._id=mCe++,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===fd||t===Iu)&&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===fd||t===Iu,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(mS);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(oh)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Iu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(oh)){const{scene:t,filter:n,hit:r}=this._cache.get(oh);de.releaseCanvas(t,n,r),this._cache.delete(oh)}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()}));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,d=n.drawBorder||!1,h=n.hitCanvasPixelRatio||1;if(!i||!o){de.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 m=new Dm({pixelRatio:a,width:i,height:o}),y=new Dm({pixelRatio:a,width:0,height:0}),b=new PE({pixelRatio:h,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(oh),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,y.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(gS),this._clearSelfAndDescendantCache(rI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),d&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(oh,{scene:m,filter:y,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(oh)}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,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var d=l.point(u);i===void 0&&(i=a=d.x,o=s=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),a=Math.max(a,d.x),s=Math.max(s,d.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 d=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()/d,r.getHeight()/d),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==fCe&&(r=aI+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(Rk,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(Ik,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;fn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ft.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(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==pCe&&l(n.getStage().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(fd),this._clearSelfAndDescendantCache(Iu)),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(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}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 Ca,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(fd);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(fd),this._clearSelfAndDescendantCache(Iu),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 de.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 de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.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(gS,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=de.isObject(i)&&!de._isPlainObject(i)&&!de._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(),de._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,de._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():ft.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;fn._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=fn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&fn._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 de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Dk.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ft[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ft[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=Ge.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=Ge.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(function(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 d=r===this;if(u){o.save();var h=this.getAbsoluteTransform(r),m=h.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var y=this.clipX(),b=this.clipY();o.rect(y,b,a,s)}o.clip(),m=h.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!d&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},d=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(w.visible()){var E=w.getClientRect({relativeTo:d,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var h=this.find("Shape"),m=!1,y=0;ye.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Og=e=>{const t=x1(e);if(t==="pointer")return ft.pointerEventsEnabled&&UC.pointer;if(t==="touch")return UC.touch;if(t==="mouse")return UC.mouse};function cI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const CCe="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);",vS=[];let c4=class extends Ma{constructor(t){super(cI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),vS.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{cI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===yCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&vS.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(CCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new Dm({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+uI,this.content.style.height=n+uI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rSCe&&de.warn("The stage has "+i+" 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."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ft.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return oV(t,this)}setPointerCapture(t){aV(t,this)}releaseCapture(t){G1(t)}getLayers(){return this.children}_bindContentEvents(){ft.isBrowser&&wCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Og(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Og(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Og(t.type),r=x1(t.type);if(n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!fn.isDragging||ft.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Og(t.type),r=x1(t.type);if(n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(fn.justDragged=!1,ft["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ft.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Og(t.type),r=x1(t.type);if(!n)return;fn.isDragging&&fn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!fn.isDragging||ft.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=WC(l.id)||this.getIntersection(l),d=l.id,h={evt:t,pointerId:d};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},h),u),s._fireAndBubble(n.pointerleave,Object.assign({},h),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},h),s),u._fireAndBubble(n.pointerenter,Object.assign({},h),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},h))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:d}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Og(t.type),r=x1(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=WC(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const d=l.id,h={evt:t,pointerId:d};let m=!1;ft["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):fn.justDragged||(ft["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ft["_"+r+"InDblClickWindow"]=!1},ft.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},h)),ft["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},h)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},h)))):(this[r+"ClickEndShape"]=null,ft["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:d}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:d}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ft["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(jk,{evt:t}):this._fire(jk,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(Nk,{evt:t}):this._fire(Nk,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=WC(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(lm,TE(t)),G1(t.pointerId)}_lostpointercapture(t){G1(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Dm({width:this.width(),height:this.height()}),this.bufferHitCanvas=new PE({pixelRatio:1,width:this.width(),height:this.height()}),!!ft.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.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"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.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(t){t.batchDraw()}),this}};c4.prototype.nodeType=vCe;Mr(c4);J.addGetterSetter(c4,"container");var vV="hasShadow",yV="shadowRGBA",bV="patternImage",xV="linearGradient",SV="radialGradient";let fx;function VC(){return fx||(fx=de.createCanvasElement().getContext("2d"),fx)}const q1={};function _Ce(e){e.fill()}function kCe(e){e.stroke()}function ECe(e){e.fill()}function PCe(e){e.stroke()}function TCe(){this._clearCache(vV)}function MCe(){this._clearCache(yV)}function LCe(){this._clearCache(bV)}function ACe(){this._clearCache(xV)}function OCe(){this._clearCache(SV)}class $e extends Ge{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in q1)););this.colorKey=n,q1[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.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(vV,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(bV,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=VC();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new Ca;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ft.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(xV,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=VC(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.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 t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Ge.prototype.destroy.call(this),delete q1[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),d=u?this.shadowOffsetX():0,h=u?this.shadowOffsetY():0,m=s+Math.abs(d),y=l+Math.abs(h),b=u&&this.shadowBlur()||0,w=m+b*2,E=y+b*2,_={width:w,height:E,x:-(a/2+b)+Math.min(d,0)+i.x,y:-(a/2+b)+Math.min(h,0)+i.y};return n?_:this._transformedRect(_,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,d,h,m=i.isCache,y=n===this;if(!this.isVisible()&&!y)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),d=u.bufferCanvas,h=d.getContext(),h.clear(),h.save(),h._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();h.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,h,this),h.restore();var E=d.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(d._canvas,0,0,d.width/E,d.height/E)}else{if(o._applyLineJoin(this),!y){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.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()"),u){a.save();var d=this.getAbsoluteTransform(n).getMatrix();return a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,d,h,m,y;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,d=u.length,h=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=h.r,u[m+1]=h.g,u[m+2]=h.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){de.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return oV(t,this)}setPointerCapture(t){aV(t,this)}releaseCapture(t){G1(t)}}$e.prototype._fillFunc=_Ce;$e.prototype._strokeFunc=kCe;$e.prototype._fillFuncHit=ECe;$e.prototype._strokeFuncHit=PCe;$e.prototype._centroid=!1;$e.prototype.nodeType="Shape";Mr($e);$e.prototype.eventListeners={};$e.prototype.on.call($e.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",TCe);$e.prototype.on.call($e.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",MCe);$e.prototype.on.call($e.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",LCe);$e.prototype.on.call($e.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",ACe);$e.prototype.on.call($e.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",OCe);J.addGetterSetter($e,"stroke",void 0,rV());J.addGetterSetter($e,"strokeWidth",2,Ve());J.addGetterSetter($e,"fillAfterStrokeEnabled",!1);J.addGetterSetter($e,"hitStrokeWidth","auto",EE());J.addGetterSetter($e,"strokeHitEnabled",!0,el());J.addGetterSetter($e,"perfectDrawEnabled",!0,el());J.addGetterSetter($e,"shadowForStrokeEnabled",!0,el());J.addGetterSetter($e,"lineJoin");J.addGetterSetter($e,"lineCap");J.addGetterSetter($e,"sceneFunc");J.addGetterSetter($e,"hitFunc");J.addGetterSetter($e,"dash");J.addGetterSetter($e,"dashOffset",0,Ve());J.addGetterSetter($e,"shadowColor",void 0,x0());J.addGetterSetter($e,"shadowBlur",0,Ve());J.addGetterSetter($e,"shadowOpacity",1,Ve());J.addComponentsGetterSetter($e,"shadowOffset",["x","y"]);J.addGetterSetter($e,"shadowOffsetX",0,Ve());J.addGetterSetter($e,"shadowOffsetY",0,Ve());J.addGetterSetter($e,"fillPatternImage");J.addGetterSetter($e,"fill",void 0,rV());J.addGetterSetter($e,"fillPatternX",0,Ve());J.addGetterSetter($e,"fillPatternY",0,Ve());J.addGetterSetter($e,"fillLinearGradientColorStops");J.addGetterSetter($e,"strokeLinearGradientColorStops");J.addGetterSetter($e,"fillRadialGradientStartRadius",0);J.addGetterSetter($e,"fillRadialGradientEndRadius",0);J.addGetterSetter($e,"fillRadialGradientColorStops");J.addGetterSetter($e,"fillPatternRepeat","repeat");J.addGetterSetter($e,"fillEnabled",!0);J.addGetterSetter($e,"strokeEnabled",!0);J.addGetterSetter($e,"shadowEnabled",!0);J.addGetterSetter($e,"dashEnabled",!0);J.addGetterSetter($e,"strokeScaleEnabled",!0);J.addGetterSetter($e,"fillPriority","color");J.addComponentsGetterSetter($e,"fillPatternOffset",["x","y"]);J.addGetterSetter($e,"fillPatternOffsetX",0,Ve());J.addGetterSetter($e,"fillPatternOffsetY",0,Ve());J.addComponentsGetterSetter($e,"fillPatternScale",["x","y"]);J.addGetterSetter($e,"fillPatternScaleX",1,Ve());J.addGetterSetter($e,"fillPatternScaleY",1,Ve());J.addComponentsGetterSetter($e,"fillLinearGradientStartPoint",["x","y"]);J.addComponentsGetterSetter($e,"strokeLinearGradientStartPoint",["x","y"]);J.addGetterSetter($e,"fillLinearGradientStartPointX",0);J.addGetterSetter($e,"strokeLinearGradientStartPointX",0);J.addGetterSetter($e,"fillLinearGradientStartPointY",0);J.addGetterSetter($e,"strokeLinearGradientStartPointY",0);J.addComponentsGetterSetter($e,"fillLinearGradientEndPoint",["x","y"]);J.addComponentsGetterSetter($e,"strokeLinearGradientEndPoint",["x","y"]);J.addGetterSetter($e,"fillLinearGradientEndPointX",0);J.addGetterSetter($e,"strokeLinearGradientEndPointX",0);J.addGetterSetter($e,"fillLinearGradientEndPointY",0);J.addGetterSetter($e,"strokeLinearGradientEndPointY",0);J.addComponentsGetterSetter($e,"fillRadialGradientStartPoint",["x","y"]);J.addGetterSetter($e,"fillRadialGradientStartPointX",0);J.addGetterSetter($e,"fillRadialGradientStartPointY",0);J.addComponentsGetterSetter($e,"fillRadialGradientEndPoint",["x","y"]);J.addGetterSetter($e,"fillRadialGradientEndPointX",0);J.addGetterSetter($e,"fillRadialGradientEndPointY",0);J.addGetterSetter($e,"fillPatternRotation",0);J.backCompat($e,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var RCe="#",ICe="beforeDraw",DCe="draw",wV=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],jCe=wV.length;let sp=class extends Ma{constructor(t){super(t),this.canvas=new Dm,this.hitCanvas=new PE({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(ICe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Ma.prototype.drawScene.call(this,i,n),this._fire(DCe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Ma.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.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 de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};sp.prototype.nodeType="Layer";Mr(sp);J.addGetterSetter(sp,"imageSmoothingEnabled",!0);J.addGetterSetter(sp,"clearBeforeDraw",!0);J.addGetterSetter(sp,"hitGraphEnabled",!0,el());class ME extends sp{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}ME.prototype.nodeType="FastLayer";Mr(ME);let Jm=class extends Ma{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}};Jm.prototype.nodeType="Group";Mr(Jm);var GC=function(){return Im.performance&&Im.performance.now?function(){return Im.performance.now()}:function(){return new Date().getTime()}}();class Ja{constructor(t,n){this.id=Ja.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:GC(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=dI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=fI,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,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 t=this.getTimer()-this._startTime;this.state===dI?this.setTime(t):this.state===fI&&this.setTime(this.duration-t)}pause(){this.state=$Ce,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Xr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||K1.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=FCe++;var u=r.getLayer()||(r instanceof ft.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ja(function(){n.tween.onEnterFrame()},u),this.tween=new BCe(l,function(d){n._tweenFunc(d)},a,0,1,o*1e3,s),this._addListeners(),Xr.attrs[i]||(Xr.attrs[i]={}),Xr.attrs[i][this._id]||(Xr.attrs[i][this._id]={}),Xr.tweens[i]||(Xr.tweens[i]={});for(l in t)NCe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,d,h,m;if(s=Xr.tweens[i][t],s&&delete Xr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(h=o,o=de._prepareArrayForTween(o,n,r.closed())):(d=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Xr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Xr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.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(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Xr.tweens[t],i;this.pause();for(i in r)delete Xr.tweens[t][i];delete Xr.attrs[t][n]}}Xr.attrs={};Xr.tweens={};Ge.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Xr(e);n.play()};const K1={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),d=a*n,h=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:h,width:d-u,height:m-h}}}hc.prototype._centroid=!0;hc.prototype.className="Arc";hc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Mr(hc);J.addGetterSetter(hc,"innerRadius",0,Ve());J.addGetterSetter(hc,"outerRadius",0,Ve());J.addGetterSetter(hc,"angle",0,Ve());J.addGetterSetter(hc,"clockwise",!1,el());function $k(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),d=a*l/(s+l),h=n-u*(i-e),m=r-u*(o-t),y=n+d*(i-e),b=r+d*(o-t);return[h,m,y,b]}function pI(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]);ud?u:d,E=u>d?1:u/d,_=u>d?d/u:1;t.translate(s,l),t.rotate(y),t.scale(E,_),t.arc(0,0,w,h,h+m,1-b),t.scale(1/E,1/_),t.rotate(-y),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 d=u.points[4],h=u.points[5],m=u.points[4]+h,y=Math.PI/180;if(Math.abs(d-m)m;b-=y){const w=Fn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=d+y;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Fn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Fn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Fn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],d=a[3],h=a[4],m=a[5],y=a[6];return h+=m*t/o.pathLength,Fn.getPointOnEllipticalArc(s,l,u,d,h,y)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}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(b[0]);){var k=null,T=[],L=l,O=u,D,I,N,W,B,K,ne,z,$,V;switch(y){case"l":l+=b.shift(),u+=b.shift(),k="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var X=b.shift(),Q=b.shift();if(l+=X,u+=Q,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+X,u=a[G].points[1]+Q;break}}T.push(l,u),y="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),y="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"S":I=l,N=u,D=a[a.length-1],D.command==="C"&&(I=l+(l-D.points[2]),N=u+(u-D.points[3])),T.push(I,N,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":I=l,N=u,D=a[a.length-1],D.command==="C"&&(I=l+(l-D.points[2]),N=u+(u-D.points[3])),T.push(I,N,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="Q",T.push(l,u);break;case"T":I=l,N=u,D=a[a.length-1],D.command==="Q"&&(I=l+(l-D.points[0]),N=u+(u-D.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(I,N,l,u);break;case"t":I=l,N=u,D=a[a.length-1],D.command==="Q"&&(I=l+(l-D.points[0]),N=u+(u-D.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(I,N,l,u);break;case"A":W=b.shift(),B=b.shift(),K=b.shift(),ne=b.shift(),z=b.shift(),$=l,V=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization($,V,l,u,ne,z,W,B,K);break;case"a":W=b.shift(),B=b.shift(),K=b.shift(),ne=b.shift(),z=b.shift(),$=l,V=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization($,V,l,u,ne,z,W,B,K);break}a.push({command:k||y,points:T,start:{x:L,y:O},pathLength:this.calcLength(L,O,k||y,T)})}(y==="z"||y==="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=Fn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var d=i[4],h=i[5],m=i[4]+h,y=Math.PI/180;if(Math.abs(d-m)m;l-=y)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=d+y;l1&&(s*=Math.sqrt(y),l*=Math.sqrt(y));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(h*h))/(s*s*(m*m)+l*l*(h*h)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*h/s,_=(t+r)/2+Math.cos(d)*w-Math.sin(d)*E,k=(n+i)/2+Math.sin(d)*w+Math.cos(d)*E,T=function(B){return Math.sqrt(B[0]*B[0]+B[1]*B[1])},L=function(B,K){return(B[0]*K[0]+B[1]*K[1])/(T(B)*T(K))},O=function(B,K){return(B[0]*K[1]=1&&(W=0),a===0&&W>0&&(W=W-2*Math.PI),a===1&&W<0&&(W=W+2*Math.PI),[_,k,s,l,D,W,d,a]}}Fn.prototype.className="Path";Fn.prototype._attrsAffectingSize=["data"];Mr(Fn);J.addGetterSetter(Fn,"data");class lp extends pc{_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 m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],y=Fn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Fn.getPointOnQuadraticBezier(Math.min(1,1-a/y),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var d=(Math.atan2(u,l)+n)%n,h=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(d),t.moveTo(0,0),t.lineTo(-a,h/2),t.lineTo(-a,-h/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,h/2),t.lineTo(-a,-h/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}}}lp.prototype.className="Arrow";Mr(lp);J.addGetterSetter(lp,"pointerLength",10,Ve());J.addGetterSetter(lp,"pointerWidth",10,Ve());J.addGetterSetter(lp,"pointerAtBeginning",!1);J.addGetterSetter(lp,"pointerAtEnding",!0);let S0=class extends $e{_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)}};S0.prototype._centroid=!0;S0.prototype.className="Circle";S0.prototype._attrsAffectingSize=["radius"];Mr(S0);J.addGetterSetter(S0,"radius",0,Ve());class cf extends $e{_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)}}cf.prototype.className="Ellipse";cf.prototype._centroid=!0;cf.prototype._attrsAffectingSize=["radiusX","radiusY"];Mr(cf);J.addComponentsGetterSetter(cf,"radius",["x","y"]);J.addGetterSetter(cf,"radiusX",0,Ve());J.addGetterSetter(cf,"radiusY",0,Ve());let uu=class CV extends $e{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?de.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?de.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=de.createImageElement();i.onload=function(){var o=new CV({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};uu.prototype.className="Image";Mr(uu);J.addGetterSetter(uu,"cornerRadius",0,kE(4));J.addGetterSetter(uu,"image");J.addComponentsGetterSetter(uu,"crop",["x","y","width","height"]);J.addGetterSetter(uu,"cropX",0,Ve());J.addGetterSetter(uu,"cropY",0,Ve());J.addGetterSetter(uu,"cropWidth",0,Ve());J.addGetterSetter(uu,"cropHeight",0,Ve());var _V=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],zCe="Change.konva",HCe="none",Fk="up",Bk="right",zk="down",Hk="left",WCe=_V.length;class LE extends Jm{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)}}cp.prototype.className="RegularPolygon";cp.prototype._centroid=!0;cp.prototype._attrsAffectingSize=["radius"];Mr(cp);J.addGetterSetter(cp,"radius",0,Ve());J.addGetterSetter(cp,"sides",0,Ve());var gI=Math.PI*2;class dp extends $e{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,gI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),gI,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)}}dp.prototype.className="Ring";dp.prototype._centroid=!0;dp.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Mr(dp);J.addGetterSetter(dp,"innerRadius",0,Ve());J.addGetterSetter(dp,"outerRadius",0,Ve());class cu extends $e{constructor(t){super(t),this._updated=!0,this.anim=new Ja(()=>{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],d=o[i+3],h=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,d),t.closePath(),t.fillStrokeShape(this)),h)if(a){var m=a[n],y=r*2;t.drawImage(h,s,l,u,d,m[y+0],m[y+1],u,d)}else t.drawImage(h,s,l,u,d,0,0,u,d)}_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],d=r*2;t.rect(u[d+0],u[d+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 px;function KC(){return px||(px=de.createCanvasElement().getContext(GCe),px)}function r6e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function i6e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function o6e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class Tr extends $e{constructor(t){super(o6e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(_+=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=de._isString(t)?t:t==null?"":t+"";return this._setAttr(qCe,n),this}getWidth(){var t=this.attrs.width===Rg||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Rg||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 de.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=KC(),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()+hx+this.fontVariant()+hx+(this.fontSize()+ZCe)+n6e(this.fontFamily())}_addTextLine(t){this.align()===Jv&&(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 KC().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!==Rg&&o!==void 0,l=a!==Rg&&a!==void 0,u=this.padding(),d=o-u*2,h=a-u*2,m=0,y=this.wrap(),b=y!==yI,w=y!==e6e&&b,E=this.ellipsis();this.textArr=[],KC().font=this._getContextFont();for(var _=E?this._getTextWidth(qC):0,k=0,T=t.length;kd)for(;L.length>0;){for(var D=0,I=L.length,N="",W=0;D>>1,K=L.slice(0,B+1),ne=this._getTextWidth(K)+_;ne<=d?(D=B+1,N=K,W=ne):I=B}if(N){if(w){var z,$=L[N.length],V=$===hx||$===mI;V&&W<=d?z=N.length:z=Math.max(N.lastIndexOf(hx),N.lastIndexOf(mI))+1,z>0&&(D=z,N=N.slice(0,D),W=this._getTextWidth(N))}N=N.trimRight(),this._addTextLine(N),r=Math.max(r,W),m+=i;var X=this._shouldHandleEllipsis(m);if(X){this._tryToAddEllipsisToLastLine();break}if(L=L.slice(D),L=L.trimLeft(),L.length>0&&(O=this._getTextWidth(L),O<=d)){this._addTextLine(L),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(L),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kh)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Rg&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==yI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Rg&&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+qC)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var d=kV(this.text()),h=this.text().split(" ").length-1,m,y,b,w=-1,E=0,_=function(){E=0;for(var ne=t.dataArray,z=w+1;z0)return w=z,ne[z];ne[z].command==="M"&&(m={x:ne[z].points[0],y:ne[z].points[1]})}return{}},k=function(ne){var z=t._getTextSize(ne).width+r;ne===" "&&i==="justify"&&(z+=(s-a)/h);var $=0,V=0;for(y=void 0;Math.abs(z-$)/z>.01&&V<20;){V++;for(var X=$;b===void 0;)b=_(),b&&X+b.pathLengthz?y=Fn.getPointOnLine(z,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var G=b.points[4],Y=b.points[5],ee=b.points[4]+Y;E===0?E=G+1e-8:z>$?E+=Math.PI/180*Y/Math.abs(Y):E-=Math.PI/360*Y/Math.abs(Y),(Y<0&&E=0&&E>ee)&&(E=ee,Q=!0),y=Fn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?z>b.pathLength?E=1e-8:E=z/b.pathLength:z>$?E+=(z-$)/b.pathLength/2:E=Math.max(E-($-z)/b.pathLength/2,0),E>1&&(E=1,Q=!0),y=Fn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=z/b.pathLength:z>$?E+=(z-$)/b.pathLength:E-=($-z)/b.pathLength,E>1&&(E=1,Q=!0),y=Fn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}y!==void 0&&($=Fn.getLineLength(m.x,m.y,y.x,y.y)),Q&&(Q=!1,b=void 0)}},T="C",L=t._getTextSize(T).width+r,O=u/L-1,D=0;De+`.${OV}`).join(" "),bI="nodesRect",l6e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],u6e={"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 c6e="ontouchstart"in ft._global;function d6e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(u6e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var L3=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],xI=1e8;function f6e(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 RV(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 Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function h6e(e,t){const n=f6e(e);return RV(e,t,n)}function p6e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(l6e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&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(bI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(bI,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=(ft.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),d={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 RV(d,-ft.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-xI,y:-xI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const d=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var h=[{x:d.x,y:d.y},{x:d.x+d.width,y:d.y},{x:d.x+d.width,y:d.y+d.height},{x:d.x,y:d.y+d.height}],m=u.getAbsoluteTransform();h.forEach(function(y){var b=m.point(y);n.push(b)})});const r=new Ca;r.rotate(-ft.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var d=r.point(u);i===void 0&&(i=a=d.x,o=s=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),a=Math.max(a,d.x),s=Math.max(s,d.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:ft.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(),L3.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new m2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:c6e?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=ft.getAngle(this.rotation()),o=d6e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new $e({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},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 d=o.getAbsolutePosition();if(!(u.x===d.x&&u.y===d.y)){if(this._movingAnchorName==="rotater"){var h=this._getNodeRect();n=o.x()-h.width/2,r=-o.y()+h.height/2;let ne=Math.atan2(-r,n)+Math.PI/2;h.height<0&&(ne-=Math.PI);var m=ft.getAngle(this.rotation());const z=m+ne,$=ft.getAngle(this.rotationSnapTolerance()),X=p6e(this.rotationSnaps(),z,$)-h.rotation,Q=h6e(h,X);this._fitNodesInto(Q,t);return}var y=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(y){var b=k?{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(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(y){var b=k?{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()-b.x,2)+Math.pow(b.y-o.y(),2));var w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var _=o.position();this.findOne(".top-left").y(_.y),this.findOne(".bottom-right").x(_.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(y){var b=k?{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(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new Ca;if(a.rotate(ft.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const h=a.point({x:-this.padding()*2,y:0});if(t.x+=h.x,t.y+=h.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const h=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const h=a.point({x:0,y:-this.padding()*2});if(t.x+=h.x,t.y+=h.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const h=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const h=this.boundBoxFunc()(r,t);h?t=h:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new Ca;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new Ca;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const d=u.multiply(l.invert());this._nodes.forEach(h=>{var m;const y=h.getParent().getAbsoluteTransform(),b=h.getTransform().copy();b.translate(h.offsetX(),h.offsetY());const w=new Ca;w.multiply(y.copy().invert()).multiply(d).multiply(y).multiply(b);const E=w.decompose();h.setAttrs(E),this._fire("transform",{evt:n,target:h}),h._fire("transform",{evt:n,target:h}),(m=h.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._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(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.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()*de._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}),(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=""),Jm.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Ge.prototype.toObject.call(this)}clone(t){var n=Ge.prototype.clone.call(this,t);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};function g6e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){L3.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+L3.join(", "))}),e||[]}Tn.prototype.className="Transformer";Mr(Tn);J.addGetterSetter(Tn,"enabledAnchors",L3,g6e);J.addGetterSetter(Tn,"flipEnabled",!0,el());J.addGetterSetter(Tn,"resizeEnabled",!0);J.addGetterSetter(Tn,"anchorSize",10,Ve());J.addGetterSetter(Tn,"rotateEnabled",!0);J.addGetterSetter(Tn,"rotationSnaps",[]);J.addGetterSetter(Tn,"rotateAnchorOffset",50,Ve());J.addGetterSetter(Tn,"rotationSnapTolerance",5,Ve());J.addGetterSetter(Tn,"borderEnabled",!0);J.addGetterSetter(Tn,"anchorStroke","rgb(0, 161, 255)");J.addGetterSetter(Tn,"anchorStrokeWidth",1,Ve());J.addGetterSetter(Tn,"anchorFill","white");J.addGetterSetter(Tn,"anchorCornerRadius",0,Ve());J.addGetterSetter(Tn,"borderStroke","rgb(0, 161, 255)");J.addGetterSetter(Tn,"borderStrokeWidth",1,Ve());J.addGetterSetter(Tn,"borderDash");J.addGetterSetter(Tn,"keepRatio",!0);J.addGetterSetter(Tn,"centeredScaling",!1);J.addGetterSetter(Tn,"ignoreStroke",!1);J.addGetterSetter(Tn,"padding",0,Ve());J.addGetterSetter(Tn,"node");J.addGetterSetter(Tn,"nodes");J.addGetterSetter(Tn,"boundBoxFunc");J.addGetterSetter(Tn,"anchorDragBoundFunc");J.addGetterSetter(Tn,"shouldOverdrawWholeArea",!1);J.addGetterSetter(Tn,"useSingleNodeRotation",!0);J.backCompat(Tn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class gc extends $e{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ft.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)}}gc.prototype.className="Wedge";gc.prototype._centroid=!0;gc.prototype._attrsAffectingSize=["radius"];Mr(gc);J.addGetterSetter(gc,"radius",0,Ve());J.addGetterSetter(gc,"angle",0,Ve());J.addGetterSetter(gc,"clockwise",!1);J.backCompat(gc,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function SI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var m6e=[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],v6e=[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 y6e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,d,h,m,y,b,w,E,_,k,T,L,O,D,I,N,W,B,K,ne,z=t+t+1,$=r-1,V=i-1,X=t+1,Q=X*(X+1)/2,G=new SI,Y=null,ee=G,fe=null,Ce=null,we=m6e[t],xe=v6e[t];for(s=1;s>xe,K!==0?(K=255/K,n[d]=(m*we>>xe)*K,n[d+1]=(y*we>>xe)*K,n[d+2]=(b*we>>xe)*K):n[d]=n[d+1]=n[d+2]=0,m-=E,y-=_,b-=k,w-=T,E-=fe.r,_-=fe.g,k-=fe.b,T-=fe.a,l=h+((l=o+t+1)<$?l:$)<<2,L+=fe.r=n[l],O+=fe.g=n[l+1],D+=fe.b=n[l+2],I+=fe.a=n[l+3],m+=L,y+=O,b+=D,w+=I,fe=fe.next,E+=N=Ce.r,_+=W=Ce.g,k+=B=Ce.b,T+=K=Ce.a,L-=N,O-=W,D-=B,I-=K,Ce=Ce.next,d+=4;h+=r}for(o=0;o>xe,K>0?(K=255/K,n[l]=(m*we>>xe)*K,n[l+1]=(y*we>>xe)*K,n[l+2]=(b*we>>xe)*K):n[l]=n[l+1]=n[l+2]=0,m-=E,y-=_,b-=k,w-=T,E-=fe.r,_-=fe.g,k-=fe.b,T-=fe.a,l=o+((l=a+X)0&&y6e(t,n)};J.addGetterSetter(Ge,"blurRadius",0,Ve(),J.afterSetFilter);const x6e=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};J.addGetterSetter(Ge,"contrast",0,Ve(),J.afterSetFilter);const w6e=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,d=l*4,h=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:de.error("Unknown emboss direction: "+r)}do{var m=(h-1)*d,y=o;h+y<1&&(y=0),h+y>u&&(y=0);var b=(h-1+y)*l*4,w=l;do{var E=m+(w-1)*4,_=a;w+_<1&&(_=0),w+_>l&&(_=0);var k=b+(w-1+_)*4,T=s[E]-s[k],L=s[E+1]-s[k+1],O=s[E+2]-s[k+2],D=T,I=D>0?D:-D,N=L>0?L:-L,W=O>0?O:-O;if(N>I&&(D=L),W>I&&(D=O),D*=t,i){var B=s[E]+D,K=s[E+1]+D,ne=s[E+2]+D;s[E]=B>255?255:B<0?0:B,s[E+1]=K>255?255:K<0?0:K,s[E+2]=ne>255?255:ne<0?0:ne}else{var z=n-D;z<0?z=0:z>255&&(z=255),s[E]=s[E+1]=s[E+2]=z}}while(--w)}while(--h)};J.addGetterSetter(Ge,"embossStrength",.5,Ve(),J.afterSetFilter);J.addGetterSetter(Ge,"embossWhiteLevel",.5,Ve(),J.afterSetFilter);J.addGetterSetter(Ge,"embossDirection","top-left",null,J.afterSetFilter);J.addGetterSetter(Ge,"embossBlend",!1,null,J.afterSetFilter);function YC(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 C6e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],d=u,h,m,y=this.enhance();if(y!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),h=t[m+2],hd&&(d=h);i===r&&(i=255,r=0),s===a&&(s=255,a=0),d===u&&(d=255,u=0);var b,w,E,_,k,T,L,O,D;for(y>0?(w=i+y*(255-i),E=r-y*(r-0),k=s+y*(255-s),T=a-y*(a-0),O=d+y*(255-d),D=u-y*(u-0)):(b=(i+r)*.5,w=i+y*(i-b),E=r+y*(r-b),_=(s+a)*.5,k=s+y*(s-_),T=a+y*(a-_),L=(d+u)*.5,O=d+y*(d-L),D=u+y*(u-L)),m=0;m_?E:_;var k=a,T=o,L,O,D=360/T*Math.PI/180,I,N;for(O=0;OT?k:T;var L=a,O=o,D,I,N=n.polarRotation||0,W,B;for(d=0;dt&&(L=T,O=0,D=-1),i=0;i=0&&y=0&&b=0&&y=0&&b=255*4?255:0}return a}function j6e(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&&y=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=L[a+0],l+=L[a+1],u+=L[a+2],d+=L[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,d=d/T,i=y;i=n))for(o=w;o=r||(a=(n*o+i)*4,L[a+0]=s,L[a+1]=l,L[a+2]=u,L[a+3]=d)}};J.addGetterSetter(Ge,"pixelSize",8,Ve(),J.afterSetFilter);const B6e=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)});J.addGetterSetter(Ge,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});J.addGetterSetter(Ge,"blue",0,nV,J.afterSetFilter);const H6e=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)});J.addGetterSetter(Ge,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});J.addGetterSetter(Ge,"blue",0,nV,J.afterSetFilter);J.addGetterSetter(Ge,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const W6e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),d>127&&(d=255-d),h>127&&(h=255-h),t[l]=u,t[l+1]=d,t[l+2]=h}while(--s)}while(--o)},V6e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i{const{width:n,height:r}=t,i=document.createElement("div"),o=new $g.Stage({container:i,width:n,height:r}),a=new $g.Layer,s=new $g.Layer;a.add(new $g.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new $g.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l};let IV=null,DV=null;const q6e=e=>{IV=e},Qs=()=>IV,K6e=e=>{DV=e},jV=()=>DV,Y6e=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("

")})},NV=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),X6e=e=>{const t=Qs(),{generationMode:n,generationState:r,postprocessingState:i,canvasState:o,systemState:a}=e,{codeformerFidelity:s,facetoolStrength:l,facetoolType:u,hiresFix:d,hiresStrength:h,shouldRunESRGAN:m,shouldRunFacetool:y,upscalingLevel:b,upscalingStrength:w,upscalingDenoising:E}=i,{cfgScale:_,height:k,img2imgStrength:T,infillMethod:L,initialImage:O,iterations:D,perlin:I,prompt:N,negativePrompt:W,sampler:B,seamBlur:K,seamless:ne,seamSize:z,seamSteps:$,seamStrength:V,seed:X,seedWeights:Q,shouldFitToWidthHeight:G,shouldGenerateVariations:Y,shouldRandomizeSeed:ee,steps:fe,threshold:Ce,tileSize:we,variationAmount:xe,width:Le,shouldUseSymmetry:Se,horizontalSymmetryTimePercentage:Qe,verticalSymmetryTimePercentage:Xe}=r,{shouldDisplayInProgressType:tt,saveIntermediatesInterval:yt,enableImageDebugging:Be}=a,Ae={prompt:N,iterations:D,steps:fe,cfg_scale:_,threshold:Ce,perlin:I,height:k,width:Le,sampler_name:B,seed:X,progress_images:tt==="full-res",progress_latents:tt==="latents",save_intermediates:yt,generation_mode:n,init_mask:""};let bt=!1,Fe=!1;if(W!==""&&(Ae.prompt=`${N} [${W}]`),Ae.seed=ee?NV(CE,_E):X,Se&&(Qe>0&&(Ae.h_symmetry_time_pct=Math.max(0,Math.min(1,Qe/fe))),Qe>0&&(Ae.v_symmetry_time_pct=Math.max(0,Math.min(1,Xe/fe)))),n==="txt2img"&&(Ae.hires_fix=d,d&&(Ae.strength=h)),["txt2img","img2img"].includes(n)&&(Ae.seamless=ne,m&&(bt={level:b,denoise_str:E,strength:w}),y&&(Fe={type:u,strength:l},u==="codeformer"&&(Fe.codeformer_fidelity=s))),n==="img2img"&&O&&(Ae.init_img=typeof O=="string"?O:O.url,Ae.strength=T,Ae.fit=G),n==="unifiedCanvas"&&t){const{layerState:{objects:at},boundingBoxCoordinates:jt,boundingBoxDimensions:mt,stageScale:Zt,isMaskEnabled:on,shouldPreserveMaskedArea:se,boundingBoxScaleMethod:Ie,scaledBoundingBoxDimensions:He}=o,Ue={...jt,...mt},ye=G6e(on?at.filter(hE):[],Ue);Ae.init_mask=ye,Ae.fit=!1,Ae.strength=T,Ae.invert_mask=se,Ae.bounding_box=Ue;const je=t.scale();t.scale({x:1/Zt,y:1/Zt});const vt=t.getAbsolutePosition(),Mt=t.toDataURL({x:Ue.x+vt.x,y:Ue.y+vt.y,width:Ue.width,height:Ue.height});Be&&Y6e([{base64:ye,caption:"mask sent as init_mask"},{base64:Mt,caption:"image sent as init_img"}]),t.scale(je),Ae.init_img=Mt,Ae.progress_images=!1,Ie!=="none"&&(Ae.inpaint_width=He.width,Ae.inpaint_height=He.height),Ae.seam_size=z,Ae.seam_blur=K,Ae.seam_strength=V,Ae.seam_steps=$,Ae.tile_size=we,Ae.infill_method=L,Ae.force_outpaint=!1}return Y?(Ae.variation_amount=xe,Q&&(Ae.with_variations=D3e(Q))):Ae.variation_amount=0,Be&&(Ae.enable_image_debugging=Be),{generationParameters:Ae,esrganParameters:bt,facetoolParameters:Fe}};var Z6e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Q6e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,J6e=/[^-+\dA-Z]/g;function Ti(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(wI[t]||t||wI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},d=function(){return e[o()+"Hours"]()},h=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},y=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return e_e(e)},E=function(){return t_e(e)},_={d:function(){return a()},dd:function(){return xa(a())},ddd:function(){return zo.dayNames[s()]},DDD:function(){return CI({y:u(),m:l(),d:a(),_:o(),dayName:zo.dayNames[s()],short:!0})},dddd:function(){return zo.dayNames[s()+7]},DDDD:function(){return CI({y:u(),m:l(),d:a(),_:o(),dayName:zo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return xa(l()+1)},mmm:function(){return zo.monthNames[l()]},mmmm:function(){return zo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return xa(u(),4)},h:function(){return d()%12||12},hh:function(){return xa(d()%12||12)},H:function(){return d()},HH:function(){return xa(d())},M:function(){return h()},MM:function(){return xa(h())},s:function(){return m()},ss:function(){return xa(m())},l:function(){return xa(y(),3)},L:function(){return xa(Math.floor(y()/10))},t:function(){return d()<12?zo.timeNames[0]:zo.timeNames[1]},tt:function(){return d()<12?zo.timeNames[2]:zo.timeNames[3]},T:function(){return d()<12?zo.timeNames[4]:zo.timeNames[5]},TT:function(){return d()<12?zo.timeNames[6]:zo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":n_e(e)},o:function(){return(b()>0?"-":"+")+xa(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+xa(Math.floor(Math.abs(b())/60),2)+":"+xa(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return xa(w())},N:function(){return E()}};return t.replace(Z6e,function(k){return k in _?_[k]():k.slice(1,k.length-1)})}var wI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},zo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},xa=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},CI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,d=new Date;d.setDate(d[o+"Date"]()-1);var h=new Date;h.setDate(h[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},y=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return d[o+"Date"]()},E=function(){return d[o+"Month"]()},_=function(){return d[o+"FullYear"]()},k=function(){return h[o+"Date"]()},T=function(){return h[o+"Month"]()},L=function(){return h[o+"FullYear"]()};return b()===n&&y()===r&&m()===i?l?"Tdy":"Today":_()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":L()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},e_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},t_e=function(t){var n=t.getDay();return n===0&&(n=7),n},n_e=function(t){return(String(t).match(Q6e)||[""]).pop().replace(J6e,"").replace(/GMT\+0000/g,"UTC")};const r_e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(wa(!0));const o=r(),{generation:a,postprocessing:s,system:l,canvas:u}=o,d={generationMode:i,generationState:a,postprocessingState:s,canvasState:u,systemState:l};n(P4e());const{generationParameters:h,esrganParameters:m,facetoolParameters:y}=X6e(d);t.emit("generateImage",h,m,y),h.init_mask&&(h.init_mask=h.init_mask.substr(0,64).concat("...")),h.init_img&&(h.init_img=h.init_img.substr(0,64).concat("...")),n(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...h,...m,...y})}`}))},emitRunESRGAN:i=>{n(wa(!0));const{postprocessing:{upscalingLevel:o,upscalingDenoising:a,upscalingStrength:s}}=r(),l={upscale:[o,a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(wa(!0));const{postprocessing:{facetoolType:o,facetoolStrength:a,codeformerFidelity:s}}=r(),l={facetool_strength:a};o==="codeformer"&&(l.codeformer_fidelity=s),t.emit("runPostprocessing",i,{type:o,...l}),n(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Face restoration (${o}) requested: ${JSON.stringify({file:i.url,...l})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(JW(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitSearchForModels:i=>{t.emit("searchForModels",i)},emitAddNewModel:i=>{t.emit("addNewModel",i)},emitDeleteModel:i=>{t.emit("deleteModel",i)},emitConvertToDiffusers:i=>{n(C4e()),t.emit("convertToDiffusers",i)},emitMergeDiffusersModels:i=>{n(_4e()),t.emit("mergeDiffusersModels",i)},emitRequestModelChange:i=>{n(w4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}};let mx;const i_e=new Uint8Array(16);function o_e(){if(!mx&&(mx=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!mx))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mx(i_e)}const Hi=[];for(let e=0;e<256;++e)Hi.push((e+256).toString(16).slice(1));function a_e(e,t=0){return(Hi[e[t+0]]+Hi[e[t+1]]+Hi[e[t+2]]+Hi[e[t+3]]+"-"+Hi[e[t+4]]+Hi[e[t+5]]+"-"+Hi[e[t+6]]+Hi[e[t+7]]+"-"+Hi[e[t+8]]+Hi[e[t+9]]+"-"+Hi[e[t+10]]+Hi[e[t+11]]+Hi[e[t+12]]+Hi[e[t+13]]+Hi[e[t+14]]+Hi[e[t+15]]).toLowerCase()}const s_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_I={randomUUID:s_e};function um(e,t,n){if(_I.randomUUID&&!t&&!e)return _I.randomUUID();e=e||{};const r=e.random||(e.rng||o_e)();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 a_e(r)}const Wk=br("socketio/generateImage"),l_e=br("socketio/runESRGAN"),u_e=br("socketio/runFacetool"),c_e=br("socketio/deleteImage"),Uk=br("socketio/requestImages"),kI=br("socketio/requestNewImages"),d_e=br("socketio/cancelProcessing"),f_e=br("socketio/requestSystemConfig"),EI=br("socketio/searchForModels"),v2=br("socketio/addNewModel"),h_e=br("socketio/deleteModel"),p_e=br("socketio/convertToDiffusers"),g_e=br("socketio/mergeDiffusersModels"),$V=br("socketio/requestModelChange"),m_e=br("socketio/saveStagingAreaImageToGallery"),v_e=br("socketio/requestEmptyTempFolder"),y_e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(HR(!0)),t(hh(Et.t("common.statusConnected"))),t(f_e());const r=n().gallery;r.categories.result.latest_mtime?t(kI("result")):t(Uk("result")),r.categories.user.latest_mtime?t(kI("user")):t(Uk("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(HR(!1)),t(hh(Et.t("common.statusDisconnected"))),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{activeTab:o}=i.ui,{shouldLoopback:a}=i.postprocessing,{boundingBox:s,generationMode:l,...u}=r,d={uuid:um(),...u};if(["txt2img","img2img"].includes(l)&&t(sm({category:"result",image:{...d,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:h}=r;t(e3e({image:{...d,category:"temp"},boundingBox:h})),i.canvas.shouldAutoSave&&t(sm({image:{...d,category:"result"},category:"result"}))}if(a)switch(xE[o]){case"img2img":{t(y0(d));break}}t(jC()),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(C3e({uuid:um(),...r,category:"result"})),r.isBase64||t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(sm({category:"result",image:{uuid:um(),...r,category:"result"}})),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(wa(!0)),t(y4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(WR()),t(jC())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:um(),...l}));t(w3e({images:s,areMoreImagesAvailable:o,category:a})),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(S4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(sm({category:"result",image:r})),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(jC())),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(JW(r));const{generation:{initialImage:o,maskPath:a}}=n();(o===i||(o==null?void 0:o.url)===i)&&t(oU()),a===i&&t(lU("")),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(b4e(r)),r.infill_methods.includes("patchmatch")||t(sU(r.infill_methods[0]))},onFoundModels:r=>{const{search_folder:i,found_models:o}=r;t(jU(i)),t(NU(o))},onNewModelAdded:r=>{const{new_model_name:i,model_list:o,update:a}=r;t(Ag(o)),t(wa(!1)),t(hh(Et.t("modelManager.modelAdded"))),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Model Added: ${i}`,level:"info"})),t($u({title:a?`${Et.t("modelManager.modelUpdated")}: ${i}`:`${Et.t("modelManager.modelAdded")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelDeleted:r=>{const{deleted_model_name:i,model_list:o}=r;t(Ag(o)),t(wa(!1)),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`${Et.t("modelmanager:modelAdded")}: ${i}`,level:"info"})),t($u({title:`${Et.t("modelmanager:modelEntryDeleted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelConverted:r=>{const{converted_model_name:i,model_list:o}=r;t(Ag(o)),t(hh(Et.t("common.statusModelConverted"))),t(wa(!1)),t(_d(!0)),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Model converted: ${i}`,level:"info"})),t($u({title:`${Et.t("modelmanager:modelConverted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelsMerged:r=>{const{merged_models:i,merged_model_name:o,model_list:a}=r;t(Ag(a)),t(hh(Et.t("common.statusMergedModels"))),t(wa(!1)),t(_d(!0)),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Models merged: ${i}`,level:"info"})),t($u({title:`${Et.t("modelManager.modelsMerged")}: ${o}`,status:"success",duration:2500,isClosable:!0}))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(Ag(o)),t(hh(Et.t("common.statusModelChanged"))),t(wa(!1)),t(_d(!0)),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(Ag(o)),t(wa(!1)),t(_d(!0)),t(WR()),t(Pi({timestamp:Ti(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t($u({title:Et.t("toast.tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}},b_e=()=>{const{origin:e}=new URL(window.location.href),t=pS(e,{timeout:6e4,path:`${window.location.pathname}socket.io`});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:d,onGenerationResult:h,onIntermediateResult:m,onProgressUpdate:y,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:_,onModelChanged:k,onFoundModels:T,onNewModelAdded:L,onModelDeleted:O,onModelConverted:D,onModelsMerged:I,onModelChangeFailed:N,onTempFolderEmptied:W}=y_e(i),{emitGenerateImage:B,emitRunESRGAN:K,emitRunFacetool:ne,emitDeleteImage:z,emitRequestImages:$,emitRequestNewImages:V,emitCancelProcessing:X,emitRequestSystemConfig:Q,emitSearchForModels:G,emitAddNewModel:Y,emitDeleteModel:ee,emitConvertToDiffusers:fe,emitMergeDiffusersModels:Ce,emitRequestModelChange:we,emitSaveStagingAreaImageToGallery:xe,emitRequestEmptyTempFolder:Le}=r_e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Se=>u(Se)),t.on("generationResult",Se=>h(Se)),t.on("postprocessingResult",Se=>d(Se)),t.on("intermediateResult",Se=>m(Se)),t.on("progressUpdate",Se=>y(Se)),t.on("galleryImages",Se=>b(Se)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",Se=>{E(Se)}),t.on("systemConfig",Se=>{_(Se)}),t.on("foundModels",Se=>{T(Se)}),t.on("newModelAdded",Se=>{L(Se)}),t.on("modelDeleted",Se=>{O(Se)}),t.on("modelConverted",Se=>{D(Se)}),t.on("modelsMerged",Se=>{I(Se)}),t.on("modelChanged",Se=>{k(Se)}),t.on("modelChangeFailed",Se=>{N(Se)}),t.on("tempFolderEmptied",()=>{W()}),n=!0),a.type){case"socketio/generateImage":{B(a.payload);break}case"socketio/runESRGAN":{K(a.payload);break}case"socketio/runFacetool":{ne(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{$(a.payload);break}case"socketio/requestNewImages":{V(a.payload);break}case"socketio/cancelProcessing":{X();break}case"socketio/requestSystemConfig":{Q();break}case"socketio/searchForModels":{G(a.payload);break}case"socketio/addNewModel":{Y(a.payload);break}case"socketio/deleteModel":{ee(a.payload);break}case"socketio/convertToDiffusers":{fe(a.payload);break}case"socketio/mergeDiffusersModels":{Ce(a.payload);break}case"socketio/requestModelChange":{we(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{xe(a.payload);break}case"socketio/requestEmptyTempFolder":{Le();break}}o(a)}},x_e=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(e=>`canvas.${e}`),S_e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps","openModel","cancelOptions.cancelAfter"].map(e=>`system.${e}`),w_e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),FV=SW({generation:z3e,postprocessing:G3e,gallery:L3e,system:L4e,canvas:x3e,ui:z4e,lightbox:R3e}),C_e=OW.getPersistConfig({key:"root",storage:AW,rootReducer:FV,blacklist:[...x_e,...S_e,...w_e],debounce:300}),__e=PSe(C_e,FV),BV=rSe({reducer:__e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(b_e()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),zV=RSe(BV),AE=S.createContext(null),Te=vxe,le=axe;let PI;const OE=()=>({setOpenUploader:e=>{e&&(PI=e)},openUploader:PI}),Br=lt(e=>e.ui,e=>xE[e.activeTab],{memoizeOptions:{equalityCheck:Pe.isEqual}}),k_e=lt(e=>e.ui,e=>e.activeTab,{memoizeOptions:{equalityCheck:Pe.isEqual}}),fp=lt(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:Pe.isEqual}}),TI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Br(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:a})).json(),u={uuid:um(),category:"user",...l};t(sm({image:u,category:"user"})),o==="unifiedCanvas"?t(i4(u)):o==="img2img"&&t(y0(u))};function E_e(){const{t:e}=De();return g.jsxs("div",{className:"work-in-progress nodes-work-in-progress",children:[g.jsx("h1",{children:e("common.nodes")}),g.jsx("p",{children:e("common.nodesDesc")})]})}const P_e=()=>{const{t:e}=De();return g.jsxs("div",{className:"work-in-progress post-processing-work-in-progress",children:[g.jsx("h1",{children:e("common.postProcessing")}),g.jsx("p",{children:e("common.postProcessDesc1")}),g.jsx("p",{children:e("common.postProcessDesc2")}),g.jsx("p",{children:e("common.postProcessDesc3")})]})};function T_e(){const{t:e}=De();return g.jsxs("div",{className:"work-in-progress nodes-work-in-progress",children:[g.jsx("h1",{children:e("common.training")}),g.jsxs("p",{children:[e("common.trainingDesc1"),g.jsx("br",{}),g.jsx("br",{}),e("common.trainingDesc2")]})]})}function M_e(e){const{i18n:t}=De(),n=localStorage.getItem("i18nextLng");Ke.useEffect(()=>{e()},[e]),Ke.useEffect(()=>{t.on("languageChanged",()=>{e()})},[e,t,n])}const L_e=fc({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:g.jsx("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:g.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),A_e=fc({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:g.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),O_e=fc({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:g.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),R_e=fc({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:g.jsx("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:g.jsx("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})}),I_e=fc({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:g.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),D_e=fc({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:g.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),Ye=Ze((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return g.jsx(si,{label:n,hasArrow:!0,...i,...i!=null&&i.placement?{placement:i.placement}:{placement:"top"},children:g.jsx(ls,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})}),On=Ze((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return g.jsx(si,{label:r,...i,children:g.jsx(ss,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),Ys=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return g.jsxs(V8,{...o,children:[g.jsx(U8,{children:t}),g.jsxs(q8,{className:`invokeai__popover-content ${r}`,children:[i&&g.jsx(G8,{className:"invokeai__popover-arrow"}),n]})]})},d4=lt(e=>e.lightbox,e=>e,{memoizeOptions:{equalityCheck:Pe.isEqual}}),Jo=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="sm",styleClass:l,...u}=e;return g.jsxs(sn,{isDisabled:n,className:`invokeai__select ${l}`,onClick:d=>{d.stopPropagation(),d.nativeEvent.stopImmediatePropagation(),d.nativeEvent.stopPropagation(),d.nativeEvent.cancelBubble=!0},children:[t&&g.jsx(Sn,{className:"invokeai__select-label",fontSize:s,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",children:t}),g.jsx(si,{label:i,...o,children:g.jsx(qH,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(d=>typeof d=="string"||typeof d=="number"?g.jsx("option",{value:d,className:"invokeai__select-option",children:d},d):g.jsx("option",{value:d.value,className:"invokeai__select-option",children:d.key},d.value))})})]})};function j_e(){const e=le(i=>i.postprocessing.facetoolType),t=Te(),{t:n}=De(),r=i=>t(dS(i.target.value));return g.jsx(Jo,{label:n("parameters.type"),validValues:I5e.concat(),value:e,onChange:r})}var HV={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},MI=Ke.createContext&&Ke.createContext(HV),Bd=globalThis&&globalThis.__assign||function(){return Bd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{Ce(i)},[i]);const we=S.useMemo(()=>V!=null&&V.max?V.max:a,[a,V==null?void 0:V.max]),xe=Xe=>{l(Xe)},Le=Xe=>{Xe.target.value===""&&(Xe.target.value=String(o));const tt=Pe.clamp(w?Math.floor(Number(Xe.target.value)):Number(fe),o,we);l(tt)},Se=Xe=>{Ce(Xe)},Qe=()=>{O&&O()};return g.jsxs(sn,{className:W?`invokeai__slider-component ${W}`:"invokeai__slider-component","data-markers":h,style:L?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"1rem",margin:0,padding:0}:{},...B,children:[g.jsx(Sn,{className:"invokeai__slider-component-label",fontSize:"sm",...K,children:r}),g.jsxs(l2,{w:"100%",gap:2,alignItems:"center",children:[g.jsxs(QH,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,width:u,...ee,children:[h&&g.jsxs(g.Fragment,{children:[g.jsx(tk,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:m,...ne,children:o}),g.jsx(tk,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:y,...ne,children:a})]}),g.jsx(eW,{className:"invokeai__slider_track",...z,children:g.jsx(tW,{className:"invokeai__slider_track-filled"})}),g.jsx(si,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${d}`,hidden:T,...G,children:g.jsx(JH,{className:"invokeai__slider-thumb",...$})})]}),b&&g.jsxs(B8,{min:o,max:we,step:s,value:fe,onChange:Se,onBlur:Le,className:"invokeai__slider-number-field",isDisabled:N,...V,children:[g.jsx(z8,{className:"invokeai__slider-number-input",width:E,readOnly:_,minWidth:E,...X}),g.jsxs(BH,{...Q,children:[g.jsx(W8,{onClick:()=>l(Number(fe)),className:"invokeai__slider-number-stepper"}),g.jsx(H8,{onClick:()=>l(Number(fe)),className:"invokeai__slider-number-stepper"})]})]}),k&&g.jsx(Ye,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:g.jsx(f4,{}),onClick:Qe,isDisabled:D,...Y})]})]})}function U_e(){const e=le(i=>i.system.isGFPGANAvailable),t=le(i=>i.postprocessing.facetoolStrength),{t:n}=De(),r=Te();return g.jsx(Dn,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.strength"),step:.05,min:0,max:1,onChange:i=>r(k3(i)),handleReset:()=>r(k3(.75)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}function V_e(){const e=le(i=>i.system.isGFPGANAvailable),t=le(i=>i.postprocessing.codeformerFidelity),{t:n}=De(),r=Te();return g.jsx(Dn,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.codeformerFidelity"),step:.05,min:0,max:1,onChange:i=>r(xk(i)),handleReset:()=>r(xk(1)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}const RE=()=>{const e=le(t=>t.postprocessing.facetoolType);return g.jsxs(ke,{direction:"column",gap:2,minWidth:"20rem",children:[g.jsx(j_e,{}),g.jsx(U_e,{}),e==="codeformer"&&g.jsx(V_e,{})]})};function G_e(){const e=le(i=>i.system.isESRGANAvailable),t=le(i=>i.postprocessing.upscalingDenoising),{t:n}=De(),r=Te();return g.jsx(Dn,{label:n("parameters.denoisingStrength"),value:t,min:0,max:1,step:.01,onChange:i=>{r(Sk(i))},handleReset:()=>r(Sk(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function q_e(){const e=le(i=>i.system.isESRGANAvailable),t=le(i=>i.postprocessing.upscalingStrength),{t:n}=De(),r=Te();return g.jsx(Dn,{label:`${n("parameters.upscale")} ${n("parameters.strength")}`,value:t,min:0,max:1,step:.05,onChange:i=>r(wk(i)),handleReset:()=>r(wk(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function K_e(){const e=le(o=>o.system.isESRGANAvailable),t=le(o=>o.postprocessing.upscalingLevel),{t:n}=De(),r=Te(),i=o=>r(yU(Number(o.target.value)));return g.jsx(Jo,{isDisabled:!e,label:n("parameters.scale"),value:t,onChange:i,validValues:R5e})}const IE=()=>g.jsxs(ke,{flexDir:"column",rowGap:2,minWidth:"20rem",children:[g.jsx(K_e,{}),g.jsx(G_e,{}),g.jsx(q_e,{})]}),DE=e=>e.postprocessing,hr=e=>e.system,Y_e=e=>e.system.toastQueue,VV=lt(hr,e=>{const{model_list:t}=e,n=Pe.reduce(t,(r,i,o)=>(i.status==="active"&&(r=o),r),"");return{...t[n],name:n}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),X_e=lt(hr,e=>{const{model_list:t}=e;return Pe.pickBy(t,(r,i)=>{if(r.format==="diffusers")return{name:i,...r}})},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function Vk(){return Vk=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 ike=function(t,n,r){r===void 0&&(r=!1);var i=n.alt,o=n.meta,a=n.mod,s=n.shift,l=n.ctrl,u=n.keys,d=t.key,h=t.code,m=t.ctrlKey,y=t.metaKey,b=t.shiftKey,w=t.altKey,E=kd(h),_=d.toLowerCase();if(!r){if(i===!w&&_!=="alt"||s===!b&&_!=="shift")return!1;if(a){if(!y&&!m)return!1}else if(o===!y&&_!=="meta"||l===!m&&_!=="ctrl")return!1}return u&&u.length===1&&(u.includes(_)||u.includes(E))?!0:u?J_e(u):!u},oke=S.createContext(void 0),ake=function(){return S.useContext(oke)};function XV(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&&XV(e[r],t[r])},!0):e===t}var ske=S.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),lke=function(){return S.useContext(ske)};function uke(e){var t=S.useRef(void 0);return XV(t.current,e)||(t.current=e),t.current}var LI=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},cke=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Je(e,t,n,r){var i=S.useRef(null),o=S.useRef(!1),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:void 0,l=S.useCallback(t,s??[]),u=S.useRef(l);s?u.current=l:u.current=t;var d=uke(a),h=lke(),m=h.enabledScopes,y=ake();return cke(function(){if(!((d==null?void 0:d.enabled)===!1||!rke(m,d==null?void 0:d.scopes))){var b=function(k,T){var L;if(T===void 0&&(T=!1),!(nke(k)&&!YV(k,d==null?void 0:d.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){LI(k);return}(L=k.target)!=null&&L.isContentEditable&&!(d!=null&&d.enableOnContentEditable)||XC(e,d==null?void 0:d.splitKey).forEach(function(O){var D,I=ZC(O,d==null?void 0:d.combinationKey);if(ike(k,I,d==null?void 0:d.ignoreModifiers)||(D=I.keys)!=null&&D.includes("*")){if(T&&o.current)return;if(eke(k,I,d==null?void 0:d.preventDefault),!tke(k,I,d==null?void 0:d.enabled)){LI(k);return}u.current(k,I),T||(o.current=!0)}})}},w=function(k){k.key!==void 0&&(qV(kd(k.code)),((d==null?void 0:d.keydown)===void 0&&(d==null?void 0:d.keyup)!==!0||d!=null&&d.keydown)&&b(k))},E=function(k){k.key!==void 0&&(KV(kd(k.code)),o.current=!1,d!=null&&d.keyup&&b(k,!0))};return(i.current||(a==null?void 0:a.document)||document).addEventListener("keyup",E),(i.current||(a==null?void 0:a.document)||document).addEventListener("keydown",w),y&&XC(e,d==null?void 0:d.splitKey).forEach(function(_){return y.addHotkey(ZC(_,d==null?void 0:d.combinationKey))}),function(){(i.current||(a==null?void 0:a.document)||document).removeEventListener("keyup",E),(i.current||(a==null?void 0:a.document)||document).removeEventListener("keydown",w),y&&XC(e,d==null?void 0:d.splitKey).forEach(function(_){return y.removeHotkey(ZC(_,d==null?void 0:d.combinationKey))})}}},[e,d,m]),i}function dke(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function fke(e){return ut({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function hke(e){return ut({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function ZV(e){return ut({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function QV(e){return ut({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function pke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function gke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function JV(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function mke(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function vke(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function jE(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function eG(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function e0(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function tG(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function yke(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"}}]})(e)}function NE(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function nG(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function bke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function xke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"}}]})(e)}function rG(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function Ske(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function wke(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function iG(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"}}]})(e)}function Cke(e){return ut({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function _ke(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function kke(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function Eke(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"}}]})(e)}function oG(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function Pke(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function Tke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function aG(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function Mke(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function Lke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function y2(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function Ake(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function Oke(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function Rke(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function $E(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function Ike(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function Dke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function AI(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function FE(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function jke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function hp(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Nke(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function h4(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function $ke(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function BE(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const rn=e=>e.canvas,Lr=lt([rn,Br,hr],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),sG=e=>e.canvas.layerState.objects.find(x3),pp=e=>e.gallery,Fke=lt([pp,d4,Lr,Br],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:d,galleryImageObjectFit:h,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:y,galleryWidth:b,shouldUseSingleGalleryColumn:w}=e,{isLightboxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:d,galleryImageObjectFit:h,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${d}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:y,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:b,isLightboxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),Bke=lt([pp,hr,d4,Br],(e,t,n,r)=>({mayDeleteImage:t.isConnected&&!t.isProcessing,galleryImageObjectFit:e.galleryImageObjectFit,galleryImageMinimumWidth:e.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:e.shouldUseSingleGalleryColumn,activeTabName:r,isLightboxOpen:n.isLightboxOpen}),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),zke=lt(hr,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),A3=S.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Kd(),a=Te(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=le(zke),d=S.useRef(null),h=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(c_e(e)),o()};Je("delete",()=>{s?i():m()},[e,s,l,u]);const y=b=>a(IU(!b.target.checked));return g.jsxs(g.Fragment,{children:[S.cloneElement(t,{onClick:e?h:void 0,ref:n}),g.jsx($H,{isOpen:r,leastDestructiveRef:d,onClose:o,children:g.jsx(oc,{children:g.jsxs(FH,{className:"modal",children:[g.jsx(op,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),g.jsx(Zm,{children:g.jsxs(ke,{direction:"column",gap:5,children:[g.jsx(Dt,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),g.jsx(sn,{children:g.jsxs(ke,{alignItems:"center",children:[g.jsx(Sn,{mb:0,children:"Don't ask me again"}),g.jsx(K8,{checked:!s,onChange:y})]})})]})}),g.jsxs(zw,{children:[g.jsx(ss,{ref:d,onClick:o,className:"modal-close-btn",children:"Cancel"}),g.jsx(ss,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})});A3.displayName="DeleteImageModal";const zE=()=>{const e=Te();return t=>{const n=typeof t=="string"?t:Rm(t),[r,i]=nU(n);e(uU(r)),e(cU(i))}},Hke=lt([hr,pp,DE,fp,d4,Br],(e,t,n,r,i,o)=>{const{isProcessing:a,isConnected:s,isGFPGANAvailable:l,isESRGANAvailable:u}=e,{upscalingLevel:d,facetoolStrength:h}=n,{isLightboxOpen:m}=i,{shouldShowImageDetails:y}=r,{intermediateImage:b,currentImage:w}=t;return{isProcessing:a,isConnected:s,isGFPGANAvailable:l,isESRGANAvailable:u,upscalingLevel:d,facetoolStrength:h,shouldDisableToolbarButtons:Boolean(b)||!w,currentImage:w,shouldShowImageDetails:y,activeTabName:o,isLightboxOpen:m}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),lG=()=>{var B,K,ne,z,$,V,X,Q;const e=Te(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightboxOpen:d,activeTabName:h}=le(Hke),m=a2(),{t:y}=De(),b=zE(),w=()=>{u&&(d&&e(Om(!1)),e(y0(u)),e(Wo("img2img")))},E=async()=>{if(!u)return;const G=await fetch(u.url).then(ee=>ee.blob()),Y=[new ClipboardItem({[G.type]:G})];await navigator.clipboard.write(Y),m({title:y("toast.imageCopied"),status:"success",duration:2500,isClosable:!0})},_=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:y("toast.imageLinkCopied"),status:"success",duration:2500,isClosable:!0})})};Je("shift+i",()=>{u?(w(),m({title:y("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):m({title:y("toast.imageNotLoaded"),description:y("toast.imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{var G,Y;u&&(u.metadata&&e(aU(u.metadata)),((G=u.metadata)==null?void 0:G.image.type)==="img2img"?e(Wo("img2img")):((Y=u.metadata)==null?void 0:Y.image.type)==="txt2img"&&e(Wo("txt2img")))};Je("a",()=>{var G,Y;["txt2img","img2img"].includes((Y=(G=u==null?void 0:u.metadata)==null?void 0:G.image)==null?void 0:Y.type)?(k(),m({title:y("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})):m({title:y("toast.parametersNotSet"),description:y("toast.parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const T=()=>{u!=null&&u.metadata&&e(p2(u.metadata.image.seed))};Je("s",()=>{var G,Y;(Y=(G=u==null?void 0:u.metadata)==null?void 0:G.image)!=null&&Y.seed?(T(),m({title:y("toast.seedSet"),status:"success",duration:2500,isClosable:!0})):m({title:y("toast.seedNotSet"),description:y("toast.seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const L=S.useCallback(()=>{var G,Y,ee,fe;(Y=(G=u==null?void 0:u.metadata)==null?void 0:G.image)!=null&&Y.prompt&&b((fe=(ee=u==null?void 0:u.metadata)==null?void 0:ee.image)==null?void 0:fe.prompt)},[(K=(B=u==null?void 0:u.metadata)==null?void 0:B.image)==null?void 0:K.prompt,b]);Je("p",()=>{var G,Y;(Y=(G=u==null?void 0:u.metadata)==null?void 0:G.image)!=null&&Y.prompt?(L(),m({title:y("toast.promptSet"),status:"success",duration:2500,isClosable:!0})):m({title:y("toast.promptNotSet"),description:y("toast.promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const O=()=>{u&&e(l_e(u))};Je("Shift+U",()=>{i&&!s&&n&&!t&&o?O():m({title:y("toast.upscalingFailed"),status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const D=()=>{u&&e(u_e(u))};Je("Shift+R",()=>{r&&!s&&n&&!t&&a?D():m({title:y("toast.faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const I=()=>e(FU(!l)),N=()=>{u&&(d&&e(Om(!1)),e(i4(u)),e(Li(!0)),h!=="unifiedCanvas"&&e(Wo("unifiedCanvas")),m({title:y("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))};Je("i",()=>{u?I():m({title:y("toast.metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[u,l]);const W=()=>{e(Om(!d))};return g.jsxs("div",{className:"current-image-options",children:[g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Ye,{"aria-label":`${y("parameters.sendTo")}...`,icon:g.jsx(Dke,{})}),children:g.jsxs("div",{className:"current-image-send-to-popover",children:[g.jsx(On,{size:"sm",onClick:w,leftIcon:g.jsx(AI,{}),children:y("parameters.sendToImg2Img")}),g.jsx(On,{size:"sm",onClick:N,leftIcon:g.jsx(AI,{}),children:y("parameters.sendToUnifiedCanvas")}),g.jsx(On,{size:"sm",onClick:E,leftIcon:g.jsx(e0,{}),children:y("parameters.copyImage")}),g.jsx(On,{size:"sm",onClick:_,leftIcon:g.jsx(e0,{}),children:y("parameters.copyImageToLink")}),g.jsx(Nh,{download:!0,href:u==null?void 0:u.url,children:g.jsx(On,{leftIcon:g.jsx(NE,{}),size:"sm",w:"100%",children:y("parameters.downloadImage")})})]})}),g.jsx(Ye,{icon:g.jsx(xke,{}),tooltip:d?`${y("parameters.closeViewer")} (Z)`:`${y("parameters.openInViewer")} (Z)`,"aria-label":d?`${y("parameters.closeViewer")} (Z)`:`${y("parameters.openInViewer")} (Z)`,"data-selected":d,onClick:W})]}),g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Ye,{icon:g.jsx(Ake,{}),tooltip:`${y("parameters.usePrompt")} (P)`,"aria-label":`${y("parameters.usePrompt")} (P)`,isDisabled:!((z=(ne=u==null?void 0:u.metadata)==null?void 0:ne.image)!=null&&z.prompt),onClick:L}),g.jsx(Ye,{icon:g.jsx(Ike,{}),tooltip:`${y("parameters.useSeed")} (S)`,"aria-label":`${y("parameters.useSeed")} (S)`,isDisabled:!((V=($=u==null?void 0:u.metadata)==null?void 0:$.image)!=null&&V.seed),onClick:T}),g.jsx(Ye,{icon:g.jsx(mke,{}),tooltip:`${y("parameters.useAll")} (A)`,"aria-label":`${y("parameters.useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes((Q=(X=u==null?void 0:u.metadata)==null?void 0:X.image)==null?void 0:Q.type),onClick:k})]}),g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Ye,{icon:g.jsx(Cke,{}),"aria-label":y("parameters.restoreFaces")}),children:g.jsxs("div",{className:"current-image-postprocessing-popover",children:[g.jsx(RE,{}),g.jsx(On,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:D,children:y("parameters.restoreFaces")})]})}),g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Ye,{icon:g.jsx(bke,{}),"aria-label":y("parameters.upscale")}),children:g.jsxs("div",{className:"current-image-postprocessing-popover",children:[g.jsx(IE,{}),g.jsx(On,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:O,children:y("parameters.upscaleImage")})]})})]}),g.jsx(Gi,{isAttached:!0,children:g.jsx(Ye,{icon:g.jsx(eG,{}),tooltip:`${y("parameters.info")} (I)`,"aria-label":`${y("parameters.info")} (I)`,"data-selected":l,onClick:I})}),g.jsx(A3,{image:u,children:g.jsx(Ye,{icon:g.jsx(hp,{}),tooltip:`${y("parameters.deleteImage")} (Del)`,"aria-label":`${y("parameters.deleteImage")} (Del)`,isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})};var Wke=fc({displayName:"EditIcon",path:g.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[g.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),g.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),uG=fc({displayName:"ExternalLinkIcon",path:g.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[g.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),g.jsx("path",{d:"M15 3h6v6"}),g.jsx("path",{d:"M10 14L21 3"})]})}),Uke=fc({displayName:"DeleteIcon",path:g.jsx("g",{fill:"currentColor",children:g.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"})})});function Vke(e){return ut({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 Jn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>g.jsxs(ke,{gap:2,children:[n&&g.jsx(si,{label:`Recall ${e}`,children:g.jsx(ls,{"aria-label":"Use this parameter",icon:g.jsx(Vke,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&g.jsx(si,{label:`Copy ${e}`,children:g.jsx(ls,{"aria-label":`Copy ${e}`,icon:g.jsx(e0,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),g.jsxs(ke,{direction:i?"column":"row",children:[g.jsxs(Dt,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?g.jsxs(Nh,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",g.jsx(uG,{mx:"2px"})]}):g.jsx(Dt,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),Gke=(e,t)=>e.image.uuid===t.image.uuid,HE=S.memo(({image:e,styleClass:t})=>{var B,K;const n=Te(),r=zE();Je("esc",()=>{n(FU(!1))});const i=((B=e==null?void 0:e.metadata)==null?void 0:B.image)||{},o=e==null?void 0:e.dreamPrompt,{cfg_scale:a,fit:s,height:l,hires_fix:u,init_image_path:d,mask_image_path:h,orig_path:m,perlin:y,postprocessing:b,prompt:w,sampler:E,seamless:_,seed:k,steps:T,strength:L,threshold:O,type:D,variations:I,width:N}=i,W=JSON.stringify(e.metadata,null,2);return g.jsx("div",{className:`image-metadata-viewer ${t}`,children:g.jsxs(ke,{gap:1,direction:"column",width:"100%",children:[g.jsxs(ke,{gap:2,children:[g.jsx(Dt,{fontWeight:"semibold",children:"File:"}),g.jsxs(Nh,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,g.jsx(uG,{mx:"2px"})]})]}),Object.keys(i).length>0?g.jsxs(g.Fragment,{children:[D&&g.jsx(Jn,{label:"Generation type",value:D}),((K=e.metadata)==null?void 0:K.model_weights)&&g.jsx(Jn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(D)&&g.jsx(Jn,{label:"Original image",value:m}),w&&g.jsx(Jn,{label:"Prompt",labelPosition:"top",value:typeof w=="string"?w:Rm(w),onClick:()=>r(w)}),k!==void 0&&g.jsx(Jn,{label:"Seed",value:k,onClick:()=>n(p2(k))}),O!==void 0&&g.jsx(Jn,{label:"Noise Threshold",value:O,onClick:()=>n(bk(O))}),y!==void 0&&g.jsx(Jn,{label:"Perlin Noise",value:y,onClick:()=>n(vk(y))}),E&&g.jsx(Jn,{label:"Sampler",value:E,onClick:()=>n(dU(E))}),T&&g.jsx(Jn,{label:"Steps",value:T,onClick:()=>n(yk(T))}),a!==void 0&&g.jsx(Jn,{label:"CFG scale",value:a,onClick:()=>n(gk(a))}),I&&I.length>0&&g.jsx(Jn,{label:"Seed-weight pairs",value:_3(I),onClick:()=>n(hU(_3(I)))}),_&&g.jsx(Jn,{label:"Seamless",value:_,onClick:()=>n(fU(_))}),u&&g.jsx(Jn,{label:"High Resolution Optimization",value:u,onClick:()=>n(vU(u))}),N&&g.jsx(Jn,{label:"Width",value:N,onClick:()=>n(cS(N))}),l&&g.jsx(Jn,{label:"Height",value:l,onClick:()=>n(uS(l))}),d&&g.jsx(Jn,{label:"Initial image",value:d,isLink:!0,onClick:()=>n(y0(d))}),h&&g.jsx(Jn,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(lU(h))}),D==="img2img"&&L&&g.jsx(Jn,{label:"Image to image strength",value:L,onClick:()=>n(mk(L))}),s&&g.jsx(Jn,{label:"Image to image fit",value:s,onClick:()=>n(pU(s))}),b&&b.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(jh,{size:"sm",children:"Postprocessing"}),b.map((ne,z)=>{if(ne.type==="esrgan"){const{scale:$,strength:V,denoise_str:X}=ne;return g.jsxs(ke,{pl:"2rem",gap:1,direction:"column",children:[g.jsx(Dt,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),g.jsx(Jn,{label:"Scale",value:$,onClick:()=>n(yU($))}),g.jsx(Jn,{label:"Strength",value:V,onClick:()=>n(wk(V))}),X!==void 0&&g.jsx(Jn,{label:"Denoising strength",value:X,onClick:()=>n(Sk(X))})]},z)}else if(ne.type==="gfpgan"){const{strength:$}=ne;return g.jsxs(ke,{pl:"2rem",gap:1,direction:"column",children:[g.jsx(Dt,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),g.jsx(Jn,{label:"Strength",value:$,onClick:()=>{n(k3($)),n(dS("gfpgan"))}})]},z)}else if(ne.type==="codeformer"){const{strength:$,fidelity:V}=ne;return g.jsxs(ke,{pl:"2rem",gap:1,direction:"column",children:[g.jsx(Dt,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),g.jsx(Jn,{label:"Strength",value:$,onClick:()=>{n(k3($)),n(dS("codeformer"))}}),V&&g.jsx(Jn,{label:"Fidelity",value:V,onClick:()=>{n(xk(V)),n(dS("codeformer"))}})]},z)}})]}),o&&g.jsx(Jn,{withCopy:!0,label:"Dream Prompt",value:o}),g.jsxs(ke,{gap:2,direction:"column",children:[g.jsxs(ke,{gap:2,children:[g.jsx(si,{label:"Copy metadata JSON",children:g.jsx(ls,{"aria-label":"Copy metadata JSON",icon:g.jsx(e0,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(W)})}),g.jsx(Dt,{fontWeight:"semibold",children:"Metadata JSON:"})]}),g.jsx("div",{className:"image-json-viewer",children:g.jsx("pre",{children:W})})]})]}):g.jsx(aH,{width:"100%",pt:10,children:g.jsx(Dt,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},Gke);HE.displayName="ImageMetadataViewer";const cG=lt([pp,fp],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>{var d;return u.uuid===((d=e==null?void 0:e.currentImage)==null?void 0:d.uuid)}),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function qke(){const e=Te(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=le(cG),[a,s]=S.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},d=()=>{e(vE())},h=()=>{e(mE())};return g.jsxs("div",{className:"current-image-preview",children:[i&&g.jsx(jw,{src:i.url,width:i.width,height:i.height,style:{imageRendering:o?"pixelated":"initial"}}),!r&&g.jsxs("div",{className:"current-image-next-prev-buttons",children:[g.jsx("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&g.jsx(ls,{"aria-label":"Previous image",icon:g.jsx(ZV,{className:"next-prev-button"}),variant:"unstyled",onClick:d})}),g.jsx("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&g.jsx(ls,{"aria-label":"Next image",icon:g.jsx(QV,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&g.jsx(HE,{image:i,styleClass:"current-image-metadata"})]})}var Kke=globalThis&&globalThis.__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){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ni=globalThis&&globalThis.__assign||function(){return ni=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},t7e=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],jI="__resizable_base__",dG=function(e){Zke(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(jI):o.className+=jI,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;o&&o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Qke},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),d=u/l[s]*100;return d+"%"}return QC(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?QC(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?QC(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ig("left",o),s=i&&Ig("top",o),l,u;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(l=a?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,h=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,y=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,w=u||0;if(s){var E=(m-b)*this.ratio+w,_=(y-b)*this.ratio+w,k=(d-w)/this.ratio+b,T=(h-w)/this.ratio+b,L=Math.max(d,E),O=Math.min(h,_),D=Math.max(m,k),I=Math.min(y,T);n=yx(n,L,O),r=yx(r,D,I)}else n=yx(n,d,h),r=yx(r,m,y);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Jke(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&bx(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var d=this.window.getComputedStyle(u).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Ol(Ol({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(h)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&bx(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=bx(n)?n.touches[0].clientX:n.clientX,d=bx(n)?n.touches[0].clientY:n.clientY,h=this.state,m=h.direction,y=h.original,b=h.width,w=h.height,E=this.getParentSize(),_=e7e(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=_.maxWidth,a=_.maxHeight,s=_.minWidth,l=_.minHeight;var k=this.calculateNewSizeFromDirection(u,d),T=k.newHeight,L=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(L=DI(L,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=DI(T,this.props.snap.y,this.props.snapGap));var D=this.calculateNewSizeFromAspectRatio(L,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(L=D.newWidth,T=D.newHeight,this.props.grid){var I=II(L,this.props.grid[0]),N=II(T,this.props.grid[1]),W=this.props.snapGap||0;L=W===0||Math.abs(I-L)<=W?I:L,T=W===0||Math.abs(N-T)<=W?N:T}var B={width:L-y.width,height:T-y.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var K=L/E.width*100;L=K+"%"}else if(b.endsWith("vw")){var ne=L/this.window.innerWidth*100;L=ne+"vw"}else if(b.endsWith("vh")){var z=L/this.window.innerHeight*100;L=z+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var K=T/E.height*100;T=K+"%"}else if(w.endsWith("vw")){var ne=T/this.window.innerWidth*100;T=ne+"vw"}else if(w.endsWith("vh")){var z=T/this.window.innerHeight*100;T=z+"vh"}}var $={width:this.createSizeForCssProperty(L,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?$.flexBasis=$.width:this.flexDir==="column"&&($.flexBasis=$.height),Xs.flushSync(function(){r.setState($)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,B)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Ol(Ol({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var d=Object.keys(i).map(function(h){return i[h]!==!1?S.createElement(Xke,{key:h,direction:h,onResizeStart:n.onResizeStart,replaceStyles:o&&o[h],className:a&&a[h]},u&&u[h]?u[h]:null):null});return S.createElement("div",{className:l,style:s},d)},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return t7e.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=Ol(Ol(Ol({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return S.createElement(o,Ol({ref:this.ref,style:i,className:this.props.className},r),this.state.isResizing&&S.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(S.PureComponent);const Gn=e=>{const{label:t,styleClass:n,...r}=e;return g.jsx(dz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function fG(e){return ut({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function hG(e){return ut({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function n7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.5 9c-.42 0-.83.04-1.24.11L1.01 3 1 10l9 2-9 2 .01 7 8.07-3.46C9.59 21.19 12.71 24 16.5 24c4.14 0 7.5-3.36 7.5-7.5S20.64 9 16.5 9zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5z"}},{tag:"path",attr:{d:"M18.27 14.03l-1.77 1.76-1.77-1.76-.7.7 1.76 1.77-1.76 1.77.7.7 1.77-1.76 1.77 1.76.7-.7-1.76-1.77 1.76-1.77z"}}]})(e)}function r7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"}}]})(e)}function i7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function o7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function a7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function pG(e){return ut({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 s7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function l7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 10l5 5 5-5z"}}]})(e)}function u7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 14l5-5 5 5z"}}]})(e)}function c7e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}function d7e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function f7e(e,t){e.classList?e.classList.add(t):d7e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function NI(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function h7e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=NI(e.className,t):e.setAttribute("class",NI(e.className&&e.className.baseVal||"",t))}const $I={disabled:!1},gG=Ke.createContext(null);var mG=function(t){return t.scrollTop},S1="unmounted",ph="exited",gh="entering",Fg="entered",Gk="exiting",mc=function(e){b8(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=ph,o.appearStatus=gh):l=Fg:r.unmountOnExit||r.mountOnEnter?l=S1:l=ph,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===S1?{status:ph}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==gh&&a!==Fg&&(o=gh):(a===gh||a===Fg)&&(o=Gk)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===gh){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ob.findDOMNode(this);a&&mG(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ph&&this.setState({status:S1})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ob.findDOMNode(this),s],u=l[0],d=l[1],h=this.getTimeouts(),m=s?h.appear:h.enter;if(!i&&!a||$I.disabled){this.safeSetState({status:Fg},function(){o.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:gh},function(){o.props.onEntering(u,d),o.onTransitionEnd(m,function(){o.safeSetState({status:Fg},function(){o.props.onEntered(u,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ob.findDOMNode(this);if(!o||$I.disabled){this.safeSetState({status:ph},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Gk},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:ph},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ob.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],d=l[1];this.props.addEndListener(u,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===S1)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=m8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ke.createElement(gG.Provider,{value:null},typeof a=="function"?a(i,s):Ke.cloneElement(Ke.Children.only(a),s))},t}(Ke.Component);mc.contextType=gG;mc.propTypes={};function Dg(){}mc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Dg,onEntering:Dg,onEntered:Dg,onExit:Dg,onExiting:Dg,onExited:Dg};mc.UNMOUNTED=S1;mc.EXITED=ph;mc.ENTERING=gh;mc.ENTERED=Fg;mc.EXITING=Gk;const p7e=mc;var g7e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return f7e(t,r)})},JC=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return h7e(t,r)})},WE=function(e){b8(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;ab,Object.values(b));return S.createElement(w.Provider,{value:E},y)}function d(h,m){const y=(m==null?void 0:m[e][l])||s,b=S.useContext(y);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(a=>S.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return S.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,m7e(i,...t)]}function m7e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const h=l(o)[`__scope${u}`];return{...s,...h}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function v7e(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yG(...e){return t=>e.forEach(n=>v7e(n,t))}function ds(...e){return S.useCallback(yG(...e),e)}const Fy=S.forwardRef((e,t)=>{const{children:n,...r}=e,i=S.Children.toArray(n),o=i.find(b7e);if(o){const a=o.props.children,s=i.map(l=>l===o?S.Children.count(a)>1?S.Children.only(null):S.isValidElement(a)?a.props.children:null:l);return S.createElement(qk,pn({},r,{ref:t}),S.isValidElement(a)?S.cloneElement(a,void 0,s):null)}return S.createElement(qk,pn({},r,{ref:t}),n)});Fy.displayName="Slot";const qk=S.forwardRef((e,t)=>{const{children:n,...r}=e;return S.isValidElement(n)?S.cloneElement(n,{...x7e(r,n.props),ref:yG(t,n.ref)}):S.Children.count(n)>1?S.Children.only(null):null});qk.displayName="SlotClone";const y7e=({children:e})=>S.createElement(S.Fragment,null,e);function b7e(e){return S.isValidElement(e)&&e.type===y7e}function x7e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const S7e=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],sc=S7e.reduce((e,t)=>{const n=S.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Fy:t;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(s,pn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function bG(e,t){e&&Xs.flushSync(()=>e.dispatchEvent(t))}function xG(e){const t=e+"CollectionProvider",[n,r]=b2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:b,children:w}=y,E=Ke.useRef(null),_=Ke.useRef(new Map).current;return Ke.createElement(i,{scope:b,itemMap:_,collectionRef:E},w)},s=e+"CollectionSlot",l=Ke.forwardRef((y,b)=>{const{scope:w,children:E}=y,_=o(s,w),k=ds(b,_.collectionRef);return Ke.createElement(Fy,{ref:k},E)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",h=Ke.forwardRef((y,b)=>{const{scope:w,children:E,..._}=y,k=Ke.useRef(null),T=ds(b,k),L=o(u,w);return Ke.useEffect(()=>(L.itemMap.set(k,{ref:k,..._}),()=>void L.itemMap.delete(k))),Ke.createElement(Fy,{[d]:"",ref:T},E)});function m(y){const b=o(e+"CollectionConsumer",y);return Ke.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const _=Array.from(E.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((L,O)=>_.indexOf(L.ref.current)-_.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:h},m,r]}const w7e=S.createContext(void 0);function SG(e){const t=S.useContext(w7e);return e||t||"ltr"}function Js(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function C7e(e,t=globalThis==null?void 0:globalThis.document){const n=Js(e);S.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Kk="dismissableLayer.update",_7e="dismissableLayer.pointerDownOutside",k7e="dismissableLayer.focusOutside";let FI;const E7e=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),P7e=S.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,d=S.useContext(E7e),[h,m]=S.useState(null),y=(n=h==null?void 0:h.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=S.useState({}),w=ds(t,N=>m(N)),E=Array.from(d.layers),[_]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(_),T=h?E.indexOf(h):-1,L=d.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,D=T7e(N=>{const W=N.target,B=[...d.branches].some(K=>K.contains(W));!O||B||(o==null||o(N),s==null||s(N),N.defaultPrevented||l==null||l())},y),I=M7e(N=>{const W=N.target;[...d.branches].some(K=>K.contains(W))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},y);return C7e(N=>{T===d.layers.size-1&&(i==null||i(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},y),S.useEffect(()=>{if(h)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(FI=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),BI(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=FI)}},[h,y,r,d]),S.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),BI())},[h,d]),S.useEffect(()=>{const N=()=>b({});return document.addEventListener(Kk,N),()=>document.removeEventListener(Kk,N)},[]),S.createElement(sc.div,pn({},u,{ref:w,style:{pointerEvents:L?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,D.onPointerDownCapture)}))});function T7e(e,t=globalThis==null?void 0:globalThis.document){const n=Js(e),r=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){wG(_7e,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function M7e(e,t=globalThis==null?void 0:globalThis.document){const n=Js(e),r=S.useRef(!1);return S.useEffect(()=>{const i=o=>{o.target&&!r.current&&wG(k7e,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function BI(){const e=new CustomEvent(Kk);document.dispatchEvent(e)}function wG(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?bG(i,o):i.dispatchEvent(o)}let e6=0;function L7e(){S.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:zI()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:zI()),e6++,()=>{e6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),e6--}},[])}function zI(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const t6="focusScope.autoFocusOnMount",n6="focusScope.autoFocusOnUnmount",HI={bubbles:!1,cancelable:!0},A7e=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=S.useState(null),u=Js(i),d=Js(o),h=S.useRef(null),m=ds(t,w=>l(w)),y=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let w=function(_){if(y.paused||!s)return;const k=_.target;s.contains(k)?h.current=k:mh(h.current,{select:!0})},E=function(_){y.paused||!s||s.contains(_.relatedTarget)||mh(h.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,y.paused]),S.useEffect(()=>{if(s){UI.add(y);const w=document.activeElement;if(!s.contains(w)){const _=new CustomEvent(t6,HI);s.addEventListener(t6,u),s.dispatchEvent(_),_.defaultPrevented||(O7e(N7e(CG(s)),{select:!0}),document.activeElement===w&&mh(s))}return()=>{s.removeEventListener(t6,u),setTimeout(()=>{const _=new CustomEvent(n6,HI);s.addEventListener(n6,d),s.dispatchEvent(_),_.defaultPrevented||mh(w??document.body,{select:!0}),s.removeEventListener(n6,d),UI.remove(y)},0)}}},[s,u,d,y]);const b=S.useCallback(w=>{if(!n&&!r||y.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,_=document.activeElement;if(E&&_){const k=w.currentTarget,[T,L]=R7e(k);T&&L?!w.shiftKey&&_===L?(w.preventDefault(),n&&mh(T,{select:!0})):w.shiftKey&&_===T&&(w.preventDefault(),n&&mh(L,{select:!0})):_===k&&w.preventDefault()}},[n,r,y.paused]);return S.createElement(sc.div,pn({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function O7e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mh(r,{select:t}),document.activeElement!==n)return}function R7e(e){const t=CG(e),n=WI(t,e),r=WI(t.reverse(),e);return[n,r]}function CG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function WI(e,t){for(const n of e)if(!I7e(n,{upTo:t}))return n}function I7e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function D7e(e){return e instanceof HTMLInputElement&&"select"in e}function mh(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&D7e(e)&&t&&e.select()}}const UI=j7e();function j7e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=VI(e,t),e.unshift(t)},remove(t){var n;e=VI(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function VI(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function N7e(e){return e.filter(t=>t.tagName!=="A")}const Pd=Boolean(globalThis==null?void 0:globalThis.document)?S.useLayoutEffect:()=>{},$7e=p6["useId".toString()]||(()=>{});let F7e=0;function B7e(e){const[t,n]=S.useState($7e());return Pd(()=>{e||n(r=>r??String(F7e++))},[e]),e||(t?`radix-${t}`:"")}function gp(e){return e.split("-")[0]}function x2(e){return e.split("-")[1]}function w0(e){return["top","bottom"].includes(gp(e))?"x":"y"}function UE(e){return e==="y"?"height":"width"}function GI(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=w0(t),l=UE(s),u=r[l]/2-i[l]/2,d=s==="x";let h;switch(gp(t)){case"top":h={x:o,y:r.y-i.height};break;case"bottom":h={x:o,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:a};break;case"left":h={x:r.x-i.width,y:a};break;default:h={x:r.x,y:r.y}}switch(x2(t)){case"start":h[s]-=u*(n&&d?-1:1);break;case"end":h[s]+=u*(n&&d?-1:1)}return h}const z7e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=GI(l,r,s),h=r,m={},y=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=_G(r),d={x:i,y:o},h=w0(a),m=x2(a),y=UE(h),b=await l.getDimensions(n),w=h==="y"?"top":"left",E=h==="y"?"bottom":"right",_=s.reference[y]+s.reference[h]-d[h]-s.floating[y],k=d[h]-s.reference[h],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let L=T?h==="y"?T.clientHeight||0:T.clientWidth||0:0;L===0&&(L=s.floating[y]);const O=_/2-k/2,D=u[w],I=L-b[y]-u[E],N=L/2-b[y]/2+O,W=Yk(D,N,I),B=(m==="start"?u[w]:u[E])>0&&N!==W&&s.reference[y]<=s.floating[y];return{[h]:d[h]-(B?NW7e[t])}function U7e(e,t,n){n===void 0&&(n=!1);const r=x2(e),i=w0(e),o=UE(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=R3(a)),{main:a,cross:R3(a)}}const V7e={start:"end",end:"start"};function KI(e){return e.replace(/start|end/g,t=>V7e[t])}const kG=["top","right","bottom","left"];kG.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const G7e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",flipAlignment:y=!0,...b}=e,w=gp(r),E=h||(w===a||!y?[R3(a)]:function(N){const W=R3(N);return[KI(N),W,KI(W)]}(a)),_=[a,...E],k=await By(t,b),T=[];let L=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&T.push(k[w]),d){const{main:N,cross:W}=U7e(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));T.push(k[N],k[W])}if(L=[...L,{placement:r,overflows:T}],!T.every(N=>N<=0)){var O,D;const N=((O=(D=i.flip)==null?void 0:D.index)!=null?O:0)+1,W=_[N];if(W)return{data:{index:N,overflows:L},reset:{placement:W}};let B="bottom";switch(m){case"bestFit":{var I;const K=(I=L.map(ne=>[ne,ne.overflows.filter(z=>z>0).reduce((z,$)=>z+$,0)]).sort((ne,z)=>ne[1]-z[1])[0])==null?void 0:I[0].placement;K&&(B=K);break}case"initialPlacement":B=a}if(r!==B)return{reset:{placement:B}}}return{}}}};function YI(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XI(e){return kG.some(t=>e[t]>=0)}const q7e=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=YI(await By(r,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:XI(o)}}}case"escaped":{const o=YI(await By(r,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:o,escaped:XI(o)}}}default:return{}}}}},K7e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(o,a){const{placement:s,platform:l,elements:u}=o,d=await(l.isRTL==null?void 0:l.isRTL(u.floating)),h=gp(s),m=x2(s),y=w0(s)==="x",b=["left","top"].includes(h)?-1:1,w=d&&y?-1:1,E=typeof a=="function"?a(o):a;let{mainAxis:_,crossAxis:k,alignmentAxis:T}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...E};return m&&typeof T=="number"&&(k=m==="end"?-1*T:T),y?{x:k*w,y:_*b}:{x:_*b,y:k*w}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function EG(e){return e==="x"?"y":"x"}const Y7e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:_,y:k}=E;return{x:_,y:k}}},...l}=e,u={x:n,y:r},d=await By(t,l),h=w0(gp(i)),m=EG(h);let y=u[h],b=u[m];if(o){const E=h==="y"?"bottom":"right";y=Yk(y+d[h==="y"?"top":"left"],y,y-d[E])}if(a){const E=m==="y"?"bottom":"right";b=Yk(b+d[m==="y"?"top":"left"],b,b-d[E])}const w=s.fn({...t,[h]:y,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},X7e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,d={x:n,y:r},h=w0(i),m=EG(h);let y=d[h],b=d[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=h==="y"?"height":"width",D=o.reference[h]-o.floating[O]+E.mainAxis,I=o.reference[h]+o.reference[O]-E.mainAxis;yI&&(y=I)}if(u){var _,k,T,L;const O=h==="y"?"width":"height",D=["top","left"].includes(gp(i)),I=o.reference[m]-o.floating[O]+(D&&(_=(k=a.offset)==null?void 0:k[m])!=null?_:0)+(D?0:E.crossAxis),N=o.reference[m]+o.reference[O]+(D?0:(T=(L=a.offset)==null?void 0:L[m])!=null?T:0)-(D?E.crossAxis:0);bN&&(b=N)}return{[h]:y,[m]:b}}}},Z7e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a,...s}=e,l=await By(t,s),u=gp(n),d=x2(n);let h,m;u==="top"||u==="bottom"?(h=u,m=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=u,h=d==="end"?"top":"bottom");const y=vh(l.left,0),b=vh(l.right,0),w=vh(l.top,0),E=vh(l.bottom,0),_={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(w!==0||E!==0?w+E:vh(l.top,l.bottom)):l[h]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(y!==0||b!==0?y+b:vh(l.left,l.right)):l[m])},k=await i.getDimensions(o.floating);a==null||a({...t,..._});const T=await i.getDimensions(o.floating);return k.width!==T.width||k.height!==T.height?{reset:{rects:!0}}:{}}}};function PG(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function vc(e){if(e==null)return window;if(!PG(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function S2(e){return vc(e).getComputedStyle(e)}function Xu(e){return PG(e)?"":e?(e.nodeName||"").toLowerCase():""}function TG(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function ou(e){return e instanceof vc(e).HTMLElement}function ef(e){return e instanceof vc(e).Element}function VE(e){return typeof ShadowRoot>"u"?!1:e instanceof vc(e).ShadowRoot||e instanceof ShadowRoot}function p4(e){const{overflow:t,overflowX:n,overflowY:r}=S2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Q7e(e){return["table","td","th"].includes(Xu(e))}function ZI(e){const t=/firefox/i.test(TG()),n=S2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"}function MG(){return!/^((?!chrome|android).)*safari/i.test(TG())}const QI=Math.min,Y1=Math.max,I3=Math.round;function Zu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&ou(e)&&(l=e.offsetWidth>0&&I3(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&I3(s.height)/e.offsetHeight||1);const d=ef(e)?vc(e):window,h=!MG()&&n,m=(s.left+(h&&(r=(i=d.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,y=(s.top+(h&&(o=(a=d.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:y,right:m+b,bottom:y+w,left:m,x:m,y}}function zd(e){return(t=e,(t instanceof vc(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function g4(e){return ef(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function LG(e){return Zu(zd(e)).left+g4(e).scrollLeft}function J7e(e,t,n){const r=ou(t),i=zd(t),o=Zu(e,r&&function(l){const u=Zu(l);return I3(u.width)!==l.offsetWidth||I3(u.height)!==l.offsetHeight}(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Xu(t)!=="body"||p4(i))&&(a=g4(t)),ou(t)){const l=Zu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=LG(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function AG(e){return Xu(e)==="html"?e:e.assignedSlot||e.parentNode||(VE(e)?e.host:null)||zd(e)}function JI(e){return ou(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function Xk(e){const t=vc(e);let n=JI(e);for(;n&&Q7e(n)&&getComputedStyle(n).position==="static";)n=JI(n);return n&&(Xu(n)==="html"||Xu(n)==="body"&&getComputedStyle(n).position==="static"&&!ZI(n))?t:n||function(r){let i=AG(r);for(VE(i)&&(i=i.host);ou(i)&&!["html","body"].includes(Xu(i));){if(ZI(i))return i;i=i.parentNode}return null}(e)||t}function eD(e){if(ou(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Zu(e);return{width:t.width,height:t.height}}function OG(e){const t=AG(e);return["html","body","#document"].includes(Xu(t))?e.ownerDocument.body:ou(t)&&p4(t)?t:OG(t)}function D3(e,t){var n;t===void 0&&(t=[]);const r=OG(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=vc(r),a=i?[o].concat(o.visualViewport||[],p4(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(D3(a))}function tD(e,t,n){return t==="viewport"?O3(function(r,i){const o=vc(r),a=zd(r),s=o.visualViewport;let l=a.clientWidth,u=a.clientHeight,d=0,h=0;if(s){l=s.width,u=s.height;const m=MG();(m||!m&&i==="fixed")&&(d=s.offsetLeft,h=s.offsetTop)}return{width:l,height:u,x:d,y:h}}(e,n)):ef(t)?function(r,i){const o=Zu(r,!1,i==="fixed"),a=o.top+r.clientTop,s=o.left+r.clientLeft;return{top:a,left:s,x:s,y:a,right:s+r.clientWidth,bottom:a+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,n):O3(function(r){var i;const o=zd(r),a=g4(r),s=(i=r.ownerDocument)==null?void 0:i.body,l=Y1(o.scrollWidth,o.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=Y1(o.scrollHeight,o.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-a.scrollLeft+LG(r);const h=-a.scrollTop;return S2(s||o).direction==="rtl"&&(d+=Y1(o.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:d,y:h}}(zd(e)))}function e9e(e){const t=D3(e),n=["absolute","fixed"].includes(S2(e).position)&&ou(e)?Xk(e):e;return ef(n)?t.filter(r=>ef(r)&&function(i,o){const a=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(a&&VE(a)){let s=o;do{if(s&&i===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(r,n)&&Xu(r)!=="body"):[]}const t9e={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?e9e(t):[].concat(n),r],a=o[0],s=o.reduce((l,u)=>{const d=tD(t,u,i);return l.top=Y1(d.top,l.top),l.right=QI(d.right,l.right),l.bottom=QI(d.bottom,l.bottom),l.left=Y1(d.left,l.left),l},tD(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=ou(n),o=zd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Xu(n)!=="body"||p4(o))&&(a=g4(n)),ou(n))){const l=Zu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:ef,getDimensions:eD,getOffsetParent:Xk,getDocumentElement:zd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:J7e(t,Xk(n),r),floating:{...eD(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>S2(e).direction==="rtl"};function n9e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,d=l||u?[...ef(e)?D3(e):[],...D3(t)]:[];d.forEach(b=>{l&&b.addEventListener("scroll",n,{passive:!0}),u&&b.addEventListener("resize",n)});let h,m=null;if(a){let b=!0;m=new ResizeObserver(()=>{b||n(),b=!1}),ef(e)&&!s&&m.observe(e),m.observe(t)}let y=s?Zu(e):null;return s&&function b(){const w=Zu(e);!y||w.x===y.x&&w.y===y.y&&w.width===y.width&&w.height===y.height||n(),y=w,h=requestAnimationFrame(b)}(),n(),()=>{var b;d.forEach(w=>{l&&w.removeEventListener("scroll",n),u&&w.removeEventListener("resize",n)}),(b=m)==null||b.disconnect(),m=null,s&&cancelAnimationFrame(h)}}const r9e=(e,t,n)=>z7e(e,t,{platform:t9e,...n});var Zk=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Qk(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,i;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(!Qk(e[r],t[r]))return!1;return!0}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;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Qk(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function i9e(e){const t=S.useRef(e);return Zk(()=>{t.current=e}),t}function o9e(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=S.useRef(null),a=S.useRef(null),s=i9e(i),l=S.useRef(null),[u,d]=S.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[h,m]=S.useState(t);Qk(h==null?void 0:h.map(T=>{let{options:L}=T;return L}),t==null?void 0:t.map(T=>{let{options:L}=T;return L}))||m(t);const y=S.useCallback(()=>{!o.current||!a.current||r9e(o.current,a.current,{middleware:h,placement:n,strategy:r}).then(T=>{b.current&&Xs.flushSync(()=>{d(T)})})},[h,n,r]);Zk(()=>{b.current&&y()},[y]);const b=S.useRef(!1);Zk(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=S.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,y);l.current=T}else y()},[y,s]),E=S.useCallback(T=>{o.current=T,w()},[w]),_=S.useCallback(T=>{a.current=T,w()},[w]),k=S.useMemo(()=>({reference:o,floating:a}),[]);return S.useMemo(()=>({...u,update:y,refs:k,reference:E,floating:_}),[u,y,k,E,_])}const a9e=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?qI({element:t.current,padding:n}).fn(i):{}:t?qI({element:t,padding:n}).fn(i):{}}}};function s9e(e){const[t,n]=S.useState(void 0);return Pd(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const RG="Popper",[GE,IG]=b2(RG),[l9e,DG]=GE(RG),u9e=e=>{const{__scopePopper:t,children:n}=e,[r,i]=S.useState(null);return S.createElement(l9e,{scope:t,anchor:r,onAnchorChange:i},n)},c9e="PopperAnchor",d9e=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=DG(c9e,n),a=S.useRef(null),s=ds(t,a);return S.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:S.createElement(sc.div,pn({},i,{ref:s}))}),j3="PopperContent",[f9e,zNe]=GE(j3),[h9e,p9e]=GE(j3,{hasParent:!1,positionUpdateFns:new Set}),g9e=S.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:d,side:h="bottom",sideOffset:m=0,align:y="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:_=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:L=!0,onPlaced:O,...D}=e,I=DG(j3,d),[N,W]=S.useState(null),B=ds(t,He=>W(He)),[K,ne]=S.useState(null),z=s9e(K),$=(n=z==null?void 0:z.width)!==null&&n!==void 0?n:0,V=(r=z==null?void 0:z.height)!==null&&r!==void 0?r:0,X=h+(y!=="center"?"-"+y:""),Q=typeof _=="number"?_:{top:0,right:0,bottom:0,left:0,..._},G=Array.isArray(E)?E:[E],Y=G.length>0,ee={padding:Q,boundary:G.filter(v9e),altBoundary:Y},{reference:fe,floating:Ce,strategy:we,x:xe,y:Le,placement:Se,middlewareData:Qe,update:Xe}=o9e({strategy:"fixed",placement:X,whileElementsMounted:n9e,middleware:[y9e(),K7e({mainAxis:m+V,alignmentAxis:b}),L?Y7e({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?X7e():void 0,...ee}):void 0,K?a9e({element:K,padding:w}):void 0,L?G7e({...ee}):void 0,Z7e({...ee,apply:({elements:He,availableWidth:Ue,availableHeight:ye})=>{He.floating.style.setProperty("--radix-popper-available-width",`${Ue}px`),He.floating.style.setProperty("--radix-popper-available-height",`${ye}px`)}}),b9e({arrowWidth:$,arrowHeight:V}),T?q7e({strategy:"referenceHidden"}):void 0].filter(m9e)});Pd(()=>{fe(I.anchor)},[fe,I.anchor]);const tt=xe!==null&&Le!==null,[yt,Be]=jG(Se),Ae=Js(O);Pd(()=>{tt&&(Ae==null||Ae())},[tt,Ae]);const bt=(i=Qe.arrow)===null||i===void 0?void 0:i.x,Fe=(o=Qe.arrow)===null||o===void 0?void 0:o.y,at=((a=Qe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[jt,mt]=S.useState();Pd(()=>{N&&mt(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Zt,positionUpdateFns:on}=p9e(j3,d),se=!Zt;S.useLayoutEffect(()=>{if(!se)return on.add(Xe),()=>{on.delete(Xe)}},[se,on,Xe]),Pd(()=>{se&&tt&&Array.from(on).reverse().forEach(He=>requestAnimationFrame(He))},[se,tt,on]);const Ie={"data-side":yt,"data-align":Be,...D,ref:B,style:{...D.style,animation:tt?void 0:"none",opacity:(s=Qe.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return S.createElement("div",{ref:Ce,"data-radix-popper-content-wrapper":"",style:{position:we,left:0,top:0,transform:tt?`translate3d(${Math.round(xe)}px, ${Math.round(Le)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:jt,["--radix-popper-transform-origin"]:[(l=Qe.transformOrigin)===null||l===void 0?void 0:l.x,(u=Qe.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},S.createElement(f9e,{scope:d,placedSide:yt,onArrowChange:ne,arrowX:bt,arrowY:Fe,shouldHideArrow:at},se?S.createElement(h9e,{scope:d,hasParent:!0,positionUpdateFns:on},S.createElement(sc.div,Ie)):S.createElement(sc.div,Ie)))});function m9e(e){return e!==void 0}function v9e(e){return e!==null}const y9e=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:i}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${i}px`),{}}}),b9e=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,h=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=h?0:e.arrowWidth,y=h?0:e.arrowHeight,[b,w]=jG(s),E={start:"0%",center:"50%",end:"100%"}[w],_=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+y/2;let T="",L="";return b==="bottom"?(T=h?E:`${_}px`,L=`${-y}px`):b==="top"?(T=h?E:`${_}px`,L=`${l.floating.height+y}px`):b==="right"?(T=`${-y}px`,L=h?E:`${k}px`):b==="left"&&(T=`${l.floating.width+y}px`,L=h?E:`${k}px`),{data:{x:T,y:L}}}});function jG(e){const[t,n="center"]=e.split("-");return[t,n]}const x9e=u9e,S9e=d9e,w9e=g9e;function C9e(e,t){return S.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const NG=e=>{const{present:t,children:n}=e,r=_9e(t),i=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),o=ds(r.ref,i.ref);return typeof n=="function"||r.isPresent?S.cloneElement(i,{ref:o}):null};NG.displayName="Presence";function _9e(e){const[t,n]=S.useState(),r=S.useRef({}),i=S.useRef(e),o=S.useRef("none"),a=e?"mounted":"unmounted",[s,l]=C9e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=Sx(r.current);o.current=s==="mounted"?u:"none"},[s]),Pd(()=>{const u=r.current,d=i.current;if(d!==e){const m=o.current,y=Sx(u);e?l("MOUNT"):y==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&m!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Pd(()=>{if(t){const u=h=>{const y=Sx(r.current).includes(h.animationName);h.target===t&&y&&Xs.flushSync(()=>l("ANIMATION_END"))},d=h=>{h.target===t&&(o.current=Sx(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:S.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Sx(e){return(e==null?void 0:e.animationName)||"none"}function k9e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=E9e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Js(n),l=S.useCallback(u=>{if(o){const h=typeof u=="function"?u(e):u;h!==e&&s(h)}else i(u)},[o,e,i,s]);return[a,l]}function E9e({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,i=S.useRef(r),o=Js(t);return S.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const r6="rovingFocusGroup.onEntryFocus",P9e={bubbles:!1,cancelable:!0},qE="RovingFocusGroup",[Jk,$G,T9e]=xG(qE),[M9e,FG]=b2(qE,[T9e]),[L9e,A9e]=M9e(qE),O9e=S.forwardRef((e,t)=>S.createElement(Jk.Provider,{scope:e.__scopeRovingFocusGroup},S.createElement(Jk.Slot,{scope:e.__scopeRovingFocusGroup},S.createElement(R9e,pn({},e,{ref:t}))))),R9e=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...d}=e,h=S.useRef(null),m=ds(t,h),y=SG(o),[b=null,w]=k9e({prop:a,defaultProp:s,onChange:l}),[E,_]=S.useState(!1),k=Js(u),T=$G(n),L=S.useRef(!1),[O,D]=S.useState(0);return S.useEffect(()=>{const I=h.current;if(I)return I.addEventListener(r6,k),()=>I.removeEventListener(r6,k)},[k]),S.createElement(L9e,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:b,onItemFocus:S.useCallback(I=>w(I),[w]),onItemShiftTab:S.useCallback(()=>_(!0),[]),onFocusableItemAdd:S.useCallback(()=>D(I=>I+1),[]),onFocusableItemRemove:S.useCallback(()=>D(I=>I-1),[])},S.createElement(sc.div,pn({tabIndex:E||O===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{L.current=!0}),onFocus:Kn(e.onFocus,I=>{const N=!L.current;if(I.target===I.currentTarget&&N&&!E){const W=new CustomEvent(r6,P9e);if(I.currentTarget.dispatchEvent(W),!W.defaultPrevented){const B=T().filter(V=>V.focusable),K=B.find(V=>V.active),ne=B.find(V=>V.id===b),$=[K,ne,...B].filter(Boolean).map(V=>V.ref.current);BG($)}}L.current=!1}),onBlur:Kn(e.onBlur,()=>_(!1))})))}),I9e="RovingFocusGroupItem",D9e=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=B7e(),l=o||s,u=A9e(I9e,n),d=u.currentTabStopId===l,h=$G(n),{onFocusableItemAdd:m,onFocusableItemRemove:y}=u;return S.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),S.createElement(Jk.ItemSlot,{scope:n,id:l,focusable:r,active:i},S.createElement(sc.span,pn({tabIndex:d?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Kn(e.onMouseDown,b=>{r?u.onItemFocus(l):b.preventDefault()}),onFocus:Kn(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Kn(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const w=$9e(b,u.orientation,u.dir);if(w!==void 0){b.preventDefault();let _=h().filter(k=>k.focusable).map(k=>k.ref.current);if(w==="last")_.reverse();else if(w==="prev"||w==="next"){w==="prev"&&_.reverse();const k=_.indexOf(b.currentTarget);_=u.loop?F9e(_,k+1):_.slice(k+1)}setTimeout(()=>BG(_))}})})))}),j9e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function N9e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $9e(e,t,n){const r=N9e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return j9e[r]}function BG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function F9e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const B9e=O9e,z9e=D9e,H9e=["Enter"," "],W9e=["ArrowDown","PageUp","Home"],zG=["ArrowUp","PageDown","End"],U9e=[...W9e,...zG],m4="Menu",[e7,V9e,G9e]=xG(m4),[mp,HG]=b2(m4,[G9e,IG,FG]),KE=IG(),WG=FG(),[q9e,v4]=mp(m4),[K9e,YE]=mp(m4),Y9e=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=KE(t),[l,u]=S.useState(null),d=S.useRef(!1),h=Js(o),m=SG(i);return S.useEffect(()=>{const y=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),S.createElement(x9e,s,S.createElement(q9e,{scope:t,open:n,onOpenChange:h,content:l,onContentChange:u},S.createElement(K9e,{scope:t,onClose:S.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:m,modal:a},r)))},X9e=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=KE(n);return S.createElement(S9e,pn({},i,r,{ref:t}))}),Z9e="MenuPortal",[HNe,Q9e]=mp(Z9e,{forceMount:void 0}),Hd="MenuContent",[J9e,UG]=mp(Hd),e8e=S.forwardRef((e,t)=>{const n=Q9e(Hd,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=v4(Hd,e.__scopeMenu),a=YE(Hd,e.__scopeMenu);return S.createElement(e7.Provider,{scope:e.__scopeMenu},S.createElement(NG,{present:r||o.open},S.createElement(e7.Slot,{scope:e.__scopeMenu},a.modal?S.createElement(t8e,pn({},i,{ref:t})):S.createElement(n8e,pn({},i,{ref:t})))))}),t8e=S.forwardRef((e,t)=>{const n=v4(Hd,e.__scopeMenu),r=S.useRef(null),i=ds(t,r);return S.useEffect(()=>{const o=r.current;if(o)return LH(o)},[]),S.createElement(VG,pn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),n8e=S.forwardRef((e,t)=>{const n=v4(Hd,e.__scopeMenu);return S.createElement(VG,pn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),VG=S.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:m,onDismiss:y,disableOutsideScroll:b,...w}=e,E=v4(Hd,n),_=YE(Hd,n),k=KE(n),T=WG(n),L=V9e(n),[O,D]=S.useState(null),I=S.useRef(null),N=ds(t,I,E.onContentChange),W=S.useRef(0),B=S.useRef(""),K=S.useRef(0),ne=S.useRef(null),z=S.useRef("right"),$=S.useRef(0),V=b?NH:S.Fragment,X=b?{as:Fy,allowPinchZoom:!0}:void 0,Q=Y=>{var ee,fe;const Ce=B.current+Y,we=L().filter(tt=>!tt.disabled),xe=document.activeElement,Le=(ee=we.find(tt=>tt.ref.current===xe))===null||ee===void 0?void 0:ee.textValue,Se=we.map(tt=>tt.textValue),Qe=d8e(Se,Ce,Le),Xe=(fe=we.find(tt=>tt.textValue===Qe))===null||fe===void 0?void 0:fe.ref.current;(function tt(yt){B.current=yt,window.clearTimeout(W.current),yt!==""&&(W.current=window.setTimeout(()=>tt(""),1e3))})(Ce),Xe&&setTimeout(()=>Xe.focus())};S.useEffect(()=>()=>window.clearTimeout(W.current),[]),L7e();const G=S.useCallback(Y=>{var ee,fe;return z.current===((ee=ne.current)===null||ee===void 0?void 0:ee.side)&&h8e(Y,(fe=ne.current)===null||fe===void 0?void 0:fe.area)},[]);return S.createElement(J9e,{scope:n,searchRef:B,onItemEnter:S.useCallback(Y=>{G(Y)&&Y.preventDefault()},[G]),onItemLeave:S.useCallback(Y=>{var ee;G(Y)||((ee=I.current)===null||ee===void 0||ee.focus(),D(null))},[G]),onTriggerLeave:S.useCallback(Y=>{G(Y)&&Y.preventDefault()},[G]),pointerGraceTimerRef:K,onPointerGraceIntentChange:S.useCallback(Y=>{ne.current=Y},[])},S.createElement(V,X,S.createElement(A7e,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,Y=>{var ee;Y.preventDefault(),(ee=I.current)===null||ee===void 0||ee.focus()}),onUnmountAutoFocus:a},S.createElement(P7e,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:m,onDismiss:y},S.createElement(B9e,pn({asChild:!0},T,{dir:_.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:D,onEntryFocus:Kn(l,Y=>{_.isUsingKeyboardRef.current||Y.preventDefault()})}),S.createElement(w9e,pn({role:"menu","aria-orientation":"vertical","data-state":l8e(E.open),"data-radix-menu-content":"",dir:_.dir},k,w,{ref:N,style:{outline:"none",...w.style},onKeyDown:Kn(w.onKeyDown,Y=>{const fe=Y.target.closest("[data-radix-menu-content]")===Y.currentTarget,Ce=Y.ctrlKey||Y.altKey||Y.metaKey,we=Y.key.length===1;fe&&(Y.key==="Tab"&&Y.preventDefault(),!Ce&&we&&Q(Y.key));const xe=I.current;if(Y.target!==xe||!U9e.includes(Y.key))return;Y.preventDefault();const Se=L().filter(Qe=>!Qe.disabled).map(Qe=>Qe.ref.current);zG.includes(Y.key)&&Se.reverse(),u8e(Se)}),onBlur:Kn(e.onBlur,Y=>{Y.currentTarget.contains(Y.target)||(window.clearTimeout(W.current),B.current="")}),onPointerMove:Kn(e.onPointerMove,n7(Y=>{const ee=Y.target,fe=$.current!==Y.clientX;if(Y.currentTarget.contains(ee)&&fe){const Ce=Y.clientX>$.current?"right":"left";z.current=Ce,$.current=Y.clientX}}))})))))))}),t7="MenuItem",nD="menu.itemSelect",r8e=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=S.useRef(null),a=YE(t7,e.__scopeMenu),s=UG(t7,e.__scopeMenu),l=ds(t,o),u=S.useRef(!1),d=()=>{const h=o.current;if(!n&&h){const m=new CustomEvent(nD,{bubbles:!0,cancelable:!0});h.addEventListener(nD,y=>r==null?void 0:r(y),{once:!0}),bG(h,m),m.defaultPrevented?u.current=!1:a.onClose()}};return S.createElement(i8e,pn({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,d),onPointerDown:h=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,h),u.current=!0},onPointerUp:Kn(e.onPointerUp,h=>{var m;u.current||(m=h.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,h=>{const m=s.searchRef.current!=="";n||m&&h.key===" "||H9e.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})}))}),i8e=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=UG(t7,n),s=WG(n),l=S.useRef(null),u=ds(t,l),[d,h]=S.useState(!1),[m,y]=S.useState("");return S.useEffect(()=>{const b=l.current;if(b){var w;y(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),S.createElement(e7.ItemSlot,{scope:n,disabled:r,textValue:i??m},S.createElement(z9e,pn({asChild:!0},s,{focusable:!r}),S.createElement(sc.div,pn({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,n7(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,n7(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>h(!0)),onBlur:Kn(e.onBlur,()=>h(!1))}))))}),o8e="MenuRadioGroup";mp(o8e,{value:void 0,onValueChange:()=>{}});const a8e="MenuItemIndicator";mp(a8e,{checked:!1});const s8e="MenuSub";mp(s8e);function l8e(e){return e?"open":"closed"}function u8e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function c8e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function d8e(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=c8e(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function f8e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=d>r&&n<(u-s)*(r-l)/(d-l)+s&&(i=!i)}return i}function h8e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return f8e(n,t)}function n7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const p8e=Y9e,g8e=X9e,m8e=e8e,v8e=r8e,GG="ContextMenu",[y8e,WNe]=b2(GG,[HG]),y4=HG(),[b8e,qG]=y8e(GG),x8e=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=S.useState(!1),l=y4(t),u=Js(r),d=S.useCallback(h=>{s(h),u(h)},[u]);return S.createElement(b8e,{scope:t,open:a,onOpenChange:d,modal:o},S.createElement(p8e,pn({},l,{dir:i,open:a,onOpenChange:d,modal:o}),n))},S8e="ContextMenuTrigger",w8e=S.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...i}=e,o=qG(S8e,n),a=y4(n),s=S.useRef({x:0,y:0}),l=S.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),u=S.useRef(0),d=S.useCallback(()=>window.clearTimeout(u.current),[]),h=m=>{s.current={x:m.clientX,y:m.clientY},o.onOpenChange(!0)};return S.useEffect(()=>d,[d]),S.useEffect(()=>void(r&&d()),[r,d]),S.createElement(S.Fragment,null,S.createElement(g8e,pn({},a,{virtualRef:l})),S.createElement(sc.span,pn({"data-state":o.open?"open":"closed","data-disabled":r?"":void 0},i,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:Kn(e.onContextMenu,m=>{d(),h(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:Kn(e.onPointerDown,wx(m=>{d(),u.current=window.setTimeout(()=>h(m),700)})),onPointerMove:r?e.onPointerMove:Kn(e.onPointerMove,wx(d)),onPointerCancel:r?e.onPointerCancel:Kn(e.onPointerCancel,wx(d)),onPointerUp:r?e.onPointerUp:Kn(e.onPointerUp,wx(d))})))}),C8e="ContextMenuContent",_8e=S.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=qG(C8e,n),o=y4(n),a=S.useRef(!1);return S.createElement(m8e,pn({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),k8e=S.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=y4(n);return S.createElement(v8e,pn({},i,r,{ref:t}))});function wx(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const E8e=x8e,P8e=w8e,T8e=_8e,ud=k8e,M8e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,KG=S.memo(e=>{var z,$,V,X,Q,G,Y,ee;const t=Te(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,shouldUseSingleGalleryColumn:a}=le(Bke),{image:s,isSelected:l}=e,{url:u,thumbnail:d,uuid:h,metadata:m}=s,[y,b]=S.useState(!1),w=a2(),{t:E}=De(),_=zE(),k=()=>b(!0),T=()=>b(!1),L=()=>{var fe,Ce,we,xe;(Ce=(fe=s.metadata)==null?void 0:fe.image)!=null&&Ce.prompt&&_((xe=(we=s.metadata)==null?void 0:we.image)==null?void 0:xe.prompt),w({title:E("toast.promptSet"),status:"success",duration:2500,isClosable:!0})},O=()=>{s.metadata&&t(p2(s.metadata.image.seed)),w({title:E("toast.seedSet"),status:"success",duration:2500,isClosable:!0})},D=()=>{t(y0(s)),n!=="img2img"&&t(Wo("img2img")),w({title:E("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},I=()=>{t(i4(s)),t(r4()),n!=="unifiedCanvas"&&t(Wo("unifiedCanvas")),w({title:E("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},N=()=>{m&&t(aU(m)),w({title:E("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})},W=async()=>{var fe;if((fe=m==null?void 0:m.image)!=null&&fe.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(Wo("img2img")),t(N3e(m)),w({title:E("toast.initialImageSet"),status:"success",duration:2500,isClosable:!0});return}w({title:E("toast.initialImageNotSet"),description:E("toast.initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},B=()=>t(ZO(s)),K=fe=>{fe.dataTransfer.setData("invokeai/imageUuid",h),fe.dataTransfer.effectAllowed="move"},ne=()=>{t(ZO(s))};return g.jsxs(E8e,{onOpenChange:fe=>{t(eU(fe))},children:[g.jsx(P8e,{children:g.jsxs(ao,{position:"relative",className:"hoverable-image",onMouseOver:k,onMouseOut:T,userSelect:"none",draggable:!0,onDragStart:K,children:[g.jsx(jw,{className:"hoverable-image-image",objectFit:a?"contain":r,rounded:"md",src:d||u,loading:"lazy"}),g.jsx("div",{className:"hoverable-image-content",onClick:B,children:l&&g.jsx(ja,{width:"50%",height:"50%",as:jE,className:"hoverable-image-check"})}),y&&i>=64&&g.jsx("div",{className:"hoverable-image-delete-button",children:g.jsx(A3,{image:s,children:g.jsx(ls,{"aria-label":E("parameters.deleteImage"),icon:g.jsx(jke,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})]},h)}),g.jsxs(T8e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:fe=>{fe.detail.originalEvent.preventDefault()},children:[g.jsx(ud,{onClickCapture:ne,children:E("parameters.openInViewer")}),g.jsx(ud,{onClickCapture:L,disabled:(($=(z=s==null?void 0:s.metadata)==null?void 0:z.image)==null?void 0:$.prompt)===void 0,children:E("parameters.usePrompt")}),g.jsx(ud,{onClickCapture:O,disabled:((X=(V=s==null?void 0:s.metadata)==null?void 0:V.image)==null?void 0:X.seed)===void 0,children:E("parameters.useSeed")}),g.jsx(ud,{onClickCapture:N,disabled:!["txt2img","img2img"].includes((G=(Q=s==null?void 0:s.metadata)==null?void 0:Q.image)==null?void 0:G.type),children:E("parameters.useAll")}),g.jsx(ud,{onClickCapture:W,disabled:((ee=(Y=s==null?void 0:s.metadata)==null?void 0:Y.image)==null?void 0:ee.type)!=="img2img",children:E("parameters.useInitImg")}),g.jsx(ud,{onClickCapture:D,children:E("parameters.sendToImg2Img")}),g.jsx(ud,{onClickCapture:I,children:E("parameters.sendToUnifiedCanvas")}),g.jsx(ud,{"data-warning":!0,children:g.jsx(A3,{image:s,children:g.jsx("p",{children:E("parameters.deleteImage")})})})]})]})},M8e);KG.displayName="HoverableImage";const Cx=320,rD=40,L8e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500},training:{galleryMinWidth:200,galleryMaxWidth:500}},iD=400;function YG(){const e=Te(),{t}=De(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:d,galleryImageObjectFit:h,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:y,areMoreImagesAvailable:b,galleryWidth:w,isLightboxOpen:E,isStaging:_,shouldEnableResize:k,shouldUseSingleGalleryColumn:T}=le(Fke),{galleryMinWidth:L,galleryMaxWidth:O}=E?{galleryMinWidth:iD,galleryMaxWidth:iD}:L8e[d],[D,I]=S.useState(w>=Cx),[N,W]=S.useState(!1),[B,K]=S.useState(0),ne=S.useRef(null),z=S.useRef(null),$=S.useRef(null);S.useEffect(()=>{w>=Cx&&I(!1)},[w]);const V=()=>{e(_3e(!o)),e(Li(!0))},X=()=>{a?G():Q()},Q=()=>{e(Am(!0)),o&&e(Li(!0))},G=S.useCallback(()=>{e(Am(!1)),e(eU(!1)),e(k3e(z.current?z.current.scrollTop:0)),setTimeout(()=>o&&e(Li(!0)),400)},[e,o]),Y=()=>{e(Uk(r))},ee=xe=>{e(Gv(xe))},fe=()=>{m||($.current=window.setTimeout(()=>G(),500))},Ce=()=>{$.current&&window.clearTimeout($.current)};Je("g",()=>{X()},[a,o]),Je("left",()=>{e(vE())},{enabled:!_||d!=="unifiedCanvas"},[_]),Je("right",()=>{e(mE())},{enabled:!_||d!=="unifiedCanvas"},[_]),Je("shift+g",()=>{V()},[o]),Je("esc",()=>{e(Am(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const we=32;return Je("shift+up",()=>{if(l<256){const xe=Pe.clamp(l+we,32,256);e(Gv(xe))}},[l]),Je("shift+down",()=>{if(l>32){const xe=Pe.clamp(l-we,32,256);e(Gv(xe))}},[l]),S.useEffect(()=>{z.current&&(z.current.scrollTop=s)},[s,a]),S.useEffect(()=>{function xe(Le){!o&&ne.current&&!ne.current.contains(Le.target)&&G()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[G,o]),g.jsx(vG,{nodeRef:ne,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:g.jsxs("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:ne,onMouseLeave:o?void 0:fe,onMouseEnter:o?void 0:Ce,onMouseOver:o?void 0:Ce,children:[g.jsxs(dG,{minWidth:L,maxWidth:o?O:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:k},size:{width:w,height:o?"100%":"100vh"},onResizeStart:(xe,Le,Se)=>{K(Se.clientHeight),Se.style.height=`${Se.clientHeight}px`,o&&(Se.style.position="fixed",Se.style.right="1rem",W(!0))},onResizeStop:(xe,Le,Se,Qe)=>{const Xe=o?Pe.clamp(Number(w)+Qe.width,L,Number(O)):Number(w)+Qe.width;e(T3e(Xe)),Se.removeAttribute("data-resize-alert"),o&&(Se.style.position="relative",Se.style.removeProperty("right"),Se.style.setProperty("height",o?"100%":"100vh"),W(!1),e(Li(!0)))},onResize:(xe,Le,Se,Qe)=>{const Xe=Pe.clamp(Number(w)+Qe.width,L,Number(o?O:.95*window.innerWidth));Xe>=Cx&&!D?I(!0):XeXe-rD&&e(Gv(Xe-rD)),o&&(Xe>=O?Se.setAttribute("data-resize-alert","true"):Se.removeAttribute("data-resize-alert")),Se.style.height=`${B}px`},children:[g.jsxs("div",{className:"image-gallery-header",children:[g.jsx(Gi,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:D?g.jsxs(g.Fragment,{children:[g.jsx(On,{size:"sm","data-selected":r==="result",onClick:()=>e(ex("result")),children:t("gallery.generations")}),g.jsx(On,{size:"sm","data-selected":r==="user",onClick:()=>e(ex("user")),children:t("gallery.uploads")})]}):g.jsxs(g.Fragment,{children:[g.jsx(Ye,{"aria-label":t("gallery.showGenerations"),tooltip:t("gallery.showGenerations"),"data-selected":r==="result",icon:g.jsx(_ke,{}),onClick:()=>e(ex("result"))}),g.jsx(Ye,{"aria-label":t("gallery.showUploads"),tooltip:t("gallery.showUploads"),"data-selected":r==="user",icon:g.jsx($ke,{}),onClick:()=>e(ex("user"))})]})}),g.jsxs("div",{className:"image-gallery-header-right-icons",children:[g.jsx(Ys,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:g.jsx(Ye,{size:"sm","aria-label":t("gallery.gallerySettings"),icon:g.jsx(BE,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:g.jsxs("div",{className:"image-gallery-settings-popover",children:[g.jsxs("div",{children:[g.jsx(Dn,{value:l,onChange:ee,min:32,max:256,hideTooltip:!0,label:t("gallery.galleryImageSize")}),g.jsx(Ye,{size:"sm","aria-label":t("gallery.galleryImageResetSize"),tooltip:t("gallery.galleryImageResetSize"),onClick:()=>e(Gv(64)),icon:g.jsx(f4,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),g.jsx("div",{children:g.jsx(Gn,{label:t("gallery.maintainAspectRatio"),isChecked:h==="contain",onChange:()=>e(E3e(h==="contain"?"cover":"contain"))})}),g.jsx("div",{children:g.jsx(Gn,{label:t("gallery.autoSwitchNewImages"),isChecked:y,onChange:xe=>e(P3e(xe.target.checked))})}),g.jsx("div",{children:g.jsx(Gn,{label:t("gallery.singleColumnLayout"),isChecked:T,onChange:xe=>e(M3e(xe.target.checked))})})]})}),g.jsx(Ye,{size:"sm",className:"image-gallery-icon-btn","aria-label":t("gallery.pinGallery"),tooltip:`${t("gallery.pinGallery")} (Shift+G)`,onClick:V,icon:o?g.jsx(fG,{}):g.jsx(hG,{})})]})]}),g.jsx("div",{className:"image-gallery-container",ref:z,children:n.length||b?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(xe=>{const{uuid:Le}=xe,Se=i===Le;return g.jsx(KG,{image:xe,isSelected:Se},Le)})}),g.jsx(ss,{onClick:Y,isDisabled:!b,className:"image-gallery-load-more-btn",children:t(b?"gallery.loadMore":"gallery.allImagesLoaded")})]}):g.jsxs("div",{className:"image-gallery-container-placeholder",children:[g.jsx(pG,{}),g.jsx("p",{children:t("gallery.noImagesInGallery")})]})})]}),N&&g.jsx("div",{style:{width:`${w}px`,height:"100%"}})]})})}var ns=function(e,t){return Number(e.toFixed(t))},A8e=function(e,t){return typeof e=="number"?e:t},mr=function(e,t,n){n&&typeof n=="function"&&n(e,t)},O8e=function(e){return-Math.cos(e*Math.PI)/2+.5},R8e=function(e){return e},I8e=function(e){return e*e},D8e=function(e){return e*(2-e)},j8e=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},N8e=function(e){return e*e*e},$8e=function(e){return--e*e*e+1},F8e=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},B8e=function(e){return e*e*e*e},z8e=function(e){return 1- --e*e*e*e},H8e=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},W8e=function(e){return e*e*e*e*e},U8e=function(e){return 1+--e*e*e*e*e},V8e=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},XG={easeOut:O8e,linear:R8e,easeInQuad:I8e,easeOutQuad:D8e,easeInOutQuad:j8e,easeInCubic:N8e,easeOutCubic:$8e,easeInOutCubic:F8e,easeInQuart:B8e,easeOutQuart:z8e,easeInOutQuart:H8e,easeInQuint:W8e,easeOutQuint:U8e,easeInOutQuint:V8e},ZG=function(e){typeof e=="number"&&cancelAnimationFrame(e)},Fl=function(e){e.mounted&&(ZG(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function QG(e,t,n,r){if(e.mounted){var i=new Date().getTime(),o=1;Fl(e),e.animation=function(){if(!e.mounted)return ZG(e.animation);var a=new Date().getTime()-i,s=a/n,l=XG[t],u=l(s);a>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function G8e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(Number.isNaN(t)||Number.isNaN(n)||Number.isNaN(r))}function ff(e,t,n,r){var i=G8e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,d=t.scale-s,h=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):QG(e,r,n,function(y){var b=s+d*y,w=l+h*y,E=u+m*y;o(b,w,E)})}}function q8e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,d=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:d}}var K8e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,d=s,h=r-i-l,m=l;return{minPositionX:u,maxPositionX:d,minPositionY:h,maxPositionY:m}},XE=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=q8e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,d=o.newContentHeight,h=o.newDiffHeight,m=K8e(a,l,u,s,d,h,Boolean(i));return m},r7=function(e,t,n,r){return r?en?ns(n,2):ns(e,2):ns(e,2)},t0=function(e,t){var n=XE(e,t);return e.bounds=n,n};function b4(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,d=n.maxPositionY,h=0,m=0;a&&(h=i,m=o);var y=r7(e,s-h,u+h,r),b=r7(t,l-m,d+m,r);return{x:y,y:b}}function x4(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,d=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var h=l-t*d,m=u-n*d,y=b4(h,m,i,o,0,0,null);return y}function w2(e,t,n,r,i){var o=i?r:0,a=t-o;return!Number.isNaN(n)&&e>=n?n:!Number.isNaN(t)&&e<=a?a:e}var oD=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i==null?void 0:i.contains(o),s=r&&o&&a;if(!s)return!1;var l=S4(o,n);return!l},aD=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Y8e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},X8e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function Z8e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var d=e.bounds,h=d.maxPositionX,m=d.minPositionX,y=d.maxPositionY,b=d.minPositionY,w=n>h||ny||rh?u.offsetWidth:e.setup.minPositionX||0,k=r>y?u.offsetHeight:e.setup.minPositionY||0,T=x4(e,_,k,i,e.bounds,s||l),L=T.x,O=T.y;return{scale:i,positionX:w?L:n,positionY:E?O:r}}}function Q8e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,d=l.positionX,h=l.positionY;if(!(a===null||s===null||t===d&&n===h)){var m=b4(t,n,s,o,r,i,a),y=m.x,b=m.y;e.setTransformState(u,y,b)}}var J8e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var d=t-r.x,h=n-r.y,m=a?l:d,y=s?u:h;return{x:m,y}},N3=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale,a=n.disablePadding;return t>0&&i>=o&&!a?t:0},eEe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},tEe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function nEe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function sD(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var d=a+(e-a)*u;return d>l?l:do?o:d}}return r?t:r7(e,o,a,i)}function rEe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function iEe(e,t){var n=eEe(e);if(n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=rEe(a,s),d=t.x-r.x,h=t.y-r.y,m=d/u,y=h/u,b=l-i,w=d*d+h*h,E=Math.sqrt(w)/b;e.velocity={velocityX:m,velocityY:y,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function oEe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=tEe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,d=n.minPositionX,h=n.maxPositionY,m=n.minPositionY,y=r.limitToBounds,b=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,_=E.lockAxisY,k=E.lockAxisX,T=w.animationType,L=b.sizeX,O=b.sizeY,D=b.velocityAlignmentTime,I=D,N=nEe(e,l),W=Math.max(N,I),B=N3(e,L),K=N3(e,O),ne=B*i.offsetWidth/100,z=K*i.offsetHeight/100,$=u+ne,V=d-ne,X=h+z,Q=m-z,G=e.transformState,Y=new Date().getTime();QG(e,T,W,function(ee){var fe=e.transformState,Ce=fe.scale,we=fe.positionX,xe=fe.positionY,Le=new Date().getTime()-Y,Se=Le/I,Qe=XG[b.animationType],Xe=1-Qe(Math.min(1,Se)),tt=1-ee,yt=we+a*tt,Be=xe+s*tt,Ae=sD(yt,G.positionX,we,k,y,d,u,V,$,Xe),bt=sD(Be,G.positionY,xe,_,y,m,h,Q,X,Xe);(we!==yt||xe!==Be)&&e.setTransformState(Ce,Ae,bt)})}}function lD(e,t){var n=e.transformState.scale;Fl(e),t0(e,n),window.TouchEvent!==void 0&&t instanceof TouchEvent?X8e(e,t):Y8e(e,t)}function JG(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,d=o||t.1&&h;m?oEe(e):JG(e)}}function ZE(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=w2(ns(t,2),o,a,0,!1),u=t0(e,l),d=x4(e,n,r,l,u,s),h=d.x,m=d.y;return{scale:l,positionX:h,positionY:m}}function eq(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.minScale,s=o.limitToBounds,l=o.zoomAnimation,u=l.disabled,d=l.animationTime,h=l.animationType,m=u||r>=a;if((r>=1||s)&&JG(e),!(m||!i||!e.mounted)){var y=t||i.offsetWidth/2,b=n||i.offsetHeight/2,w=ZE(e,a,y,b);w&&ff(e,w,d,h)}}var Wd=function(){return Wd=Object.assign||function(t){for(var n,r=1,i=arguments.length;ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},wEe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=S4(a,i);return!l},CEe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},_Ee=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=ns(i[0].clientX-r.left,5),a=ns(i[0].clientY-r.top,5),s=ns(i[1].clientX-r.left,5),l=ns(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},sq=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},kEe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=i.disablePadding,u=s.size,d=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,m=h*n;return w2(ns(m,2),a,o,u,!d&&!l)},EEe=160,PEe=100,TEe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Fl(e),mr(Un(e),t,r),mr(Un(e),t,i))},MEe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,d=a.centerZoomedOut,h=a.zoomAnimation,m=a.wheel,y=a.disablePadding,b=h.size,w=h.disabled,E=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var _=bEe(t,null),k=xEe(e,_,E,!t.ctrlKey);if(l!==k){var T=t0(e,k),L=aq(t,o,l),O=w||b===0||d||y,D=u&&O,I=x4(e,L.x,L.y,k,T,D),N=I.x,W=I.y;e.previousWheelEvent=t,e.setTransformState(k,N,W),mr(Un(e),t,r),mr(Un(e),t,i)}},LEe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;i7(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){e.mounted&&(eq(e,t.x,t.y),e.wheelAnimationTimer=null)},PEe);var o=SEe(e,t);o&&(i7(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){e.mounted&&(e.wheelStopEventTimer=null,mr(Un(e),t,r),mr(Un(e),t,i))},EEe))},AEe=function(e,t){var n=sq(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Fl(e)},OEe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,d=l.size;if(!(r===null||!n)){var h=_Ee(t,i,n);if(!(!Number.isFinite(h.x)||!Number.isFinite(h.y))){var m=sq(t),y=kEe(e,m);if(y!==i){var b=t0(e,y),w=u||d===0||s,E=a&&w,_=x4(e,h.x,h.y,y,b,E),k=_.x,T=_.y;e.pinchMidpoint=h,e.lastDistance=m,e.setTransformState(y,k,T)}}}},REe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,eq(e,t==null?void 0:t.x,t==null?void 0:t.y)},lq=function(e,t){var n=e.props.onZoomStop,r=e.setup.doubleClick.animationTime;i7(e.doubleClickStopEventTimer),e.doubleClickStopEventTimer=setTimeout(function(){e.doubleClickStopEventTimer=null,mr(Un(e),t,n)},r)},IEe=function(e,t){var n=e.props,r=n.onZoomStart,i=n.onZoom,o=e.setup.doubleClick,a=o.animationTime,s=o.animationType;mr(Un(e),t,r),iq(e,a,s,function(){return mr(Un(e),t,i)}),lq(e,t)};function DEe(e,t){var n=e.setup,r=e.doubleClickStopEventTimer,i=e.transformState,o=e.contentComponent,a=i.scale,s=e.props,l=s.onZoomStart,u=s.onZoom,d=n.doubleClick,h=d.disabled,m=d.mode,y=d.step,b=d.animationTime,w=d.animationType;if(!h&&!r){if(m==="reset")return IEe(e,t);if(!o)return console.error("No ContentComponent found");var E=m==="zoomOut"?-1:1,_=nq(e,E,y);if(a!==_){mr(Un(e),t,l);var k=aq(t,o,a),T=ZE(e,_,k.x,k.y);if(!T)return console.error("Error during zoom event. New transformation state was not calculated.");mr(Un(e),t,u),ff(e,T,b,w),lq(e,t)}}}var jEe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i==null?void 0:i.contains(l),d=n&&l&&u&&!a;if(!d)return!1;var h=S4(l,s);return!h},NEe=function(){function e(t){var n=this;this.mounted=!0,this.onChangeCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.startCoords=null,this.lastTouch=null,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.animate=!1,this.animation=null,this.maxBounds=null,this.pressedKeys={},this.mount=function(){n.initializeWindowEvents()},this.unmount=function(){n.cleanupWindowEvents()},this.update=function(r){t0(n,n.transformState.scale),n.setup=dD(r)},this.initializeWindowEvents=function(){var r,i=o6(),o=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,a=o==null?void 0:o.defaultView;a==null||a.addEventListener("mousedown",n.onPanningStart,i),a==null||a.addEventListener("mousemove",n.onPanning,i),a==null||a.addEventListener("mouseup",n.onPanningStop,i),o==null||o.addEventListener("mouseleave",n.clearPanning,i),a==null||a.addEventListener("keyup",n.setKeyUnPressed,i),a==null||a.addEventListener("keydown",n.setKeyPressed,i)},this.cleanupWindowEvents=function(){var r,i,o=o6(),a=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,s=a==null?void 0:a.defaultView;s==null||s.removeEventListener("mousedown",n.onPanningStart,o),s==null||s.removeEventListener("mousemove",n.onPanning,o),s==null||s.removeEventListener("mouseup",n.onPanningStop,o),a==null||a.removeEventListener("mouseleave",n.clearPanning,o),s==null||s.removeEventListener("keyup",n.setKeyUnPressed,o),s==null||s.removeEventListener("keydown",n.setKeyPressed,o),document.removeEventListener("mouseleave",n.clearPanning,o),Fl(n),(i=n.observer)===null||i===void 0||i.disconnect()},this.handleInitializeWrapperEvents=function(r){var i=o6();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},this.handleInitialize=function(r){var i=n.setup.centerOnInit;n.applyTransformation(),i&&(n.setCenter(),n.observer=new ResizeObserver(function(){var o;n.setCenter(),(o=n.observer)===null||o===void 0||o.disconnect()}),n.observer.observe(r))},this.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=vEe(n,r);if(o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);a&&(TEe(n,r),MEe(n,r),LEe(n,r))}}},this.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=oD(n,r);if(a){var s=n.isPressingKeys(n.setup.panning.activationKeys);s&&(r.preventDefault(),r.stopPropagation(),Fl(n),lD(n,r),mr(Un(n),r,o))}}},this.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=aD(n);if(a){var s=n.isPressingKeys(n.setup.panning.activationKeys);s&&(r.preventDefault(),r.stopPropagation(),uD(n,r.clientX,r.clientY),mr(Un(n),r,o))}}},this.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(aEe(n),mr(Un(n),r,i))},this.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=wEe(n,r);l&&(AEe(n,r),Fl(n),mr(Un(n),r,a),mr(Un(n),r,s))}},this.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=CEe(n);l&&(r.preventDefault(),r.stopPropagation(),OEe(n,r),mr(Un(n),r,a),mr(Un(n),r,s))}},this.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(REe(n),mr(Un(n),r,o),mr(Un(n),r,a))},this.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=oD(n,r);if(a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,Fl(n);var l=r.touches,u=l.length===1,d=l.length===2;u&&(Fl(n),lD(n,r),mr(Un(n),r,o)),d&&n.onPinchStart(r)}}}},this.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=aD(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];uD(n,s.clientX,s.clientY),mr(Un(n),r,o)}else r.touches.length>1&&n.onPinch(r)},this.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},this.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=jEe(n,r);o&&DEe(n,r)}},this.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},this.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},this.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},this.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},this.setTransformState=function(r,i,o){var a=n.props.onTransformed;if(!Number.isNaN(r)&&!Number.isNaN(i)&&!Number.isNaN(o)){r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o;var s=Un(n);n.onChangeCallbacks.forEach(function(l){return l(s)}),mr(s,{scale:r,positionX:i,positionY:o},a),n.applyTransformation()}else console.error("Detected NaN set state values")},this.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=oq(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},this.handleTransformStyles=function(r,i,o){return n.props.customTransform?n.props.customTransform(r,i,o):gEe(r,i,o)},this.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=n.handleTransformStyles(o,a,i);n.contentComponent.style.transform=s}},this.getContext=function(){return Un(n)},this.onChange=function(r){return n.onChangeCallbacks.has(r)||n.onChangeCallbacks.add(r),function(){n.onChangeCallbacks.delete(r)}},this.init=function(r,i){n.cleanupWindowEvents(),n.wrapperComponent=r,n.contentComponent=i,t0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(i),n.initializeWindowEvents(),n.isInitialized=!0,mr(Un(n),void 0,n.props.onInit)},this.props=t,this.setup=dD(this.props),this.transformState=tq(this.props)}return e}(),QE=Ke.createContext(null),$Ee=function(e,t){return typeof e=="function"?e(t):e},FEe=Ke.forwardRef(function(e,t){var n=S.useState(0),r=n[1],i=e.children,o=S.useRef(new NEe(e)).current,a=$Ee(e.children,Un(o)),s=S.useCallback(function(){typeof i=="function"&&r(function(l){return l+1})},[i]);return S.useImperativeHandle(t,function(){return Un(o)},[o]),S.useEffect(function(){o.update(e)},[o,e]),S.useEffect(function(){return o.onChange(s)},[o,e,s]),Ke.createElement(QE.Provider,{value:o},a)});function BEe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var zEe=`.transform-component-module_wrapper__7HFJe { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__uCDPE { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__uCDPE img { - pointer-events: none; -} -`,fD={wrapper:"transform-component-module_wrapper__7HFJe",content:"transform-component-module_content__uCDPE"};BEe(zEe);var HEe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=e.wrapperProps,u=l===void 0?{}:l,d=e.contentProps,h=d===void 0?{}:d,m=S.useContext(QE).init,y=S.useRef(null),b=S.useRef(null);return S.useEffect(function(){var w=y.current,E=b.current;w!==null&&E!==null&&m&&m(w,E)},[]),Ke.createElement("div",Wd({},u,{ref:y,className:"react-transform-wrapper ".concat(fD.wrapper," ").concat(r),style:a}),Ke.createElement("div",Wd({},h,{ref:b,className:"react-transform-component ".concat(fD.content," ").concat(o),style:s}),t))};Ke.forwardRef(function(e,t){var n=S.useRef(null),r=S.useContext(QE);return S.useEffect(function(){return r.onChange(function(i){if(n.current){var o=0,a=0;n.current.style.transform=r.handleTransformStyles(o,a,1/i.state.scale)}})},[r]),Ke.createElement("div",Wd({},e,{ref:mEe([n,t])}))});function WEe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=S.useState(0),[a,s]=S.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},d=()=>{s(!a)};return g.jsx(FEe,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:({zoomIn:h,zoomOut:m,resetTransform:y,centerView:b})=>g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"lightbox-image-options",children:[g.jsx(Ye,{icon:g.jsx(H_e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>h(),fontSize:20}),g.jsx(Ye,{icon:g.jsx(W_e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),g.jsx(Ye,{icon:g.jsx(B_e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),g.jsx(Ye,{icon:g.jsx(z_e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),g.jsx(Ye,{icon:g.jsx(a7e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:d,fontSize:20}),g.jsx(Ye,{icon:g.jsx(f4,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{y(),o(0),s(!1)},fontSize:20})]}),g.jsx(HEe,{wrapperStyle:{width:"100%",height:"100%"},children:g.jsx("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b(1,0,"easeOut")})})]})})}function UEe(){const e=Te(),t=le(m=>m.lightbox.isLightboxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=le(cG),[a,s]=S.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},d=()=>{e(vE())},h=()=>{e(mE())};return Je("Esc",()=>{t&&e(Om(!1))},[t]),g.jsxs("div",{className:"lightbox-container",children:[g.jsx(Ye,{icon:g.jsx(F_e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(Om(!1))},fontSize:20}),g.jsxs("div",{className:"lightbox-display-container",children:[g.jsxs("div",{className:"lightbox-preview-wrapper",children:[g.jsx(lG,{}),!r&&g.jsxs("div",{className:"current-image-next-prev-buttons",children:[g.jsx("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&g.jsx(ls,{"aria-label":"Previous image",icon:g.jsx(ZV,{className:"next-prev-button"}),variant:"unstyled",onClick:d})}),g.jsx("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&g.jsx(ls,{"aria-label":"Next image",icon:g.jsx(QV,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),n&&g.jsxs(g.Fragment,{children:[g.jsx(WEe,{image:n.url,styleClass:"lightbox-image"}),r&&g.jsx(HE,{image:n})]})]}),g.jsx(YG,{})]})]})}function VEe(e){const{menuType:t="icon",iconTooltip:n,buttonText:r,menuItems:i,menuProps:o,menuButtonProps:a,menuListProps:s,menuItemProps:l}=e,u=()=>{const d=[];return i.forEach((h,m)=>{d.push(g.jsx(_H,{onClick:h.onClick,fontSize:"0.9rem",color:"var(--text-color-secondary)",backgroundColor:"var(--background-color-secondary)",_focus:{color:"var(--text-color)",backgroundColor:"var(--border-color)"},...l,children:h.item},m))}),d};return g.jsx(SH,{...o,children:({isOpen:d})=>g.jsxs(g.Fragment,{children:[g.jsx(EH,{as:t==="icon"?Ye:On,tooltip:n,icon:d?g.jsx(u7e,{}):g.jsx(l7e,{}),padding:t==="regular"?"0 0.5rem":0,backgroundColor:"var(--btn-base-color)",_hover:{backgroundColor:"var(--btn-base-color-hover)"},minWidth:"1rem",minHeight:"1rem",fontSize:"1.5rem",...a,children:t==="regular"&&r}),g.jsx(kH,{zIndex:15,padding:0,borderRadius:"0.5rem",backgroundColor:"var(--background-color-secondary)",color:"var(--text-color-secondary)",borderColor:"var(--border-color)",...s,children:u()})]})})}const GEe=lt(hr,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable,currentIteration:e.currentIteration,totalIterations:e.totalIterations,cancelType:e.cancelOptions.cancelType,cancelAfter:e.cancelOptions.cancelAfter}),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function JE(e){const t=Te(),{btnGroupWidth:n="auto",...r}=e,{isProcessing:i,isConnected:o,isCancelable:a,currentIteration:s,totalIterations:l,cancelType:u,cancelAfter:d}=le(GEe),h=S.useCallback(()=>{t(d_e()),t(BC(null))},[t]),{t:m}=De(),y=d!==null;Je("shift+x",()=>{(o||i)&&a&&h()},[o,i,a]),S.useEffect(()=>{d!==null&&dt(VR("immediate"))},{item:m("parameters.cancel.schedule"),onClick:()=>t(VR("scheduled"))}];return g.jsxs(Gi,{isAttached:!0,variant:"link",minHeight:"2.5rem",width:n,children:[u==="immediate"?g.jsx(Ye,{icon:g.jsx(c7e,{}),tooltip:m("parameters.cancel.immediate"),"aria-label":m("parameters.cancel.immediate"),isDisabled:!o||!i||!a,onClick:h,className:"cancel-btn",...r}):g.jsx(Ye,{icon:y?g.jsx(a3,{color:"var(--text-color)"}):g.jsx(n7e,{}),tooltip:m(y?"parameters.cancel.isScheduled":"parameters.cancel.schedule"),"aria-label":m(y?"parameters.cancel.isScheduled":"parameters.cancel.schedule"),isDisabled:!o||!i||!a||s===l,onClick:()=>{t(BC(y?null:s))},className:"cancel-btn",...r}),g.jsx(VEe,{menuItems:b,iconTooltip:m("parameters.cancel.setType"),menuButtonProps:{backgroundColor:"var(--destructive-color)",color:"var(--text-color)",minWidth:"1.5rem",minHeight:"1.5rem",_hover:{backgroundColor:"var(--destructive-color-hover)"}}})]})}const eP=e=>e.generation;lt(eP,({shouldRandomizeSeed:e,shouldGenerateVariations:t})=>e||t,{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});const uq=lt([eP,hr,sG,Br],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:d}=t;let h=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(h=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(h=!1,m.push("No initial image selected")),u&&(h=!1,m.push("System Busy")),d||(h=!1,m.push("System Disconnected")),o&&(!(yE(a)||a==="")||l===-1)&&(h=!1,m.push("Seed-Weights badly formatted.")),{isReady:h,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Pe.isEqual,resultEqualityCheck:Pe.isEqual}});function tP(e){const{iconButton:t=!1,...n}=e,r=Te(),{isReady:i}=le(uq),o=le(Br),a=()=>{r(Wk(o))},{t:s}=De();return Je(["ctrl+enter","meta+enter"],()=>{r(Wk(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),g.jsx("div",{style:{flexGrow:4},children:t?g.jsx(Ye,{"aria-label":s("parameters.invoke"),type:"submit",icon:g.jsx(Lke,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:s("parameters.invoke"),tooltipProps:{placement:"bottom"},...n}):g.jsx(On,{"aria-label":s("parameters.invoke"),type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const nP=lt([pp,fp,Br],(e,t,n)=>{const{shouldPinParametersPanel:r,shouldShowParametersPanel:i,shouldHoldParametersPanelOpen:o,shouldUseCanvasBetaLayout:a}=t,{shouldShowGallery:s,shouldPinGallery:l,shouldHoldGalleryOpen:u}=e,d=a&&n==="unifiedCanvas",h=!d&&!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),m=!(s||u&&!l)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinParametersPanel:r,shouldShowProcessButtons:!d&&(!r||!i),shouldShowParametersPanelButton:h,shouldShowParametersPanel:i,shouldShowGallery:s,shouldPinGallery:l,shouldShowGalleryButton:m}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),qEe=()=>{const e=Te(),{shouldShowParametersPanelButton:t,shouldShowProcessButtons:n,shouldPinParametersPanel:r}=le(nP),i=()=>{e(Fh(!0)),r&&setTimeout(()=>e(Li(!0)),400)};return t?g.jsxs("div",{className:"show-hide-button-options",children:[g.jsx(Ye,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:i,children:g.jsx(FE,{})}),n&&g.jsxs(g.Fragment,{children:[g.jsx(tP,{iconButton:!0}),g.jsx(JE,{})]})]}):null};function KEe(e){return ut({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}const YEe=lt(pp,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),XEe=()=>{const{resultImages:e,userImages:t}=le(YEe);return n=>{const r=e.find(o=>o.uuid===n);if(r)return r;const i=t.find(o=>o.uuid===n);if(i)return i}},ZEe=lt([fp,d4,Br],(e,t,n)=>{const{shouldShowDualDisplay:r,shouldPinParametersPanel:i}=e,{isLightboxOpen:o}=t;return{shouldShowDualDisplay:r,shouldPinParametersPanel:i,isLightboxOpen:o,shouldShowDualDisplayButton:["inpainting"].includes(n),activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),rP=e=>{const t=Te(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,shouldShowDualDisplay:a,isLightboxOpen:s,shouldShowDualDisplayButton:l}=le(ZEe),u=XEe(),d=()=>{t(N4e(!a)),t(Li(!0))},h=m=>{const y=m.dataTransfer.getData("invokeai/imageUuid"),b=u(y);b&&(o==="img2img"?t(y0(b)):o==="unifiedCanvas"&&t(i4(b)))};return g.jsx("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:g.jsxs("div",{className:"workarea-main",children:[n,g.jsxs("div",{className:"workarea-children-wrapper",onDrop:h,children:[r,l&&g.jsx(si,{label:"Toggle Split View",children:g.jsx("div",{className:"workarea-split-button","data-selected":a,onClick:d,children:g.jsx(KEe,{})})})]}),!s&&g.jsx(YG,{})]})})},QEe=e=>{const{styleClass:t}=e,n=S.useContext(AE),r=()=>{n&&n()};return g.jsx("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:g.jsxs("div",{className:"image-upload-button",children:[g.jsx(h4,{}),g.jsx(jh,{size:"lg",children:"Click or Drag and Drop"})]})})},JEe=lt([pp,fp,Br],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),cq=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=le(JEe);return g.jsx("div",{className:"current-image-area","data-tab-name":t,children:e?g.jsxs(g.Fragment,{children:[g.jsx(lG,{}),g.jsx(qke,{})]}):g.jsx("div",{className:"current-image-display-placeholder",children:g.jsx(s7e,{})})})},ePe=()=>{const e=S.useContext(AE);return g.jsx(Ye,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:g.jsx(h4,{}),onClick:e||void 0})};function tPe(){const e=le(o=>o.generation.initialImage),{t}=De(),n=Te(),r=a2(),i=()=>{r({title:t("toast.parametersFailed"),description:t("toast.parametersFailedDesc"),status:"error",isClosable:!0}),n(oU())};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"init-image-preview-header",children:[g.jsx("h2",{children:t("parameters.initialImage")}),g.jsx(ePe,{})]}),e&&g.jsx("div",{className:"init-image-preview",children:g.jsx(jw,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:i})})]})}const nPe=()=>{const e=le(r=>r.generation.initialImage),{currentImage:t}=le(r=>r.gallery),n=e?g.jsx("div",{className:"image-to-image-area",children:g.jsx(tPe,{})}):g.jsx(QEe,{});return g.jsxs("div",{className:"workarea-split-view",children:[g.jsx("div",{className:"workarea-split-view-left",children:n}),t&&g.jsx("div",{className:"workarea-split-view-right",children:g.jsx(cq,{})})]})};var oo=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(oo||{});const rPe=()=>{const{t:e}=De();return S.useMemo(()=>({[0]:{text:e("tooltip.feature.prompt"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:e("tooltip.feature.gallery"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:e("tooltip.feature.other"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:e("tooltip.feature.seed"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:e("tooltip.feature.variations"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:e("tooltip.feature.upscale"),href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:e("tooltip.feature.faceCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:e("tooltip.feature.imageToImage"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:e("tooltip.feature.boundingBox"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:e("tooltip.feature.seamCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:e("tooltip.feature.infillAndScaling"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}}),[e])},iPe=e=>rPe()[e],_a=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return g.jsxs(sn,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,display:"flex",columnGap:"1rem",alignItems:"center",justifyContent:"space-between",...i,children:[g.jsx(Sn,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",marginRight:0,marginTop:.5,marginBottom:.5,fontSize:"sm",fontWeight:"bold",width:"auto",...o,children:t}),g.jsx(K8,{className:"invokeai__switch-root",...s})]})};function dq(){const e=le(i=>i.system.isGFPGANAvailable),t=le(i=>i.postprocessing.shouldRunFacetool),n=Te(),r=i=>n(V3e(i.target.checked));return g.jsx(_a,{isDisabled:!e,isChecked:t,onChange:r})}const fq=()=>{const e=Te(),t=le(i=>i.generation.seamless),n=i=>e(fU(i.target.checked)),{t:r}=De();return g.jsx(ke,{gap:2,direction:"column",children:g.jsx(_a,{label:r("parameters.seamlessTiling"),fontSize:"md",isChecked:t,onChange:n})})},oPe=()=>g.jsx(ke,{gap:2,direction:"column",children:g.jsx(fq,{})});function iP(){const e=le(o=>o.generation.horizontalSymmetryTimePercentage),t=le(o=>o.generation.verticalSymmetryTimePercentage),n=le(o=>o.generation.steps),r=Te(),{t:i}=De();return g.jsxs(g.Fragment,{children:[g.jsx(Dn,{label:i("parameters.hSymmetryStep"),value:e,onChange:o=>r(oR(o)),min:0,max:n,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>r(oR(0)),sliderMarkRightOffset:-6}),g.jsx(Dn,{label:i("parameters.vSymmetryStep"),value:t,onChange:o=>r(aR(o)),min:0,max:n,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>r(aR(0)),sliderMarkRightOffset:-6})]})}function oP(){const e=le(n=>n.generation.shouldUseSymmetry),t=Te();return g.jsx(_a,{isChecked:e,onChange:n=>t(B3e(n.target.checked))})}function aPe(){const e=Te(),t=le(r=>r.generation.perlin),{t:n}=De();return g.jsx(Dn,{label:n("parameters.perlinNoise"),min:0,max:1,step:.05,onChange:r=>e(vk(r)),handleReset:()=>e(vk(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0})}function sPe(){const e=Te(),{t}=De(),n=le(i=>i.generation.shouldRandomizeSeed),r=i=>e(F3e(i.target.checked));return g.jsx(_a,{label:t("parameters.randomizeSeed"),isChecked:n,onChange:r})}const hD=/^-?(0\.)?\.?$/,lc=e=>{const{label:t,labelFontSize:n="sm",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:d,min:h,max:m,isInteger:y=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:_,tooltipProps:k,...T}=e,[L,O]=S.useState(String(u));S.useEffect(()=>{!L.match(hD)&&u!==Number(L)&&O(String(u))},[u,L]);const D=N=>{O(N),N.match(hD)||d(y?Math.floor(Number(N)):Number(N))},I=N=>{const W=Pe.clamp(y?Math.floor(Number(N.target.value)):Number(N.target.value),h,m);O(String(W)),d(W)};return g.jsx(si,{...k,children:g.jsxs(sn,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&g.jsx(Sn,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",...w,children:t}),g.jsxs(B8,{className:"invokeai__number-input-root",value:L,min:h,max:m,keepWithinRange:!0,clampValueOnBlur:!1,onChange:D,onBlur:I,width:a,...T,children:[g.jsx(z8,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&g.jsxs("div",{className:"invokeai__number-input-stepper",children:[g.jsx(W8,{..._,className:"invokeai__number-input-stepper-button"}),g.jsx(H8,{..._,className:"invokeai__number-input-stepper-button"})]})]})]})})};function lPe(){const e=le(a=>a.generation.seed),t=le(a=>a.generation.shouldRandomizeSeed),n=le(a=>a.generation.shouldGenerateVariations),{t:r}=De(),i=Te(),o=a=>i(p2(a));return g.jsx(lc,{label:r("parameters.seed"),step:1,precision:0,flexGrow:1,min:CE,max:_E,isDisabled:t,isInvalid:e<0&&n,onChange:o,value:e,width:"auto"})}function uPe(){const e=Te(),t=le(i=>i.generation.shouldRandomizeSeed),{t:n}=De(),r=()=>e(p2(NV(CE,_E)));return g.jsx(ss,{size:"sm",isDisabled:t,onClick:r,padding:"0 1.5rem",children:g.jsx("p",{children:n("parameters.shuffle")})})}function cPe(){const e=Te(),t=le(r=>r.generation.threshold),{t:n}=De();return g.jsx(Dn,{label:n("parameters.noiseThreshold"),min:0,max:20,step:.1,onChange:r=>e(bk(r)),handleReset:()=>e(bk(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-4})}const aP=()=>g.jsxs(ke,{gap:2,direction:"column",children:[g.jsx(sPe,{}),g.jsxs(ke,{gap:2,children:[g.jsx(lPe,{}),g.jsx(uPe,{})]}),g.jsx(ke,{gap:2,children:g.jsx(cPe,{})}),g.jsx(ke,{gap:2,children:g.jsx(aPe,{})})]});function hq(){const e=le(i=>i.system.isESRGANAvailable),t=le(i=>i.postprocessing.shouldRunESRGAN),n=Te(),r=i=>n(U3e(i.target.checked));return g.jsx(_a,{isDisabled:!e,isChecked:t,onChange:r})}function sP(){const e=le(r=>r.generation.shouldGenerateVariations),t=Te(),n=r=>t($3e(r.target.checked));return g.jsx(_a,{isChecked:e,width:"auto",onChange:n})}function qn(e){const{label:t="",styleClass:n,isDisabled:r=!1,fontSize:i="sm",width:o,size:a="sm",isInvalid:s,...l}=e;return g.jsxs(sn,{className:`input ${n}`,isInvalid:s,isDisabled:r,children:[t!==""&&g.jsx(Sn,{fontSize:i,fontWeight:"bold",alignItems:"center",whiteSpace:"nowrap",marginBottom:0,marginRight:0,className:"input-label",children:t}),g.jsx(E8,{...l,className:"input-entry",size:a,width:o})]})}function dPe(){const e=le(o=>o.generation.seedWeights),t=le(o=>o.generation.shouldGenerateVariations),{t:n}=De(),r=Te(),i=o=>r(hU(o.target.value));return g.jsx(qn,{label:n("parameters.seedWeights"),value:e,isInvalid:t&&!(yE(e)||e===""),isDisabled:!t,onChange:i})}function fPe(){const e=le(i=>i.generation.variationAmount),t=le(i=>i.generation.shouldGenerateVariations),{t:n}=De(),r=Te();return g.jsx(Dn,{label:n("parameters.variationAmount"),value:e,step:.01,min:0,max:1,isSliderDisabled:!t,isInputDisabled:!t,isResetDisabled:!t,onChange:i=>r(iR(i)),handleReset:()=>r(iR(.1)),withInput:!0,withReset:!0,withSliderMarks:!0})}const lP=()=>g.jsxs(ke,{gap:2,direction:"column",children:[g.jsx(fPe,{}),g.jsx(dPe,{})]}),hPe=lt(hr,e=>e.shouldDisplayGuides),pPe=({children:e,feature:t})=>{const n=le(hPe),{text:r}=iPe(t);return n?g.jsxs(V8,{trigger:"hover",children:[g.jsx(U8,{children:g.jsx(ao,{children:e})}),g.jsxs(q8,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[g.jsx(G8,{className:"guide-popover-arrow"}),g.jsx("div",{className:"guide-popover-guide-content",children:r})]})]}):null},gPe=Ze(({feature:e,icon:t=i7e},n)=>g.jsx(pPe,{feature:e,children:g.jsx(ao,{ref:n,children:g.jsx(ja,{marginBottom:"-.15rem",as:t})})}));function mPe(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return g.jsxs(rm,{className:"advanced-parameters-item",children:[g.jsx(tm,{className:"advanced-parameters-header",children:g.jsxs(ke,{width:"100%",gap:"0.5rem",align:"center",children:[g.jsx(ao,{flexGrow:1,textAlign:"left",children:t}),i,n&&g.jsx(gPe,{feature:n}),g.jsx(nm,{})]})}),g.jsx(om,{className:"advanced-parameters-panel",children:r})]})}const n0=e=>{const{accordionInfo:t}=e,n=le(a=>a.system.openAccordions),r=Te(),i=a=>r(v4e(a)),o=()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:d,additionalHeaderComponents:h}=t[s];a.push(g.jsx(mPe,{header:l,feature:u,content:d,additionalHeaderComponents:h},s))}),a};return g.jsx(c8,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:i,className:"advanced-parameters",children:o()})};function pD(){const e=Te(),t=le(o=>o.generation.cfgScale),n=le(o=>o.ui.shouldUseSliders),{t:r}=De(),i=o=>e(gk(o));return n?g.jsx(Dn,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:30,onChange:i,handleReset:()=>e(gk(7.5)),value:t,sliderMarkRightOffset:-5,sliderNumberInputProps:{max:200},withInput:!0,withReset:!0,withSliderMarks:!0}):g.jsx(lc,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:200,onChange:i,value:t,width:"auto",styleClass:"main-settings-block",textAlign:"center",isInteger:!1})}function gD(){const e=le(o=>o.generation.height),t=le(o=>o.ui.shouldUseSliders),n=le(Br),r=Te(),{t:i}=De();return t?g.jsx(Dn,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:i("parameters.height"),value:e,min:64,step:64,max:2048,onChange:o=>r(uS(o)),handleReset:()=>r(uS(512)),withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-8,inputWidth:"6.2rem",sliderNumberInputProps:{max:15360}}):g.jsx(Jo,{isDisabled:n==="unifiedCanvas",label:i("parameters.height"),value:e,flexGrow:1,onChange:o=>r(uS(Number(o.target.value))),validValues:O5e,styleClass:"main-settings-block",width:"5.5rem"})}function mD(){const e=le(o=>o.generation.iterations),t=le(o=>o.ui.shouldUseSliders),n=Te(),{t:r}=De(),i=o=>n(QO(o));return t?g.jsx(Dn,{label:r("parameters.images"),step:1,min:1,max:16,onChange:i,handleReset:()=>n(QO(1)),value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-5,sliderNumberInputProps:{max:9999}}):g.jsx(lc,{label:r("parameters.images"),step:1,min:1,max:9999,onChange:i,value:e,width:"auto",labelFontSize:.5,styleClass:"main-settings-block",textAlign:"center"})}function vD(){const e=le(o=>o.generation.sampler),t=le(VV),n=Te(),{t:r}=De(),i=o=>n(dU(o.target.value));return g.jsx(Jo,{label:r("parameters.sampler"),value:e,onChange:i,validValues:t.format==="diffusers"?L5e:M5e,styleClass:"main-settings-block",minWidth:"9rem"})}function yD(){const e=Te(),t=le(o=>o.generation.steps),n=le(o=>o.ui.shouldUseSliders),{t:r}=De(),i=o=>e(yk(o));return n?g.jsx(Dn,{label:r("parameters.steps"),min:1,step:1,onChange:i,handleReset:()=>e(yk(20)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-6,sliderNumberInputProps:{max:9999}}):g.jsx(lc,{label:r("parameters.steps"),min:1,max:9999,step:1,onChange:i,value:t,width:"auto",styleClass:"main-settings-block",textAlign:"center"})}function bD(){const e=le(o=>o.generation.width),t=le(o=>o.ui.shouldUseSliders),n=le(Br),{t:r}=De(),i=Te();return t?g.jsx(Dn,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,min:64,step:64,max:2048,onChange:o=>i(cS(o)),handleReset:()=>i(cS(512)),withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-8,inputWidth:"6.2rem",inputReadOnly:!0,sliderNumberInputProps:{max:15360}}):g.jsx(Jo,{isDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,flexGrow:1,onChange:o=>i(cS(Number(o.target.value))),validValues:A5e,styleClass:"main-settings-block",width:"5.5rem"})}function uP(){const{t:e}=De(),t=le(r=>r.ui.shouldUseSliders),n={main:{header:`${e("parameters.general")}`,feature:void 0,content:t?g.jsxs(ke,{flexDir:"column",rowGap:2,children:[g.jsx(mD,{}),g.jsx(yD,{}),g.jsx(pD,{}),g.jsx(bD,{}),g.jsx(gD,{}),g.jsx(vD,{})]}):g.jsxs(ke,{flexDirection:"column",rowGap:2,children:[g.jsxs(ke,{gap:2,children:[g.jsx(mD,{}),g.jsx(yD,{}),g.jsx(pD,{})]}),g.jsxs(ke,{children:[g.jsx(bD,{}),g.jsx(gD,{}),g.jsx(vD,{})]})]})}};return g.jsx(n0,{accordionInfo:n})}const vPe=lt(DE,({shouldLoopback:e})=>e),yPe=()=>{const e=Te(),t=le(vPe),{t:n}=De();return g.jsx(Ye,{"aria-label":n("parameters.toggleLoopback"),tooltip:n("parameters.toggleLoopback"),styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:g.jsx(Oke,{}),onClick:()=>{e(W3e(!t))}})},cP=()=>{const e=le(Br);return g.jsxs("div",{className:"process-buttons",children:[g.jsx(tP,{}),e==="img2img"&&g.jsx(yPe,{}),g.jsx(JE,{})]})},dP=()=>{const e=le(r=>r.generation.negativePrompt),t=Te(),{t:n}=De();return g.jsx(sn,{children:g.jsx(Z8,{id:"negativePrompt",name:"negativePrompt",value:e,onChange:r=>t(cU(r.target.value)),background:"var(--prompt-bg-color)",placeholder:n("parameters.negativePrompts"),_placeholder:{fontSize:"0.8rem"},borderColor:"var(--border-color)",_hover:{borderColor:"var(--border-color-light)"},_focusVisible:{borderColor:"var(--border-color-invalid)",boxShadow:"0 0 10px var(--box-shadow-color-invalid)"},fontSize:"0.9rem",color:"var(--text-color-secondary)"})})},bPe=lt([e=>e.generation,Br],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),fP=()=>{const e=Te(),{prompt:t,activeTabName:n}=le(bPe),{isReady:r}=le(uq),i=S.useRef(null),{t:o}=De(),a=l=>{e(uU(l.target.value))};Je("alt+a",()=>{var l;(l=i.current)==null||l.focus()},[]);const s=l=>{l.key==="Enter"&&l.shiftKey===!1&&r&&(l.preventDefault(),e(Wk(n)))};return g.jsx("div",{className:"prompt-bar",children:g.jsx(sn,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:g.jsx(Z8,{id:"prompt",name:"prompt",placeholder:o("parameters.promptPlaceholder"),size:"lg",value:t,onChange:a,onKeyDown:s,resize:"vertical",height:30,ref:i,_placeholder:{color:"var(--text-color-secondary)"}})})})},pq=""+new URL("logo-13003d72.png",import.meta.url).href,xPe=lt(fp,e=>{const{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:i}=e;return{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),hP=e=>{const t=Te(),{shouldShowParametersPanel:n,shouldHoldParametersPanelOpen:r,shouldPinParametersPanel:i}=le(xPe),o=S.useRef(null),a=S.useRef(null),s=S.useRef(null),{children:l}=e;Je("o",()=>{t(Fh(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),Je("esc",()=>{t(Fh(!1))},{enabled:()=>!i,preventDefault:!0},[i]),Je("shift+o",()=>{m(),t(Li(!0))},[i]);const u=S.useCallback(()=>{i||(t(I4e(a.current?a.current.scrollTop:0)),t(Fh(!1)),t(D4e(!1)))},[t,i]),d=()=>{s.current=window.setTimeout(()=>u(),500)},h=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(j4e(!i)),t(Li(!0))};return S.useEffect(()=>{function y(b){o.current&&!o.current.contains(b.target)&&u()}return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[u]),g.jsx(vG,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"parameters-panel-wrapper",children:g.jsx("div",{className:"parameters-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:h,onMouseOver:i?void 0:h,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:g.jsx("div",{className:"parameters-panel-margin",children:g.jsxs("div",{className:"parameters-panel",ref:a,onMouseLeave:y=>{y.target!==a.current?h():!i&&d()},children:[g.jsx(si,{label:"Pin Options Panel",children:g.jsx("div",{className:"parameters-panel-pin-button","data-selected":i,onClick:m,children:i?g.jsx(fG,{}):g.jsx(hG,{})})}),!i&&g.jsxs("div",{className:"invoke-ai-logo-wrapper",children:[g.jsx("img",{src:pq,alt:"invoke-ai-logo"}),g.jsxs("h1",{children:["invoke ",g.jsx("strong",{children:"ai"})]})]}),l]})})})})};function SPe(){const e=Te(),t=le(i=>i.generation.shouldFitToWidthHeight),n=i=>e(pU(i.target.checked)),{t:r}=De();return g.jsx(_a,{label:r("parameters.imageFit"),isChecked:t,onChange:n})}function gq(e){const{t}=De(),{label:n=`${t("parameters.strength")}`,styleClass:r}=e,i=le(l=>l.generation.img2imgStrength),o=Te(),a=l=>o(mk(l)),s=()=>{o(mk(.75))};return g.jsx(Dn,{label:n,step:.01,min:.01,max:1,onChange:a,value:i,isInteger:!1,styleClass:r,withInput:!0,withSliderMarks:!0,inputWidth:"5.5rem",withReset:!0,handleReset:s})}function wPe(){const{t:e}=De(),t={imageToImage:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:g.jsxs(ke,{gap:2,flexDir:"column",children:[g.jsx(gq,{label:e("parameters.img2imgStrength"),styleClass:"main-settings-block image-to-image-strength-main-option"}),g.jsx(SPe,{})]})}};return g.jsx(n0,{accordionInfo:t})}function CPe(){const{t:e}=De(),t={seed:{header:`${e("parameters.seed")}`,feature:oo.SEED,content:g.jsx(aP,{})},variations:{header:`${e("parameters.variations")}`,feature:oo.VARIATIONS,content:g.jsx(lP,{}),additionalHeaderComponents:g.jsx(sP,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:oo.FACE_CORRECTION,content:g.jsx(RE,{}),additionalHeaderComponents:g.jsx(dq,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:oo.UPSCALE,content:g.jsx(IE,{}),additionalHeaderComponents:g.jsx(hq,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:g.jsx(iP,{}),additionalHeaderComponents:g.jsx(oP,{})},other:{header:`${e("parameters.otherOptions")}`,feature:oo.OTHER,content:g.jsx(oPe,{})}};return g.jsxs(hP,{children:[g.jsxs(ke,{flexDir:"column",rowGap:"0.5rem",children:[g.jsx(fP,{}),g.jsx(dP,{})]}),g.jsx(cP,{}),g.jsx(uP,{}),g.jsx(wPe,{}),g.jsx(n0,{accordionInfo:t})]})}function _Pe(){return g.jsx(rP,{optionsPanel:g.jsx(CPe,{}),children:g.jsx(nPe,{})})}const kPe=()=>g.jsx("div",{className:"workarea-single-view",children:g.jsx("div",{className:"text-to-image-area",children:g.jsx(cq,{})})});function EPe(e){const{active:t=!0,width:n="1rem",height:r="1.3rem",side:i="right"}=e;return g.jsxs(g.Fragment,{children:[i==="right"&&g.jsx(ao,{width:n,height:r,margin:"-0.5rem 0.5rem 0 0.5rem",borderLeft:t?"3px solid var(--subhook-color)":"3px solid var(--tab-hover-color)",borderBottom:t?"3px solid var(--subhook-color)":"3px solid var(--tab-hover-color)"}),i==="left"&&g.jsx(ao,{width:n,height:r,margin:"-0.5rem 0.5rem 0 0.5rem",borderRight:t?"3px solid var(--subhook-color)":"3px solid var(--tab-hover-color)",borderBottom:t?"3px solid var(--subhook-color)":"3px solid var(--tab-hover-color)"})]})}const PPe=lt([DE],({hiresFix:e,hiresStrength:t})=>({hiresFix:e,hiresStrength:t}),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),TPe=()=>{const{hiresFix:e,hiresStrength:t}=le(PPe),n=Te(),{t:r}=De(),i=a=>{n(sR(a))},o=()=>{n(sR(.75))};return g.jsxs(ke,{children:[g.jsx(EPe,{active:e}),g.jsx(Dn,{label:r("parameters.hiresStrength"),step:.01,min:.01,max:.99,onChange:i,value:t,isInteger:!1,withInput:!0,withSliderMarks:!0,inputWidth:"5.5rem",withReset:!0,handleReset:o,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,sliderMarkRightOffset:-7})]})},MPe=()=>{const e=Te(),t=le(i=>i.postprocessing.hiresFix),{t:n}=De(),r=i=>e(vU(i.target.checked));return g.jsxs(ke,{rowGap:"0.8rem",direction:"column",children:[g.jsx(_a,{label:n("parameters.hiresOptim"),fontSize:"md",isChecked:t,onChange:r}),g.jsx(TPe,{})]})},LPe=()=>g.jsxs(ke,{gap:2,direction:"column",children:[g.jsx(fq,{}),g.jsx(MPe,{})]});function APe(){const{t:e}=De(),t={seed:{header:`${e("parameters.seed")}`,feature:oo.SEED,content:g.jsx(aP,{})},variations:{header:`${e("parameters.variations")}`,feature:oo.VARIATIONS,content:g.jsx(lP,{}),additionalHeaderComponents:g.jsx(sP,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:oo.FACE_CORRECTION,content:g.jsx(RE,{}),additionalHeaderComponents:g.jsx(dq,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:oo.UPSCALE,content:g.jsx(IE,{}),additionalHeaderComponents:g.jsx(hq,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:g.jsx(iP,{}),additionalHeaderComponents:g.jsx(oP,{})},other:{header:`${e("parameters.otherOptions")}`,feature:oo.OTHER,content:g.jsx(LPe,{})}};return g.jsxs(hP,{children:[g.jsxs(ke,{flexDir:"column",rowGap:"0.5rem",children:[g.jsx(fP,{}),g.jsx(dP,{})]}),g.jsx(cP,{}),g.jsx(uP,{}),g.jsx(n0,{accordionInfo:t})]})}function OPe(){return g.jsx(rP,{optionsPanel:g.jsx(APe,{}),children:g.jsx(kPe,{})})}var o7={},RPe={get exports(){return o7},set exports(e){o7=e}};/** - * @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 IPe=function(t){var n={},r=S,i=Th,o=Object.assign;function a(f){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+f,x=1;xae||M[U]!==R[ae]){var he=` -`+M[U].replace(" at new "," at ");return f.displayName&&he.includes("")&&(he=he.replace("",f.displayName)),he}while(1<=U&&0<=ae);break}}}finally{il=!1,Error.prepareStackTrace=x}return(f=f?f.displayName||f.name:"")?hu(f):""}var kp=Object.prototype.hasOwnProperty,wc=[],ol=-1;function ra(f){return{current:f}}function Mn(f){0>ol||(f.current=wc[ol],wc[ol]=null,ol--)}function wn(f,p){ol++,wc[ol]=f.current,f.current=p}var ia={},Hr=ra(ia),ui=ra(!1),oa=ia;function al(f,p){var x=f.type.contextTypes;if(!x)return ia;var P=f.stateNode;if(P&&P.__reactInternalMemoizedUnmaskedChildContext===p)return P.__reactInternalMemoizedMaskedChildContext;var M={},R;for(R in x)M[R]=p[R];return P&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=p,f.__reactInternalMemoizedMaskedChildContext=M),M}function ci(f){return f=f.childContextTypes,f!=null}function Ss(){Mn(ui),Mn(Hr)}function yf(f,p,x){if(Hr.current!==ia)throw Error(a(168));wn(Hr,p),wn(ui,x)}function gu(f,p,x){var P=f.stateNode;if(p=p.childContextTypes,typeof P.getChildContext!="function")return x;P=P.getChildContext();for(var M in P)if(!(M in p))throw Error(a(108,N(f)||"Unknown",M));return o({},x,P)}function ws(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||ia,oa=Hr.current,wn(Hr,f),wn(ui,ui.current),!0}function bf(f,p,x){var P=f.stateNode;if(!P)throw Error(a(169));x?(f=gu(f,p,oa),P.__reactInternalMemoizedMergedChildContext=f,Mn(ui),Mn(Hr),wn(Hr,f)):Mn(ui),wn(ui,x)}var Ri=Math.clz32?Math.clz32:xf,Ep=Math.log,Pp=Math.LN2;function xf(f){return f>>>=0,f===0?32:31-(Ep(f)/Pp|0)|0}var sl=64,Mo=4194304;function ll(f){switch(f&-f){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 f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function mu(f,p){var x=f.pendingLanes;if(x===0)return 0;var P=0,M=f.suspendedLanes,R=f.pingedLanes,U=x&268435455;if(U!==0){var ae=U&~M;ae!==0?P=ll(ae):(R&=U,R!==0&&(P=ll(R)))}else U=x&~M,U!==0?P=ll(U):R!==0&&(P=ll(R));if(P===0)return 0;if(p!==0&&p!==P&&!(p&M)&&(M=P&-P,R=p&-p,M>=R||M===16&&(R&4194240)!==0))return p;if(P&4&&(P|=x&16),p=f.entangledLanes,p!==0)for(f=f.entanglements,p&=P;0x;x++)p.push(f);return p}function $a(f,p,x){f.pendingLanes|=p,p!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,p=31-Ri(p),f[p]=x}function wf(f,p){var x=f.pendingLanes&~p;f.pendingLanes=p,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=p,f.mutableReadLanes&=p,f.entangledLanes&=p,p=f.entanglements;var P=f.eventTimes;for(f=f.expirationTimes;0>=U,M-=U,uo=1<<32-Ri(p)+M|x<Ut?(ti=At,At=null):ti=At.sibling;var Qt=it(ge,At,ve[Ut],et);if(Qt===null){At===null&&(At=ti);break}f&&At&&Qt.alternate===null&&p(ge,At),ue=R(Qt,ue,Ut),It===null?Oe=Qt:It.sibling=Qt,It=Qt,At=ti}if(Ut===ve.length)return x(ge,At),zn&&ul(ge,Ut),Oe;if(At===null){for(;UtUt?(ti=At,At=null):ti=At.sibling;var As=it(ge,At,Qt.value,et);if(As===null){At===null&&(At=ti);break}f&&At&&As.alternate===null&&p(ge,At),ue=R(As,ue,Ut),It===null?Oe=As:It.sibling=As,It=As,At=ti}if(Qt.done)return x(ge,At),zn&&ul(ge,Ut),Oe;if(At===null){for(;!Qt.done;Ut++,Qt=ve.next())Qt=Rt(ge,Qt.value,et),Qt!==null&&(ue=R(Qt,ue,Ut),It===null?Oe=Qt:It.sibling=Qt,It=Qt);return zn&&ul(ge,Ut),Oe}for(At=P(ge,At);!Qt.done;Ut++,Qt=ve.next())Qt=Wn(At,ge,Ut,Qt.value,et),Qt!==null&&(f&&Qt.alternate!==null&&At.delete(Qt.key===null?Ut:Qt.key),ue=R(Qt,ue,Ut),It===null?Oe=Qt:It.sibling=Qt,It=Qt);return f&&At.forEach(function(ki){return p(ge,ki)}),zn&&ul(ge,Ut),Oe}function ma(ge,ue,ve,et){if(typeof ve=="object"&&ve!==null&&ve.type===d&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Oe=ve.key,It=ue;It!==null;){if(It.key===Oe){if(Oe=ve.type,Oe===d){if(It.tag===7){x(ge,It.sibling),ue=M(It,ve.props.children),ue.return=ge,ge=ue;break e}}else if(It.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===T&&G0(Oe)===It.type){x(ge,It.sibling),ue=M(It,ve.props),ue.ref=za(ge,It,ve),ue.return=ge,ge=ue;break e}x(ge,It);break}else p(ge,It);It=It.sibling}ve.type===d?(ue=Cl(ve.props.children,ge.mode,et,ve.key),ue.return=ge,ge=ue):(et=Xf(ve.type,ve.key,ve.props,null,ge.mode,et),et.ref=za(ge,ue,ve),et.return=ge,ge=et)}return U(ge);case u:e:{for(It=ve.key;ue!==null;){if(ue.key===It)if(ue.tag===4&&ue.stateNode.containerInfo===ve.containerInfo&&ue.stateNode.implementation===ve.implementation){x(ge,ue.sibling),ue=M(ue,ve.children||[]),ue.return=ge,ge=ue;break e}else{x(ge,ue);break}else p(ge,ue);ue=ue.sibling}ue=_l(ve,ge.mode,et),ue.return=ge,ge=ue}return U(ge);case T:return It=ve._init,ma(ge,ue,It(ve._payload),et)}if(V(ve))return Ln(ge,ue,ve,et);if(D(ve))return gr(ge,ue,ve,et);Qi(ge,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,ue!==null&&ue.tag===6?(x(ge,ue.sibling),ue=M(ue,ve),ue.return=ge,ge=ue):(x(ge,ue),ue=pg(ve,ge.mode,et),ue.return=ge,ge=ue),U(ge)):x(ge,ue)}return ma}var Rc=D2(!0),j2=D2(!1),Rf={},Ro=ra(Rf),Ha=ra(Rf),ie=ra(Rf);function be(f){if(f===Rf)throw Error(a(174));return f}function me(f,p){wn(ie,p),wn(Ha,f),wn(Ro,Rf),f=Q(p),Mn(Ro),wn(Ro,f)}function rt(){Mn(Ro),Mn(Ha),Mn(ie)}function Lt(f){var p=be(ie.current),x=be(Ro.current);p=G(x,f.type,p),x!==p&&(wn(Ha,f),wn(Ro,p))}function en(f){Ha.current===f&&(Mn(Ro),Mn(Ha))}var Nt=ra(0);function dn(f){for(var p=f;p!==null;){if(p.tag===13){var x=p.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||xc(x)||vf(x)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var If=[];function q0(){for(var f=0;fx?x:4,f(!0);var P=Ic.transition;Ic.transition={};try{f(!1),p()}finally{Gt=x,Ic.transition=P}}function zc(){return ji().memoizedState}function tv(f,p,x){var P=qr(f);if(x={lane:P,action:x,hasEagerState:!1,eagerState:null,next:null},Wc(f))Uc(p,x);else if(x=Oc(f,p,x,P),x!==null){var M=_i();jo(x,f,P,M),Bf(x,p,P)}}function Hc(f,p,x){var P=qr(f),M={lane:P,action:x,hasEagerState:!1,eagerState:null,next:null};if(Wc(f))Uc(p,M);else{var R=f.alternate;if(f.lanes===0&&(R===null||R.lanes===0)&&(R=p.lastRenderedReducer,R!==null))try{var U=p.lastRenderedState,ae=R(U,x);if(M.hasEagerState=!0,M.eagerState=ae,q(ae,U)){var he=p.interleaved;he===null?(M.next=M,Af(p)):(M.next=he.next,he.next=M),p.interleaved=M;return}}catch{}finally{}x=Oc(f,p,M,P),x!==null&&(M=_i(),jo(x,f,P,M),Bf(x,p,P))}}function Wc(f){var p=f.alternate;return f===Cn||p!==null&&p===Cn}function Uc(f,p){Df=an=!0;var x=f.pending;x===null?p.next=p:(p.next=x.next,x.next=p),f.pending=p}function Bf(f,p,x){if(x&4194240){var P=p.lanes;P&=f.pendingLanes,x|=P,p.lanes=x,vu(f,x)}}var ks={readContext:co,useCallback:xi,useContext:xi,useEffect:xi,useImperativeHandle:xi,useInsertionEffect:xi,useLayoutEffect:xi,useMemo:xi,useReducer:xi,useRef:xi,useState:xi,useDebugValue:xi,useDeferredValue:xi,useTransition:xi,useMutableSource:xi,useSyncExternalStore:xi,useId:xi,unstable_isNewReconciler:!1},A4={readContext:co,useCallback:function(f,p){return fi().memoizedState=[f,p===void 0?null:p],f},useContext:co,useEffect:F2,useImperativeHandle:function(f,p,x){return x=x!=null?x.concat([f]):null,Su(4194308,4,Or.bind(null,p,f),x)},useLayoutEffect:function(f,p){return Su(4194308,4,f,p)},useInsertionEffect:function(f,p){return Su(4,2,f,p)},useMemo:function(f,p){var x=fi();return p=p===void 0?null:p,f=f(),x.memoizedState=[f,p],f},useReducer:function(f,p,x){var P=fi();return p=x!==void 0?x(p):p,P.memoizedState=P.baseState=p,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:p},P.queue=f,f=f.dispatch=tv.bind(null,Cn,f),[P.memoizedState,f]},useRef:function(f){var p=fi();return f={current:f},p.memoizedState=f},useState:$2,useDebugValue:Q0,useDeferredValue:function(f){return fi().memoizedState=f},useTransition:function(){var f=$2(!1),p=f[0];return f=ev.bind(null,f[1]),fi().memoizedState=f,[p,f]},useMutableSource:function(){},useSyncExternalStore:function(f,p,x){var P=Cn,M=fi();if(zn){if(x===void 0)throw Error(a(407));x=x()}else{if(x=p(),ei===null)throw Error(a(349));xu&30||Z0(P,p,x)}M.memoizedState=x;var R={value:x,getSnapshot:p};return M.queue=R,F2(fl.bind(null,P,R,f),[f]),P.flags|=2048,$f(9,Fc.bind(null,P,R,x,p),void 0,null),x},useId:function(){var f=fi(),p=ei.identifierPrefix;if(zn){var x=Fa,P=uo;x=(P&~(1<<32-Ri(P)-1)).toString(32)+x,p=":"+p+"R"+x,x=Dc++,0ig&&(p.flags|=128,P=!0,qc(M,!1),p.lanes=4194304)}else{if(!P)if(f=dn(R),f!==null){if(p.flags|=128,P=!0,f=f.updateQueue,f!==null&&(p.updateQueue=f,p.flags|=4),qc(M,!0),M.tail===null&&M.tailMode==="hidden"&&!R.alternate&&!zn)return Si(p),null}else 2*Xn()-M.renderingStartTime>ig&&x!==1073741824&&(p.flags|=128,P=!0,qc(M,!1),p.lanes=4194304);M.isBackwards?(R.sibling=p.child,p.child=R):(f=M.last,f!==null?f.sibling=R:p.child=R,M.last=R)}return M.tail!==null?(p=M.tail,M.rendering=p,M.tail=p.sibling,M.renderingStartTime=Xn(),p.sibling=null,f=Nt.current,wn(Nt,P?f&1|2:f&1),p):(Si(p),null);case 22:case 23:return nd(),x=p.memoizedState!==null,f!==null&&f.memoizedState!==null!==x&&(p.flags|=8192),x&&p.mode&1?ho&1073741824&&(Si(p),Be&&p.subtreeFlags&6&&(p.flags|=8192)):Si(p),null;case 24:return null;case 25:return null}throw Error(a(156,p.tag))}function uv(f,p){switch(H0(p),p.tag){case 1:return ci(p.type)&&Ss(),f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 3:return rt(),Mn(ui),Mn(Hr),q0(),f=p.flags,f&65536&&!(f&128)?(p.flags=f&-65537|128,p):null;case 5:return en(p),null;case 13:if(Mn(Nt),f=p.memoizedState,f!==null&&f.dehydrated!==null){if(p.alternate===null)throw Error(a(340));Mc()}return f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 19:return Mn(Nt),null;case 4:return rt(),null;case 10:return Mf(p.type._context),null;case 22:case 23:return nd(),null;case 24:return null;default:return null}}var pl=!1,Ur=!1,N4=typeof WeakSet=="function"?WeakSet:Set,st=null;function Kc(f,p){var x=f.ref;if(x!==null)if(typeof x=="function")try{x(null)}catch(P){Qn(f,p,P)}else x.current=null}function fa(f,p,x){try{x()}catch(P){Qn(f,p,P)}}var Vp=!1;function Cu(f,p){for(Y(f.containerInfo),st=p;st!==null;)if(f=st,p=f.child,(f.subtreeFlags&1028)!==0&&p!==null)p.return=f,st=p;else for(;st!==null;){f=st;try{var x=f.alternate;if(f.flags&1024)switch(f.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var P=x.memoizedProps,M=x.memoizedState,R=f.stateNode,U=R.getSnapshotBeforeUpdate(f.elementType===f.type?P:sa(f.type,P),M);R.__reactInternalSnapshotBeforeUpdate=U}break;case 3:Be&&Xi(f.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(ae){Qn(f,f.return,ae)}if(p=f.sibling,p!==null){p.return=f.return,st=p;break}st=f.return}return x=Vp,Vp=!1,x}function wi(f,p,x){var P=p.updateQueue;if(P=P!==null?P.lastEffect:null,P!==null){var M=P=P.next;do{if((M.tag&f)===f){var R=M.destroy;M.destroy=void 0,R!==void 0&&fa(p,x,R)}M=M.next}while(M!==P)}}function Gp(f,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&f)===f){var P=x.create;x.destroy=P()}x=x.next}while(x!==p)}}function qp(f){var p=f.ref;if(p!==null){var x=f.stateNode;switch(f.tag){case 5:f=X(x);break;default:f=x}typeof p=="function"?p(f):p.current=f}}function cv(f){var p=f.alternate;p!==null&&(f.alternate=null,cv(p)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(p=f.stateNode,p!==null&&mt(p)),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function Yc(f){return f.tag===5||f.tag===3||f.tag===4}function Ps(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||Yc(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function Kp(f,p,x){var P=f.tag;if(P===5||P===6)f=f.stateNode,p?zr(x,f,p):Ct(x,f);else if(P!==4&&(f=f.child,f!==null))for(Kp(f,p,x),f=f.sibling;f!==null;)Kp(f,p,x),f=f.sibling}function dv(f,p,x){var P=f.tag;if(P===5||P===6)f=f.stateNode,p?pt(x,f,p):Me(x,f);else if(P!==4&&(f=f.child,f!==null))for(dv(f,p,x),f=f.sibling;f!==null;)dv(f,p,x),f=f.sibling}var Ir=null,ha=!1;function pa(f,p,x){for(x=x.child;x!==null;)Vr(f,p,x),x=x.sibling}function Vr(f,p,x){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(cn,x)}catch{}switch(x.tag){case 5:Ur||Kc(x,p);case 6:if(Be){var P=Ir,M=ha;Ir=null,pa(f,p,x),Ir=P,ha=M,Ir!==null&&(ha?Bn(Ir,x.stateNode):rr(Ir,x.stateNode))}else pa(f,p,x);break;case 18:Be&&Ir!==null&&(ha?N0(Ir,x.stateNode):j0(Ir,x.stateNode));break;case 4:Be?(P=Ir,M=ha,Ir=x.stateNode.containerInfo,ha=!0,pa(f,p,x),Ir=P,ha=M):(Ae&&(P=x.stateNode.containerInfo,M=Na(P),bc(P,M)),pa(f,p,x));break;case 0:case 11:case 14:case 15:if(!Ur&&(P=x.updateQueue,P!==null&&(P=P.lastEffect,P!==null))){M=P=P.next;do{var R=M,U=R.destroy;R=R.tag,U!==void 0&&(R&2||R&4)&&fa(x,p,U),M=M.next}while(M!==P)}pa(f,p,x);break;case 1:if(!Ur&&(Kc(x,p),P=x.stateNode,typeof P.componentWillUnmount=="function"))try{P.props=x.memoizedProps,P.state=x.memoizedState,P.componentWillUnmount()}catch(ae){Qn(x,p,ae)}pa(f,p,x);break;case 21:pa(f,p,x);break;case 22:x.mode&1?(Ur=(P=Ur)||x.memoizedState!==null,pa(f,p,x),Ur=P):pa(f,p,x);break;default:pa(f,p,x)}}function Yp(f){var p=f.updateQueue;if(p!==null){f.updateQueue=null;var x=f.stateNode;x===null&&(x=f.stateNode=new N4),p.forEach(function(P){var M=rb.bind(null,f,P);x.has(P)||(x.add(P),P.then(M,M))})}}function Io(f,p){var x=p.deletions;if(x!==null)for(var P=0;P";case Jp:return":has("+(pv(f)||"")+")";case eg:return'[role="'+f.value+'"]';case tg:return'"'+f.value+'"';case Xc:return'[data-testname="'+f.value+'"]';default:throw Error(a(365))}}function Zc(f,p){var x=[];f=[f,0];for(var P=0;PM&&(M=U),P&=~R}if(P=M,P=Xn()-P,P=(120>P?120:480>P?480:1080>P?1080:1920>P?1920:3e3>P?3e3:4320>P?4320:1960*$4(P/1960))-P,10f?16:f,Tt===null)var P=!1;else{if(f=Tt,Tt=null,og=0,Wt&6)throw Error(a(331));var M=Wt;for(Wt|=4,st=f.current;st!==null;){var R=st,U=R.child;if(st.flags&16){var ae=R.deletions;if(ae!==null){for(var he=0;heXn()-vv?xl(f,0):mv|=x),pi(f,p)}function wv(f,p){p===0&&(f.mode&1?(p=Mo,Mo<<=1,!(Mo&130023424)&&(Mo=4194304)):p=1);var x=_i();f=la(f,p),f!==null&&($a(f,p,x),pi(f,x))}function B4(f){var p=f.memoizedState,x=0;p!==null&&(x=p.retryLane),wv(f,x)}function rb(f,p){var x=0;switch(f.tag){case 13:var P=f.stateNode,M=f.memoizedState;M!==null&&(x=M.retryLane);break;case 19:P=f.stateNode;break;default:throw Error(a(314))}P!==null&&P.delete(p),wv(f,x)}var Cv;Cv=function(f,p,x){if(f!==null)if(f.memoizedProps!==p.pendingProps||ui.current)Ji=!0;else{if(!(f.lanes&x)&&!(p.flags&128))return Ji=!1,D4(f,p,x);Ji=!!(f.flags&131072)}else Ji=!1,zn&&p.flags&1048576&&z0(p,Ar,p.index);switch(p.lanes=0,p.tag){case 2:var P=p.type;Wa(f,p),f=p.pendingProps;var M=al(p,Hr.current);Ac(p,x),M=Y0(null,p,P,f,M,x);var R=jc();return p.flags|=1,typeof M=="object"&&M!==null&&typeof M.render=="function"&&M.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,ci(P)?(R=!0,ws(p)):R=!1,p.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,U0(p),M.updater=ua,p.stateNode=M,M._reactInternals=p,V0(p,P,f,x),p=ca(null,p,P,!0,R,x)):(p.tag=0,zn&&R&&Ii(p),Ni(null,p,M,x),p=p.child),p;case 16:P=p.elementType;e:{switch(Wa(f,p),f=p.pendingProps,M=P._init,P=M(P._payload),p.type=P,M=p.tag=fg(P),f=sa(P,f),M){case 0:p=iv(null,p,P,f,x);break e;case 1:p=K2(null,p,P,f,x);break e;case 11:p=U2(null,p,P,f,x);break e;case 14:p=hl(null,p,P,sa(P.type,f),x);break e}throw Error(a(306,P,""))}return p;case 0:return P=p.type,M=p.pendingProps,M=p.elementType===P?M:sa(P,M),iv(f,p,P,M,x);case 1:return P=p.type,M=p.pendingProps,M=p.elementType===P?M:sa(P,M),K2(f,p,P,M,x);case 3:e:{if(Y2(p),f===null)throw Error(a(387));P=p.pendingProps,R=p.memoizedState,M=R.element,A2(f,p),jp(p,P,null,x);var U=p.memoizedState;if(P=U.element,bt&&R.isDehydrated)if(R={element:P,isDehydrated:!1,cache:U.cache,pendingSuspenseBoundaries:U.pendingSuspenseBoundaries,transitions:U.transitions},p.updateQueue.baseState=R,p.memoizedState=R,p.flags&256){M=Vc(Error(a(423)),p),p=X2(f,p,P,x,M);break e}else if(P!==M){M=Vc(Error(a(424)),p),p=X2(f,p,P,x,M);break e}else for(bt&&(Ao=M0(p.stateNode.containerInfo),Zn=p,zn=!0,Zi=null,Oo=!1),x=j2(p,null,P,x),p.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling;else{if(Mc(),P===M){p=Es(f,p,x);break e}Ni(f,p,P,x)}p=p.child}return p;case 5:return Lt(p),f===null&&kf(p),P=p.type,M=p.pendingProps,R=f!==null?f.memoizedProps:null,U=M.children,Le(P,M)?U=null:R!==null&&Le(P,R)&&(p.flags|=32),q2(f,p),Ni(f,p,U,x),p.child;case 6:return f===null&&kf(p),null;case 13:return Z2(f,p,x);case 4:return me(p,p.stateNode.containerInfo),P=p.pendingProps,f===null?p.child=Rc(p,null,P,x):Ni(f,p,P,x),p.child;case 11:return P=p.type,M=p.pendingProps,M=p.elementType===P?M:sa(P,M),U2(f,p,P,M,x);case 7:return Ni(f,p,p.pendingProps,x),p.child;case 8:return Ni(f,p,p.pendingProps.children,x),p.child;case 12:return Ni(f,p,p.pendingProps.children,x),p.child;case 10:e:{if(P=p.type._context,M=p.pendingProps,R=p.memoizedProps,U=M.value,L2(p,P,U),R!==null)if(q(R.value,U)){if(R.children===M.children&&!ui.current){p=Es(f,p,x);break e}}else for(R=p.child,R!==null&&(R.return=p);R!==null;){var ae=R.dependencies;if(ae!==null){U=R.child;for(var he=ae.firstContext;he!==null;){if(he.context===P){if(R.tag===1){he=_s(-1,x&-x),he.tag=2;var We=R.updateQueue;if(We!==null){We=We.shared;var ct=We.pending;ct===null?he.next=he:(he.next=ct.next,ct.next=he),We.pending=he}}R.lanes|=x,he=R.alternate,he!==null&&(he.lanes|=x),Lf(R.return,x,p),ae.lanes|=x;break}he=he.next}}else if(R.tag===10)U=R.type===p.type?null:R.child;else if(R.tag===18){if(U=R.return,U===null)throw Error(a(341));U.lanes|=x,ae=U.alternate,ae!==null&&(ae.lanes|=x),Lf(U,x,p),U=R.sibling}else U=R.child;if(U!==null)U.return=R;else for(U=R;U!==null;){if(U===p){U=null;break}if(R=U.sibling,R!==null){R.return=U.return,U=R;break}U=U.return}R=U}Ni(f,p,M.children,x),p=p.child}return p;case 9:return M=p.type,P=p.pendingProps.children,Ac(p,x),M=co(M),P=P(M),p.flags|=1,Ni(f,p,P,x),p.child;case 14:return P=p.type,M=sa(P,p.pendingProps),M=sa(P.type,M),hl(f,p,P,M,x);case 15:return V2(f,p,p.type,p.pendingProps,x);case 17:return P=p.type,M=p.pendingProps,M=p.elementType===P?M:sa(P,M),Wa(f,p),p.tag=1,ci(P)?(f=!0,ws(p)):f=!1,Ac(p,x),R2(p,P,M),V0(p,P,M,x),ca(null,p,P,!0,f,x);case 19:return J2(f,p,x);case 22:return G2(f,p,x)}throw Error(a(156,p.tag))};function Bi(f,p){return Ec(f,p)}function Ua(f,p,x,P){this.tag=f,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=P,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function No(f,p,x,P){return new Ua(f,p,x,P)}function _v(f){return f=f.prototype,!(!f||!f.isReactComponent)}function fg(f){if(typeof f=="function")return _v(f)?1:0;if(f!=null){if(f=f.$$typeof,f===w)return 11;if(f===k)return 14}return 2}function go(f,p){var x=f.alternate;return x===null?(x=No(f.tag,p,f.key,f.mode),x.elementType=f.elementType,x.type=f.type,x.stateNode=f.stateNode,x.alternate=f,f.alternate=x):(x.pendingProps=p,x.type=f.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=f.flags&14680064,x.childLanes=f.childLanes,x.lanes=f.lanes,x.child=f.child,x.memoizedProps=f.memoizedProps,x.memoizedState=f.memoizedState,x.updateQueue=f.updateQueue,p=f.dependencies,x.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},x.sibling=f.sibling,x.index=f.index,x.ref=f.ref,x}function Xf(f,p,x,P,M,R){var U=2;if(P=f,typeof f=="function")_v(f)&&(U=1);else if(typeof f=="string")U=5;else e:switch(f){case d:return Cl(x.children,M,R,p);case h:U=8,M|=8;break;case m:return f=No(12,x,p,M|2),f.elementType=m,f.lanes=R,f;case E:return f=No(13,x,p,M),f.elementType=E,f.lanes=R,f;case _:return f=No(19,x,p,M),f.elementType=_,f.lanes=R,f;case L:return hg(x,M,R,p);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case y:U=10;break e;case b:U=9;break e;case w:U=11;break e;case k:U=14;break e;case T:U=16,P=null;break e}throw Error(a(130,f==null?f:typeof f,""))}return p=No(U,x,p,M),p.elementType=f,p.type=P,p.lanes=R,p}function Cl(f,p,x,P){return f=No(7,f,P,p),f.lanes=x,f}function hg(f,p,x,P){return f=No(22,f,P,p),f.elementType=L,f.lanes=x,f.stateNode={isHidden:!1},f}function pg(f,p,x){return f=No(6,f,null,p),f.lanes=x,f}function _l(f,p,x){return p=No(4,f.children!==null?f.children:[],f.key,p),p.lanes=x,p.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},p}function Zf(f,p,x,P,M){this.tag=p,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=tt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kc(0),this.expirationTimes=kc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kc(0),this.identifierPrefix=P,this.onRecoverableError=M,bt&&(this.mutableSourceEagerHydrationData=null)}function ib(f,p,x,P,M,R,U,ae,he){return f=new Zf(f,p,x,ae,he),p===1?(p=1,R===!0&&(p|=8)):p=0,R=No(3,null,null,p),f.current=R,R.stateNode=f,R.memoizedState={element:P,isDehydrated:x,cache:null,transitions:null,pendingSuspenseBoundaries:null},U0(R),f}function kv(f){if(!f)return ia;f=f._reactInternals;e:{if(W(f)!==f||f.tag!==1)throw Error(a(170));var p=f;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(ci(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(a(171))}if(f.tag===1){var x=f.type;if(ci(x))return gu(f,x,p)}return p}function Ev(f){var p=f._reactInternals;if(p===void 0)throw typeof f.render=="function"?Error(a(188)):(f=Object.keys(f).join(","),Error(a(268,f)));return f=ne(p),f===null?null:f.stateNode}function Qf(f,p){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var x=f.retryLane;f.retryLane=x!==0&&x=We&&R>=Rt&&M<=ct&&U<=it){f.splice(p,1);break}else if(P!==We||x.width!==he.width||itU){if(!(R!==Rt||x.height!==he.height||ctM)){We>P&&(he.width+=We-P,he.x=P),ctR&&(he.height+=Rt-R,he.y=R),itx&&(x=U)),U ")+` - -No matching component was found for: - `)+f.join(" > ")}return null},n.getPublicRootInstance=function(f){if(f=f.current,!f.child)return null;switch(f.child.tag){case 5:return X(f.child.stateNode);default:return f.child.stateNode}},n.injectIntoDevTools=function(f){if(f={bundleType:f.bundleType,version:f.version,rendererPackageName:f.rendererPackageName,rendererConfig:f.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:gg,findFiberByHostInstance:f.findFiberByHostInstance||Pv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")f=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)f=!0;else{try{cn=p.inject(f),qt=p}catch{}f=!!p.checkDCE}}return f},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(f,p,x,P){if(!se)throw Error(a(363));f=gv(f,p);var M=Mt(f,x,P).disconnect;return{disconnect:function(){M()}}},n.registerMutableSourceForHydration=function(f,p){var x=p._getVersion;x=x(p._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[p,x]:f.mutableSourceEagerHydrationData.push(p,x)},n.runWithPriority=function(f,p){var x=Gt;try{return Gt=f,p()}finally{Gt=x}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(f,p,x,P){var M=p.current,R=_i(),U=qr(M);return x=kv(x),p.context===null?p.context=x:p.pendingContext=x,p=_s(R,U),p.payload={element:f},P=P===void 0?null:P,P!==null&&(p.callback=P),f=dl(M,p,U),f!==null&&(jo(f,M,U,R),Dp(f,M,U)),U},n};(function(e){e.exports=IPe})(RPe);const DPe=S7(o7);var $3={},jPe={get exports(){return $3},set exports(e){$3=e}},vp={};/** - * @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. - */vp.ConcurrentRoot=1;vp.ContinuousEventPriority=4;vp.DefaultEventPriority=16;vp.DiscreteEventPriority=1;vp.IdleEventPriority=536870912;vp.LegacyRoot=0;(function(e){e.exports=vp})(jPe);const xD={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let SD=!1,wD=!1;const pP=".react-konva-event",NPe=`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 -`,$Pe=`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 -`,FPe={};function w4(e,t,n=FPe){if(!SD&&"zIndex"in t&&(console.warn($Pe),SD=!0),!wD&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(NPe),wD=!0)}for(var o in n)if(!xD[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var d=t._useStrictMode,h={},m=!1;const y={};for(var o in t)if(!xD[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(y[l]=t[o])}!a&&(t[o]!==n[o]||d&&t[o]!==e.getAttr(o))&&(m=!0,h[o]=t[o])}m&&(e.setAttrs(h),hf(e));for(var l in y)e.on(l+pP,y[l])}function hf(e){if(!ft.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const mq={},BPe={};Qh.Node.prototype._applyProps=w4;function zPe(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),hf(e)}function HPe(e,t,n){let r=Qh[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=Qh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return w4(l,o),l}function WPe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function UPe(e,t,n){return!1}function VPe(e){return e}function GPe(){return null}function qPe(){return null}function KPe(e,t,n,r){return BPe}function YPe(){}function XPe(e){}function ZPe(e,t){return!1}function QPe(){return mq}function JPe(){return mq}const eTe=setTimeout,tTe=clearTimeout,nTe=-1;function rTe(e,t){return!1}const iTe=!1,oTe=!0,aTe=!0;function sTe(e,t){t.parent===e?t.moveToTop():e.add(t),hf(e)}function lTe(e,t){t.parent===e?t.moveToTop():e.add(t),hf(e)}function vq(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),hf(e)}function uTe(e,t,n){vq(e,t,n)}function cTe(e,t){t.destroy(),t.off(pP),hf(e)}function dTe(e,t){t.destroy(),t.off(pP),hf(e)}function fTe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function hTe(e,t,n){}function pTe(e,t,n,r,i){w4(e,i,r)}function gTe(e){e.hide(),hf(e)}function mTe(e){}function vTe(e,t){(t.visible==null||t.visible)&&e.show()}function yTe(e,t){}function bTe(e){}function xTe(){}const STe=()=>$3.DefaultEventPriority,wTe=Object.freeze(Object.defineProperty({__proto__:null,appendChild:sTe,appendChildToContainer:lTe,appendInitialChild:zPe,cancelTimeout:tTe,clearContainer:bTe,commitMount:hTe,commitTextUpdate:fTe,commitUpdate:pTe,createInstance:HPe,createTextInstance:WPe,detachDeletedInstance:xTe,finalizeInitialChildren:UPe,getChildHostContext:JPe,getCurrentEventPriority:STe,getPublicInstance:VPe,getRootHostContext:QPe,hideInstance:gTe,hideTextInstance:mTe,idlePriority:Th.unstable_IdlePriority,insertBefore:vq,insertInContainerBefore:uTe,isPrimaryRenderer:iTe,noTimeout:nTe,now:Th.unstable_now,prepareForCommit:GPe,preparePortalMount:qPe,prepareUpdate:KPe,removeChild:cTe,removeChildFromContainer:dTe,resetAfterCommit:YPe,resetTextContent:XPe,run:Th.unstable_runWithPriority,scheduleTimeout:eTe,shouldDeprioritizeSubtree:ZPe,shouldSetTextContent:rTe,supportsMutation:aTe,unhideInstance:vTe,unhideTextInstance:yTe,warnsIfNotActing:oTe},Symbol.toStringTag,{value:"Module"}));var CTe=Object.defineProperty,_Te=Object.defineProperties,kTe=Object.getOwnPropertyDescriptors,CD=Object.getOwnPropertySymbols,ETe=Object.prototype.hasOwnProperty,PTe=Object.prototype.propertyIsEnumerable,_D=(e,t,n)=>t in e?CTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kD=(e,t)=>{for(var n in t||(t={}))ETe.call(t,n)&&_D(e,n,t[n]);if(CD)for(var n of CD(t))PTe.call(t,n)&&_D(e,n,t[n]);return e},TTe=(e,t)=>_Te(e,kTe(t));function yq(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=yq(r,t,n);if(i)return i;r=t?null:r.sibling}}function bq(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const gP=bq(S.createContext(null));class xq extends S.Component{render(){return S.createElement(gP.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:MTe,ReactCurrentDispatcher:LTe}=S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function ATe(){const e=S.useContext(gP);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=S.useId();return S.useMemo(()=>{var r;return(r=MTe.current)!=null?r:yq(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}function OTe(){var e,t;const n=ATe(),[r]=S.useState(()=>new Map);r.clear();let i=n;for(;i;){const o=(e=i.type)==null?void 0:e._context;o&&o!==gP&&!r.has(o)&&r.set(o,(t=LTe.current)==null?void 0:t.readContext(bq(o))),i=i.return}return S.useMemo(()=>Array.from(r.keys()).reduce((o,a)=>s=>S.createElement(o,null,S.createElement(a.Provider,TTe(kD({},s),{value:r.get(a)}))),o=>S.createElement(xq,kD({},o))),[r])}function RTe(e){const t=Ke.useRef();return Ke.useLayoutEffect(()=>{t.current=e}),t.current}const ITe=e=>{const t=Ke.useRef(),n=Ke.useRef(),r=Ke.useRef(),i=RTe(e),o=OTe(),a=s=>{const{forwardedRef:l}=e;l&&(typeof l=="function"?l(s):l.current=s)};return Ke.useLayoutEffect(()=>(n.current=new Qh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=w1.createContainer(n.current,$3.LegacyRoot,!1,null),w1.updateContainer(Ke.createElement(o,{},e.children),r.current),()=>{Qh.isBrowser&&(a(null),w1.updateContainer(null,r.current,null),n.current.destroy())}),[]),Ke.useLayoutEffect(()=>{a(n.current),w4(n.current,e,i),w1.updateContainer(Ke.createElement(o,{},e.children),r.current,null)}),Ke.createElement("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},n1="Layer",uc="Group",cc="Rect",ah="Circle",F3="Line",Sq="Image",DTe="Transformer",w1=DPe(wTe);w1.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:Ke.version,rendererPackageName:"react-konva"});const jTe=Ke.forwardRef((e,t)=>Ke.createElement(xq,{},Ke.createElement(ITe,{...e,forwardedRef:t}))),NTe=lt([rn,Lr],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),$Te=()=>{const e=Te(),{tool:t,isStaging:n,isMovingBoundingBox:r}=le(NTe);return{handleDragStart:S.useCallback(()=>{(t==="move"||n)&&!r&&e(S3(!0))},[e,r,n,t]),handleDragMove:S.useCallback(i=>{if(!((t==="move"||n)&&!r))return;const o={x:i.target.x(),y:i.target.y()};e(XW(o))},[e,r,n,t]),handleDragEnd:S.useCallback(()=>{(t==="move"||n)&&!r&&e(S3(!1))},[e,r,n,t])}},FTe=lt([rn,Br,Lr],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isMaskEnabled:s,shouldSnapToGrid:l}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isStaging:n,isMaskEnabled:s,shouldSnapToGrid:l}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),BTe=()=>{const e=Te(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:i,isMaskEnabled:o,shouldSnapToGrid:a}=le(FTe),s=S.useRef(null),l=jV(),u=()=>e(pE());Je(["shift+c"],()=>{u()},{enabled:()=>!i,preventDefault:!0},[]);const d=()=>e(h2(!o));Je(["h"],()=>{d()},{enabled:()=>!i,preventDefault:!0},[o]),Je(["n"],()=>{e(C3(!a))},{enabled:!0,preventDefault:!0},[a]),Je("esc",()=>{e(u3e())},{enabled:()=>!0,preventDefault:!0}),Je("shift+h",()=>{e(m3e(!n))},{enabled:()=>!i,preventDefault:!0},[t,n]),Je(["space"],h=>{h.repeat||(l==null||l.container().focus(),r!=="move"&&(s.current=r,e(Jl("move"))),r==="move"&&s.current&&s.current!=="move"&&(e(Jl(s.current)),s.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,s])},mP=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}},wq=()=>{const e=Te(),t=Qs(),n=jV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=$g.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(h3e({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(n3e())}}},zTe=lt([Br,rn,Lr],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),HTe=e=>{const t=Te(),{tool:n,isStaging:r}=le(zTe),{commitColorUnderCursor:i}=wq();return S.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(S3(!0));return}if(n==="colorPicker"){i();return}const a=mP(e.current);a&&(o.evt.preventDefault(),t(zW(!0)),t(t3e([a.x,a.y])))},[e,n,r,t,i])},WTe=lt([Br,rn,Lr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),UTe=(e,t,n)=>{const r=Te(),{isDrawing:i,tool:o,isStaging:a}=le(WTe),{updateColorUnderCursor:s}=wq();return S.useCallback(()=>{if(!e.current)return;const l=mP(e.current);if(l){if(r(p3e(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r($W([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},VTe=()=>{const e=Te();return S.useCallback(()=>{e(o3e())},[e])},GTe=lt([Br,rn,Lr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),qTe=(e,t)=>{const n=Te(),{tool:r,isDrawing:i,isStaging:o}=le(GTe);return S.useCallback(()=>{if(r==="move"||o){n(S3(!1));return}if(!t.current&&i&&e.current){const a=mP(e.current);if(!a)return;n($W([a.x,a.y]))}else t.current=!1;n(zW(!1))},[t,n,i,o,e,r])},KTe=lt([rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),YTe=e=>{const t=Te(),{isMoveStageKeyHeld:n,stageScale:r}=le(KTe);return S.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=Pe.clamp(r*USe**s,VSe,GSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(y3e(l)),t(XW(u))},[e,n,r,t])},XTe=lt(rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a,stageDimensions:r,stageScale:i}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),ZTe=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=le(XTe);return g.jsxs(uc,{children:[g.jsx(cc,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),g.jsx(cc,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},QTe=lt([rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),JTe={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},eMe=()=>{const{colorMode:e}=Qy(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=le(QTe),[i,o]=S.useState([]),a=S.useCallback(s=>s/t,[t]);return S.useLayoutEffect(()=>{const s=JTe[e],{width:l,height:u}=r,{x:d,y:h}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(d),y:a(h)}},y={x:Math.ceil(a(d)/64)*64,y:Math.ceil(a(h)/64)*64},b={x1:-y.x,y1:-y.y,x2:a(l)-y.x+64,y2:a(u)-y.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},_=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(_/64)+1,L=Math.round(k/64)+1,O=Pe.range(0,T).map(I=>g.jsx(F3,{x:E.x1+I*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${I}`)),D=Pe.range(0,L).map(I=>g.jsx(F3,{x:E.x1,y:E.y1+I*64,points:[0,0,_,0],stroke:s,strokeWidth:1},`y_${I}`));o(O.concat(D))},[t,n,r,e,a]),g.jsx(uc,{children:i})},tMe=lt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),nMe=e=>{const{...t}=e,n=le(tMe),[r,i]=S.useState(null);if(S.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!(n!=null&&n.boundingBox))return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?g.jsx(Sq,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},zh=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},rMe=lt(rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:zh(t)}}),ED=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),iMe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=le(rMe),[a,s]=S.useState(null),[l,u]=S.useState(0),d=S.useRef(null),h=S.useCallback(()=>{u(l+1),setTimeout(h,500)},[l]);return S.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=ED(n)},[a,n]),S.useEffect(()=>{a&&(a.src=ED(n))},[a,n]),S.useEffect(()=>{const m=setInterval(()=>u(y=>(y+1)%5),50);return()=>clearInterval(m)},[]),!a||!Pe.isNumber(r.x)||!Pe.isNumber(r.y)||!Pe.isNumber(o)||!Pe.isNumber(i.width)||!Pe.isNumber(i.height)?null:g.jsx(cc,{ref:d,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Pe.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},oMe=lt([rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),aMe=e=>{const{...t}=e,{objects:n}=le(oMe);return g.jsx(uc,{listening:!1,...t,children:n.filter(hE).map((r,i)=>g.jsx(F3,{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"},i))})};var sh=S,sMe=function(t,n,r){const i=sh.useRef("loading"),o=sh.useRef(),[a,s]=sh.useState(0),l=sh.useRef(),u=sh.useRef(),d=sh.useRef();return(l.current!==t||u.current!==n||d.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,d.current=r),sh.useLayoutEffect(function(){if(!t)return;var h=document.createElement("img");function m(){i.current="loaded",o.current=h,s(Math.random())}function y(){i.current="failed",o.current=void 0,s(Math.random())}return h.addEventListener("load",m),h.addEventListener("error",y),n&&(h.crossOrigin=n),r&&(h.referrerpolicy=r),h.src=t,function(){h.removeEventListener("load",m),h.removeEventListener("error",y)}},[t,n,r]),[o.current,i.current]};const Cq=e=>{const{url:t,x:n,y:r}=e,[i]=sMe(t);return g.jsx(Sq,{x:n,y:r,image:i,listening:!1})},lMe=lt([rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),uMe=()=>{const{objects:e}=le(lMe);return e?g.jsx(uc,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(x3(t))return g.jsx(Cq,{x:t.x,y:t.y,url:t.image.url},n);if(YSe(t)){const r=g.jsx(F3,{points:t.points,stroke:t.color?zh(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?g.jsx(uc,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(XSe(t))return g.jsx(cc,{x:t.x,y:t.y,width:t.width,height:t.height,fill:zh(t.color)},n);if(ZSe(t))return g.jsx(cc,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},cMe=lt([rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i,boundingBoxCoordinates:{x:o,y:a},boundingBoxDimensions:{width:s,height:l}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),dMe=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}=le(cMe);return g.jsxs(uc,{...t,children:[r&&n&&g.jsx(Cq,{url:n.image.url,x:o,y:a}),i&&g.jsxs(uc,{children:[g.jsx(cc,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),g.jsx(cc,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},fMe=lt([rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),hMe=()=>{const e=Te(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=le(fMe),{t:o}=De(),a=S.useCallback(()=>{e(XO(!0))},[e]),s=S.useCallback(()=>{e(XO(!1))},[e]);Je(["left"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),Je(["right"],()=>{u()},{enabled:()=>!0,preventDefault:!0}),Je(["enter"],()=>{d()},{enabled:()=>!0,preventDefault:!0});const l=()=>e(s3e()),u=()=>e(a3e()),d=()=>e(r3e());return r?g.jsx(ke,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:a,onMouseOut:s,children:g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Ye,{tooltip:`${o("unifiedCanvas.previous")} (Left)`,"aria-label":`${o("unifiedCanvas.previous")} (Left)`,icon:g.jsx(pke,{}),onClick:l,"data-selected":!0,isDisabled:t}),g.jsx(Ye,{tooltip:`${o("unifiedCanvas.next")} (Right)`,"aria-label":`${o("unifiedCanvas.next")} (Right)`,icon:g.jsx(gke,{}),onClick:u,"data-selected":!0,isDisabled:n}),g.jsx(Ye,{tooltip:`${o("unifiedCanvas.accept")} (Enter)`,"aria-label":`${o("unifiedCanvas.accept")} (Enter)`,icon:g.jsx(jE,{}),onClick:d,"data-selected":!0}),g.jsx(Ye,{tooltip:o("unifiedCanvas.showHide"),"aria-label":o("unifiedCanvas.showHide"),"data-alert":!i,icon:i?g.jsx(wke,{}):g.jsx(Ske,{}),onClick:()=>e(v3e(!i)),"data-selected":!0}),g.jsx(Ye,{tooltip:o("unifiedCanvas.saveToGallery"),"aria-label":o("unifiedCanvas.saveToGallery"),icon:g.jsx($E,{}),onClick:()=>e(m_e(r.image.url)),"data-selected":!0}),g.jsx(Ye,{tooltip:o("unifiedCanvas.discardAll"),"aria-label":o("unifiedCanvas.discardAll"),icon:g.jsx(y2,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(i3e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"},fontSize:20})]})}):null},cm=e=>Math.round(e*100)/100,pMe=lt([rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${cm(n)}, ${cm(r)})`}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function gMe(){const{cursorCoordinatesString:e}=le(pMe),{t}=De();return g.jsx("div",{children:`${t("unifiedcanvas:cursorPosition")}: ${e}`})}const mMe=lt([rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:d},stageScale:h,shouldShowCanvasDebugInfo:m,layer:y,boundingBoxScaleMethod:b,shouldPreserveMaskedArea:w}=e;let E="inherit";return(b==="none"&&(o<512||a<512)||b==="manual"&&s*l<512*512)&&(E="var(--status-working-color)"),{activeLayerColor:y==="mask"?"var(--status-working-color)":"inherit",activeLayerString:y.charAt(0).toUpperCase()+y.slice(1),boundingBoxColor:E,boundingBoxCoordinatesString:`(${cm(u)}, ${cm(d)})`,boundingBoxDimensionsString:`${o}×${a}`,scaledBoundingBoxDimensionsString:`${s}×${l}`,canvasCoordinatesString:`${cm(r)}×${cm(i)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(h*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:b!=="auto",shouldShowScaledBoundingBox:b!=="none",shouldPreserveMaskedArea:w}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),vMe=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:d,shouldShowBoundingBox:h,shouldPreserveMaskedArea:m}=le(mMe),{t:y}=De();return g.jsxs("div",{className:"canvas-status-text",children:[g.jsx("div",{style:{color:e},children:`${y("unifiedCanvas.activeLayer")}: ${t}`}),g.jsx("div",{children:`${y("unifiedCanvas.canvasScale")}: ${u}%`}),m&&g.jsx("div",{style:{color:"var(--status-working-color)"},children:"Preserve Masked Area: On"}),h&&g.jsx("div",{style:{color:n},children:`${y("unifiedcanvas:boundingBox")}: ${i}`}),a&&g.jsx("div",{style:{color:n},children:`${y("unifiedcanvas:scaledBoundingBox")}: ${o}`}),d&&g.jsxs(g.Fragment,{children:[g.jsx("div",{children:`${y("unifiedcanvas:boundingBoxPosition")}: ${r}`}),g.jsx("div",{children:`${y("unifiedcanvas:canvasDimensions")}: ${l}`}),g.jsx("div",{children:`${y("unifiedcanvas:canvasPosition")}: ${s}`}),g.jsx(gMe,{})]})]})},yMe=lt(rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:i,isTransformingBoundingBox:o,isMovingBoundingBox:a,tool:s,shouldSnapToGrid:l}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:i,isMovingBoundingBox:a,isTransformingBoundingBox:o,stageScale:r,shouldSnapToGrid:l,tool:s,hitStrokeWidth:20/r}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),bMe=e=>{const{...t}=e,n=Te(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMovingBoundingBox:a,isTransformingBoundingBox:s,stageScale:l,shouldSnapToGrid:u,tool:d,hitStrokeWidth:h}=le(yMe),m=S.useRef(null),y=S.useRef(null),[b,w]=S.useState(!1);S.useEffect(()=>{var ne;!m.current||!y.current||(m.current.nodes([y.current]),(ne=m.current.getLayer())==null||ne.batchDraw())},[]);const E=64*l,_=S.useCallback(ne=>{if(!u){n(RC({x:Math.floor(ne.target.x()),y:Math.floor(ne.target.y())}));return}const z=ne.target.x(),$=ne.target.y(),V=Hl(z,64),X=Hl($,64);ne.target.x(V),ne.target.y(X),n(RC({x:V,y:X}))},[n,u]),k=S.useCallback(()=>{if(!y.current)return;const ne=y.current,z=ne.scaleX(),$=ne.scaleY(),V=Math.round(ne.width()*z),X=Math.round(ne.height()*$),Q=Math.round(ne.x()),G=Math.round(ne.y());n(g1({width:V,height:X})),n(RC({x:u?Cd(Q,64):Q,y:u?Cd(G,64):G})),ne.scaleX(1),ne.scaleY(1)},[n,u]),T=S.useCallback((ne,z,$)=>{const V=ne.x%E,X=ne.y%E;return{x:Cd(z.x,E)+V,y:Cd(z.y,E)+X}},[E]),L=()=>{n(DC(!0))},O=()=>{n(DC(!1)),n(IC(!1)),n(Qb(!1)),w(!1)},D=()=>{n(IC(!0))},I=()=>{n(DC(!1)),n(IC(!1)),n(Qb(!1)),w(!1)},N=()=>{w(!0)},W=()=>{!s&&!a&&w(!1)},B=()=>{n(Qb(!0))},K=()=>{n(Qb(!1))};return g.jsxs(uc,{...t,children:[g.jsx(cc,{height:i.height,width:i.width,x:r.x,y:r.y,onMouseEnter:B,onMouseOver:B,onMouseLeave:K,onMouseOut:K}),g.jsx(cc,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:h,listening:!o&&d==="move",onDragStart:D,onDragEnd:I,onDragMove:_,onMouseDown:D,onMouseOut:W,onMouseOver:N,onMouseEnter:N,onMouseUp:I,onTransform:k,onTransformEnd:O,ref:y,stroke:b?"rgba(255,255,255,0.7)":"white",strokeWidth:(b?8:1)/l,width:i.width,x:r.x,y:r.y}),g.jsx(DTe,{anchorCornerRadius:3,anchorDragBoundFunc:T,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:d==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&d==="move",onDragStart:D,onDragEnd:I,onMouseDown:L,onMouseUp:O,onTransformEnd:O,ref:m,rotateEnabled:!1})]})},xMe=lt(rn,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:i,brushColor:o,tool:a,layer:s,shouldShowBrush:l,isMovingBoundingBox:u,isTransformingBoundingBox:d,stageScale:h,stageDimensions:m,boundingBoxCoordinates:y,boundingBoxDimensions:b,shouldRestrictStrokesToBox:w}=e,E=w?{clipX:y.x,clipY:y.y,clipWidth:b.width,clipHeight:b.height}:{};return{cursorPosition:t,brushX:t?t.x:m.width/2,brushY:t?t.y:m.height/2,radius:n/2,colorPickerOuterRadius:KO/h,colorPickerInnerRadius:(KO-pk+1)/h,maskColorString:zh({...i,a:.5}),brushColorString:zh(o),colorPickerColorString:zh(r),tool:a,layer:s,shouldShowBrush:l,shouldDrawBrushPreview:!(u||d||!t)&&l,strokeWidth:1.5/h,dotRadius:1.5/h,clip:E}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),SMe=e=>{const{...t}=e,{brushX:n,brushY:r,radius:i,maskColorString:o,tool:a,layer:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:d,brushColorString:h,colorPickerColorString:m,colorPickerInnerRadius:y,colorPickerOuterRadius:b,clip:w}=le(xMe);return l?g.jsxs(uc,{listening:!1,...w,...t,children:[a==="colorPicker"?g.jsxs(g.Fragment,{children:[g.jsx(ah,{x:n,y:r,radius:b,stroke:h,strokeWidth:pk,strokeScaleEnabled:!1}),g.jsx(ah,{x:n,y:r,radius:y,stroke:m,strokeWidth:pk,strokeScaleEnabled:!1})]}):g.jsxs(g.Fragment,{children:[g.jsx(ah,{x:n,y:r,radius:i,fill:s==="mask"?o:h,globalCompositeOperation:a==="eraser"?"destination-out":"source-out"}),g.jsx(ah,{x:n,y:r,radius:i,stroke:"rgba(255,255,255,0.4)",strokeWidth:d*2,strokeEnabled:!0,listening:!1}),g.jsx(ah,{x:n,y:r,radius:i,stroke:"rgba(0,0,0,1)",strokeWidth:d,strokeEnabled:!0,listening:!1})]}),g.jsx(ah,{x:n,y:r,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),g.jsx(ah,{x:n,y:r,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},wMe=lt([rn,Lr],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:d,isMovingStage:h,shouldShowIntermediates:m,shouldShowGrid:y,shouldRestrictStrokesToBox:b}=e;let w="none";return d==="move"||t?h?w="grabbing":w="grab":o?w=void 0:b&&!a&&(w="default"),{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:y,stageCoordinates:u,stageCursor:w,stageDimensions:l,stageScale:r,tool:d,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),_q=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:d}=le(wMe);BTe();const h=S.useRef(null),m=S.useRef(null),y=S.useCallback(W=>{K6e(W),h.current=W},[]),b=S.useCallback(W=>{q6e(W),m.current=W},[]),w=S.useRef({x:0,y:0}),E=S.useRef(!1),_=YTe(h),k=HTe(h),T=qTe(h,E),L=UTe(h,E,w),O=VTe(),{handleDragStart:D,handleDragMove:I,handleDragEnd:N}=$Te();return g.jsx("div",{className:"inpainting-canvas-container",children:g.jsxs("div",{className:"inpainting-canvas-wrapper",children:[g.jsxs(jTe,{tabIndex:-1,ref:y,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:L,onTouchEnd:T,onMouseDown:k,onMouseLeave:O,onMouseMove:L,onMouseUp:T,onDragStart:D,onDragMove:I,onDragEnd:N,onContextMenu:W=>W.evt.preventDefault(),onWheel:_,draggable:(l==="move"||u)&&!t,children:[g.jsx(n1,{id:"grid",visible:r,children:g.jsx(eMe,{})}),g.jsx(n1,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:g.jsx(uMe,{})}),g.jsxs(n1,{id:"mask",visible:e,listening:!1,children:[g.jsx(aMe,{visible:!0,listening:!1}),g.jsx(iMe,{listening:!1})]}),g.jsx(n1,{children:g.jsx(ZTe,{})}),g.jsxs(n1,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&g.jsx(SMe,{visible:l!=="move",listening:!1}),g.jsx(dMe,{visible:u}),d&&g.jsx(nMe,{}),g.jsx(bMe,{visible:n&&!u})]})]}),g.jsx(vMe,{}),g.jsx(hMe,{})]})})},CMe=lt(rn,sG,Br,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),kq=()=>{const e=Te(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=le(CMe),o=S.useRef(null);return S.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(f3e({width:a,height:s})),e(i?c3e():r4()),e(Li(!1))},0)},[e,r,t,n,i]),g.jsx("div",{ref:o,className:"inpainting-canvas-area",children:g.jsx(p0,{thickness:"2px",speed:"1s",size:"xl"})})},_Me=lt([rn,Br,hr],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function Eq(){const e=Te(),{canRedo:t,activeTabName:n}=le(_Me),{t:r}=De(),i=()=>{e(l3e())};return Je(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{i()},{enabled:()=>t,preventDefault:!0},[n,t]),g.jsx(Ye,{"aria-label":`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,icon:g.jsx(Rke,{}),onClick:i,isDisabled:!t})}const kMe=lt([rn,Br,hr],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function Pq(){const e=Te(),{t}=De(),{canUndo:n,activeTabName:r}=le(kMe),i=()=>{e(b3e())};return Je(["meta+z","ctrl+z"],()=>{i()},{enabled:()=>n,preventDefault:!0},[r,n]),g.jsx(Ye,{"aria-label":`${t("unifiedCanvas.undo")} (Ctrl+Z)`,tooltip:`${t("unifiedCanvas.undo")} (Ctrl+Z)`,icon:g.jsx(Nke,{}),onClick:i,isDisabled:!n})}const EMe=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");o&&(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},PMe=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},TMe=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),d=r?{x:r.x+n.x,y:r.y+n.y,width:r.width,height:r.height}:{x:a,y:s,width:l,height:u},h=e.toDataURL(d);return e.scale(i),{dataURL:h,boundingBox:{x:o.x,y:o.y,width:l,height:u}}},MMe={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},Td=(e=MMe)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(M4e("Exporting Image")),t(_d(!1));const u=n(),{stageScale:d,boundingBoxCoordinates:h,boundingBoxDimensions:m,stageCoordinates:y}=u.canvas,b=Qs();if(!b){t(wa(!1)),t(_d(!0));return}const{dataURL:w,boundingBox:E}=TMe(b,d,y,i?{...h,...m}:void 0);if(!w){t(wa(!1)),t(_d(!0));return}const _=new FormData;_.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:_})).json(),{url:L,width:O,height:D}=T,I={uuid:um(),category:o?"result":"user",...T};a&&(PMe(L),t($u({title:Et.t("toast.downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),s&&(EMe(L,O,D),t($u({title:Et.t("toast.imageCopied"),status:"success",duration:2500,isClosable:!0}))),o&&(t(sm({image:I,category:"result"})),t($u({title:Et.t("toast.imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),l&&(t(g3e({kind:"image",layer:"base",...E,image:I})),t($u({title:Et.t("toast.canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(wa(!1)),t(hh(Et.t("common.statusConnected"))),t(_d(!0))};function LMe(){const e=le(Lr),t=Qs(),n=le(s=>s.system.isProcessing),r=le(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Te(),{t:o}=De();Je(["meta+c","ctrl+c"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(Td({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return g.jsx(Ye,{"aria-label":`${o("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${o("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:g.jsx(e0,{}),onClick:a,isDisabled:e})}function AMe(){const e=Te(),{t}=De(),n=Qs(),r=le(Lr),i=le(s=>s.system.isProcessing),o=le(s=>s.canvas.shouldCropToBoundingBoxOnSave);Je(["shift+d"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n,i]);const a=()=>{e(Td({cropVisible:!o,cropToBoundingBox:o,shouldDownload:!0}))};return g.jsx(Ye,{"aria-label":`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:g.jsx(NE,{}),onClick:a,isDisabled:r})}function OMe(){const e=le(Lr),{openUploader:t}=OE(),{t:n}=De();return g.jsx(Ye,{"aria-label":n("common.upload"),tooltip:n("common.upload"),icon:g.jsx(h4,{}),onClick:t,isDisabled:e})}const RMe=lt([rn,Lr],(e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function IMe(){const e=Te(),{t}=De(),{layer:n,isMaskEnabled:r,isStaging:i}=le(RMe),o=()=>{e(w3(n==="mask"?"base":"mask"))};Je(["q"],()=>{o()},{enabled:()=>!i,preventDefault:!0},[n]);const a=s=>{const l=s.target.value;e(w3(l)),l==="mask"&&!r&&e(h2(!0))};return g.jsx(Jo,{tooltip:`${t("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:IW,onChange:a,isDisabled:i})}function DMe(){const e=Te(),{t}=De(),n=Qs(),r=le(Lr),i=le(a=>a.system.isProcessing);Je(["shift+m"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n,i]);const o=()=>{e(Td({cropVisible:!1,shouldSetAsInitialImage:!0}))};return g.jsx(Ye,{"aria-label":`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:g.jsx(oG,{}),onClick:o,isDisabled:r})}function jMe(){const e=le(o=>o.canvas.tool),t=le(Lr),n=Te(),{t:r}=De();Je(["v"],()=>{i()},{enabled:()=>!t,preventDefault:!0},[]);const i=()=>n(Jl("move"));return g.jsx(Ye,{"aria-label":`${r("unifiedCanvas.move")} (V)`,tooltip:`${r("unifiedCanvas.move")} (V)`,icon:g.jsx(JV,{}),"data-selected":e==="move"||t,onClick:i})}function NMe(){const e=le(i=>i.ui.shouldPinParametersPanel),t=Te(),{t:n}=De(),r=()=>{t(Fh(!0)),e&&setTimeout(()=>t(Li(!0)),400)};return g.jsxs(ke,{flexDirection:"column",gap:"0.5rem",children:[g.jsx(Ye,{tooltip:`${n("parameters.showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":n("parameters.showOptionsPanel"),onClick:r,children:g.jsx(FE,{})}),g.jsx(ke,{children:g.jsx(tP,{iconButton:!0})}),g.jsx(ke,{children:g.jsx(JE,{width:"100%",height:"40px",btnGroupWidth:"100%"})})]})}function $Me(){const e=Te(),{t}=De(),n=le(Lr),r=()=>{e(gE()),e(r4())};return g.jsx(Ye,{"aria-label":t("unifiedCanvas.clearCanvas"),tooltip:t("unifiedCanvas.clearCanvas"),icon:g.jsx(hp,{}),onClick:r,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})}function Tq(e,t,n=250){const[r,i]=S.useState(0);return S.useEffect(()=>{const o=setTimeout(()=>{r===1&&e(),i(0)},n);return r===2&&t(),()=>clearTimeout(o)},[r,e,t,n]),()=>i(o=>o+1)}function FMe(){const e=Qs(),t=Te(),{t:n}=De();Je(["r"],()=>{i()},{enabled:()=>!0,preventDefault:!0},[e]);const r=Tq(()=>i(!1),()=>i(!0)),i=(o=!1)=>{const a=Qs();if(!a)return;const s=a.getClientRect({skipTransform:!0});t(BW({contentRect:s,shouldScaleTo1:o}))};return g.jsx(Ye,{"aria-label":`${n("unifiedCanvas.resetView")} (R)`,tooltip:`${n("unifiedCanvas.resetView")} (R)`,icon:g.jsx(tG,{}),onClick:r})}function BMe(){const e=le(Lr),t=Qs(),n=le(s=>s.system.isProcessing),r=le(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Te(),{t:o}=De();Je(["shift+s"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(Td({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return g.jsx(Ye,{"aria-label":`${o("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${o("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:g.jsx($E,{}),onClick:a,isDisabled:e})}const zMe=lt([rn,Lr,hr],(e,t,n)=>{const{isProcessing:r}=n,{tool:i}=e;return{tool:i,isStaging:t,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),HMe=()=>{const e=Te(),{t}=De(),{tool:n,isStaging:r}=le(zMe);Je(["b"],()=>{i()},{enabled:()=>!r,preventDefault:!0},[]),Je(["e"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n]),Je(["c"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n]),Je(["shift+f"],()=>{s()},{enabled:()=>!r,preventDefault:!0}),Je(["delete","backspace"],()=>{l()},{enabled:()=>!r,preventDefault:!0});const i=()=>e(Jl("brush")),o=()=>e(Jl("eraser")),a=()=>e(Jl("colorPicker")),s=()=>e(NW()),l=()=>e(jW());return g.jsxs(ke,{flexDirection:"column",gap:"0.5rem",children:[g.jsxs(Gi,{children:[g.jsx(Ye,{"aria-label":`${t("unifiedCanvas.brush")} (B)`,tooltip:`${t("unifiedCanvas.brush")} (B)`,icon:g.jsx(aG,{}),"data-selected":n==="brush"&&!r,onClick:i,isDisabled:r}),g.jsx(Ye,{"aria-label":`${t("unifiedCanvas.eraser")} (E)`,tooltip:`${t("unifiedCanvas.eraser")} (B)`,icon:g.jsx(nG,{}),"data-selected":n==="eraser"&&!r,isDisabled:r,onClick:o})]}),g.jsxs(Gi,{children:[g.jsx(Ye,{"aria-label":`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:g.jsx(iG,{}),isDisabled:r,onClick:s}),g.jsx(Ye,{"aria-label":`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:g.jsx(y2,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:l})]}),g.jsx(Ye,{"aria-label":`${t("unifiedCanvas.colorPicker")} (C)`,tooltip:`${t("unifiedCanvas.colorPicker")} (C)`,icon:g.jsx(rG,{}),"data-selected":n==="colorPicker"&&!r,isDisabled:r,onClick:a,width:"max-content"})]})},C4=Ze((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:d,onClose:h}=Kd(),m=S.useRef(null),y=()=>{r(),h()},b=()=>{o&&o(),h()};return g.jsxs(g.Fragment,{children:[S.cloneElement(l,{onClick:d,ref:t}),g.jsx($H,{isOpen:u,leastDestructiveRef:m,onClose:h,children:g.jsx(oc,{children:g.jsxs(FH,{className:"modal",children:[g.jsx(op,{fontSize:"lg",fontWeight:"bold",children:s}),g.jsx(Zm,{children:a}),g.jsxs(zw,{children:[g.jsx(ss,{ref:m,onClick:b,className:"modal-close-btn",children:i}),g.jsx(ss,{colorScheme:"red",onClick:y,ml:3,children:n})]})]})})})]})}),Mq=()=>{const e=le(Lr),t=Te(),{t:n}=De(),r=()=>{t(v_e()),t(gE()),t(FW())};return g.jsxs(C4,{title:n("unifiedCanvas.emptyTempImageFolder"),acceptCallback:r,acceptButtonText:n("unifiedCanvas.emptyFolder"),triggerComponent:g.jsx(On,{leftIcon:g.jsx(hp,{}),size:"sm",isDisabled:e,children:n("unifiedCanvas.emptyTempImageFolder")}),children:[g.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderMessage")}),g.jsx("br",{}),g.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderConfirm")})]})},Lq=()=>{const e=le(Lr),t=Te(),{t:n}=De();return g.jsxs(C4,{title:n("unifiedCanvas.clearCanvasHistory"),acceptCallback:()=>t(FW()),acceptButtonText:n("unifiedCanvas.clearHistory"),triggerComponent:g.jsx(On,{size:"sm",leftIcon:g.jsx(hp,{}),isDisabled:e,children:n("unifiedCanvas.clearCanvasHistory")}),children:[g.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryMessage")}),g.jsx("br",{}),g.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryConfirm")})]})},WMe=lt([rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),UMe=()=>{const e=Te(),{t}=De(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:i,shouldShowIntermediates:o}=le(WMe);return g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Ye,{tooltip:t("unifiedCanvas.canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedCanvas.canvasSettings"),icon:g.jsx(BE,{})}),children:g.jsxs(ke,{direction:"column",gap:"0.5rem",children:[g.jsx(Gn,{label:t("unifiedCanvas.showIntermediates"),isChecked:o,onChange:a=>e(YW(a.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:a=>e(WW(a.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:a=>e(UW(a.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:i,onChange:a=>e(qW(a.target.checked))}),g.jsx(Lq,{}),g.jsx(Mq,{})]})})},VMe=()=>{const e=le(t=>t.ui.shouldShowParametersPanel);return g.jsxs(ke,{flexDirection:"column",rowGap:"0.5rem",width:"6rem",children:[g.jsx(IMe,{}),g.jsx(HMe,{}),g.jsxs(ke,{gap:"0.5rem",children:[g.jsx(jMe,{}),g.jsx(FMe,{})]}),g.jsxs(ke,{columnGap:"0.5rem",children:[g.jsx(DMe,{}),g.jsx(BMe,{})]}),g.jsxs(ke,{columnGap:"0.5rem",children:[g.jsx(LMe,{}),g.jsx(AMe,{})]}),g.jsxs(ke,{gap:"0.5rem",children:[g.jsx(Pq,{}),g.jsx(Eq,{})]}),g.jsxs(ke,{gap:"0.5rem",children:[g.jsx(OMe,{}),g.jsx($Me,{})]}),g.jsx(UMe,{}),!e&&g.jsx(NMe,{})]})};function GMe(){const e=Te(),t=le(i=>i.canvas.brushSize),{t:n}=De(),r=le(Lr);return Je(["BracketLeft"],()=>{e(Lm(Math.max(t-5,5)))},{enabled:()=>!r,preventDefault:!0},[t]),Je(["BracketRight"],()=>{e(Lm(Math.min(t+5,500)))},{enabled:()=>!r,preventDefault:!0},[t]),g.jsx(Dn,{label:n("unifiedCanvas.brushSize"),value:t,withInput:!0,onChange:i=>e(Lm(i)),sliderNumberInputProps:{max:500},inputReadOnly:!1,width:"100px",isCompact:!0})}function _4(){return(_4=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function a7(e){var t=S.useRef(e),n=S.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var r0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(PD(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var _=l.current,k=s7(i.current),T=E?k.addEventListener:k.removeEventListener;T(_?"touchmove":"mousemove",y),T(_?"touchend":"mouseup",b)}return[function(E){var _=E.nativeEvent,k=i.current;if(k&&(TD(_),!function(L,O){return O&&!X1(L)}(_,l.current)&&k)){if(X1(_)){l.current=!0;var T=_.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(PD(k,_,s.current)),w(!0)}},function(E){var _=E.which||E.keyCode;_<37||_>40||(E.preventDefault(),a({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},w]},[a,o]),d=u[0],h=u[1],m=u[2];return S.useEffect(function(){return m},[m]),Ke.createElement("div",_4({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),k4=function(e){return e.filter(Boolean).join(" ")},yP=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=k4(["react-colorful__pointer",e.className]);return Ke.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},Ke.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Co=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Oq=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Co(e.h),s:Co(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Co(i/2),a:Co(r,2)}},l7=function(e){var t=Oq(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},a6=function(e){var t=Oq(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},qMe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:Co(255*[r,s,a,a,l,r][u]),g:Co(255*[l,r,r,s,a,a][u]),b:Co(255*[a,a,l,r,r,s][u]),a:Co(i,2)}},KMe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:Co(60*(s<0?s+6:s)),s:Co(o?a/o*100:0),v:Co(o/255*100),a:i}},YMe=Ke.memo(function(e){var t=e.hue,n=e.onChange,r=k4(["react-colorful__hue",e.className]);return Ke.createElement("div",{className:r},Ke.createElement(vP,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:r0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Co(t),"aria-valuemax":"360","aria-valuemin":"0"},Ke.createElement(yP,{className:"react-colorful__hue-pointer",left:t/360,color:l7({h:t,s:100,v:100,a:1})})))}),XMe=Ke.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:l7({h:t.h,s:100,v:100,a:1})};return Ke.createElement("div",{className:"react-colorful__saturation",style:r},Ke.createElement(vP,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:r0(t.s+100*i.left,0,100),v:r0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Co(t.s)+"%, Brightness "+Co(t.v)+"%"},Ke.createElement(yP,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:l7(t)})))}),Rq=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function ZMe(e,t,n){var r=a7(n),i=S.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=S.useRef({color:t,hsva:o});S.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),S.useEffect(function(){var u;Rq(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=S.useCallback(function(u){a(function(d){return Object.assign({},d,u)})},[]);return[o,l]}var QMe=typeof window<"u"?S.useLayoutEffect:S.useEffect,JMe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},MD=new Map,eLe=function(e){QMe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!MD.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}`,MD.set(t,n);var r=JMe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},tLe=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+a6(Object.assign({},n,{a:0}))+", "+a6(Object.assign({},n,{a:1}))+")"},o=k4(["react-colorful__alpha",t]),a=Co(100*n.a);return Ke.createElement("div",{className:o},Ke.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),Ke.createElement(vP,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:r0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},Ke.createElement(yP,{className:"react-colorful__alpha-pointer",left:n.a,color:a6(n)})))},nLe=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=Aq(e,["className","colorModel","color","onChange"]),s=S.useRef(null);eLe(s);var l=ZMe(n,i,o),u=l[0],d=l[1],h=k4(["react-colorful",t]);return Ke.createElement("div",_4({},a,{ref:s,className:h}),Ke.createElement(XMe,{hsva:u,onChange:d}),Ke.createElement(YMe,{hue:u.h,onChange:d}),Ke.createElement(tLe,{hsva:u,onChange:d,className:"react-colorful__last-control"}))},rLe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:KMe,fromHsva:qMe,equal:Rq},iLe=function(e){return Ke.createElement(nLe,_4({},e,{colorModel:rLe}))};const B3=e=>{const{styleClass:t,...n}=e;return g.jsx(iLe,{className:`invokeai__color-picker ${t}`,...n})},oLe=lt([rn,Lr],(e,t)=>{const{brushColor:n,maskColor:r,layer:i}=e;return{brushColor:n,maskColor:r,layer:i,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function aLe(){const e=Te(),{brushColor:t,maskColor:n,layer:r,isStaging:i}=le(oLe),o=()=>{if(r==="base")return`rgba(${t.r},${t.g},${t.b},${t.a})`;if(r==="mask")return`rgba(${n.r},${n.g},${n.b},${n.a})`};return Je(["shift+BracketLeft"],()=>{e(Mm({...t,a:Pe.clamp(t.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),Je(["shift+BracketRight"],()=>{e(Mm({...t,a:Pe.clamp(t.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(ao,{style:{width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",borderRadius:"99999999px",backgroundColor:o(),cursor:"pointer"}}),children:g.jsxs(ke,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[r==="base"&&g.jsx(B3,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:t,onChange:a=>e(Mm(a))}),r==="mask"&&g.jsx(B3,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:a=>e(HW(a))})]})})}function Iq(){return g.jsxs(ke,{columnGap:"1rem",alignItems:"center",children:[g.jsx(GMe,{}),g.jsx(aLe,{})]})}function sLe(){const e=Te(),t=le(r=>r.canvas.shouldRestrictStrokesToBox),{t:n}=De();return g.jsx(Gn,{label:n("unifiedCanvas.betaLimitToBox"),isChecked:t,onChange:r=>e(ZW(r.target.checked))})}function lLe(){return g.jsxs(ke,{gap:"1rem",alignItems:"center",children:[g.jsx(Iq,{}),g.jsx(sLe,{})]})}function uLe(){const e=Te(),{t}=De(),n=()=>e(pE());return g.jsx(On,{size:"sm",leftIcon:g.jsx(hp,{}),onClick:n,tooltip:`${t("unifiedCanvas.clearMask")} (Shift+C)`,children:t("unifiedCanvas.betaClear")})}function cLe(){const e=le(i=>i.canvas.isMaskEnabled),t=Te(),{t:n}=De(),r=()=>t(h2(!e));return g.jsx(Gn,{label:`${n("unifiedCanvas.enableMask")} (H)`,isChecked:e,onChange:r})}function dLe(){const e=Te(),{t}=De(),n=le(r=>r.canvas.shouldPreserveMaskedArea);return g.jsx(Gn,{label:t("unifiedCanvas.betaPreserveMasked"),isChecked:n,onChange:r=>e(GW(r.target.checked))})}function fLe(){return g.jsxs(ke,{gap:"1rem",alignItems:"center",children:[g.jsx(Iq,{}),g.jsx(cLe,{}),g.jsx(dLe,{}),g.jsx(uLe,{})]})}function hLe(){const e=le(r=>r.canvas.shouldDarkenOutsideBoundingBox),t=Te(),{t:n}=De();return g.jsx(Gn,{label:n("unifiedCanvas.betaDarkenOutside"),isChecked:e,onChange:r=>t(VW(r.target.checked))})}function pLe(){const e=le(r=>r.canvas.shouldShowGrid),t=Te(),{t:n}=De();return g.jsx(Gn,{label:n("unifiedCanvas.showGrid"),isChecked:e,onChange:r=>t(KW(r.target.checked))})}function gLe(){const e=le(i=>i.canvas.shouldSnapToGrid),t=Te(),{t:n}=De(),r=i=>t(C3(i.target.checked));return g.jsx(Gn,{label:`${n("unifiedCanvas.snapToGrid")} (N)`,isChecked:e,onChange:r})}function mLe(){return g.jsxs(ke,{alignItems:"center",gap:"1rem",children:[g.jsx(pLe,{}),g.jsx(gLe,{}),g.jsx(hLe,{})]})}const vLe=lt([rn],e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function yLe(){const{tool:e,layer:t}=le(vLe);return g.jsxs(ke,{height:"2rem",minHeight:"2rem",maxHeight:"2rem",alignItems:"center",children:[t=="base"&&["brush","eraser","colorPicker"].includes(e)&&g.jsx(lLe,{}),t=="mask"&&["brush","eraser","colorPicker"].includes(e)&&g.jsx(fLe,{}),e=="move"&&g.jsx(mLe,{})]})}const bLe=lt([rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),xLe=()=>{const e=Te(),{doesCanvasNeedScaling:t}=le(bLe);return S.useLayoutEffect(()=>{e(Li(!0));const n=Pe.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),g.jsx("div",{className:"workarea-single-view",children:g.jsxs(ke,{flexDirection:"row",width:"100%",height:"100%",columnGap:"1rem",padding:"1rem",children:[g.jsx(VMe,{}),g.jsxs(ke,{width:"100%",height:"100%",flexDirection:"column",rowGap:"1rem",children:[g.jsx(yLe,{}),t?g.jsx(kq,{}):g.jsx(_q,{})]})]})})},SLe=lt([rn,Lr],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:i,shouldPreserveMaskedArea:o}=e;return{layer:r,maskColor:n,maskColorString:zh(n),isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),wLe=()=>{const e=Te(),{t}=De(),{layer:n,maskColor:r,isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:a}=le(SLe);Je(["q"],()=>{s()},{enabled:()=>!a,preventDefault:!0},[n]),Je(["shift+c"],()=>{l()},{enabled:()=>!a,preventDefault:!0},[]),Je(["h"],()=>{u()},{enabled:()=>!a,preventDefault:!0},[i]);const s=()=>{e(w3(n==="mask"?"base":"mask"))},l=()=>e(pE()),u=()=>e(h2(!i));return g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Gi,{children:g.jsx(Ye,{"aria-label":t("unifiedCanvas.maskingOptions"),tooltip:t("unifiedCanvas.maskingOptions"),icon:g.jsx(Pke,{}),style:n==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"},isDisabled:a})}),children:g.jsxs(ke,{direction:"column",gap:"0.5rem",children:[g.jsx(Gn,{label:`${t("unifiedCanvas.enableMask")} (H)`,isChecked:i,onChange:u}),g.jsx(Gn,{label:t("unifiedCanvas.preserveMaskedArea"),isChecked:o,onChange:d=>e(GW(d.target.checked))}),g.jsx(B3,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:r,onChange:d=>e(HW(d))}),g.jsxs(On,{size:"sm",leftIcon:g.jsx(hp,{}),onClick:l,children:[t("unifiedCanvas.clearMask")," (Shift+C)"]})]})})},CLe=lt([rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),_Le=()=>{const e=Te(),{t}=De(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:i,shouldShowCanvasDebugInfo:o,shouldShowGrid:a,shouldShowIntermediates:s,shouldSnapToGrid:l,shouldRestrictStrokesToBox:u}=le(CLe);Je(["n"],()=>{e(C3(!l))},{enabled:!0,preventDefault:!0},[l]);const d=h=>e(C3(h.target.checked));return g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Ye,{tooltip:t("unifiedCanvas.canvasSettings"),"aria-label":t("unifiedCanvas.canvasSettings"),icon:g.jsx(BE,{})}),children:g.jsxs(ke,{direction:"column",gap:"0.5rem",children:[g.jsx(Gn,{label:t("unifiedCanvas.showIntermediates"),isChecked:s,onChange:h=>e(YW(h.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.showGrid"),isChecked:a,onChange:h=>e(KW(h.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.snapToGrid"),isChecked:l,onChange:d}),g.jsx(Gn,{label:t("unifiedCanvas.darkenOutsideSelection"),isChecked:i,onChange:h=>e(VW(h.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:h=>e(WW(h.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:h=>e(UW(h.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.limitStrokesToBox"),isChecked:u,onChange:h=>e(ZW(h.target.checked))}),g.jsx(Gn,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:o,onChange:h=>e(qW(h.target.checked))}),g.jsx(Lq,{}),g.jsx(Mq,{})]})})},kLe=lt([rn,Lr,hr],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),ELe=()=>{const e=Te(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=le(kLe),{t:o}=De();Je(["b"],()=>{a()},{enabled:()=>!i,preventDefault:!0},[]),Je(["e"],()=>{s()},{enabled:()=>!i,preventDefault:!0},[t]),Je(["c"],()=>{l()},{enabled:()=>!i,preventDefault:!0},[t]),Je(["shift+f"],()=>{u()},{enabled:()=>!i,preventDefault:!0}),Je(["delete","backspace"],()=>{d()},{enabled:()=>!i,preventDefault:!0}),Je(["BracketLeft"],()=>{e(Lm(Math.max(r-5,5)))},{enabled:()=>!i,preventDefault:!0},[r]),Je(["BracketRight"],()=>{e(Lm(Math.min(r+5,500)))},{enabled:()=>!i,preventDefault:!0},[r]),Je(["shift+BracketLeft"],()=>{e(Mm({...n,a:Pe.clamp(n.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]),Je(["shift+BracketRight"],()=>{e(Mm({...n,a:Pe.clamp(n.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]);const a=()=>e(Jl("brush")),s=()=>e(Jl("eraser")),l=()=>e(Jl("colorPicker")),u=()=>e(NW()),d=()=>e(jW());return g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Ye,{"aria-label":`${o("unifiedCanvas.brush")} (B)`,tooltip:`${o("unifiedCanvas.brush")} (B)`,icon:g.jsx(aG,{}),"data-selected":t==="brush"&&!i,onClick:a,isDisabled:i}),g.jsx(Ye,{"aria-label":`${o("unifiedCanvas.eraser")} (E)`,tooltip:`${o("unifiedCanvas.eraser")} (E)`,icon:g.jsx(nG,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:s}),g.jsx(Ye,{"aria-label":`${o("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${o("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:g.jsx(iG,{}),isDisabled:i,onClick:u}),g.jsx(Ye,{"aria-label":`${o("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${o("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:g.jsx(y2,{style:{transform:"rotate(45deg)"}}),isDisabled:i,onClick:d}),g.jsx(Ye,{"aria-label":`${o("unifiedCanvas.colorPicker")} (C)`,tooltip:`${o("unifiedCanvas.colorPicker")} (C)`,icon:g.jsx(rG,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:l}),g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Ye,{"aria-label":o("unifiedCanvas.brushOptions"),tooltip:o("unifiedCanvas.brushOptions"),icon:g.jsx(FE,{})}),children:g.jsxs(ke,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[g.jsx(ke,{gap:"1rem",justifyContent:"space-between",children:g.jsx(Dn,{label:o("unifiedCanvas.brushSize"),value:r,withInput:!0,onChange:h=>e(Lm(h)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),g.jsx(B3,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:h=>e(Mm(h))})]})})]})},PLe=lt([hr,rn,Lr],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),TLe=()=>{const e=Te(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=le(PLe),s=Qs(),{t:l}=De(),{openUploader:u}=OE();Je(["v"],()=>{d()},{enabled:()=>!n,preventDefault:!0},[]),Je(["r"],()=>{m()},{enabled:()=>!0,preventDefault:!0},[s]),Je(["shift+m"],()=>{b()},{enabled:()=>!n,preventDefault:!0},[s,t]),Je(["shift+s"],()=>{w()},{enabled:()=>!n,preventDefault:!0},[s,t]),Je(["meta+c","ctrl+c"],()=>{E()},{enabled:()=>!n,preventDefault:!0},[s,t]),Je(["shift+d"],()=>{_()},{enabled:()=>!n,preventDefault:!0},[s,t]);const d=()=>e(Jl("move")),h=Tq(()=>m(!1),()=>m(!0)),m=(T=!1)=>{const L=Qs();if(!L)return;const O=L.getClientRect({skipTransform:!0});e(BW({contentRect:O,shouldScaleTo1:T}))},y=()=>{e(gE()),e(r4())},b=()=>{e(Td({cropVisible:!1,shouldSetAsInitialImage:!0}))},w=()=>{e(Td({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},E=()=>{e(Td({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},_=()=>{e(Td({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))},k=T=>{const L=T.target.value;e(w3(L)),L==="mask"&&!r&&e(h2(!0))};return g.jsxs("div",{className:"inpainting-settings",children:[g.jsx(Jo,{tooltip:`${l("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:IW,onChange:k,isDisabled:n}),g.jsx(wLe,{}),g.jsx(ELe,{}),g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Ye,{"aria-label":`${l("unifiedCanvas.move")} (V)`,tooltip:`${l("unifiedCanvas.move")} (V)`,icon:g.jsx(JV,{}),"data-selected":o==="move"||n,onClick:d}),g.jsx(Ye,{"aria-label":`${l("unifiedCanvas.resetView")} (R)`,tooltip:`${l("unifiedCanvas.resetView")} (R)`,icon:g.jsx(tG,{}),onClick:h})]}),g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Ye,{"aria-label":`${l("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${l("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:g.jsx(oG,{}),onClick:b,isDisabled:n}),g.jsx(Ye,{"aria-label":`${l("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${l("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:g.jsx($E,{}),onClick:w,isDisabled:n}),g.jsx(Ye,{"aria-label":`${l("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${l("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:g.jsx(e0,{}),onClick:E,isDisabled:n}),g.jsx(Ye,{"aria-label":`${l("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${l("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:g.jsx(NE,{}),onClick:_,isDisabled:n})]}),g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Pq,{}),g.jsx(Eq,{})]}),g.jsxs(Gi,{isAttached:!0,children:[g.jsx(Ye,{"aria-label":`${l("common.upload")}`,tooltip:`${l("common.upload")}`,icon:g.jsx(h4,{}),onClick:u,isDisabled:n}),g.jsx(Ye,{"aria-label":`${l("unifiedCanvas.clearCanvas")}`,tooltip:`${l("unifiedCanvas.clearCanvas")}`,icon:g.jsx(hp,{}),onClick:y,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})]}),g.jsx(Gi,{isAttached:!0,children:g.jsx(_Le,{})})]})},MLe=lt([rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),LLe=()=>{const e=Te(),{doesCanvasNeedScaling:t}=le(MLe);return S.useLayoutEffect(()=>{e(Li(!0));const n=Pe.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),g.jsx("div",{className:"workarea-single-view",children:g.jsx("div",{className:"workarea-split-view-left",children:g.jsxs("div",{className:"inpainting-main-area",children:[g.jsx(TLe,{}),g.jsx("div",{className:"inpainting-canvas-area",children:t?g.jsx(kq,{}):g.jsx(_q,{})})]})})})},ALe=lt(rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),OLe=()=>{const e=Te(),{boundingBoxDimensions:t}=le(ALe),{t:n}=De(),r=s=>{e(g1({...t,width:Math.floor(s)}))},i=s=>{e(g1({...t,height:Math.floor(s)}))},o=()=>{e(g1({...t,width:Math.floor(512)}))},a=()=>{e(g1({...t,height:Math.floor(512)}))};return g.jsxs(ke,{direction:"column",gap:2,children:[g.jsx(Dn,{label:n("parameters.width"),min:64,max:1024,step:64,value:t.width,onChange:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:o,sliderMarkRightOffset:-7}),g.jsx(Dn,{label:n("parameters.height"),min:64,max:1024,step:64,value:t.height,onChange:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:a,sliderMarkRightOffset:-7})]})},RLe=lt([eP,hr,rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxScaleMethod:a,scaledBoundingBoxDimensions:s}=n;return{boundingBoxScale:a,scaledBoundingBoxDimensions:s,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:a==="manual"}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),ILe=()=>{const e=Te(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:i,isManual:o,scaledBoundingBoxDimensions:a}=le(RLe),{t:s}=De(),l=y=>{e(Jb({...a,width:Math.floor(y)}))},u=y=>{e(Jb({...a,height:Math.floor(y)}))},d=()=>{e(Jb({...a,width:Math.floor(512)}))},h=()=>{e(Jb({...a,height:Math.floor(512)}))},m=y=>{e(d3e(y.target.value))};return g.jsxs(ke,{direction:"column",gap:4,children:[g.jsx(Jo,{label:s("parameters.scaleBeforeProcessing"),validValues:KSe,value:i,onChange:m}),g.jsx(Dn,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("parameters.scaledWidth"),min:64,max:1024,step:64,value:a.width,onChange:l,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:d,sliderMarkRightOffset:-7}),g.jsx(Dn,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("parameters.scaledHeight"),min:64,max:1024,step:64,value:a.height,onChange:u,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:h,sliderMarkRightOffset:-7}),g.jsx(Jo,{label:s("parameters.infillMethod"),value:n,validValues:r,onChange:y=>e(sU(y.target.value))}),g.jsx(Dn,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:s("parameters.tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:y=>{e(rR(y))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(rR(32))}})]})};function DLe(){const e=Te(),t=le(r=>r.generation.seamBlur),{t:n}=De();return g.jsx(Dn,{sliderMarkRightOffset:-4,label:n("parameters.seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r=>{e(JO(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(JO(16))}})}function jLe(){const e=Te(),{t}=De(),n=le(r=>r.generation.seamSize);return g.jsx(Dn,{sliderMarkRightOffset:-6,label:t("parameters.seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:n,onChange:r=>{e(eR(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>e(eR(96))})}function NLe(){const{t:e}=De(),t=le(r=>r.generation.seamSteps),n=Te();return g.jsx(Dn,{sliderMarkRightOffset:-4,label:e("parameters.seamSteps"),min:1,max:100,sliderNumberInputProps:{max:999},value:t,onChange:r=>{n(tR(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{n(tR(30))}})}function $Le(){const e=Te(),{t}=De(),n=le(r=>r.generation.seamStrength);return g.jsx(Dn,{sliderMarkRightOffset:-7,label:t("parameters.seamStrength"),min:.01,max:.99,step:.01,value:n,onChange:r=>{e(nR(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(nR(.7))}})}const FLe=()=>g.jsxs(ke,{direction:"column",gap:2,children:[g.jsx(jLe,{}),g.jsx(DLe,{}),g.jsx($Le,{}),g.jsx(NLe,{})]});function BLe(){const{t:e}=De(),t={seed:{header:`${e("parameters.seed")}`,feature:oo.SEED,content:g.jsx(aP,{})},boundingBox:{header:`${e("parameters.boundingBoxHeader")}`,feature:oo.BOUNDING_BOX,content:g.jsx(OLe,{})},seamCorrection:{header:`${e("parameters.seamCorrectionHeader")}`,feature:oo.SEAM_CORRECTION,content:g.jsx(FLe,{})},infillAndScaling:{header:`${e("parameters.infillScalingHeader")}`,feature:oo.INFILL_AND_SCALING,content:g.jsx(ILe,{})},variations:{header:`${e("parameters.variations")}`,feature:oo.VARIATIONS,content:g.jsx(lP,{}),additionalHeaderComponents:g.jsx(sP,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:g.jsx(iP,{}),additionalHeaderComponents:g.jsx(oP,{})}},n={unifiedCanvasImg2Img:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:g.jsx(gq,{label:e("parameters.img2imgStrength"),styleClass:"main-settings-block image-to-image-strength-main-option"})}};return g.jsxs(hP,{children:[g.jsxs(ke,{flexDir:"column",rowGap:"0.5rem",children:[g.jsx(fP,{}),g.jsx(dP,{})]}),g.jsx(cP,{}),g.jsx(uP,{}),g.jsx(n0,{accordionInfo:n}),g.jsx(n0,{accordionInfo:t})]})}function zLe(){const e=le(t=>t.ui.shouldUseCanvasBetaLayout);return g.jsx(rP,{optionsPanel:g.jsx(BLe,{}),styleClass:"inpainting-workarea-overrides",children:e?g.jsx(xLe,{}):g.jsx(LLe,{})})}const Qa={txt2img:{title:g.jsx(R_e,{fill:"black",boxSize:"2.5rem"}),workarea:g.jsx(OPe,{}),tooltip:"Text To Image"},img2img:{title:g.jsx(L_e,{fill:"black",boxSize:"2.5rem"}),workarea:g.jsx(_Pe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:g.jsx(D_e,{fill:"black",boxSize:"2.5rem"}),workarea:g.jsx(zLe,{}),tooltip:"Unified Canvas"},nodes:{title:g.jsx(A_e,{fill:"black",boxSize:"2.5rem"}),workarea:g.jsx(E_e,{}),tooltip:"Nodes"},postprocess:{title:g.jsx(O_e,{fill:"black",boxSize:"2.5rem"}),workarea:g.jsx(P_e,{}),tooltip:"Post Processing"},training:{title:g.jsx(I_e,{fill:"black",boxSize:"2.5rem"}),workarea:g.jsx(T_e,{}),tooltip:"Training"}};function HLe(){Qa.txt2img.tooltip=Et.t("common.text2img"),Qa.img2img.tooltip=Et.t("common.img2img"),Qa.unifiedCanvas.tooltip=Et.t("common.unifiedCanvas"),Qa.nodes.tooltip=Et.t("common.nodes"),Qa.postprocess.tooltip=Et.t("common.postProcessing"),Qa.training.tooltip=Et.t("common.training")}function WLe(){const e=le(k_e),t=le(u=>u.lightbox.isLightboxOpen),{shouldShowGallery:n,shouldShowParametersPanel:r,shouldPinGallery:i,shouldPinParametersPanel:o}=le(nP);M_e(HLe);const a=Te();Je("1",()=>{a(Wo(0))}),Je("2",()=>{a(Wo(1))}),Je("3",()=>{a(Wo(2))}),Je("4",()=>{a(Wo(3))}),Je("5",()=>{a(Wo(4))}),Je("6",()=>{a(Wo(5))}),Je("z",()=>{a(Om(!t))},[t]),Je("f",()=>{n||r?(a(Fh(!1)),a(Am(!1))):(a(Fh(!0)),a(Am(!0))),(i||o)&&setTimeout(()=>a(Li(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(Qa).forEach(d=>{u.push(g.jsx(si,{hasArrow:!0,label:Qa[d].tooltip,placement:"right",children:g.jsx(sW,{children:Qa[d].title})},d))}),u},l=()=>{const u=[];return Object.keys(Qa).forEach(d=>{u.push(g.jsx(oW,{className:"app-tabs-panel",children:Qa[d].workarea},d))}),u};return g.jsxs(iW,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(Wo(u))},children:[g.jsx("div",{className:"app-tabs-list",children:s()}),g.jsx(aW,{className:"app-tabs-panels",children:t?g.jsx(UEe,{}):l()})]})}var ULe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function C2(e,t){var n=VLe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function VLe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=ULe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var GLe=[".DS_Store","Thumbs.db"];function qLe(e){return f0(this,void 0,void 0,function(){return h0(this,function(t){return z3(e)&&KLe(e.dataTransfer)?[2,QLe(e.dataTransfer,e.type)]:YLe(e)?[2,XLe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ZLe(e)]:[2,[]]})})}function KLe(e){return z3(e)}function YLe(e){return z3(e)&&z3(e.target)}function z3(e){return typeof e=="object"&&e!==null}function XLe(e){return u7(e.target.files).map(function(t){return C2(t)})}function ZLe(e){return f0(this,void 0,void 0,function(){var t;return h0(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 C2(r)})]}})})}function QLe(e,t){return f0(this,void 0,void 0,function(){var n,r;return h0(this,function(i){switch(i.label){case 0:return e.items?(n=u7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(JLe))]):[3,2];case 1:return r=i.sent(),[2,LD(Dq(r))];case 2:return[2,LD(u7(e.files).map(function(o){return C2(o)}))]}})})}function LD(e){return e.filter(function(t){return GLe.indexOf(t.name)===-1})}function u7(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,DD(n)];if(e.sizen)return[!1,DD(n)]}return[!0,null]}function Sh(e){return e!=null}function gAe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=Fq(l,n),d=zy(u,1),h=d[0],m=Bq(l,r,i),y=zy(m,1),b=y[0],w=s?s(l):null;return h&&b&&!w})}function H3(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function kx(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 ND(e){e.preventDefault()}function mAe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function vAe(e){return e.indexOf("Edge/")!==-1}function yAe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return mAe(e)||vAe(e)}function Ml(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.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 DAe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var bP=S.forwardRef(function(e,t){var n=e.children,r=W3(e,_Ae),i=Vq(r),o=i.open,a=W3(i,kAe);return S.useImperativeHandle(t,function(){return{open:o}},[o]),Ke.createElement(S.Fragment,null,n(_r(_r({},a),{},{open:o})))});bP.displayName="Dropzone";var Uq={disabled:!1,getFilesFromEvent:qLe,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};bP.defaultProps=Uq;bP.propTypes={children:An.func,accept:An.objectOf(An.arrayOf(An.string)),multiple:An.bool,preventDropOnDocument:An.bool,noClick:An.bool,noKeyboard:An.bool,noDrag:An.bool,noDragEventsBubbling:An.bool,minSize:An.number,maxSize:An.number,maxFiles:An.number,disabled:An.bool,getFilesFromEvent:An.func,onFileDialogCancel:An.func,onFileDialogOpen:An.func,useFsAccessApi:An.bool,autoFocus:An.bool,onDragEnter:An.func,onDragLeave:An.func,onDragOver:An.func,onDrop:An.func,onDropAccepted:An.func,onDropRejected:An.func,onError:An.func,validator:An.func};var h7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Vq(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_r(_r({},Uq),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,h=t.onDragOver,m=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,_=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,L=t.noClick,O=t.noKeyboard,D=t.noDrag,I=t.noDragEventsBubbling,N=t.onError,W=t.validator,B=S.useMemo(function(){return SAe(n)},[n]),K=S.useMemo(function(){return xAe(n)},[n]),ne=S.useMemo(function(){return typeof E=="function"?E:FD},[E]),z=S.useMemo(function(){return typeof w=="function"?w:FD},[w]),$=S.useRef(null),V=S.useRef(null),X=S.useReducer(jAe,h7),Q=s6(X,2),G=Q[0],Y=Q[1],ee=G.isFocused,fe=G.isFileDialogActive,Ce=S.useRef(typeof window<"u"&&window.isSecureContext&&_&&bAe()),we=function(){!Ce.current&&fe&&setTimeout(function(){if(V.current){var je=V.current.files;je.length||(Y({type:"closeDialog"}),z())}},300)};S.useEffect(function(){return window.addEventListener("focus",we,!1),function(){window.removeEventListener("focus",we,!1)}},[V,fe,z,Ce]);var xe=S.useRef([]),Le=function(je){$.current&&$.current.contains(je.target)||(je.preventDefault(),xe.current=[])};S.useEffect(function(){return T&&(document.addEventListener("dragover",ND,!1),document.addEventListener("drop",Le,!1)),function(){T&&(document.removeEventListener("dragover",ND),document.removeEventListener("drop",Le))}},[$,T]),S.useEffect(function(){return!r&&k&&$.current&&$.current.focus(),function(){}},[$,k,r]);var Se=S.useCallback(function(ye){N?N(ye):console.error(ye)},[N]),Qe=S.useCallback(function(ye){ye.preventDefault(),ye.persist(),se(ye),xe.current=[].concat(TAe(xe.current),[ye.target]),kx(ye)&&Promise.resolve(i(ye)).then(function(je){if(!(H3(ye)&&!I)){var vt=je.length,Mt=vt>0&&gAe({files:je,accept:B,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:W}),Me=vt>0&&!Mt;Y({isDragAccept:Mt,isDragReject:Me,isDragActive:!0,type:"setDraggedFiles"}),u&&u(ye)}}).catch(function(je){return Se(je)})},[i,u,Se,I,B,a,o,s,l,W]),Xe=S.useCallback(function(ye){ye.preventDefault(),ye.persist(),se(ye);var je=kx(ye);if(je&&ye.dataTransfer)try{ye.dataTransfer.dropEffect="copy"}catch{}return je&&h&&h(ye),!1},[h,I]),tt=S.useCallback(function(ye){ye.preventDefault(),ye.persist(),se(ye);var je=xe.current.filter(function(Mt){return $.current&&$.current.contains(Mt)}),vt=je.indexOf(ye.target);vt!==-1&&je.splice(vt,1),xe.current=je,!(je.length>0)&&(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),kx(ye)&&d&&d(ye))},[$,d,I]),yt=S.useCallback(function(ye,je){var vt=[],Mt=[];ye.forEach(function(Me){var Ct=Fq(Me,B),zt=s6(Ct,2),$n=zt[0],qe=zt[1],pt=Bq(Me,a,o),zr=s6(pt,2),rr=zr[0],Bn=zr[1],li=W?W(Me):null;if($n&&rr&&!li)vt.push(Me);else{var vs=[qe,Bn];li&&(vs=vs.concat(li)),Mt.push({file:Me,errors:vs.filter(function(tl){return tl})})}}),(!s&&vt.length>1||s&&l>=1&&vt.length>l)&&(vt.forEach(function(Me){Mt.push({file:Me,errors:[pAe]})}),vt.splice(0)),Y({acceptedFiles:vt,fileRejections:Mt,type:"setFiles"}),m&&m(vt,Mt,je),Mt.length>0&&b&&b(Mt,je),vt.length>0&&y&&y(vt,je)},[Y,s,B,a,o,l,m,y,b,W]),Be=S.useCallback(function(ye){ye.preventDefault(),ye.persist(),se(ye),xe.current=[],kx(ye)&&Promise.resolve(i(ye)).then(function(je){H3(ye)&&!I||yt(je,ye)}).catch(function(je){return Se(je)}),Y({type:"reset"})},[i,yt,Se,I]),Ae=S.useCallback(function(){if(Ce.current){Y({type:"openDialog"}),ne();var ye={multiple:s,types:K};window.showOpenFilePicker(ye).then(function(je){return i(je)}).then(function(je){yt(je,null),Y({type:"closeDialog"})}).catch(function(je){wAe(je)?(z(je),Y({type:"closeDialog"})):CAe(je)?(Ce.current=!1,V.current?(V.current.value=null,V.current.click()):Se(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."))):Se(je)});return}V.current&&(Y({type:"openDialog"}),ne(),V.current.value=null,V.current.click())},[Y,ne,z,_,yt,Se,K,s]),bt=S.useCallback(function(ye){!$.current||!$.current.isEqualNode(ye.target)||(ye.key===" "||ye.key==="Enter"||ye.keyCode===32||ye.keyCode===13)&&(ye.preventDefault(),Ae())},[$,Ae]),Fe=S.useCallback(function(){Y({type:"focus"})},[]),at=S.useCallback(function(){Y({type:"blur"})},[]),jt=S.useCallback(function(){L||(yAe()?setTimeout(Ae,0):Ae())},[L,Ae]),mt=function(je){return r?null:je},Zt=function(je){return O?null:mt(je)},on=function(je){return D?null:mt(je)},se=function(je){I&&je.stopPropagation()},Ie=S.useMemo(function(){return function(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},je=ye.refKey,vt=je===void 0?"ref":je,Mt=ye.role,Me=ye.onKeyDown,Ct=ye.onFocus,zt=ye.onBlur,$n=ye.onClick,qe=ye.onDragEnter,pt=ye.onDragOver,zr=ye.onDragLeave,rr=ye.onDrop,Bn=W3(ye,EAe);return _r(_r(f7({onKeyDown:Zt(Ml(Me,bt)),onFocus:Zt(Ml(Ct,Fe)),onBlur:Zt(Ml(zt,at)),onClick:mt(Ml($n,jt)),onDragEnter:on(Ml(qe,Qe)),onDragOver:on(Ml(pt,Xe)),onDragLeave:on(Ml(zr,tt)),onDrop:on(Ml(rr,Be)),role:typeof Mt=="string"&&Mt!==""?Mt:"presentation"},vt,$),!r&&!O?{tabIndex:0}:{}),Bn)}},[$,bt,Fe,at,jt,Qe,Xe,tt,Be,O,D,r]),He=S.useCallback(function(ye){ye.stopPropagation()},[]),Ue=S.useMemo(function(){return function(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},je=ye.refKey,vt=je===void 0?"ref":je,Mt=ye.onChange,Me=ye.onClick,Ct=W3(ye,PAe),zt=f7({accept:B,multiple:s,type:"file",style:{display:"none"},onChange:mt(Ml(Mt,Be)),onClick:mt(Ml(Me,He)),tabIndex:-1},vt,V);return _r(_r({},zt),Ct)}},[V,n,s,Be,r]);return _r(_r({},G),{},{isFocused:ee&&!r,getRootProps:Ie,getInputProps:Ue,rootRef:$,inputRef:V,open:mt(Ae)})}function jAe(e,t){switch(t.type){case"focus":return _r(_r({},e),{},{isFocused:!0});case"blur":return _r(_r({},e),{},{isFocused:!1});case"openDialog":return _r(_r({},h7),{},{isFileDialogActive:!0});case"closeDialog":return _r(_r({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _r(_r({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _r(_r({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return _r({},h7);default:return e}}function FD(){}const NAe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return Je("esc",()=>{i(!1)}),g.jsxs("div",{className:"dropzone-container",children:[t&&g.jsx("div",{className:"dropzone-overlay is-drag-accept",children:g.jsxs(jh,{size:"lg",children:["Upload Image",r]})}),n&&g.jsxs("div",{className:"dropzone-overlay is-drag-reject",children:[g.jsx(jh,{size:"lg",children:"Invalid Upload"}),g.jsx(jh,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},$Ae=e=>{const{children:t}=e,n=Te(),r=le(Br),i=a2({}),{t:o}=De(),[a,s]=S.useState(!1),{setOpenUploader:l}=OE(),u=S.useCallback(T=>{s(!0);const L=T.errors.reduce((O,D)=>`${O} -${D.message}`,"");i({title:o("toast.uploadFailed"),description:L,status:"error",isClosable:!0})},[o,i]),d=S.useCallback(async T=>{n(TI({imageFile:T}))},[n]),h=S.useCallback((T,L)=>{L.forEach(O=>{u(O)}),T.forEach(O=>{d(O)})},[d,u]),{getRootProps:m,getInputProps:y,isDragAccept:b,isDragReject:w,isDragActive:E,open:_}=Vq({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>s(!0),maxFiles:1});l(_),S.useEffect(()=>{const T=L=>{var N;const O=(N=L.clipboardData)==null?void 0:N.items;if(!O)return;const D=[];for(const W of O)W.kind==="file"&&["image/png","image/jpg"].includes(W.type)&&D.push(W);if(!D.length)return;if(L.stopImmediatePropagation(),D.length>1){i({description:o("toast.uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});return}const I=D[0].getAsFile();if(!I){i({description:o("toast.uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0});return}n(TI({imageFile:I}))};return document.addEventListener("paste",T),()=>{document.removeEventListener("paste",T)}},[o,n,i,r]);const k=["img2img","unifiedCanvas"].includes(r)?` to ${Qa[r].tooltip}`:"";return g.jsx(AE.Provider,{value:_,children:g.jsxs("div",{...m({style:{}}),onKeyDown:T=>{T.key},children:[g.jsx("input",{...y()}),t,E&&a&&g.jsx(NAe,{isDragAccept:b,isDragReject:w,overlaySecondaryText:k,setIsHandlingUpload:s})]})})},FAe=lt(hr,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),BAe=lt(hr,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),zAe=()=>{const e=Te(),t=le(FAe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=le(BAe),[o,a]=S.useState(!0),s=S.useRef(null);S.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(DU()),e(FC(!n))};Je("`",()=>{e(FC(!n))},[n]),Je("esc",()=>{e(FC(!1))});const u=()=>{s.current&&o&&s.current.scrollTop{const{timestamp:m,message:y,level:b}=d;return g.jsxs("div",{className:`console-entry console-${b}-color`,children:[g.jsxs("p",{className:"console-timestamp",children:[m,":"]}),g.jsx("p",{className:"console-message",children:y})]},h)})})}),n&&g.jsx(si,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:g.jsx(ls,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:g.jsx(hke,{}),onClick:()=>a(!o)})}),g.jsx(si,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:g.jsx(ls,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?g.jsx(Tke,{}):g.jsx(eG,{}),onClick:l})})]})},HAe=lt(hr,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),WAe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=le(HAe),i=t?Math.round(t*100/n):0;return g.jsx(UH,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function UAe(e){const{title:t,hotkey:n,description:r}=e;return g.jsxs("div",{className:"hotkey-modal-item",children:[g.jsxs("div",{className:"hotkey-info",children:[g.jsx("p",{className:"hotkey-title",children:t}),r&&g.jsx("p",{className:"hotkey-description",children:r})]}),g.jsx("div",{className:"hotkey-key",children:n})]})}function VAe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Kd(),{t:i}=De(),o=[{title:i("hotkeys.invoke.title"),desc:i("hotkeys.invoke.desc"),hotkey:"Ctrl+Enter"},{title:i("hotkeys.cancel.title"),desc:i("hotkeys.cancel.desc"),hotkey:"Shift+X"},{title:i("hotkeys.focusPrompt.title"),desc:i("hotkeys.focusPrompt.desc"),hotkey:"Alt+A"},{title:i("hotkeys.toggleOptions.title"),desc:i("hotkeys.toggleOptions.desc"),hotkey:"O"},{title:i("hotkeys.pinOptions.title"),desc:i("hotkeys.pinOptions.desc"),hotkey:"Shift+O"},{title:i("hotkeys.toggleViewer.title"),desc:i("hotkeys.toggleViewer.desc"),hotkey:"Z"},{title:i("hotkeys.toggleGallery.title"),desc:i("hotkeys.toggleGallery.desc"),hotkey:"G"},{title:i("hotkeys.maximizeWorkSpace.title"),desc:i("hotkeys.maximizeWorkSpace.desc"),hotkey:"F"},{title:i("hotkeys.changeTabs.title"),desc:i("hotkeys.changeTabs.desc"),hotkey:"1-5"},{title:i("hotkeys.consoleToggle.title"),desc:i("hotkeys.consoleToggle.desc"),hotkey:"`"}],a=[{title:i("hotkeys.setPrompt.title"),desc:i("hotkeys.setPrompt.desc"),hotkey:"P"},{title:i("hotkeys.setSeed.title"),desc:i("hotkeys.setSeed.desc"),hotkey:"S"},{title:i("hotkeys.setParameters.title"),desc:i("hotkeys.setParameters.desc"),hotkey:"A"},{title:i("hotkeys.restoreFaces.title"),desc:i("hotkeys.restoreFaces.desc"),hotkey:"Shift+R"},{title:i("hotkeys.upscale.title"),desc:i("hotkeys.upscale.desc"),hotkey:"Shift+U"},{title:i("hotkeys.showInfo.title"),desc:i("hotkeys.showInfo.desc"),hotkey:"I"},{title:i("hotkeys.sendToImageToImage.title"),desc:i("hotkeys.sendToImageToImage.desc"),hotkey:"Shift+I"},{title:i("hotkeys.deleteImage.title"),desc:i("hotkeys.deleteImage.desc"),hotkey:"Del"},{title:i("hotkeys.closePanels.title"),desc:i("hotkeys.closePanels.desc"),hotkey:"Esc"}],s=[{title:i("hotkeys.previousImage.title"),desc:i("hotkeys.previousImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys.nextImage.title"),desc:i("hotkeys.nextImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys.toggleGalleryPin.title"),desc:i("hotkeys.toggleGalleryPin.desc"),hotkey:"Shift+G"},{title:i("hotkeys.increaseGalleryThumbSize.title"),desc:i("hotkeys.increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:i("hotkeys.decreaseGalleryThumbSize.title"),desc:i("hotkeys.decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],l=[{title:i("hotkeys.selectBrush.title"),desc:i("hotkeys.selectBrush.desc"),hotkey:"B"},{title:i("hotkeys.selectEraser.title"),desc:i("hotkeys.selectEraser.desc"),hotkey:"E"},{title:i("hotkeys.decreaseBrushSize.title"),desc:i("hotkeys.decreaseBrushSize.desc"),hotkey:"["},{title:i("hotkeys.increaseBrushSize.title"),desc:i("hotkeys.increaseBrushSize.desc"),hotkey:"]"},{title:i("hotkeys.decreaseBrushOpacity.title"),desc:i("hotkeys.decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:i("hotkeys.increaseBrushOpacity.title"),desc:i("hotkeys.increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:i("hotkeys.moveTool.title"),desc:i("hotkeys.moveTool.desc"),hotkey:"V"},{title:i("hotkeys.fillBoundingBox.title"),desc:i("hotkeys.fillBoundingBox.desc"),hotkey:"Shift + F"},{title:i("hotkeys.eraseBoundingBox.title"),desc:i("hotkeys.eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:i("hotkeys.colorPicker.title"),desc:i("hotkeys.colorPicker.desc"),hotkey:"C"},{title:i("hotkeys.toggleSnap.title"),desc:i("hotkeys.toggleSnap.desc"),hotkey:"N"},{title:i("hotkeys.quickToggleMove.title"),desc:i("hotkeys.quickToggleMove.desc"),hotkey:"Hold Space"},{title:i("hotkeys.toggleLayer.title"),desc:i("hotkeys.toggleLayer.desc"),hotkey:"Q"},{title:i("hotkeys.clearMask.title"),desc:i("hotkeys.clearMask.desc"),hotkey:"Shift+C"},{title:i("hotkeys.hideMask.title"),desc:i("hotkeys.hideMask.desc"),hotkey:"H"},{title:i("hotkeys.showHideBoundingBox.title"),desc:i("hotkeys.showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:i("hotkeys.mergeVisible.title"),desc:i("hotkeys.mergeVisible.desc"),hotkey:"Shift+M"},{title:i("hotkeys.saveToGallery.title"),desc:i("hotkeys.saveToGallery.desc"),hotkey:"Shift+S"},{title:i("hotkeys.copyToClipboard.title"),desc:i("hotkeys.copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:i("hotkeys.downloadImage.title"),desc:i("hotkeys.downloadImage.desc"),hotkey:"Shift+D"},{title:i("hotkeys.undoStroke.title"),desc:i("hotkeys.undoStroke.desc"),hotkey:"Ctrl+Z"},{title:i("hotkeys.redoStroke.title"),desc:i("hotkeys.redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:i("hotkeys.resetView.title"),desc:i("hotkeys.resetView.desc"),hotkey:"R"},{title:i("hotkeys.previousStagingImage.title"),desc:i("hotkeys.previousStagingImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys.nextStagingImage.title"),desc:i("hotkeys.nextStagingImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys.acceptStagingImage.title"),desc:i("hotkeys.acceptStagingImage.desc"),hotkey:"Enter"}],u=d=>{const h=[];return d.forEach((m,y)=>{h.push(g.jsx(UAe,{title:m.title,description:m.desc,hotkey:m.hotkey},y))}),g.jsx("div",{className:"hotkey-modal-category",children:h})};return g.jsxs(g.Fragment,{children:[S.cloneElement(e,{onClick:n}),g.jsxs(Yd,{isOpen:t,onClose:r,children:[g.jsx(oc,{}),g.jsxs(Xd,{className:" modal hotkeys-modal",children:[g.jsx(m0,{className:"modal-close-btn"}),g.jsx("h1",{children:"Keyboard Shorcuts"}),g.jsx("div",{className:"hotkeys-modal-items",children:g.jsxs(c8,{allowMultiple:!0,children:[g.jsxs(rm,{children:[g.jsxs(tm,{className:"hotkeys-modal-button",children:[g.jsx("h2",{children:i("hotkeys.appHotkeys")}),g.jsx(nm,{})]}),g.jsx(om,{children:u(o)})]}),g.jsxs(rm,{children:[g.jsxs(tm,{className:"hotkeys-modal-button",children:[g.jsx("h2",{children:i("hotkeys.generalHotkeys")}),g.jsx(nm,{})]}),g.jsx(om,{children:u(a)})]}),g.jsxs(rm,{children:[g.jsxs(tm,{className:"hotkeys-modal-button",children:[g.jsx("h2",{children:i("hotkeys.galleryHotkeys")}),g.jsx(nm,{})]}),g.jsx(om,{children:u(s)})]}),g.jsxs(rm,{children:[g.jsxs(tm,{className:"hotkeys-modal-button",children:[g.jsx("h2",{children:i("hotkeys.unifiedCanvasHotkeys")}),g.jsx(nm,{})]}),g.jsx(om,{children:u(l)})]})]})})]})]})]})}var BD=Array.isArray,zD=Object.keys,GAe=Object.prototype.hasOwnProperty,qAe=typeof Element<"u";function p7(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=BD(e),r=BD(t),i,o,a;if(n&&r){if(o=e.length,o!=t.length)return!1;for(i=o;i--!==0;)if(!p7(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var h=zD(e);if(o=h.length,o!==zD(t).length)return!1;for(i=o;i--!==0;)if(!GAe.call(t,h[i]))return!1;if(qAe&&e instanceof Element&&t instanceof Element)return e===t;for(i=o;i--!==0;)if(a=h[i],!(a==="_owner"&&e.$$typeof)&&!p7(e[a],t[a]))return!1;return!0}return e!==e&&t!==t}var md=function(t,n){try{return p7(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}},KAe=function(t){return YAe(t)&&!XAe(t)};function YAe(e){return!!e&&typeof e=="object"}function XAe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||JAe(e)}var ZAe=typeof Symbol=="function"&&Symbol.for,QAe=ZAe?Symbol.for("react.element"):60103;function JAe(e){return e.$$typeof===QAe}function eOe(e){return Array.isArray(e)?[]:{}}function U3(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Hy(eOe(e),e,t):e}function tOe(e,t,n){return e.concat(t).map(function(r){return U3(r,n)})}function nOe(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=U3(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=U3(t[i],n):r[i]=Hy(e[i],t[i],n)}),r}function Hy(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||tOe,n.isMergeableObject=n.isMergeableObject||KAe;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):nOe(e,t,n):U3(t,n)}Hy.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Hy(r,i,n)},{})};var g7=Hy,rOe=typeof global=="object"&&global&&global.Object===Object&&global;const Gq=rOe;var iOe=typeof self=="object"&&self&&self.Object===Object&&self,oOe=Gq||iOe||Function("return this")();const du=oOe;var aOe=du.Symbol;const tf=aOe;var qq=Object.prototype,sOe=qq.hasOwnProperty,lOe=qq.toString,r1=tf?tf.toStringTag:void 0;function uOe(e){var t=sOe.call(e,r1),n=e[r1];try{e[r1]=void 0;var r=!0}catch{}var i=lOe.call(e);return r&&(t?e[r1]=n:delete e[r1]),i}var cOe=Object.prototype,dOe=cOe.toString;function fOe(e){return dOe.call(e)}var hOe="[object Null]",pOe="[object Undefined]",HD=tf?tf.toStringTag:void 0;function yp(e){return e==null?e===void 0?pOe:hOe:HD&&HD in Object(e)?uOe(e):fOe(e)}function Kq(e,t){return function(n){return e(t(n))}}var gOe=Kq(Object.getPrototypeOf,Object);const xP=gOe;function bp(e){return e!=null&&typeof e=="object"}var mOe="[object Object]",vOe=Function.prototype,yOe=Object.prototype,Yq=vOe.toString,bOe=yOe.hasOwnProperty,xOe=Yq.call(Object);function WD(e){if(!bp(e)||yp(e)!=mOe)return!1;var t=xP(e);if(t===null)return!0;var n=bOe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Yq.call(n)==xOe}function SOe(){this.__data__=[],this.size=0}function Xq(e,t){return e===t||e!==e&&t!==t}function E4(e,t){for(var n=e.length;n--;)if(Xq(e[n][0],t))return n;return-1}var wOe=Array.prototype,COe=wOe.splice;function _Oe(e){var t=this.__data__,n=E4(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():COe.call(t,n,1),--this.size,!0}function kOe(e){var t=this.__data__,n=E4(t,e);return n<0?void 0:t[n][1]}function EOe(e){return E4(this.__data__,e)>-1}function POe(e,t){var n=this.__data__,r=E4(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=IRe}var DRe="[object Arguments]",jRe="[object Array]",NRe="[object Boolean]",$Re="[object Date]",FRe="[object Error]",BRe="[object Function]",zRe="[object Map]",HRe="[object Number]",WRe="[object Object]",URe="[object RegExp]",VRe="[object Set]",GRe="[object String]",qRe="[object WeakMap]",KRe="[object ArrayBuffer]",YRe="[object DataView]",XRe="[object Float32Array]",ZRe="[object Float64Array]",QRe="[object Int8Array]",JRe="[object Int16Array]",eIe="[object Int32Array]",tIe="[object Uint8Array]",nIe="[object Uint8ClampedArray]",rIe="[object Uint16Array]",iIe="[object Uint32Array]",ar={};ar[XRe]=ar[ZRe]=ar[QRe]=ar[JRe]=ar[eIe]=ar[tIe]=ar[nIe]=ar[rIe]=ar[iIe]=!0;ar[DRe]=ar[jRe]=ar[KRe]=ar[NRe]=ar[YRe]=ar[$Re]=ar[FRe]=ar[BRe]=ar[zRe]=ar[HRe]=ar[WRe]=ar[URe]=ar[VRe]=ar[GRe]=ar[qRe]=!1;function oIe(e){return bp(e)&&rK(e.length)&&!!ar[yp(e)]}function SP(e){return function(t){return e(t)}}var iK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Z1=iK&&typeof module=="object"&&module&&!module.nodeType&&module,aIe=Z1&&Z1.exports===iK,u6=aIe&&Gq.process,sIe=function(){try{var e=Z1&&Z1.require&&Z1.require("util").types;return e||u6&&u6.binding&&u6.binding("util")}catch{}}();const i0=sIe;var YD=i0&&i0.isTypedArray,lIe=YD?SP(YD):oIe;const uIe=lIe;var cIe=Object.prototype,dIe=cIe.hasOwnProperty;function oK(e,t){var n=k2(e),r=!n&&kRe(e),i=!n&&!r&&nK(e),o=!n&&!r&&!i&&uIe(e),a=n||r||i||o,s=a?xRe(e.length,String):[],l=s.length;for(var u in e)(t||dIe.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||RRe(u,l)))&&s.push(u);return s}var fIe=Object.prototype;function wP(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||fIe;return e===n}var hIe=Kq(Object.keys,Object);const pIe=hIe;var gIe=Object.prototype,mIe=gIe.hasOwnProperty;function vIe(e){if(!wP(e))return pIe(e);var t=[];for(var n in Object(e))mIe.call(e,n)&&n!="constructor"&&t.push(n);return t}function aK(e){return e!=null&&rK(e.length)&&!Zq(e)}function CP(e){return aK(e)?oK(e):vIe(e)}function yIe(e,t){return e&&T4(t,CP(t),e)}function bIe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var xIe=Object.prototype,SIe=xIe.hasOwnProperty;function wIe(e){if(!_2(e))return bIe(e);var t=wP(e),n=[];for(var r in e)r=="constructor"&&(t||!SIe.call(e,r))||n.push(r);return n}function _P(e){return aK(e)?oK(e,!0):wIe(e)}function CIe(e,t){return e&&T4(t,_P(t),e)}var sK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,XD=sK&&typeof module=="object"&&module&&!module.nodeType&&module,_Ie=XD&&XD.exports===sK,ZD=_Ie?du.Buffer:void 0,QD=ZD?ZD.allocUnsafe:void 0;function kIe(e,t){if(t)return e.slice();var n=e.length,r=QD?QD(n):new e.constructor(n);return e.copy(r),r}function lK(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[i]=e[i]);return n}function pj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var gj=function(t){return Array.isArray(t)&&t.length===0},Ho=function(t){return typeof t=="function"},M4=function(t){return t!==null&&typeof t=="object"},Cje=function(t){return String(Math.floor(Number(t)))===t},c6=function(t){return Object.prototype.toString.call(t)==="[object String]"},bK=function(t){return S.Children.count(t)===0},d6=function(t){return M4(t)&&Ho(t.then)};function Ui(e,t,n,r){r===void 0&&(r=0);for(var i=yK(t);e&&r=0?[]:{}}}return(o===0?e:i)[a[o]]===n?e:(n===void 0?delete i[a[o]]:i[a[o]]=n,o===0&&n===void 0&&delete r[a[o]],r)}function xK(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,o=Object.keys(e);i0?Ie.map(function(Ue){return N(Ue,Ui(se,Ue))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(He).then(function(Ue){return Ue.reduce(function(ye,je,vt){return je==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||je&&(ye=tu(ye,Ie[vt],je)),ye},{})})},[N]),B=S.useCallback(function(se){return Promise.all([W(se),m.validationSchema?I(se):{},m.validate?D(se):{}]).then(function(Ie){var He=Ie[0],Ue=Ie[1],ye=Ie[2],je=g7.all([He,Ue,ye],{arrayMerge:Mje});return je})},[m.validate,m.validationSchema,W,D,I]),K=qa(function(se){return se===void 0&&(se=L.values),O({type:"SET_ISVALIDATING",payload:!0}),B(se).then(function(Ie){return _.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:Ie})),Ie})});S.useEffect(function(){a&&_.current===!0&&md(y.current,m.initialValues)&&K(y.current)},[a,K]);var ne=S.useCallback(function(se){var Ie=se&&se.values?se.values:y.current,He=se&&se.errors?se.errors:b.current?b.current:m.initialErrors||{},Ue=se&&se.touched?se.touched:w.current?w.current:m.initialTouched||{},ye=se&&se.status?se.status:E.current?E.current:m.initialStatus;y.current=Ie,b.current=He,w.current=Ue,E.current=ye;var je=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!se&&!!se.isSubmitting,errors:He,touched:Ue,status:ye,values:Ie,isValidating:!!se&&!!se.isValidating,submitCount:se&&se.submitCount&&typeof se.submitCount=="number"?se.submitCount:0}})};if(m.onReset){var vt=m.onReset(L.values,Be);d6(vt)?vt.then(je):je()}else je()},[m.initialErrors,m.initialStatus,m.initialTouched]);S.useEffect(function(){_.current===!0&&!md(y.current,m.initialValues)&&(u&&(y.current=m.initialValues,ne()),a&&K(y.current))},[u,m.initialValues,ne,a,K]),S.useEffect(function(){u&&_.current===!0&&!md(b.current,m.initialErrors)&&(b.current=m.initialErrors||lh,O({type:"SET_ERRORS",payload:m.initialErrors||lh}))},[u,m.initialErrors]),S.useEffect(function(){u&&_.current===!0&&!md(w.current,m.initialTouched)&&(w.current=m.initialTouched||Ex,O({type:"SET_TOUCHED",payload:m.initialTouched||Ex}))},[u,m.initialTouched]),S.useEffect(function(){u&&_.current===!0&&!md(E.current,m.initialStatus)&&(E.current=m.initialStatus,O({type:"SET_STATUS",payload:m.initialStatus}))},[u,m.initialStatus,m.initialTouched]);var z=qa(function(se){if(k.current[se]&&Ho(k.current[se].validate)){var Ie=Ui(L.values,se),He=k.current[se].validate(Ie);return d6(He)?(O({type:"SET_ISVALIDATING",payload:!0}),He.then(function(Ue){return Ue}).then(function(Ue){O({type:"SET_FIELD_ERROR",payload:{field:se,value:Ue}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:se,value:He}}),Promise.resolve(He))}else if(m.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),I(L.values,se).then(function(Ue){return Ue}).then(function(Ue){O({type:"SET_FIELD_ERROR",payload:{field:se,value:Ue[se]}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),$=S.useCallback(function(se,Ie){var He=Ie.validate;k.current[se]={validate:He}},[]),V=S.useCallback(function(se){delete k.current[se]},[]),X=qa(function(se,Ie){O({type:"SET_TOUCHED",payload:se});var He=Ie===void 0?i:Ie;return He?K(L.values):Promise.resolve()}),Q=S.useCallback(function(se){O({type:"SET_ERRORS",payload:se})},[]),G=qa(function(se,Ie){var He=Ho(se)?se(L.values):se;O({type:"SET_VALUES",payload:He});var Ue=Ie===void 0?n:Ie;return Ue?K(He):Promise.resolve()}),Y=S.useCallback(function(se,Ie){O({type:"SET_FIELD_ERROR",payload:{field:se,value:Ie}})},[]),ee=qa(function(se,Ie,He){O({type:"SET_FIELD_VALUE",payload:{field:se,value:Ie}});var Ue=He===void 0?n:He;return Ue?K(tu(L.values,se,Ie)):Promise.resolve()}),fe=S.useCallback(function(se,Ie){var He=Ie,Ue=se,ye;if(!c6(se)){se.persist&&se.persist();var je=se.target?se.target:se.currentTarget,vt=je.type,Mt=je.name,Me=je.id,Ct=je.value,zt=je.checked,$n=je.outerHTML,qe=je.options,pt=je.multiple;He=Ie||Mt||Me,Ue=/number|range/.test(vt)?(ye=parseFloat(Ct),isNaN(ye)?"":ye):/checkbox/.test(vt)?Aje(Ui(L.values,He),zt,Ct):qe&&pt?Lje(qe):Ct}He&&ee(He,Ue)},[ee,L.values]),Ce=qa(function(se){if(c6(se))return function(Ie){return fe(Ie,se)};fe(se)}),we=qa(function(se,Ie,He){Ie===void 0&&(Ie=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:se,value:Ie}});var Ue=He===void 0?i:He;return Ue?K(L.values):Promise.resolve()}),xe=S.useCallback(function(se,Ie){se.persist&&se.persist();var He=se.target,Ue=He.name,ye=He.id,je=He.outerHTML,vt=Ie||Ue||ye;we(vt,!0)},[we]),Le=qa(function(se){if(c6(se))return function(Ie){return xe(Ie,se)};xe(se)}),Se=S.useCallback(function(se){Ho(se)?O({type:"SET_FORMIK_STATE",payload:se}):O({type:"SET_FORMIK_STATE",payload:function(){return se}})},[]),Qe=S.useCallback(function(se){O({type:"SET_STATUS",payload:se})},[]),Xe=S.useCallback(function(se){O({type:"SET_ISSUBMITTING",payload:se})},[]),tt=qa(function(){return O({type:"SUBMIT_ATTEMPT"}),K().then(function(se){var Ie=se instanceof Error,He=!Ie&&Object.keys(se).length===0;if(He){var Ue;try{if(Ue=Ae(),Ue===void 0)return}catch(ye){throw ye}return Promise.resolve(Ue).then(function(ye){return _.current&&O({type:"SUBMIT_SUCCESS"}),ye}).catch(function(ye){if(_.current)throw O({type:"SUBMIT_FAILURE"}),ye})}else if(_.current&&(O({type:"SUBMIT_FAILURE"}),Ie))throw se})}),yt=qa(function(se){se&&se.preventDefault&&Ho(se.preventDefault)&&se.preventDefault(),se&&se.stopPropagation&&Ho(se.stopPropagation)&&se.stopPropagation(),tt().catch(function(Ie){console.warn("Warning: An unhandled error was caught from submitForm()",Ie)})}),Be={resetForm:ne,validateForm:K,validateField:z,setErrors:Q,setFieldError:Y,setFieldTouched:we,setFieldValue:ee,setStatus:Qe,setSubmitting:Xe,setTouched:X,setValues:G,setFormikState:Se,submitForm:tt},Ae=qa(function(){return d(L.values,Be)}),bt=qa(function(se){se&&se.preventDefault&&Ho(se.preventDefault)&&se.preventDefault(),se&&se.stopPropagation&&Ho(se.stopPropagation)&&se.stopPropagation(),ne()}),Fe=S.useCallback(function(se){return{value:Ui(L.values,se),error:Ui(L.errors,se),touched:!!Ui(L.touched,se),initialValue:Ui(y.current,se),initialTouched:!!Ui(w.current,se),initialError:Ui(b.current,se)}},[L.errors,L.touched,L.values]),at=S.useCallback(function(se){return{setValue:function(He,Ue){return ee(se,He,Ue)},setTouched:function(He,Ue){return we(se,He,Ue)},setError:function(He){return Y(se,He)}}},[ee,we,Y]),jt=S.useCallback(function(se){var Ie=M4(se),He=Ie?se.name:se,Ue=Ui(L.values,He),ye={name:He,value:Ue,onChange:Ce,onBlur:Le};if(Ie){var je=se.type,vt=se.value,Mt=se.as,Me=se.multiple;je==="checkbox"?vt===void 0?ye.checked=!!Ue:(ye.checked=!!(Array.isArray(Ue)&&~Ue.indexOf(vt)),ye.value=vt):je==="radio"?(ye.checked=Ue===vt,ye.value=vt):Mt==="select"&&Me&&(ye.value=ye.value||[],ye.multiple=!0)}return ye},[Le,Ce,L.values]),mt=S.useMemo(function(){return!md(y.current,L.values)},[y.current,L.values]),Zt=S.useMemo(function(){return typeof s<"u"?mt?L.errors&&Object.keys(L.errors).length===0:s!==!1&&Ho(s)?s(m):s:L.errors&&Object.keys(L.errors).length===0},[s,mt,L.errors,m]),on=Vn({},L,{initialValues:y.current,initialErrors:b.current,initialTouched:w.current,initialStatus:E.current,handleBlur:Le,handleChange:Ce,handleReset:bt,handleSubmit:yt,resetForm:ne,setErrors:Q,setFormikState:Se,setFieldTouched:we,setFieldValue:ee,setFieldError:Y,setStatus:Qe,setSubmitting:Xe,setTouched:X,setValues:G,submitForm:tt,validateForm:K,validateField:z,isValid:Zt,dirty:mt,unregisterField:V,registerField:$,getFieldProps:jt,getFieldMeta:Fe,getFieldHelpers:at,validateOnBlur:i,validateOnChange:n,validateOnMount:a});return on}function E2(e){var t=Eje(e),n=e.component,r=e.children,i=e.render,o=e.innerRef;return S.useImperativeHandle(o,function(){return t}),S.createElement(_je,{value:t},n?S.createElement(n,t):i?i(t):r?Ho(r)?r(t):bK(r)?null:S.Children.only(r):null)}function Pje(e){var t={};if(e.inner){if(e.inner.length===0)return tu(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var o;if(n){if(r>=i.length)break;o=i[r++]}else{if(r=i.next(),r.done)break;o=r.value}var a=o;Ui(t,a.path)||(t=tu(t,a.path,a.message))}}return t}function Tje(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r={});var i=x7(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function x7(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||WD(i)?x7(i):i!==""?i:void 0}):WD(e[r])?t[r]=x7(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Mje(e,t,n){var r=e.slice();return t.forEach(function(o,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(o);r[a]=l?g7(Array.isArray(o)?[]:{},o,n):o}else n.isMergeableObject(o)?r[a]=g7(e[a],o,n):e.indexOf(o)===-1&&r.push(o)}),r}function Lje(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Aje(e,t,n){if(typeof e=="boolean")return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,o=e.indexOf(n),i=o>=0;else if(!n||n=="true"||n=="false")return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,o).concat(r.slice(o+1)):r}var Oje=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?S.useLayoutEffect:S.useEffect;function qa(e){var t=S.useRef(e);return Oje(function(){t.current=e}),S.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;ir?i:r},0);return Array.from(Vn({},t,{length:n+1}))}else return[]},Nje=function(e){wje(t,e);function t(r){var i;return i=e.call(this,r)||this,i.updateArrayField=function(o,a,s){var l=i.props,u=l.name,d=l.formik.setFormikState;d(function(h){var m=typeof s=="function"?s:o,y=typeof a=="function"?a:o,b=tu(h.values,u,o(Ui(h.values,u))),w=s?m(Ui(h.errors,u)):void 0,E=a?y(Ui(h.touched,u)):void 0;return gj(w)&&(w=void 0),gj(E)&&(E=void 0),Vn({},h,{values:b,errors:s?tu(h.errors,u,w):h.errors,touched:a?tu(h.touched,u,E):h.touched})})},i.push=function(o){return i.updateArrayField(function(a){return[].concat(o0(a),[Sje(o)])},!1,!1)},i.handlePush=function(o){return function(){return i.push(o)}},i.swap=function(o,a){return i.updateArrayField(function(s){return Dje(s,o,a)},!0,!0)},i.handleSwap=function(o,a){return function(){return i.swap(o,a)}},i.move=function(o,a){return i.updateArrayField(function(s){return Ije(s,o,a)},!0,!0)},i.handleMove=function(o,a){return function(){return i.move(o,a)}},i.insert=function(o,a){return i.updateArrayField(function(s){return f6(s,o,a)},function(s){return f6(s,o,null)},function(s){return f6(s,o,null)})},i.handleInsert=function(o,a){return function(){return i.insert(o,a)}},i.replace=function(o,a){return i.updateArrayField(function(s){return jje(s,o,a)},!1,!1)},i.handleReplace=function(o,a){return function(){return i.replace(o,a)}},i.unshift=function(o){var a=-1;return i.updateArrayField(function(s){var l=s?[o].concat(s):[o];return a<0&&(a=l.length),l},function(s){var l=s?[null].concat(s):[null];return a<0&&(a=l.length),l},function(s){var l=s?[null].concat(s):[null];return a<0&&(a=l.length),l}),a},i.handleUnshift=function(o){return function(){return i.unshift(o)}},i.handleRemove=function(o){return function(){return i.remove(o)}},i.handlePop=function(){return function(){return i.pop()}},i.remove=i.remove.bind(pj(i)),i.pop=i.pop.bind(pj(i)),i}var n=t.prototype;return n.componentDidUpdate=function(i){this.props.validateOnChange&&this.props.formik.validateOnChange&&!md(Ui(i.formik.values,i.name),Ui(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(i){var o;return this.updateArrayField(function(a){var s=a?o0(a):[];return o||(o=s[i]),Ho(s.splice)&&s.splice(i,1),s},!0,!0),o},n.pop=function(){var i;return this.updateArrayField(function(o){var a=o;return i||(i=a&&a.pop&&a.pop()),a},!0,!0),i},n.render=function(){var i={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},o=this.props,a=o.component,s=o.render,l=o.children,u=o.name,d=o.formik,h=Ph(d,["validate","validationSchema"]),m=Vn({},i,{form:h,name:u});return a?S.createElement(a,m):s?s(m):l?typeof l=="function"?l(m):bK(l)?null:S.Children.only(l):null},t}(S.Component);Nje.defaultProps={validateOnChange:!0};function $je(e){const{model:t}=e,r=le(b=>b.system.model_list)[t],i=Te(),{t:o}=De(),a=le(b=>b.system.isProcessing),s=le(b=>b.system.isConnected),[l,u]=S.useState("same"),[d,h]=S.useState("");S.useEffect(()=>{u("same")},[t]);const m=()=>{u("same")},y=()=>{i(p_e({model_name:t,save_location:l,custom_location:l==="custom"&&d!==""?d:null}))};return g.jsxs(C4,{title:`${o("modelManager.convert")} ${t}`,acceptCallback:y,cancelCallback:m,acceptButtonText:`${o("modelManager.convert")}`,triggerComponent:g.jsxs(On,{size:"sm","aria-label":o("modelManager.convertToDiffusers"),isDisabled:r.status==="active"||a||!s,className:" modal-close-btn",marginRight:"2rem",children:["🧨 ",o("modelManager.convertToDiffusers")]}),motionPreset:"slideInBottom",children:[g.jsxs(ke,{flexDirection:"column",rowGap:4,children:[g.jsx(Dt,{children:o("modelManager.convertToDiffusersHelpText1")}),g.jsxs(tH,{children:[g.jsx(f1,{children:o("modelManager.convertToDiffusersHelpText2")}),g.jsx(f1,{children:o("modelManager.convertToDiffusersHelpText3")}),g.jsx(f1,{children:o("modelManager.convertToDiffusersHelpText4")}),g.jsx(f1,{children:o("modelManager.convertToDiffusersHelpText5")})]}),g.jsx(Dt,{children:o("modelManager.convertToDiffusersHelpText6")})]}),g.jsxs(ke,{flexDir:"column",gap:4,children:[g.jsxs(ke,{marginTop:"1rem",flexDir:"column",gap:2,children:[g.jsx(Dt,{fontWeight:"bold",children:o("modelManager.convertToDiffusersSaveLocation")}),g.jsx(Oy,{value:l,onChange:b=>u(b),children:g.jsxs(ke,{gap:4,children:[g.jsx(Vo,{value:"same",children:g.jsx(si,{label:"Save converted model in the same folder",children:o("modelManager.sameFolder")})}),g.jsx(Vo,{value:"root",children:g.jsx(si,{label:"Save converted model in the InvokeAI root folder",children:o("modelManager.invokeRoot")})}),g.jsx(Vo,{value:"custom",children:g.jsx(si,{label:"Save converted model in a custom folder",children:o("modelManager.custom")})})]})})]}),l==="custom"&&g.jsxs(ke,{flexDirection:"column",rowGap:2,children:[g.jsx(Dt,{fontWeight:"bold",fontSize:"sm",color:"var(--text-color-secondary)",children:o("modelManager.customSaveLocation")}),g.jsx(qn,{value:d,onChange:b=>{b.target.value!==""&&h(b.target.value)},width:"25rem"})]})]})]})}const Fje=lt([hr],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),mj=64,vj=2048;function Bje(){const{openModel:e,model_list:t}=le(Fje),n=le(l=>l.system.isProcessing),r=Te(),{t:i}=De(),[o,a]=S.useState({name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1,format:"ckpt"});S.useEffect(()=>{var l,u,d,h,m,y,b;if(e){const w=Pe.pickBy(t,(E,_)=>Pe.isEqual(_,e));a({name:e,description:(l=w[e])==null?void 0:l.description,config:(u=w[e])==null?void 0:u.config,weights:(d=w[e])==null?void 0:d.weights,vae:(h=w[e])==null?void 0:h.vae,width:(m=w[e])==null?void 0:m.width,height:(y=w[e])==null?void 0:y.height,default:(b=w[e])==null?void 0:b.default,format:"ckpt"})}},[t,e]);const s=l=>{r(v2({...l,width:Number(l.width),height:Number(l.height)}))};return e?g.jsxs(ke,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[g.jsxs(ke,{alignItems:"center",gap:4,justifyContent:"space-between",children:[g.jsx(Dt,{fontSize:"lg",fontWeight:"bold",children:e}),g.jsx($je,{model:e})]}),g.jsx(ke,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:g.jsx(E2,{enableReinitialize:!0,initialValues:o,onSubmit:s,children:({handleSubmit:l,errors:u,touched:d})=>g.jsx("form",{onSubmit:l,children:g.jsxs(hn,{rowGap:"0.5rem",alignItems:"start",children:[g.jsxs(sn,{isInvalid:!!u.description&&d.description,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"description",fontSize:"sm",children:i("modelManager.description")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"description",name:"description",type:"text",width:"lg"}),u.description&&d.description?g.jsx(lr,{children:u.description}):g.jsx(sr,{margin:0,children:i("modelManager.descriptionValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!u.config&&d.config,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"config",fontSize:"sm",children:i("modelManager.config")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"config",name:"config",type:"text",width:"lg"}),u.config&&d.config?g.jsx(lr,{children:u.config}):g.jsx(sr,{margin:0,children:i("modelManager.configValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!u.weights&&d.weights,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"config",fontSize:"sm",children:i("modelManager.modelLocation")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"weights",name:"weights",type:"text",width:"lg"}),u.weights&&d.weights?g.jsx(lr,{children:u.weights}):g.jsx(sr,{margin:0,children:i("modelManager.modelLocationValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!u.vae&&d.vae,children:[g.jsx(Sn,{htmlFor:"vae",fontSize:"sm",children:i("modelManager.vaeLocation")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"vae",name:"vae",type:"text",width:"lg"}),u.vae&&d.vae?g.jsx(lr,{children:u.vae}):g.jsx(sr,{margin:0,children:i("modelManager.vaeLocationValidationMsg")})]})]}),g.jsxs(l2,{width:"100%",children:[g.jsxs(sn,{isInvalid:!!u.width&&d.width,children:[g.jsx(Sn,{htmlFor:"width",fontSize:"sm",children:i("modelManager.width")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{id:"width",name:"width",children:({field:h,form:m})=>g.jsx(lc,{id:"width",name:"width",min:mj,max:vj,step:64,value:m.values.width,onChange:y=>m.setFieldValue(h.name,Number(y))})}),u.width&&d.width?g.jsx(lr,{children:u.width}):g.jsx(sr,{margin:0,children:i("modelManager.widthValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!u.height&&d.height,children:[g.jsx(Sn,{htmlFor:"height",fontSize:"sm",children:i("modelManager.height")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{id:"height",name:"height",children:({field:h,form:m})=>g.jsx(lc,{id:"height",name:"height",min:mj,max:vj,step:64,value:m.values.height,onChange:y=>m.setFieldValue(h.name,Number(y))})}),u.height&&d.height?g.jsx(lr,{children:u.height}):g.jsx(sr,{margin:0,children:i("modelManager.heightValidationMsg")})]})]})]}),g.jsx(On,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelManager.updateModel")})]})})})})]}):g.jsx(ke,{width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:g.jsx(Dt,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}const zje=lt([hr],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function Hje(){const{openModel:e,model_list:t}=le(zje),n=le(l=>l.system.isProcessing),r=Te(),{t:i}=De(),[o,a]=S.useState({name:"",description:"",repo_id:"",path:"",vae:{repo_id:"",path:""},default:!1,format:"diffusers"});S.useEffect(()=>{var l,u,d,h,m,y,b,w,E,_,k,T,L,O,D,I;if(e){const N=Pe.pickBy(t,(W,B)=>Pe.isEqual(B,e));a({name:e,description:(l=N[e])==null?void 0:l.description,path:(u=N[e])!=null&&u.path&&((d=N[e])==null?void 0:d.path)!=="None"?(h=N[e])==null?void 0:h.path:"",repo_id:(m=N[e])!=null&&m.repo_id&&((y=N[e])==null?void 0:y.repo_id)!=="None"?(b=N[e])==null?void 0:b.repo_id:"",vae:{repo_id:(E=(w=N[e])==null?void 0:w.vae)!=null&&E.repo_id?(k=(_=N[e])==null?void 0:_.vae)==null?void 0:k.repo_id:"",path:(L=(T=N[e])==null?void 0:T.vae)!=null&&L.path?(D=(O=N[e])==null?void 0:O.vae)==null?void 0:D.path:""},default:(I=N[e])==null?void 0:I.default,format:"diffusers"})}},[t,e]);const s=l=>{const u=l;l.path===""&&delete u.path,l.repo_id===""&&delete u.repo_id,l.vae.path===""&&delete u.vae.path,l.vae.repo_id===""&&delete u.vae.repo_id,r(v2(l))};return e?g.jsxs(ke,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[g.jsx(ke,{alignItems:"center",children:g.jsx(Dt,{fontSize:"lg",fontWeight:"bold",children:e})}),g.jsx(ke,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:g.jsx(E2,{enableReinitialize:!0,initialValues:o,onSubmit:s,children:({handleSubmit:l,errors:u,touched:d})=>{var h,m,y,b,w,E,_,k,T,L;return g.jsx("form",{onSubmit:l,children:g.jsxs(hn,{rowGap:"0.5rem",alignItems:"start",children:[g.jsxs(sn,{isInvalid:!!u.description&&d.description,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"description",fontSize:"sm",children:i("modelManager.description")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"description",name:"description",type:"text",width:"lg"}),u.description&&d.description?g.jsx(lr,{children:u.description}):g.jsx(sr,{margin:0,children:i("modelManager.descriptionValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!u.path&&d.path,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"path",fontSize:"sm",children:i("modelManager.modelLocation")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"path",name:"path",type:"text",width:"lg"}),u.path&&d.path?g.jsx(lr,{children:u.path}):g.jsx(sr,{margin:0,children:i("modelManager.modelLocationValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!u.repo_id&&d.repo_id,children:[g.jsx(Sn,{htmlFor:"repo_id",fontSize:"sm",children:i("modelManager.repo_id")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"repo_id",name:"repo_id",type:"text",width:"lg"}),u.repo_id&&d.repo_id?g.jsx(lr,{children:u.repo_id}):g.jsx(sr,{margin:0,children:i("modelManager.repoIDValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!((h=u.vae)!=null&&h.path)&&((m=d.vae)==null?void 0:m.path),children:[g.jsx(Sn,{htmlFor:"vae.path",fontSize:"sm",children:i("modelManager.vaeLocation")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"vae.path",name:"vae.path",type:"text",width:"lg"}),(y=u.vae)!=null&&y.path&&((b=d.vae)!=null&&b.path)?g.jsx(lr,{children:(w=u.vae)==null?void 0:w.path}):g.jsx(sr,{margin:0,children:i("modelManager.vaeLocationValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!((E=u.vae)!=null&&E.repo_id)&&((_=d.vae)==null?void 0:_.repo_id),children:[g.jsx(Sn,{htmlFor:"vae.repo_id",fontSize:"sm",children:i("modelManager.vaeRepoID")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"lg"}),(k=u.vae)!=null&&k.repo_id&&((T=d.vae)!=null&&T.repo_id)?g.jsx(lr,{children:(L=u.vae)==null?void 0:L.repo_id}):g.jsx(sr,{margin:0,children:i("modelManager.vaeRepoIDValidationMsg")})]})]}),g.jsx(On,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelManager.updateModel")})]})})}})})]}):g.jsx(ke,{width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:g.jsx(Dt,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}const wK=lt([hr],e=>{const{model_list:t}=e,n=[];return Pe.forEach(t,r=>{n.push(r.weights)}),n});function Wje(){const{t:e}=De();return g.jsx(ao,{position:"absolute",zIndex:2,right:4,top:4,fontSize:"0.7rem",fontWeight:"bold",backgroundColor:"var(--accent-color)",padding:"0.2rem 0.5rem",borderRadius:"0.2rem",alignItems:"center",children:e("modelManager.modelExists")})}function yj({model:e,modelsToAdd:t,setModelsToAdd:n}){const r=le(wK),i=o=>{t.includes(o.target.value)?n(Pe.remove(t,a=>a!==o.target.value)):n([...t,o.target.value])};return g.jsxs(ao,{position:"relative",children:[r.includes(e.location)?g.jsx(Wje,{}):null,g.jsx(Gn,{value:e.name,label:g.jsx(g.Fragment,{children:g.jsxs(hn,{alignItems:"start",children:[g.jsx("p",{style:{fontWeight:"bold"},children:e.name}),g.jsx("p",{style:{fontStyle:"italic"},children:e.location})]})}),isChecked:t.includes(e.name),isDisabled:r.includes(e.location),onChange:i,padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",_checked:{backgroundColor:"var(--accent-color)",color:"var(--text-color)"},_disabled:{backgroundColor:"var(--background-color-secondary)"}})]})}function Uje(){const e=Te(),{t}=De(),n=le(T=>T.system.searchFolder),r=le(T=>T.system.foundModels),i=le(wK),o=le(T=>T.ui.shouldShowExistingModelsInSearch),a=le(T=>T.system.isProcessing),[s,l]=Ke.useState([]),[u,d]=Ke.useState("v1"),[h,m]=Ke.useState(""),y=()=>{e(jU(null)),e(NU(null)),l([])},b=T=>{e(EI(T.checkpointFolder))},w=()=>{l([]),r&&r.forEach(T=>{i.includes(T.location)||l(L=>[...L,T.name])})},E=()=>{l([])},_=()=>{const T=r==null?void 0:r.filter(O=>s.includes(O.name)),L={v1:"configs/stable-diffusion/v1-inference.yaml",v2:"configs/stable-diffusion/v2-inference-v.yaml",inpainting:"configs/stable-diffusion/v1-inpainting-inference.yaml",custom:h};T==null||T.forEach(O=>{const D={name:O.name,description:"",config:L[u],weights:O.location,vae:"",width:512,height:512,default:!1,format:"ckpt"};e(v2(D))}),l([])},k=()=>{const T=[],L=[];return r&&r.forEach((O,D)=>{i.includes(O.location)?L.push(g.jsx(yj,{model:O,modelsToAdd:s,setModelsToAdd:l},D)):T.push(g.jsx(yj,{model:O,modelsToAdd:s,setModelsToAdd:l},D))}),g.jsxs(g.Fragment,{children:[T,o&&L]})};return g.jsxs(g.Fragment,{children:[n?g.jsxs(ke,{flexDirection:"column",padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",rowGap:"0.5rem",position:"relative",children:[g.jsx("p",{style:{fontWeight:"bold",fontSize:"0.8rem",backgroundColor:"var(--background-color-secondary)",padding:"0.2rem 1rem",width:"max-content",borderRadius:"0.2rem"},children:t("modelManager.checkpointFolder")}),g.jsx("p",{style:{fontWeight:"bold",fontSize:"0.8rem",maxWidth:"80%"},children:n}),g.jsx(Ye,{"aria-label":t("modelManager.scanAgain"),tooltip:t("modelManager.scanAgain"),icon:g.jsx(f4,{}),position:"absolute",right:16,fontSize:18,disabled:a,onClick:()=>e(EI(n))}),g.jsx(Ye,{"aria-label":t("modelManager.clearCheckpointFolder"),icon:g.jsx(y2,{style:{transform:"rotate(45deg)"}}),position:"absolute",right:5,onClick:y})]}):g.jsx(E2,{initialValues:{checkpointFolder:""},onSubmit:T=>{b(T)},children:({handleSubmit:T})=>g.jsx("form",{onSubmit:T,children:g.jsxs(l2,{columnGap:"0.5rem",children:[g.jsx(sn,{isRequired:!0,width:"max-content",children:g.jsx(ur,{as:qn,id:"checkpointFolder",name:"checkpointFolder",type:"text",width:"lg",size:"md",label:t("modelManager.checkpointFolder")})}),g.jsx(Ye,{icon:g.jsx(r7e,{}),"aria-label":t("modelManager.findModels"),tooltip:t("modelManager.findModels"),type:"submit",disabled:a})]})})}),r&&g.jsxs(ke,{flexDirection:"column",rowGap:"1rem",children:[g.jsxs(ke,{justifyContent:"space-between",alignItems:"center",children:[g.jsxs("p",{children:[t("modelManager.modelsFound"),": ",r.length]}),g.jsxs("p",{children:[t("modelManager.selected"),": ",s.length]})]}),g.jsxs(ke,{columnGap:"0.5rem",justifyContent:"space-between",children:[g.jsxs(ke,{columnGap:"0.5rem",children:[g.jsx(On,{isDisabled:s.length===r.length,onClick:w,children:t("modelManager.selectAll")}),g.jsx(On,{isDisabled:s.length===0,onClick:E,children:t("modelManager.deselectAll")}),g.jsx(Gn,{label:t("modelManager.showExisting"),isChecked:o,onChange:()=>e(F4e(!o))})]}),g.jsx(On,{isDisabled:s.length===0,onClick:_,backgroundColor:s.length>0?"var(--accent-color) !important":"",children:t("modelManager.addSelected")})]}),g.jsxs(ke,{gap:4,backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.2rem",flexDirection:"column",children:[g.jsxs(ke,{gap:4,children:[g.jsx(Dt,{fontWeight:"bold",color:"var(--text-color-secondary)",children:"Pick Model Type:"}),g.jsx(Oy,{value:u,onChange:T=>d(T),defaultValue:"v1",name:"model_type",children:g.jsxs(ke,{gap:4,children:[g.jsx(Vo,{value:"v1",children:t("modelManager.v1")}),g.jsx(Vo,{value:"v2",children:t("modelManager.v2")}),g.jsx(Vo,{value:"inpainting",children:t("modelManager.inpainting")}),g.jsx(Vo,{value:"custom",children:t("modelManager.customConfig")})]})})]}),u==="custom"&&g.jsxs(ke,{flexDirection:"column",rowGap:2,children:[g.jsx(Dt,{fontWeight:"bold",fontSize:"sm",color:"var(--text-color-secondary)",children:t("modelManager.pathToCustomConfig")}),g.jsx(qn,{value:h,onChange:T=>{T.target.value!==""&&m(T.target.value)},width:"42.5rem"})]})]}),g.jsxs(ke,{rowGap:"1rem",flexDirection:"column",maxHeight:"18rem",overflowY:"scroll",paddingRight:"1rem",paddingLeft:"0.2rem",borderRadius:"0.2rem",children:[r.length>0?s.length===0&&g.jsx(Dt,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",margin:"0 0.5rem 0 1rem",textAlign:"center",backgroundColor:"var(--notice-color)",boxShadow:"0 0 200px 6px var(--notice-color)",marginTop:"1rem",width:"max-content",children:t("modelManager.selectAndAdd")}):g.jsx(Dt,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",textAlign:"center",backgroundColor:"var(--status-bad-color)",children:t("modelManager.noModelsFound")}),k()]})]})]})}const bj=64,xj=2048;function Vje(){const e=Te(),{t}=De(),n=le(u=>u.system.isProcessing);function r(u){return/\s/.test(u)}function i(u){let d;return r(u)&&(d=t("modelManager.cannotUseSpaces")),d}const o={name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,format:"ckpt",default:!1},a=u=>{e(v2(u)),e(Bh(null))},[s,l]=Ke.useState(!1);return g.jsxs(g.Fragment,{children:[g.jsx(Ye,{"aria-label":t("common.back"),tooltip:t("common.back"),onClick:()=>e(Bh(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",right:12,top:3,icon:g.jsx(UV,{})}),g.jsx(Uje,{}),g.jsx(Gn,{label:t("modelManager.addManually"),isChecked:s,onChange:()=>l(!s)}),s&&g.jsx(E2,{initialValues:o,onSubmit:a,children:({handleSubmit:u,errors:d,touched:h})=>g.jsx("form",{onSubmit:u,children:g.jsxs(hn,{rowGap:"0.5rem",children:[g.jsx(Dt,{fontSize:20,fontWeight:"bold",alignSelf:"start",children:t("modelManager.manual")}),g.jsxs(sn,{isInvalid:!!d.name&&h.name,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"name",name:"name",type:"text",validate:i,width:"2xl"}),d.name&&h.name?g.jsx(lr,{children:d.name}):g.jsx(sr,{margin:0,children:t("modelManager.nameValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!d.description&&h.description,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"description",name:"description",type:"text",width:"2xl"}),d.description&&h.description?g.jsx(lr,{children:d.description}):g.jsx(sr,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!d.config&&h.config,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"config",fontSize:"sm",children:t("modelManager.config")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"config",name:"config",type:"text",width:"2xl"}),d.config&&h.config?g.jsx(lr,{children:d.config}):g.jsx(sr,{margin:0,children:t("modelManager.configValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!d.weights&&h.weights,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"config",fontSize:"sm",children:t("modelManager.modelLocation")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"weights",name:"weights",type:"text",width:"2xl"}),d.weights&&h.weights?g.jsx(lr,{children:d.weights}):g.jsx(sr,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!d.vae&&h.vae,children:[g.jsx(Sn,{htmlFor:"vae",fontSize:"sm",children:t("modelManager.vaeLocation")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"vae",name:"vae",type:"text",width:"2xl"}),d.vae&&h.vae?g.jsx(lr,{children:d.vae}):g.jsx(sr,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),g.jsxs(l2,{width:"100%",children:[g.jsxs(sn,{isInvalid:!!d.width&&h.width,children:[g.jsx(Sn,{htmlFor:"width",fontSize:"sm",children:t("modelManager.width")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{id:"width",name:"width",children:({field:m,form:y})=>g.jsx(lc,{id:"width",name:"width",min:bj,max:xj,step:64,width:"90%",value:y.values.width,onChange:b=>y.setFieldValue(m.name,Number(b))})}),d.width&&h.width?g.jsx(lr,{children:d.width}):g.jsx(sr,{margin:0,children:t("modelManager.widthValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!d.height&&h.height,children:[g.jsx(Sn,{htmlFor:"height",fontSize:"sm",children:t("modelManager.height")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{id:"height",name:"height",children:({field:m,form:y})=>g.jsx(lc,{id:"height",name:"height",min:bj,max:xj,width:"90%",step:64,value:y.values.height,onChange:b=>y.setFieldValue(m.name,Number(b))})}),d.height&&h.height?g.jsx(lr,{children:d.height}):g.jsx(sr,{margin:0,children:t("modelManager.heightValidationMsg")})]})]})]}),g.jsx(On,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelManager.addModel")})]})})})]})}function Px({children:e}){return g.jsx(ke,{flexDirection:"column",backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.5rem",rowGap:"1rem",width:"100%",children:e})}function Gje(){const e=Te(),{t}=De(),n=le(s=>s.system.isProcessing);function r(s){return/\s/.test(s)}function i(s){let l;return r(s)&&(l=t("modelManager.cannotUseSpaces")),l}const o={name:"",description:"",repo_id:"",path:"",format:"diffusers",default:!1,vae:{repo_id:"",path:""}},a=s=>{const l=s;s.path===""&&delete l.path,s.repo_id===""&&delete l.repo_id,s.vae.path===""&&delete l.vae.path,s.vae.repo_id===""&&delete l.vae.repo_id,e(v2(l)),e(Bh(null))};return g.jsxs(ke,{children:[g.jsx(Ye,{"aria-label":t("common.back"),tooltip:t("common.back"),onClick:()=>e(Bh(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",right:12,top:3,icon:g.jsx(UV,{})}),g.jsx(E2,{initialValues:o,onSubmit:a,children:({handleSubmit:s,errors:l,touched:u})=>{var d,h,m,y,b,w,E,_,k,T;return g.jsx("form",{onSubmit:s,children:g.jsxs(hn,{rowGap:"0.5rem",children:[g.jsx(Px,{children:g.jsxs(sn,{isInvalid:!!l.name&&u.name,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"name",name:"name",type:"text",validate:i,width:"2xl",isRequired:!0}),l.name&&u.name?g.jsx(lr,{children:l.name}):g.jsx(sr,{margin:0,children:t("modelManager.nameValidationMsg")})]})]})}),g.jsx(Px,{children:g.jsxs(sn,{isInvalid:!!l.description&&u.description,isRequired:!0,children:[g.jsx(Sn,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"description",name:"description",type:"text",width:"2xl",isRequired:!0}),l.description&&u.description?g.jsx(lr,{children:l.description}):g.jsx(sr,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]})}),g.jsxs(Px,{children:[g.jsx(Dt,{fontWeight:"bold",fontSize:"sm",children:t("modelManager.formMessageDiffusersModelLocation")}),g.jsx(Dt,{fontSize:"sm",fontStyle:"italic",color:"var(--text-color-secondary)",children:t("modelManager.formMessageDiffusersModelLocationDesc")}),g.jsxs(sn,{isInvalid:!!l.path&&u.path,children:[g.jsx(Sn,{htmlFor:"path",fontSize:"sm",children:t("modelManager.modelLocation")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"path",name:"path",type:"text",width:"2xl"}),l.path&&u.path?g.jsx(lr,{children:l.path}):g.jsx(sr,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!l.repo_id&&u.repo_id,children:[g.jsx(Sn,{htmlFor:"repo_id",fontSize:"sm",children:t("modelManager.repo_id")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"repo_id",name:"repo_id",type:"text",width:"2xl"}),l.repo_id&&u.repo_id?g.jsx(lr,{children:l.repo_id}):g.jsx(sr,{margin:0,children:t("modelManager.repoIDValidationMsg")})]})]})]}),g.jsxs(Px,{children:[g.jsx(Dt,{fontWeight:"bold",children:t("modelManager.formMessageDiffusersVAELocation")}),g.jsx(Dt,{fontSize:"sm",fontStyle:"italic",color:"var(--text-color-secondary)",children:t("modelManager.formMessageDiffusersVAELocationDesc")}),g.jsxs(sn,{isInvalid:!!((d=l.vae)!=null&&d.path)&&((h=u.vae)==null?void 0:h.path),children:[g.jsx(Sn,{htmlFor:"vae.path",fontSize:"sm",children:t("modelManager.vaeLocation")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"vae.path",name:"vae.path",type:"text",width:"2xl"}),(m=l.vae)!=null&&m.path&&((y=u.vae)!=null&&y.path)?g.jsx(lr,{children:(b=l.vae)==null?void 0:b.path}):g.jsx(sr,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),g.jsxs(sn,{isInvalid:!!((w=l.vae)!=null&&w.repo_id)&&((E=u.vae)==null?void 0:E.repo_id),children:[g.jsx(Sn,{htmlFor:"vae.repo_id",fontSize:"sm",children:t("modelManager.vaeRepoID")}),g.jsxs(hn,{alignItems:"start",children:[g.jsx(ur,{as:qn,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"2xl"}),(_=l.vae)!=null&&_.repo_id&&((k=u.vae)!=null&&k.repo_id)?g.jsx(lr,{children:(T=l.vae)==null?void 0:T.repo_id}):g.jsx(sr,{margin:0,children:t("modelManager.vaeRepoIDValidationMsg")})]})]})]}),g.jsx(On,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelManager.addModel")})]})})}})]})}function Sj({text:e,onClick:t}){return g.jsx(ke,{position:"relative",width:"50%",height:"200px",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",justifyContent:"center",alignItems:"center",_hover:{cursor:"pointer",backgroundColor:"var(--accent-color)"},onClick:t,children:g.jsx(Dt,{fontWeight:"bold",children:e})})}function qje(){const{isOpen:e,onOpen:t,onClose:n}=Kd(),r=le(s=>s.ui.addNewModelUIOption),i=Te(),{t:o}=De(),a=()=>{n(),i(Bh(null))};return g.jsxs(g.Fragment,{children:[g.jsx(On,{"aria-label":o("modelManager.addNewModel"),tooltip:o("modelManager.addNewModel"),onClick:t,className:"modal-close-btn",size:"sm",children:g.jsxs(ke,{columnGap:"0.5rem",alignItems:"center",children:[g.jsx(y2,{}),o("modelManager.addNew")]})}),g.jsxs(Yd,{isOpen:e,onClose:a,size:"3xl",closeOnOverlayClick:!1,children:[g.jsx(oc,{}),g.jsxs(Xd,{className:"modal add-model-modal",fontFamily:"Inter",margin:"auto",children:[g.jsx(op,{children:o("modelManager.addNewModel")}),g.jsx(m0,{marginTop:"0.3rem"}),g.jsxs(Zm,{className:"add-model-modal-body",children:[r==null&&g.jsxs(ke,{columnGap:"1rem",children:[g.jsx(Sj,{text:o("modelManager.addCheckpointModel"),onClick:()=>i(Bh("ckpt"))}),g.jsx(Sj,{text:o("modelManager.addDiffuserModel"),onClick:()=>i(Bh("diffusers"))})]}),r=="ckpt"&&g.jsx(Vje,{}),r=="diffusers"&&g.jsx(Gje,{})]})]})]})]})}function Tx(e){const{isProcessing:t,isConnected:n}=le(y=>y.system),r=le(y=>y.system.openModel),{t:i}=De(),o=Te(),{name:a,status:s,description:l}=e,u=()=>{o($V(a))},d=()=>{o(UR(a))},h=()=>{o(h_e(a)),o(UR(null))},m=()=>{switch(s){case"active":return"var(--status-good-color)";case"cached":return"var(--status-working-color)";case"not loaded":return"var(--text-color-secondary)"}};return g.jsxs(ke,{alignItems:"center",padding:"0.5rem 0.5rem",borderRadius:"0.2rem",backgroundColor:a===r?"var(--accent-color)":"",_hover:{backgroundColor:a===r?"var(--accent-color)":"var(--background-color)"},children:[g.jsx(ao,{onClick:d,cursor:"pointer",children:g.jsx(si,{label:l,hasArrow:!0,placement:"bottom",children:g.jsx(Dt,{fontWeight:"bold",children:a})})}),g.jsx(rH,{onClick:d,cursor:"pointer"}),g.jsxs(ke,{gap:2,alignItems:"center",children:[g.jsx(Dt,{color:m(),children:s}),g.jsx(ss,{size:"sm",onClick:u,isDisabled:s==="active"||t||!n,className:"modal-close-btn",children:i("modelManager.load")}),g.jsx(Ye,{icon:g.jsx(Wke,{}),size:"sm",onClick:d,"aria-label":"Modify Config",isDisabled:s==="active"||t||!n,className:" modal-close-btn"}),g.jsx(C4,{title:i("modelManager.deleteModel"),acceptCallback:h,acceptButtonText:i("modelManager.delete"),triggerComponent:g.jsx(Ye,{icon:g.jsx(Uke,{}),size:"sm","aria-label":i("modelManager.deleteConfig"),isDisabled:s==="active"||t||!n,className:" modal-close-btn",style:{backgroundColor:"var(--btn-delete-image)"}}),children:g.jsxs(ke,{rowGap:"1rem",flexDirection:"column",children:[g.jsx("p",{style:{fontWeight:"bold"},children:i("modelManager.deleteMsg1")}),g.jsx("p",{style:{color:"var(--text-color-secondary"},children:i("modelManager.deleteMsg2")})]})})]})]})}function Kje(){const e=Te(),{isOpen:t,onOpen:n,onClose:r}=Kd(),i=le(X_e),{t:o}=De(),[a,s]=S.useState(Object.keys(i)[0]),[l,u]=S.useState(Object.keys(i)[1]),[d,h]=S.useState("none"),[m,y]=S.useState(""),[b,w]=S.useState(.5),[E,_]=S.useState("weighted_sum"),[k,T]=S.useState("root"),[L,O]=S.useState(""),[D,I]=S.useState(!1),N=Object.keys(i).filter(z=>{if(z!==l&&z!==d)return z}),W=Object.keys(i).filter(z=>{if(z!==a&&z!==d)return z}),B=["none",...Object.keys(i).filter(z=>{if(z!==a&&z!==l)return z})],K=le(z=>z.system.isProcessing),ne=()=>{let z=[a,l,d];z=z.filter(V=>V!=="none");const $={models_to_merge:z,merged_model_name:m!==""?m:z.join("-"),alpha:b,interp:E,model_merge_save_path:k==="root"?null:L,force:D};e(g_e($))};return g.jsxs(g.Fragment,{children:[g.jsx(On,{onClick:n,className:"modal-close-btn",size:"sm",children:g.jsx(ke,{columnGap:"0.5rem",alignItems:"center",children:o("modelManager.mergeModels")})}),g.jsxs(Yd,{isOpen:t,onClose:r,size:"4xl",closeOnOverlayClick:!1,children:[g.jsx(oc,{}),g.jsxs(Xd,{className:"modal",fontFamily:"Inter",margin:"auto",children:[g.jsx(op,{children:o("modelManager.mergeModels")}),g.jsx(m0,{}),g.jsxs(ke,{flexDirection:"column",padding:"1rem",rowGap:4,children:[g.jsxs(ke,{flexDirection:"column",marginBottom:"1rem",padding:"1rem",borderRadius:"0.3rem",backgroundColor:"var(--background-color)",rowGap:1,children:[g.jsx(Dt,{children:o("modelManager.modelMergeHeaderHelp1")}),g.jsx(Dt,{fontSize:"0.9rem",color:"var(--text-color-secondary)",children:o("modelManager.modelMergeHeaderHelp2")})]}),g.jsxs(ke,{columnGap:4,children:[g.jsx(Jo,{label:o("modelManager.modelOne"),validValues:N,onChange:z=>s(z.target.value)}),g.jsx(Jo,{label:o("modelManager.modelTwo"),validValues:W,onChange:z=>u(z.target.value)}),g.jsx(Jo,{label:o("modelManager.modelThree"),validValues:B,onChange:z=>{z.target.value!=="none"?(h(z.target.value),_("add_difference")):(h("none"),_("weighted_sum"))}})]}),g.jsx(qn,{label:o("modelManager.mergedModelName"),value:m,onChange:z=>y(z.target.value)}),g.jsxs(ke,{flexDir:"column",backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.2rem",rowGap:2,children:[g.jsx(Dn,{label:o("modelManager.alpha"),min:.01,max:.99,step:.01,value:b,onChange:z=>w(z),withInput:!0,withReset:!0,handleReset:()=>w(.5),withSliderMarks:!0,sliderMarkRightOffset:-7}),g.jsx(Dt,{fontSize:"0.9rem",color:"var(--text-color-secondary)",children:o("modelManager.modelMergeAlphaHelp")})]}),g.jsxs(ke,{columnGap:4,backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.2rem",children:[g.jsx(Dt,{fontWeight:"bold",fontSize:"0.9rem",color:"var(--text-color-secondary)",children:o("modelManager.interpolationType")}),g.jsx(Oy,{value:E,onChange:z=>_(z),children:g.jsx(ke,{columnGap:4,children:d==="none"?g.jsxs(g.Fragment,{children:[g.jsx(Vo,{value:"weighted_sum",children:"weighted_sum"}),g.jsx(Vo,{value:"sigmoid",children:"sigmoid"}),g.jsx(Vo,{value:"inv_sigmoid",children:"inv_sigmoid"})]}):g.jsx(Vo,{value:"add_difference",children:g.jsx(si,{label:o("modelmanager:modelMergeInterpAddDifferenceHelp"),children:"add_difference"})})})})]}),g.jsxs(ke,{gap:4,flexDirection:"column",backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.2rem",children:[g.jsxs(ke,{columnGap:4,children:[g.jsx(Dt,{fontWeight:"bold",fontSize:"0.9rem",color:"var(--text-color-secondary)",children:o("modelManager.mergedModelSaveLocation")}),g.jsx(Oy,{value:k,onChange:z=>T(z),children:g.jsxs(ke,{columnGap:4,children:[g.jsx(Vo,{value:"root",children:o("modelManager.invokeAIFolder")}),g.jsx(Vo,{value:"custom",children:o("modelManager.custom")})]})})]}),k==="custom"&&g.jsx(qn,{label:o("modelManager.mergedModelCustomSaveLocation"),value:L,onChange:z=>O(z.target.value)})]}),g.jsx(Gn,{label:o("modelManager.ignoreMismatch"),isChecked:D,onChange:z=>I(z.target.checked),fontWeight:"bold"}),g.jsx(On,{onClick:ne,isLoading:K,isDisabled:k==="custom"&&L==="",className:"modal modal-close-btn",children:o("modelManager.merge")})]})]})]})]})}const Yje=lt(hr,e=>Pe.map(e.model_list,(n,r)=>({name:r,...n})),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}});function h6({label:e,isActive:t,onClick:n}){return g.jsx(On,{onClick:n,isActive:t,_active:{backgroundColor:"var(--accent-color)",_hover:{backgroundColor:"var(--accent-color)"}},size:"sm",children:e})}const Xje=()=>{const e=le(Yje),[t,n]=Ke.useState(!1);Ke.useEffect(()=>{const m=setTimeout(()=>{n(!0)},200);return()=>clearTimeout(m)},[]);const[r,i]=S.useState(""),[o,a]=S.useState("all"),[s,l]=S.useTransition(),{t:u}=De(),d=m=>{l(()=>{i(m.target.value)})},h=S.useMemo(()=>{const m=[],y=[],b=[],w=[];return e.forEach((E,_)=>{E.name.toLowerCase().includes(r.toLowerCase())&&(b.push(g.jsx(Tx,{name:E.name,status:E.status,description:E.description},_)),E.format===o&&w.push(g.jsx(Tx,{name:E.name,status:E.status,description:E.description},_))),E.format!=="diffusers"?m.push(g.jsx(Tx,{name:E.name,status:E.status,description:E.description},_)):y.push(g.jsx(Tx,{name:E.name,status:E.status,description:E.description},_))}),r!==""?o==="all"?g.jsx(ao,{marginTop:"1rem",children:b}):g.jsx(ao,{marginTop:"1rem",children:w}):g.jsxs(ke,{flexDirection:"column",rowGap:"1.5rem",children:[o==="all"&&g.jsxs(g.Fragment,{children:[g.jsxs(ao,{children:[g.jsx(Dt,{fontWeight:"bold",backgroundColor:"var(--background-color)",padding:"0.5rem 1rem",borderRadius:"0.5rem",margin:"1rem 0",width:"max-content",fontSize:"14",children:u("modelManager.checkpointModels")}),m]}),g.jsxs(ao,{children:[g.jsx(Dt,{fontWeight:"bold",backgroundColor:"var(--background-color)",padding:"0.5rem 1rem",borderRadius:"0.5rem",marginBottom:"0.5rem",width:"max-content",fontSize:"14",children:u("modelManager.diffusersModels")}),y]})]}),o==="ckpt"&&g.jsx(ke,{flexDirection:"column",marginTop:"1rem",children:m}),o==="diffusers"&&g.jsx(ke,{flexDirection:"column",marginTop:"1rem",children:y})]})},[e,r,u,o]);return g.jsxs(ke,{flexDirection:"column",rowGap:"2rem",width:"50%",minWidth:"50%",children:[g.jsxs(ke,{justifyContent:"space-between",children:[g.jsx(Dt,{fontSize:"1.4rem",fontWeight:"bold",children:u("modelManager.availableModels")}),g.jsxs(ke,{gap:2,children:[g.jsx(qje,{}),g.jsx(Kje,{})]})]}),g.jsx(qn,{onChange:d,label:u("modelManager.search")}),g.jsxs(ke,{flexDirection:"column",gap:1,maxHeight:window.innerHeight-360,overflow:"scroll",paddingRight:"1rem",children:[g.jsxs(ke,{columnGap:"0.5rem",children:[g.jsx(h6,{label:u("modelManager.allModels"),onClick:()=>a("all"),isActive:o==="all"}),g.jsx(h6,{label:u("modelManager.checkpointModels"),onClick:()=>a("ckpt"),isActive:o==="ckpt"}),g.jsx(h6,{label:u("modelManager.diffusersModels"),onClick:()=>a("diffusers"),isActive:o==="diffusers"})]}),t?h:g.jsx(ke,{width:"100%",minHeight:"30rem",justifyContent:"center",alignItems:"center",children:g.jsx(p0,{})})]})]})};function Zje({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Kd(),i=le(s=>s.system.model_list),o=le(s=>s.system.openModel),{t:a}=De();return g.jsxs(g.Fragment,{children:[S.cloneElement(e,{onClick:n}),g.jsxs(Yd,{isOpen:t,onClose:r,size:"6xl",children:[g.jsx(oc,{}),g.jsxs(Xd,{className:"modal",fontFamily:"Inter",children:[g.jsx(m0,{className:"modal-close-btn"}),g.jsx(op,{fontWeight:"bold",children:a("modelManager.modelManager")}),g.jsxs(ke,{padding:"0 1.5rem 1.5rem 1.5rem",width:"100%",columnGap:"2rem",children:[g.jsx(Xje,{}),o&&i[o].format==="diffusers"?g.jsx(Hje,{}):g.jsx(Bje,{})]})]})]})]})}const Qje=lt([hr],e=>{const{isProcessing:t,model_list:n}=e;return{models:Pe.map(n,(i,o)=>o),isProcessing:t}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),Jje=()=>{const e=Te(),{models:t,isProcessing:n}=le(Qje),r=le(VV),i=o=>{e($V(o.target.value))};return g.jsx(ke,{style:{paddingLeft:"0.3rem"},children:g.jsx(Jo,{style:{fontSize:"0.8rem"},tooltip:r.description,isDisabled:n,value:r.name,validValues:t,onChange:i})})},eNe=lt([hr,fp],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:o,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldUseCanvasBetaLayout:l,shouldUseSliders:u}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:Pe.map(o,(d,h)=>h),saveIntermediatesInterval:a,enableImageDebugging:s,shouldUseCanvasBetaLayout:l,shouldUseSliders:u}},{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),tNe=({children:e})=>{const t=Te(),{t:n}=De(),r=le(T=>T.generation.steps),{isOpen:i,onOpen:o,onClose:a}=Kd(),{isOpen:s,onOpen:l,onClose:u}=Kd(),{shouldDisplayInProgressType:d,shouldConfirmOnDelete:h,shouldDisplayGuides:m,saveIntermediatesInterval:y,enableImageDebugging:b,shouldUseCanvasBetaLayout:w,shouldUseSliders:E}=le(eNe),_=()=>{zV.purge().then(()=>{a(),l()})},k=T=>{T>r&&(T=r),T<1&&(T=1),t(k4e(T))};return g.jsxs(g.Fragment,{children:[S.cloneElement(e,{onClick:o}),g.jsxs(Yd,{isOpen:i,onClose:a,size:"lg",children:[g.jsx(oc,{}),g.jsxs(Xd,{className:"modal settings-modal",children:[g.jsx(op,{className:"settings-modal-header",children:n("common.settingsLabel")}),g.jsx(m0,{className:"modal-close-btn"}),g.jsxs(Zm,{className:"settings-modal-content",children:[g.jsxs("div",{className:"settings-modal-items",children:[g.jsxs("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[g.jsx(Jo,{label:n("settings.displayInProgress"),validValues:D5e,value:d,onChange:T=>t(m4e(T.target.value))}),d==="full-res"&&g.jsx(lc,{label:n("settings.saveSteps"),min:1,max:r,step:1,onChange:k,value:y,width:"auto",textAlign:"center"})]}),g.jsx(_a,{styleClass:"settings-modal-item",label:n("settings.confirmOnDelete"),isChecked:h,onChange:T=>t(IU(T.target.checked))}),g.jsx(_a,{styleClass:"settings-modal-item",label:n("settings.displayHelpIcons"),isChecked:m,onChange:T=>t(x4e(T.target.checked))}),g.jsx(_a,{styleClass:"settings-modal-item",label:n("settings.useCanvasBeta"),isChecked:w,onChange:T=>t($4e(T.target.checked))}),g.jsx(_a,{styleClass:"settings-modal-item",label:n("settings.useSlidersForAll"),isChecked:E,onChange:T=>t(B4e(T.target.checked))})]}),g.jsxs("div",{className:"settings-modal-items",children:[g.jsx("h2",{style:{fontWeight:"bold"},children:"Developer"}),g.jsx(_a,{styleClass:"settings-modal-item",label:n("settings.enableImageDebugging"),isChecked:b,onChange:T=>t(E4e(T.target.checked))})]}),g.jsxs("div",{className:"settings-modal-reset",children:[g.jsx(jh,{size:"md",children:n("settings.resetWebUI")}),g.jsx(ss,{colorScheme:"red",onClick:_,children:n("settings.resetWebUI")}),g.jsx(Dt,{children:n("settings.resetWebUIDesc1")}),g.jsx(Dt,{children:n("settings.resetWebUIDesc2")})]})]}),g.jsx(zw,{children:g.jsx(ss,{onClick:a,className:"modal-close-btn",children:n("common.close")})})]})]}),g.jsxs(Yd,{closeOnOverlayClick:!1,isOpen:s,onClose:u,isCentered:!0,children:[g.jsx(oc,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),g.jsx(Xd,{children:g.jsx(Zm,{pb:6,pt:6,children:g.jsx(ke,{justifyContent:"center",children:g.jsx(Dt,{fontSize:"lg",children:g.jsx(Dt,{children:n("settings.resetComplete")})})})})})]})]})},nNe=lt(hr,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Pe.isEqual}}),rNe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=le(nNe),s=Te(),{t:l}=De();let u;e&&!o?u="status-good":u="status-bad";let d=i;[l("common.statusGenerating"),l("common.statusPreparing"),l("common.statusSavingImage"),l("common.statusRestoringFaces"),l("common.statusUpscaling")].includes(d)&&(u="status-working"),d&&t&&r>1&&(d=`${l(d)} (${n}/${r})`);const m=o&&!a?"Click to clear, check logs for details":void 0,y=o&&!a?"pointer":"initial",b=()=>{(o||!a)&&s(DU())};return g.jsx(si,{label:m,children:g.jsx(Dt,{cursor:y,onClick:b,className:`status ${u}`,children:l(d)})})};function iNe(){const{t:e}=De(),{setColorMode:t,colorMode:n}=Qy(),r=Te(),i=le(l=>l.ui.currentTheme),o={dark:e("common.darkTheme"),light:e("common.lightTheme"),green:e("common.greenTheme")};S.useEffect(()=>{n!==i&&t(i)},[t,n,i]);const a=l=>{r(R4e(l))},s=()=>{const l=[];return Object.keys(o).forEach(u=>{l.push(g.jsx(On,{style:{width:"6rem"},leftIcon:i===u?g.jsx(jE,{}):void 0,size:"sm",onClick:()=>a(u),children:o[u]},u))}),l};return g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Ye,{"aria-label":e("common.themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:g.jsx(Mke,{})}),children:g.jsx(hn,{align:"stretch",children:s()})})}function oNe(){const{t:e,i18n:t}=De(),n={ar:e("common.langArabic",{lng:"ar"}),nl:e("common.langDutch",{lng:"nl"}),en:e("common.langEnglish",{lng:"en"}),fr:e("common.langFrench",{lng:"fr"}),de:e("common.langGerman",{lng:"de"}),it:e("common.langItalian",{lng:"it"}),ja:e("common.langJapanese",{lng:"ja"}),pl:e("common.langPolish",{lng:"pl"}),pt_Br:e("common.langBrPortuguese",{lng:"pt_Br"}),ru:e("common.langRussian",{lng:"ru"}),zh_Cn:e("common.langSimplifiedChinese",{lng:"zh_Cn"}),es:e("common.langSpanish",{lng:"es"}),uk:e("common.langUkranian",{lng:"ua"})},r=()=>{const i=[];return Object.keys(n).forEach(o=>{i.push(g.jsx(On,{"data-selected":localStorage.getItem("i18nextLng")===o,onClick:()=>t.changeLanguage(o),className:"modal-close-btn lang-select-btn","aria-label":n[o],size:"sm",minWidth:"200px",children:n[o]},o))}),i};return g.jsx(Ys,{trigger:"hover",triggerComponent:g.jsx(Ye,{"aria-label":e("common.languagePickerLabel"),tooltip:e("common.languagePickerLabel"),icon:g.jsx(Eke,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:g.jsx(hn,{children:r()})})}const aNe=()=>{const{t:e}=De(),t=le(n=>n.system.app_version);return g.jsxs("div",{className:"site-header",children:[g.jsxs("div",{className:"site-header-left-side",children:[g.jsx("img",{src:pq,alt:"invoke-ai-logo"}),g.jsxs(ke,{alignItems:"center",columnGap:"0.6rem",children:[g.jsxs(Dt,{fontSize:"1.4rem",children:["invoke ",g.jsx("strong",{children:"ai"})]}),g.jsx(Dt,{fontWeight:"bold",color:"var(--text-color-secondary)",marginTop:"0.2rem",children:t})]})]}),g.jsxs("div",{className:"site-header-right-side",children:[g.jsx(rNe,{}),g.jsx(Jje,{}),g.jsx(Zje,{children:g.jsx(Ye,{"aria-label":e("modelManager.modelManager"),tooltip:e("modelManager.modelManager"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:g.jsx(yke,{})})}),g.jsx(VAe,{children:g.jsx(Ye,{"aria-label":e("common.hotkeysLabel"),tooltip:e("common.hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:g.jsx(kke,{})})}),g.jsx(iNe,{}),g.jsx(oNe,{}),g.jsx(Ye,{"aria-label":e("common.reportBugLabel"),tooltip:e("common.reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:g.jsx(Nh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:g.jsx(vke,{})})}),g.jsx(Ye,{"aria-label":e("common.githubLabel"),tooltip:e("common.githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:g.jsx(Nh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:g.jsx(fke,{})})}),g.jsx(Ye,{"aria-label":e("common.discordLabel"),tooltip:e("common.discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:g.jsx(Nh,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:g.jsx(dke,{})})}),g.jsx(tNe,{children:g.jsx(Ye,{"aria-label":e("common.settingsLabel"),tooltip:e("common.settingsLabel"),variant:"link","data-variant":"link",fontSize:22,size:"sm",icon:g.jsx(o7e,{})})})]})]})};function sNe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{}.NODE_ENV||{}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}const lNe=()=>{const e=Te(),t=le(Y_e),n=a2();S.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(T4e())},[e,n,t])},uNe=()=>{const e=Te(),{shouldShowGalleryButton:t,shouldPinGallery:n}=le(nP),r=()=>{e(Am(!0)),n&&e(Li(!0))};return t?g.jsx(Ye,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:r,children:g.jsx(pG,{})}):null};sNe();const cNe=()=>(lNe(),g.jsxs("div",{className:"App",children:[g.jsxs($Ae,{children:[g.jsx(WAe,{}),g.jsxs("div",{className:"app-content",children:[g.jsx(aNe,{}),g.jsx(WLe,{})]}),g.jsx("div",{className:"app-console",children:g.jsx(zAe,{})})]}),g.jsx(qEe,{}),g.jsx(uNe,{})]})),wj=()=>g.jsx(ke,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:g.jsx(p0,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})});const dNe=Bj({key:"invokeai-style-cache",prepend:!0});rk.createRoot(document.getElementById("root")).render(g.jsx(Ke.StrictMode,{children:g.jsx(pxe,{store:BV,children:g.jsx(gW,{loading:g.jsx(wj,{}),persistor:zV,children:g.jsx(uee,{value:dNe,children:g.jsx(Rge,{children:g.jsx(Ke.Suspense,{fallback:g.jsx(wj,{}),children:g.jsx(cNe,{})})})})})})})); diff --git a/invokeai/frontend/web/dist/assets/index-14cb2922.css b/invokeai/frontend/web/dist/assets/index-14cb2922.css deleted file mode 100644 index 91b7cafe09..0000000000 --- a/invokeai/frontend/web/dist/assets/index-14cb2922.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;src:url(./Inter-b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold-790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}*{scrollbar-width:thick;scrollbar-color:var(--scrollbar-color) transparent}*::-webkit-scrollbar{width:8px;height:8px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:var(--scrollbar-color);border-radius:8px;border:2px solid var(--scrollbar-color)}*::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color-hover);border:2px solid var(--scrollbar-color-hover)}::-webkit-scrollbar-button{background:transparent}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(26, 26, 32);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(46, 48, 58);--tab-panel-bg: rgb(36, 38, 48);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--slider-mark-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--notice-color: rgb(130, 71, 19);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39);--scrollbar-color: var(--accent-color);--scrollbar-color-hover: var(--accent-color-bright);--subhook-color: var(--accent-color)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(208, 210, 212);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(196, 198, 200);--tab-panel-bg: rgb(206, 208, 210);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: var(--accent-color);--slider-mark-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--notice-color: rgb(255, 71, 90);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(167, 167, 171);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172);--scrollbar-color: rgb(180, 180, 184);--scrollbar-color-hover: rgb(150, 150, 154);--subhook-color: rgb(0, 0, 0)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: rgb(36, 40, 44);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-mark-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--notice-color: rgb(130, 71, 19);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39);--scrollbar-color: var(--accent-color);--scrollbar-color-hover: var(--accent-color-bright);--subhook-color: var(--accent-color)}@media (max-width: 600px){#root .app-content{padding:5px}#root .app-content .site-header{position:fixed;display:flex;height:100px;z-index:1}#root .app-content .site-header .site-header-left-side{position:absolute;display:flex;min-width:145px;float:left;padding-left:0}#root .app-content .site-header .site-header-right-side{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;grid-template-rows:25px 25px 25px;grid-template-areas:"logoSpace logoSpace logoSpace sampler sampler sampler" "status status status status status status" "btn1 btn2 btn3 btn4 btn5 btn6";row-gap:15px}#root .app-content .site-header .site-header-right-side .chakra-popover__popper{grid-area:logoSpace}#root .app-content .site-header .site-header-right-side>:nth-child(1).chakra-text{grid-area:status;width:100%;display:flex;justify-content:center}#root .app-content .site-header .site-header-right-side>:nth-child(2){grid-area:sampler;display:flex;justify-content:center;align-items:center}#root .app-content .site-header .site-header-right-side>:nth-child(2) select{width:185px;margin-top:10px}#root .app-content .site-header .site-header-right-side>:nth-child(2) .chakra-select__icon-wrapper{right:10px}#root .app-content .site-header .site-header-right-side>:nth-child(2) .chakra-select__icon-wrapper svg{margin-top:10px}#root .app-content .site-header .site-header-right-side>:nth-child(3){grid-area:btn1}#root .app-content .site-header .site-header-right-side>:nth-child(4){grid-area:btn2}#root .app-content .site-header .site-header-right-side>:nth-child(6){grid-area:btn3}#root .app-content .site-header .site-header-right-side>:nth-child(7){grid-area:btn4}#root .app-content .site-header .site-header-right-side>:nth-child(8){grid-area:btn5}#root .app-content .site-header .site-header-right-side>:nth-child(9){grid-area:btn6}#root .app-content .app-tabs{position:fixed;display:flex;flex-direction:column;row-gap:15px;max-width:100%;overflow:hidden;margin-top:120px}#root .app-content .app-tabs .app-tabs-list{display:flex;justify-content:space-between}#root .app-content .app-tabs .app-tabs-panels{overflow:hidden;overflow-y:scroll}#root .app-content .app-tabs .app-tabs-panels .workarea-main{display:grid;grid-template-areas:"workarea" "options" "gallery";row-gap:15px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .parameters-panel-wrapper{grid-area:options;width:100%;max-width:100%;height:inherit;overflow:inherit;padding:0 10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .parameters-panel-wrapper .main-settings-row,#root .app-content .app-tabs .app-tabs-panels .workarea-main .parameters-panel-wrapper .advanced-parameters-item{max-width:100%}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper{grid-area:workarea}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .workarea-split-view{display:flex;flex-direction:column}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .current-image-options{column-gap:3px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .text-to-image-area{padding:0}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .current-image-preview{height:430px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .image-upload-button{row-gap:10px;padding:5px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .image-upload-button svg{width:2rem;height:2rem;margin-top:10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .inpainting-settings{display:flex;flex-wrap:wrap;row-gap:10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .inpainting-canvas-area .konvajs-content{height:400px!important}#root .app-content .app-tabs .app-tabs-panels .workarea-main .image-gallery-wrapper{grid-area:gallery;min-height:400px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .image-gallery-wrapper .image-gallery-popup{width:100%!important;max-width:100%!important}}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.site-header-right-side .lang-select-btn[data-selected=true],.site-header-right-side .lang-select-btn[data-selected=true]:hover{background-color:var(--accent-color)}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button:disabled:hover{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.add-model-modal{display:flex}.add-model-modal-body{display:flex;flex-direction:column;row-gap:1rem;padding-bottom:2rem}.add-model-form{display:flex;flex-direction:column;row-gap:.5rem}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color);transition:width .2s ease-in-out}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:var(--btn-base-color)}.invoke-btn:disabled:hover{background-color:var(--btn-base-color)}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:var(--btn-base-color)}.cancel-btn:disabled:hover{background-color:var(--btn-base-color)}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-settings,.main-settings-list{display:grid;row-gap:1rem}.main-settings-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-settings-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-settings-block .invokeai__number-input-form-label,.main-settings-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-settings-block .invokeai__select-label{margin:0}.advanced-parameters{padding-top:.5rem;display:grid;row-gap:.5rem}.advanced-parameters-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem;background-color:var(--tab-panel-bg)}.advanced-parameters-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-parameters-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-parameters-panel button{background-color:var(--btn-base-color)}.advanced-parameters-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-parameters-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-parameters-header{border-radius:.4rem;font-weight:700}.advanced-parameters-header[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.4rem .4rem 0 0}.advanced-parameters-header:hover{background-color:var(--tab-hover-color)}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--tab-list-text-inactive)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30;animation:popIn .3s ease-in}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}@keyframes popIn{0%{opacity:0;filter:blur(100)}to{opacity:1;filter:blur(0)}}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:24px;height:24px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.parameters-panel-wrapper-enter{transform:translate(-150%)}.parameters-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.parameters-panel-wrapper-exit{transform:translate(0)}.parameters-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.parameters-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.parameters-panel-wrapper::-webkit-scrollbar{display:none}.parameters-panel-wrapper .parameters-panel{display:flex;flex-direction:column;row-gap:.5rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.parameters-panel-wrapper .parameters-panel::-webkit-scrollbar{display:none}.parameters-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.parameters-panel-wrapper[data-pinned=false] .parameters-panel-margin{margin:1rem}.parameters-panel-wrapper .parameters-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.parameters-panel-wrapper .parameters-panel-pin-button[data-selected=true]{top:0;right:0}.parameters-panel-wrapper .parameters-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:var(--btn-base-color)}.floating-show-hide-button:disabled:hover{background-color:var(--btn-base-color)}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-canvas-container{display:flex;position:relative;height:100%;width:100%;border-radius:.5rem}.inpainting-canvas-wrapper{position:relative}.inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary)}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary)}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{color:var(--text-color-secondary)}.invokeai__switch-form-control .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary)}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;font-size:.9rem;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{padding-bottom:.5rem;border-radius:.5rem}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-mark-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color);font-family:Inter}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/invokeai/frontend/web/dist/assets/index-5483945c.css b/invokeai/frontend/web/dist/assets/index-5483945c.css new file mode 100644 index 0000000000..395fcc729a --- /dev/null +++ b/invokeai/frontend/web/dist/assets/index-5483945c.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-cyrillic-ext-100-normal-a1f4d02d.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-cyrillic-100-normal-9747741a.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-greek-ext-100-normal-71976b96.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-greek-100-normal-a44b9fc9.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(data:font/woff2;base64,d09GMgABAAAAAA6IABAAAAAAIpgAAA4qAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqiikYAuCEgABNgIkA4QgBCAFhDAHIAwHG6gdo6KEtKaP7C8WOCdWB0/8EUAQpJhsK9wKN21ulDGK8xnl/rCTFtIvmWeLh6e19P2Z3bsAsYrwLFSMJbSR4aKPLbCqkeRYqXYMnubs5202m81ugMWDp4ZowKvZfsxSTIMGfPEI0NScE69wYp46/Zean3DuOSOowqUAfNEJ+PsfALbw4Lmf7OC3g1+bKMwuEknBq3rk/+33rf75983hrZg8xEN0a5YIUe/O8/0zKyaI+V9U0h7SkuliFhp0DhU/XbwRUsNDT5hZOlZKqXCMH2I4FMdxFCF8BfqbywrQASBxT/8ywpMaESgYESoaESsFkWY5YqVcRL4CRJFyRJUaRJ1ORBcJMWwMMW0aQUAbNQ1qM6eoAoFrGR1AILLdMTwAAeHOBxAgYVG8FEBxCRAxhwbD/b3qN1WNHDVAZaGhjDJQdwtC4ytIqRM0pE95iDDDWsosr6wlEsBFoQlHb0wrn8OaMHLB3F4YdD5fmBFmllk0aupTtCG9XT0QoETSmpURyoxv6hwRvKuMah8e6Eb8BbZehFnfirA+i8FfuAiRokSLpZUoSbIUa2XJV6pKtRqN+vQbMIhSzaCGAdH1M3XxJPEi8SbxIfEl8SPxJ1GTBJEEk2Qy0DN4j5SpIiliIJIkmeUAjqftBeJt+zDxtf0S8SdqEkSCXcRTTFH9YQDgBr6ghmUQ70r6q4AOcqEAqlmMSwggcjsQJAh4Qi4XSyFOAo5WCkUksEARpriK+8d3epU6dTzU6ySLB5oouXtatQlwIHfJIkHRFP0HL67CB2+q/JsDk84SDQSvLD+dT4s7LC5UzXh/o4bmUuNefJeE/IM9XyaRZ0BCz0DHWqc/7NYVl8MeSfO67cW/Gmh7kV4QD9DAAjNUCIJFgQEUWECdG7tGiQdwvIFRIiBoAgJEr3aQEVT4A+UPkEAGA2QIGEDHUtBHIEOFjHhGVHST++PD1F+a18VFJCJEZHSR2Xg/NZuvhtP8fRC8+PD7iEqDhTb5j9tK0/IFqhKnS6g6sbrJ5KDlkluLkUkhCyub0v9wVuGtoaLjRuRuNU9FvBTzVsJHKV96ftbxV0atXJBqwWqEqafRYJFGizVZotlSBsu0CNcqQptI7aJ0iNYpXo8EvbT6JOqXZECyQSkkaYalG5Fh1HJjCFLoBlxC9IAVyH1Qj0P9nLwMqFGFDi8jub5Cz6CRjTxQ+npdYJbX1nAbpLUZvFa4xaNmWxOySNVdgKX9KlpFCz2s0OPHYWp4r78QceJQVvpz/gP12ZXqLqHDnaYEocu/SS8vNNVVI7rcSluSMMnj4jkrb+YsnMmT0KsibntuVXdDfqJyJx57TlFzjc9bzJzVRDzgZvXm1fAkNLxZ8wtZN/KH2/lJ2Sb187tem7XpFtRtHZzaKM437VZW/jKuIFeZ2VJhtvHjWHTJ6mftIZU41eWeXDXULmLmrbyJ4RT9OyklG66yq1MFIRvoEW8iBXhvka4tsJyMu9RV1S6mCHkM2xXpVLCRbOclyQZ1G1pW8grezFkb5CtYnNzFcr7rQF94X8iuwDAWYSzBt+NLbssKs2XneG9Np1UDW69XuW3OU8DGj6ox8w0Tl2HDy9w2u60yXbWkkjdzhLuEuWniiyLWRt6UeVOWZNc6XLS6VYHnXpaS6mrLB4V84kvelldYjXy7tZPvSBXtHDFyCaw5zBw5YfZrsAmmhLM+2+ajCnKOXGNVnc2oWnJsWXkZV0hzXYPpcEE9X5ONqI6vZUFeoaUM2xoqBWn2pVPXzgFwZ2CnBqfTK1YY+Q6us30wmj3NxxkHarm6dWpLmCBjY9DOceNkKuCVtOXemOSVU2dmJR5+C++txy47sGtOlN0fsevZMZsVN4ea9NRlxSqeY0M2v/Wa+BpqnKIzeM8XZ55HPKKPPT7yCRcrxgbd+suV41iDnHnHY79qawAWIlj4HhNEpwgRLLJEenZOnJvViFCztQti/BiWX74+xf7735Ty0vWM3romGf/+qzG/oC4j/PhbBufXXxn+OPFW5NKj3PD3t1+3OPEpi7Ht+0W8deDoK+Hi/oix+0i583b/PhYXkxeds+cUvnXxfPHbh3NwRjOa9Z1nohKePHw4oXzs34Ftbr+IqazH7ug0B4hdgRPlSbsK412LMSz00Ue/Y+nHo4+nUxyiA/vCpi8ZbSdnShK3Tw1+UvqcTzf/ZtiYblXD899fOfHAz3sTbK8uab5j1+lC09hrWRssmQ+36sUMNsF4970nKkZ0t36/f5f6ja9eKglrVY94rlWc9v+2peW21me+Og+tqHlFeW6f8dNPbjEqz79kOd1+1xsR69ntIliINjZq+o43HB0W3YPf2dcXnDtnK6CMBx6AbevJ+qcJqdCcij3/sPGTTx4xhp1/eetnQ4+famLuEM+JM6/fFet6fv9B15v3ZMreY0/t1rudOrzX3ja64e3kgG17LhqhBgMRDCiFOrAycGeeOzGSoXk57NwjXZ98+ohRprz8cuj5R1tYXf2FX9I9SL17R+G5c3cWEPuDD1B2QqDG/JMW9V/sFV/Ycfh+XqxRdObGbIv8IsdfVUqc7Js/sPgbmzrxx75D9367Zcu397Ii63C5HNsvjJnOoolJEafv36zN+k6IFcbVCds8jp6x33ylLqLa58hEa9QDfpPrI4fXfbqECc7SbHmOTQ+WFWlUL2ru2GTLxGuiXURU57z/s/qIZ5EUPh/x5PBvSD8xG5N8aChiByeE5aNg4a1Q/enWeNtYZ3ZbYpmuIjE9a6TSI9vlW3enVC/WJ+p1dYliyWA14rdD7Bk3d3dz2z1i6bqKkpLvAJFfbBePDDP1WShG/WiZFYfuwcw0jGgaGW5SwLV+FYeOUFxzH/3Rvfcs0b+8pPwKnt37cpj+njBEfnn3ba9vFR8oZ8rDw0J6UhpwaBy7OwozW4pyFYj+8v/GG+nYeZeyuEnKwdqaXH1uavKasttPbrWkRSpKyYt57D3DT6vLQH1hn1gvTKyveGfOdtufPzbrXc2ImRMzq0Jmibt6s1n89qHfsMiv8/Gb4gNDTL1Oh6KxYgsO3Y1bzKjRj/Q3KrD0qgfJzvzTo23TYMnyUq3rf4nPiU2lfNGfQvvGgYI0/jJrdTmJdn2THqqjdtEpggoHAaCAlQRTqs0U0w60mWQEalWbTeQItbTNZrxE1bTZQmzEqWwlPuSYfwTMm6Fi26wn28l37ja02UCaqJSZG0kOlRc0vJUEg4CQMvQxg48GxYKnKLAZwAkqwGtUgM1UADUVqNqVoUsCsDvYy6XlAU1lWmWqhCnaAEgh3opgfXwwx0NG5EVZpBAv0ieFeFEZNAQcNAQcRiyENpsg7RSHmPC+2dJEGwsxUDACIAYsBrAcqHHN6wQOEdsKumismOc1m8y47mNFqgc0IvXLhAaaCiqaCg/BimZWPAelrCfBru94RJkF7Sj/t96Njf3QAvELpBWBuAGx4ociV8HgEZvxWBWDzXlfk7QikPi4pBWBeMylKdOhzSZQ/hAgb/o2ar8MBBGskDCOeZdKFH4YECsKvXCNscUQl4raeGEnLxyZc5IWQh4thPdF4bw2eb+BA1CZYFmYBHgle8k+ExU/bMgQtR6uVfrI4H1ROxrYq1GbzbChBo9QRGthnta6z8eSumYMJky9t+kns51Z9LKMru7lRjjbqVHS6Edw8O4Wzgap23mJdoNd6nbW0G7wgaFs02yvo9zp2qkQsBuGZMvSh2bgAegW1r/u+vKfj1yDvx5aePctCgDQADB9nMgLGYLVubwAuopK1Mb1Vh9OQyPpUnpJVFkKQEQUymdZlgFvXvBUfjUHE8yvwhfai5dKA3kbc71nMU4DDSB7zbpoIECt4wWiKc1CZlnAIeGKPjZYdn2G0EFXUYnauN7qxWkOcQ83A29eyFJ+ZUEswu4nOte8AhohL6hzWAAtjEbBFnMzRkmzIhZh98MAMIYairyQkcNCo0UjRAbesk6l32cBkpWRSKtqsZToJWdVrfwp5SoK0mDcKcXIn1DauL6Wy6i5QMBLYK1RvBccSLL8IVZCYsTgpfhq6rxyFZ5gkEo/VNosXO9ZjNW4+gAZbV30F4CKUgpwcjUxKe6uiaci6VNTP1OuwjMaJPFJFH3K8ZSKQyywM+KtFLIVX1kWXWD2EsH1nVxLHkQI1jJAZBCaR8Fo2BmjlGJ10IhZmBTM/GcH1jTxZuCtFNDyBLg+AxSeLEAAyOgPWgIPypo9Vv3OBvEAgPd/eTMIAD6o1F/5c/7fyeAeFQAwoAAABPjXMCPEVpF/++0QIOiO9e1cBRzMHBrSeCjed33G9BFxJ3yhMyg7KmXXoBE7EO1q2Aw4WL9ezeiZX4JIdKyzW7EnzlEydhjGVv4b3mpyPK9nbsdL6HmN2xOooCQ4IRO17OrLwi+6gDGgbKdQ9wb3Z2hzKQgUiVAv/5TQveOzNWOEdsx0Rb/gctYm6s5ZyN/0LK7hEviJniFdwH/uwL/2ry1DNpur/F29T9xpP8zRmxFP1yFeDvTQ43iDnoGjDQGXnusgUSC6u6sR0OUZGamUgMf0CuFjxqbq9CFFJtoL3dKKXJr3FYZPXoq7lMIVARd1yZ7YaO+IeEAVfU4imbojLv/2t7thkMRsWDejLqM0kmhToUZFRjpuN9+AUR2GaegNG9SjQ5vx8muNGdVl0LARGpEBiFNLRqyQIIFRd/UyxrSK12ZQvwSg2COU3h3sHtWENWZlUvaljcb0aTEsWTytRMutVKZcsXIrPa3iSBVrgGwPKjeNSx/P+xxHq0WqRFppOmi1huiz0VfFI9o+Klta2SPMwu0+YbO3jbUWpXIURZir8modH7CrfCasmi3Tjeu/lt2cn6Ps1R0A) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-latin-ext-100-normal-d3be20b3.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-latin-100-normal-61cac109.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-cyrillic-ext-200-normal-82562199.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-cyrillic-200-normal-87d2e1ba.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-greek-ext-200-normal-45dafb12.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-greek-200-normal-9575e0f8.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(data:font/woff2;base64,d09GMgABAAAAAA7YABAAAAAAIrgAAA56AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqhikZwuCEgABNgIkA4QgBCAFhGAHIAwHG98dUdTI0Sp5ZD8TTLc7SDuXNe2Cl41ikP6LJXJ+d74XRfD///v9b659ztlH7vviSdFKaD9BIlmIDKpFjzcSGqPjjUijWrXQLX3ZP0/b6n1aBmUQo49NsMFa3LSxcXUIGxOxGHRUwsC+0/M2rUvdK6/dvdxq9qLtDdyLCgk+1n77TuuXUESRRqiemf6HKNZMQ9VGtUZLDKVov6uTz/9/7Vudt/e9tfmYJv0rjRDFpBIJ5f5h3sj/b9ZEZ8H/YuuIJw4Jook2InQOlZKWDKeTCCGKhlwx27+pd+VW8PCBHUbmdFiPUwgu9Td3RIAFAMC45Z8ZIuAD8RMACRICCRMDiRMP2UUByZAJyVYAUdNCitRC6pCQFm2Qbt0QBBh8iNAWr2UT4LdTQTWDH7R9p6UZcIgbDwAIYDho3GWC2CCAwgEDsBN/n05ojEIurdlSUJBvOpsqCFWeGVpSCwPYR/ICxwMAMcNEaSQYMwHP17pxgO4VDniDwC3v2AGd1OULeoTeRIZIFT8fUiBXzgMgMCT6lDETciAOjhU4IgGMrr3UTrwnTfYLbSeC3muDvB+ieNtOTCJYiDBSMlGixUiUIoOSmoZWqUZNmhnRaOho6SB19UHcCJDckYRIHkieSF5I3kg+SP5IAUjJdPLoRg+mUyMV0RGSkrrdg0tguoMITQ8hnqZXJt7Eh/iTAA8aSabh/WIAwBU8wQe2QYQn6rcC+0ABmaBRYjx4AGGafiD+gBF0pzBs4SJxScVgRwIHaISVrOb2/l2Zp0gRvmK16PHAIC7CLa85BbjA9NAjgd0c4xeerIYFb+ryOwdWOIfMD9yjvKQuzVPGBshlBH/DBHXkDwJ8L4PTFxfSHQwzBcAwOsDijPMbe2M9pwAuiCZ6NeZOtQDjxeYAPQPgOAAO8CAIBw2wiQa4gHZ4t45CfICHO80UwkEYcAiA2jgAEoQW3gDE7wBggATYRIcAmxixFWAdjo4WdCRQsAya1fzeX6JXsQElCJdEdZrRS3sz7dq4wu+XgLjz4PUepQYImvIft126ZfCjFq5OkCJhDOjSMCgwJWJJxpaCI5WLJFy7Yfbi2cdVAjd7CGRzl0MolwclT3m87Octn48C/jQCaN2jmEiJTUptVmaLclvpbFNhu0piVSSqBasRolaEepEaSDWSaRKlWTSjGKQ4LXZoJUeJ1wZB9YYVAMwAqAFwBFILKD2g3AFpHgAKWs39S1DLT3FkytBnLzR+1hjWthub2A52pgc3iia6V33eEIWylMBheN0V8Bj4ajuN2B5SvH1tZ/XyE6ln7gzvzX5lF59lfOHG4GB82bsyVsarTy4tP8DGsGbLXF4HxrVhFq6VaxYALuAh17FP1or6V+/y3BB/bH1Fu7zstO7rbjOjyq6PhICzBESatvZmtr7lT7n3f75K71/7wnX0M59rS+fGHXEu0/pW1rHRT9Zs2MLHBFpasngyLPZlZ5N0d1XzR70zEKLtH2/dniVd7xYWzIaZWVx208jiIup9lqnJGQj1Lt7gJqJGj7GQQgBn0LkfR6lH95hzj2ZKvhzYFywjd1dR79onjnIVxsYsZ8baLvfqAYxlabpyUmsFwB0J97iJEwNzJi5Fq7ZUdLVhFuvIhxfGR0+zPgD7++drbDPWZa/2ZedhXS9PPW6T+VnKYgS5uS8zm42x7H+Vvz3SaCvMew2DSojTLJQUjcb6TqFc/GMhuCObHqu21WI1OaOai/SSAja1KAMxGtUhlMmucKVGIyyqkpWLlpbUO0+qWVhQLXxMmF+rF9f+1MWYtplVEVZYjateWgo6FuQPdi8dUbyAcixE/9jtP1jY8fqSTY/VcGurjcVYte2hFlffXMgtOnM3rQZIDVN3Cf1h8j5cjLt2giki9irsSACrPTAmghwjSSjb3nxBV4aVgQg5HOT7NhAiLucGUSXL1DLofqV+cO9YvTANgX4nD1cuoXuoraLpX1avwR5IWX/7uV8jHAAcuoCDp8c9daI6kAAHivpj/ynqVAGfAj9t7+JgJmDP2vIQc8MQS2y799xcGmTBhmB9OMvuwHOzyk9XVpR3zx0L8j9zTPnZ2gqw/ZiFds60BZYuffKhb+PDvl1ztKqftz+cQQ5dwLz+wcU04sytm6ozlxTwHtBF29XjM0L/R0+dylg6+eNg//OQeZy4cdI0iTdSgj5V3LQtYFMD5gxHJQU33fivdTTCo3y2exaOiAZvGgbeOqxLPjRmuJUy7U65vu5XF78rYe6jq6eedB4MM7WEhDY9dWhZ0aE/FX+4TfVaj8zq6SJWjdx/Kb+JPHj7/q7fHr5bpQ5q9GrH258WfpivGyx/ZOlVkF4QnRS+NVH71RdTtcK33xi4VD3w5OZKnsYCHNqV/K2V/U9dru4gH759oj3mypX2qNvzDz/qPNEeffFie6zzFYhNEL0f/c7TNZ99PqcXv3eu9/Pa+YvVgueyLxjTnh7Gvnrk8PT3z45sop2IujAk/Wd+vvsEYbI4msM2Zx+ectYAHRYWYEH/jEuelkgmg8/0XTeFaLvonPjtZ/Sff/FMrfidc5W8Y3wu2FY8S87++OpA7HGFwZgfXpudJRasqLH9qIXia4PUpUdWz7GrihnVmeJRSdq+8S+lnPxNd6zAwvoXN7b9x/EnJr/o7/957jfrjxe+/Pak+UaDxQE6Vjw5lHL8IU0PVFTo94gHhdHP+1+hbF9EoXDflvrSLVPCtg5Ja+r5LXGe/UGDVdz8cv2SYeZWvXH0gTR4j1qkQJy2hp08FHYSZF5rYQ8SVhC3OMcLuS7oxioG8k/eDAYev/+oZ3NMDz9gTCwP37+TiNiRoFe7JNfy3chHh/VJReE5O1URexVVWpCmA9U1PT40KF/jXZSyoFyjIcohxOto441mVtFuSAZlh4LklD4HTw1AI+jMDVoXkO1fCZ6UiKeCJVNiySSEKpbaTNNDw8PTQ6a2zAKNVkNobndPBtgvB9gPca37sp990g/CNEutpomhwYHJowqtmfkatRqvwVhugKe0TGILj2WMKHHZfxhm9EpFfUY6B8Kvv0OZpu71It6aicrI12o0BVrdsVwBS2Ww5ado9+Ul7JDtzalWurFUjd1EVPr2uwli0rkvB+h+vs9M9JqnhOnKo7+tV06wKyE6PbLP0jzMlN3i7fywyvhPFWyTy83m0U2iK2OkfBCS1yqf1TM1sfGQZEps4qhn4VFLaYGpWsWG4D8jB40jm4Qi4eiQMStbyeeW9rcTO7KCryWEzIAmszvXFSvr7dgflRWcEJcSPINrMoDHevu6TlQHtBEIUNlCYqCCu4pxILiz0FpMcL+eN9/gAcxJSvCgqvWLc4g/dP0ILrOEyGJ374kmd1M7g3ultLDyPiXYnqCZbSEBHEEJvjLsUeG0mjNQXgEcYjiUMhwyGA43Gc6YHkKn+DoeLNfFwneqnO0TvgvJWacIVI5SzteDf0QgZVPSQFn+NFA2Ng2UNc0C6WUeC0H7dARl0sfspj5TR7A1agy0ACvUhnIW2lMW6xzwqxU2C5pYGCyo1F16nA4dVuwIyKzYTxNGWSzksVg4DTv3sXkF5ezxV/zivmzzoE1FfWrnEtzLGmHBfbzNnvJ+yfHlrC2eL3cDOeV090F+DA0eoj+u6wPqq+mZf5oFSC8dpo3TQYFYMQa3w60NTytrFFJplj+Lw5nNwtpq8nWhRGQt5iOhWTLyYFnwtJX1ujZ5f4IEgSqPZOv/k0JVMsPHIr7ZoKKFMiuHFQbiQAt7omoQhcv4SFkhBLBCeIkVNlWJ5VAoSu9wn8pz5t/K5+mmbD1de1jo4bPJ9HS3CjnfAEN6xwFU2fzJHSP+IVs3eBDECJPfehXFHFjui4f4MDioSVp45QL44KjqORlfHN8J4///z5+hAQC3gb+P4l+xmo6d+GAyRjCjUHi7DDkLYL7sPavakwBogsTyShN/wDHxA/u/lX06yRhDyxOROp6MIhQjDYacRJC+vXYBYPsTHzGsCrrRAD6V/nWwBfjHpwgOJmMEMwqFVx7yvayOcTgmflT/14OwtWmJ407FNcL/jBPTAOhRuIg2PMY1S/UibO0QWuBPPSz+lZgGGj0qERG84M0pbA7Q3yUAuaa2fMne86nOdaaLjL3kxADR551uFIpeLMtb7HyYC6d3NRDH2ayL5FWXhUSqCKz/VvPgLkMrQKT+1I0eoRhp0OTRBdKc1/4NYGudD7ckW4/X93uWI5I6qrmsy9BpNYr9xRySY6lnL9I2XhydjyspRDbwQf6Lb4tSS/8hYhzg8hi/cRFOtnHNcnml3xA2j8d+eqHoempxODg6Hz3vQCwBtdsABEjZrQ/fHi3n7/7P8Z8AgB9/TvsDwM/beYt/OE86A+p5AOBoABD472HE7lXH/9+vewEknf/zuJe1CnA7L4kzltwiyRaM6Qh7B5lZSmIxBQjN4KRyoe0a09TR7Rokl7iLERxce8Wi/Ue0c+sCLzQf06Y/wxxGX9pEiwzr4RYqiU57Mrqq+xud4CS2ScjIZFMdWyLQK5v/9ojlt+oViyxO7MPlG/FXMRv1mPo0X2Ch2PgizyseOPkOnMyfW3bG+QKflVzAmHIr/4c0W0ea59Ga/co7eR4HCDBzFB4SG5KerUCAZS9ChzIXAF4A1YmIHDRpfTbvpItzbkSGybTYrxKrS4Q43cREphPHje5hAh5xby3EB148TIV0bkIk9HjPf9JkRiSLFgZ6dSgiUaQ5UYRoSM2TZmhGqdFCJE8Lo3o1qpx3TtSGUseoRSsRSQDiyqRWO0WKpGfoXrlNpQhVjJpEAovZynBDcNPgKYmpzLW8RYXsxT7FfDX02jSq0CJaBCmZeLvkK5CjwK7x0YcTtTL5UAZGzUQ3fM3OLJxUhVgyUnFqSFUG8lfMT5NbVb2fiSSqeiImJTeKeIdMfe8ApTTZcY2fpmvUVE/Bq1Wc0XRpcWdXuEDVj9oYfM8YAwA=) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-latin-ext-200-normal-4336e69d.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-latin-200-normal-74885a0c.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-cyrillic-ext-300-normal-66b2369e.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-cyrillic-300-normal-cff08766.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-greek-ext-300-normal-09d21325.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-greek-300-normal-d0749e19.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(data:font/woff2;base64,d09GMgABAAAAAA74ABAAAAAAImgAAA6ZAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqXCkZQuCEgABNgIkA4QgBCAFhDgHIAwHG7UdUZSQ1pSR/Ugw3eYjndBacK7QXB2i0JqXCZGpyG/0OXhFEI6h90kZHKCq8CxUjSW0jL4WaJuakeRYqS0+PL/NP/fxeDweBhZiszQKA2vb11VjgeiYWI1RsMBFpWvWznXp8i91EemPFFThUgC+6AT8f8192r//ZWdySK6UyRVIOEJ1daQqK8z+veQ2+5M9/jP5B4S5K/8rs+qcaiUoQHQVEtB1fKeWjKgwjoX29W1fbl7S49R1+MDKpJilWRopXb1/vaEADQASm/A7I+xIEa7cEZ78EAHCERGiEb0MRgw1DDFCIkIlBZEqF5FPj6hQjZhgAoKAOlIy1PSgEUlwXUZVKVyR2ZyKUogRNhwBARIWxd4wKBYBIlrQoLt/VtMmupajSqkBSJ5A6agVaUHDbaSUCxrSp9xFPENfaYy2vMQpKtgS4BgKs4oWCgAh1gJiF3SGsC+YB8uyikzU7ypyCC6lgwDFRx6zNJYoKAvqIltKnFbLutqNS4aZf7HJPKSlTQjrxxic9eTNhy8/AeRChAoTrq8BhhpNRS2FVrESpcpQ1HRS6BD5f6WJHT17eg70HOk50ZPQc6YnpedGz51efzpKutpDeVT0gupIb+nBEMWx4/ZADtwxICckQc5IityQu0lq8ilWfxgAWIMTSKEHBJmhfxWIhcEwDNTUxxQ7ID53BXIDESI3CiAQKBhHLpzAE1igEJOvYvPxXdhKqlS20uTi+QONhMImLNcEOOCbPE8QrEv/wakziNYW/s2ByWAJu4J9tsQQVuMhiwUV1UERgA/VI1Wr8D0OzD+cyTdI+BmQ0H3QsNbpJztzIxNxJpLsmXv4lwJ1D+mBuIcqLNDHCkGwKNCBAkOozbz8KmILrK60iogRNDECRGcEgIygwhkof4AEMujAQ0AHOrqDNmI8VPCIXfhGAdkQH3r+7nu2WIhExOET+aQx3nsa8xVwgb/3gj1Hko/ov3DuPAFJLxMM5UolUD5PqQIU4BmENhhfX4z+BAZgDSTUD6c3kV9YiWUtjo0+7IxgbyQHozgazYmSRDxnCaQSuVFzl8JLGpkxutDqaqxu0nWn00OGnjJ5y+Ijm68cfnIFKRSsiFyxECVClQpTJpxehAqRKkWpEq0aQUrRDDiCaAFjkNugcgAqb8ijgEpUQf8ywvqK1Mwa3uwDpa9XBkzvq+FmSGvm3CfWiSfNFgjZ5CHTg83SkscaK1osZleZEo7re9o5i73PXMJSZ87ZsdxaKLURW9nQNFBs4yyglxQLpLSWb6QNQdTF52HNGUX1nIGrs4PYzopYz331iPfw4UvOhtjOffGAmtT+3DAWaawj7a2NDhAzdsSNuWHUna+t5rx9yJv86N2UpDcPUibbs563bz63By9Es189MopM7Umkra3eYtQvjedZ3suH5MV775G3Ie/e3btTd9imK1EyROEcdQwnKJl1/z5puIirYZCTfZ+bNQmpiMW4NyQDyxHubrZq9gg3n3h4KIPpXv3V8hoevTLYySLBwcfxjmWPSMPDKxjtvO6DZa8HgD2xa7g/kn03aWmIjP42dfKUViKjqN4wqwfaMAcmudy0I3zxAKb259cl45ZpdptUdxHtDBEvd5/lAhFjelNaS845OW1E3ahRIOye6nuxQK02fFCEH/muA+yJMU2UbcwVaYypKRzJE+XAqIKngt4LvQZt7HGnKYeIvGwDRy6pJw33Ver72yqpbq6BTP2p0kQpWUqpIk03TtXW5rnRKUDBTku+e27OuoG1ZTfWy5gnyuFUSWU3T59bcXmlGi53Ledmr13SG0r2vCZn6qy8u9nqxg0fuO4kdng/EfMaEXLNcXHHG8/I1nC4ELQCLfRuXfDxtrbxSvzvL/NfyP9ufsNm3dzXIAK7a3zC1b/tzO49GjueXI7t9/Ja0++BUoDFcbBwrApcMGQBxGCx2fyBt8O8g/+/Ge5HSmdD/W+Ie9U+j+LxkPiyPS7OP5+iEsmdB2MdDs/oc/NKK9lHpjtSy+l9fr1y5Zeb9AWLmhnL93e843+1WrHaevoBXuXn6h/q3BQcB3/ErfNDxpx491Z78vzgW+CPOA5+7KaFnezC5mbhwgWdm9Agnd6EXdkfno4/yK6YyM7XRG3ZKZzUg8+ivUfHNfvwT9QeFD6z9lgtlned/aZ4+o0lFcmr12a1RTfYmmybnbVhMd3XHjuwd+uvC30zzb3Dxh9e9qpfdcqpwE36nJZVDs0dIq/+4yeejM/bOO/meP2vE56GjvGok9Ta/t5ge7h/Ro12zuUVCImTnXS7vC7n65d12R6XTs05mlm20HOAuMd+sNjj4eQ5sHzRsayajUtvbSz1PHakxPVW47JVt7cWu+3bX+J12wyFSdYW3bIj+8P7HflB1y6Pf5d65FiR69mUprX/LKn5fHvmrEVPVo+zYPnYwxPEH5Y2lmzur69wH2CO6Kpbt+lzJr6Awf4wBn86GzlymEIhIiN7/W4RDtlleevO7I+fd+bKWy5fDm7dlfP5oyT51S9tbHyys8Jj164Krye7G9c/3c2eZHjQFy3Sto43323++Yg3VUdljuo633trdP0P0vDm4QebwaDZYqOo/rBm++JXpoa/D71qbj9w5+HW/NNZxjPIZGIbFww71ZS+enJZfm/PKZLFsy5/htxYRZrDzuA1qW5zbUr0fpWRq7upbM+6T3WyCU931mdrh09p7ZI1Q/DG/NGMHj3vWS7eCb0IueRe6LPLUqP4o+mr7FCzxzp+0bLlB2MNyf278wX0lC3b6/qk+Skjknwj+qSq+XFzbJmpWxur+6f6DYlI8O0Vp1IjlIV5/ol9mzYc3zffPCqpUKdTF8Jf1bjiVjFfrYjpZ+idA7b+5KmZldnjshOFCN33KWLU8HDFqGERkZypCE9nQfD0eztrTy7ZsgWfvHbngGRNpk6t+at0qaTplkRP/rj0lmPTUscx2+5tqT20ZMP6Iy22DEjSjB2LFyldu5jaoeWpZUJUeadClLH7UGHisMrBQwWQb7tlNhxdvmnDieUG88DkMTpd0pgxxzJdKG3NtFQM1kSPjooJ/mVo1xxHKq1m3tjg013FBQ7o4hcUNxS8nifnVKyYW/H4347DhSf/fiv7qW02Ylo85pRnH/HjWeXkY0veWlEe/KPkhoqzLjZONucMFfqmaU1aJtEvLKY0bCzY4p076pGh1mtGsAg+4rE0/ZxTh6Tj7JL0eFW6M62aPDFVMbTbuvN+QcoBIWOcaJWpQRM0uOvnft18g5T9YNV/xYIhC0D1BAEggJGEUxDqeOYyoI5jGqkAdTJZRtmqU9CbkqtTyRDyRZmGB6T1KLxRTwIoX3UiSSR/r2uC2kBiqe7KJBJDhVnevS7vBGJCWK/1DHkaFAM2U6AzAC0WAw+LwRaLoVESh6HD1MsCF7Q5h1imWi5NZbqciYHj6RWA5BEqSNJMIYJAy6OjEKob9oBW7AH3JI8Qkid5BJOjzBc8D6glUyiOq8Nj1pKh2ECKdObggz9Ag/1j+lteaQB3EdAKKnHA2lcFMzE/BgahqIH+QvFlwlGsgCVYAbcg5gAjjkAoE9Fm+dv01jWntQeUwZTGagPOo7s6CacQ1jyZuMKWUq5HUymDKWe+plDEROGaRVcTpmlbmV2fS3B3wJDG6dR8HgR4U2VgDR5YvMTwWkjHwyGKUjkDQ7WqdwtB1vC+3HfxcHguDXeXi+FzWuuCvwvByT75hs59LCWH0CNE0o8aKiWNjykSWl8wQGh6gRhJ436ONfBZ0rjHY826v3pCanEtVnMVg7qOpDdjpBrQAKTVW3kfklWWNBWnaAwhoqANTJEK3I9xAQRqFGIo0g+QBOXBdful8krBVMtOUACtWWRD32dmYAvEdk48ann37zNLWcf6ztMnKADAaID5wEW500mw0ieyBvbGUVhr9bGGcUosxra4VRgsNogYfn4LyzIQKrIO5qTtmA0ibyg0d1QlEybSstWnpgenRBZA97A6hQA1T2SN99yCdLDAgZgoWM+6y5bXBDqwN47CWquPNZhT9sO6cavhE1mzV2oh6MUuJ2LLE4Gsx8z//4q5LCSxUJoDe45bzbRUK4GDnQ4lwPxaIlHudMplIX0ia04uxXrLE36IRrJQTCzLs7Al3Oo2VDLpQm+KUVp+QlTcD6HW6lPyMU7stMYay3NmNQsO7az1kOsy1QhRoghmpe2YSqE3GHZHVTJ8odZi9anpwSot84EXb3W+Aqh8oTXOczm5zrIl8dpTet2OmSj0hr2EKGHnhV+7Xqdq+8lkV0dSq5NXaiHowYzHJ8tnfol0fSIxlwE8FuMdzYE5w65mmksqdzo5mFjo/z/DX0AahTIg0PlNkFpaAYGcBQgAHv2kdpFyabpt799ZNxEA4PHP424A8CRZef/P5/+Ncy+0AgAGFACAAP8dZnqYCvJvv+0HBMPpP4M7gQ+CKIwOC/Pa0spMJ+JtoJCZ1COU0jOQFQ0hxsJ7NhEH2PRJTZxY+gA5EQuTCRioDIw5CmRQzifjhfXbt/zMi09jDSaetQ6DUmouzqP2C/XIMj96X0mbMUHnVTy+aV172lAVYlLwqXga3iU0PSBSBPRj0C8s/1bWUQn3QG7Qz3GHPx5P6F+JCPhvefAqv7Zy2oQnOPcS/KS3oYNfi1B+QfgujTDyK/CC/hUXqBBw5E4DPQFieLRKBDTZIyMVQsAVSSEkFnCqjLcqPAEOjEsrfBGeKwxJEsVGeAGKGBc6bgepcCRiC6uoopBM0xIn07n9g04po1evQoE8+arIhJIHv0xShnIedKhSVXJUkFGqUKZQjiyjv6/qyPPz9hUqyfg4EOZ60TtGsGB5Coo3UC1TkCxlSgQTLwnFwQqc1/VtkjGiH56Qfes81YplqBAmiFyIaL0kSDRSol5V4wYiFeXDFShTSnbUe+KB8pNnUAghFyGHXCYfNidtlV8p6wPj+hWvZOrPiyP9CHhe6aDRBhnhsvyqWC0nmYnzoeUcnmFB/+XOaPu5sv+BPgcAAA==) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-latin-ext-300-normal-34623012.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-latin-300-normal-6b2cee46.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-cyrillic-ext-400-normal-f7666a51.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-cyrillic-400-normal-e9493683.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-greek-ext-400-normal-d3e30cde.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-greek-400-normal-2f2d421a.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA6AABAAAAAAIkQAAA4gAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVRIAII4EQgKqWikUQuCEgABNgIkA4QgBCAFhBYHIAwHG4MdUZSQ1lKR/ThwyuwFjhaNSE1IHRJNhJc5TuaR//PSZ8crHuzH0Jf8Mrh2rHaeUc1YQsvoawes0Agkpbb49Hxu/rkvLy+P9wKERUgh2LhB2IMECoUvqLijgAvsNWwhYY0QaiBUE0gt7vlfujMtdnWhdGMqbdMxrbjTymiEWNOKxfmfzqe7S1yDKlwKwBedgP/PtU/7cy87s5/KvLMFEpbBkaqsMPm5zWVz2RwUt0S8RVQ352pbRQy2qqwJHaAwFUbUVWhX33xV7wGS3G71+AEvWGYYGEaocUz2X/cqwACA5Jf+HkQAKSKMDDFXDCKOCpEqHZFhFWKNtYhcmxCFihGlNAgtPaJVO2KHHQgC+kjJUZtW5m5G2CoNzQhD9tS2NkOC8BMMCJBYlEBr4UtpB3EODaZ7MJSfdHeOaqZy0H0jpaZeE+c12p9MDWjIF22KxAab1AC5ysrOmOAkfhh/5FbnHE0ItZbUuUVQ4/A7PIJPEkuueg6WEtLbzQcClKKUNVBpUDZfqnOVbXn5ohbjQWMl35l1EfjgLIT1SQyhIkVRiBYjjlKSxZKpLJVjjTyFihSr0KhJsxaUImrF1Ajt2wwJoBdIL4heML059ELohdKT0gunJ6O3nFo+tXdFgUJ6hdRIj/U8n5oTIAKBgkQwozkiJKFQJEXhSCaJpyVF/IEBgC/MASksggS5+KMCWbAK1kIRjZGSACQUYUDhwCOytzgi8RJxlFREkcAChZiWhfzat3WxUqX8ldEQxAONfJRfGqcKcCCUgkgQTY/+gLcsxAd7fT7mwMSzpIVBYMMQY7jHMZYXHd0JYdMJ3Uu63sBHyd1+cLQeSdjQ6fQ8OfCd8X2w+9ZvgiNS/pC7968Y+u7lPWIOurDAPGIEwaLABAosQp2o0xqIP3BkzQYiQdCCCUBGaNjIt2iI1qFz3aUqatQmiaSmY2H3MRICnL2ABER06MjheDZzf95Dr5dIIglFaMlAPJ0ZmI4/buXvnBAoWEib/gsnMxeQMuywRphC8bTmKhVHR2Al2ipCSzGWE8nBWsHHMpxMvCXEsvjK5udfAuQKtF6QDYLlmSNfiAKhNpLaJFwRmWJPKyNXbp4K8z1nga0WUlukUqQqUaop1IhWK4ZGgnqJGig1StJksWbJWqjopWr1jDZpDNK1I0iVYcBFiBGwFtoYdA4AnXdpSwGdqELyGsJsIJ7KI6h1oNhuUsDzE6s4G3LH3BPHPOKfZZsQUpP3StMuS4d87yamJRJ2SAjhqGdkQKgk6sLn0z6UCw0u9+8j9ZOI/WjKLfELFdGjS0RSukJoojuTMsrV9xWbfDvEnZwxCIEBYuK7d/o6sfz4C+dH/PffvEZ1u6Y6OziTkQSANwVBQgdAmKbClB9evO+XHwU916d9bYnFPbe4e6Zc9pft2k1+7/R1E999S0z2TnZYEjrMRZ3bE0uO7tWrPItJ0CuCYCaqSq5vB582ZWQ4UdOeiQlimRxFEYYnxDLB7XFuLjwRi32VRwTDEe4Tp7PwBpe85oRQpQ4wf+64WwvL9WlD93heyHfsYJCunt7BdvG03/sRrgGBJMAy8UBrJzAPt2iLc+yPN/EdnXv+0IqNYNbj3LaSN6/B/G3qvnR90d0sGR81jIjv4ASc03lhT4CcNWLMT5rKxJutmyfhQVun3Miiq9KqqKizUYSP3hmETmIq860xaXxLTKXFHKnja2EqtIA6WpAt5ntErzASTk+NCB/Vo5Mjk5OtlUXrm2uzcasTMiVTVcYXT2pXWMqXzMsVBk2goMoWEOm8mNkIpjq+Vly4uWX2dN+PuK6qhNPsVoqrUnN1TUtj15y6+8z1w4Uevt82CcC9nbABbD3ZsuB06P6RSyeyQLqLdORKu0S+vF/qlkI/63Y/WX/qXd0Dz2HNUseftDs45sPbN88tyZ4e+/xubC/AwgMWQaOZI/qR446dbvdwv7t/ZNaNp9nSpmCyIufXyVe9DENEvDmnYf9Yzn3SFPf1V18RIS9Hr1xsZ/tm/cSL+NH+g9/SPf/17qK6Fx4Icy+Prq61//UXExaXzyOXn+20V3pmbluPH79j7Z55BZZtXTOjBo7qdY7ue6Ms8/PrIsdwdC9kC3rs0vSPJUvIGc715OLNhf/5rXnv5Vesde99VHE5od53b8BQYH58Ots38O67R08eitx0Iy9j77n+35cY1jrmDzdsv3bi9uy4eFvLti/zKq/sczRVfaR23ayRdQd3+m0u499SqbWlpi+6kOSQOxZ9937N7b/fr4769rtXhqrKu14Nvj0LFrdmZa9v3fFpVduVA6f6atmhwWrqlM32ypnXquh33qvhzvQjxSH/OXt0sGp2dlCbemHc+Gveyc+2LZqsGRj7pFtz0d5u3j+2p+mnnb1Dxj8nuw5WvKJqqo/Im85a0HZ06L4aLjCYBQPRKqyoqli2rKpihfDrm4bKLB9POz1U/fufQ7WIHT+5tX/+rgl2cenKWxcPV4reeKPS5+K7b53sdyUCWzT9hEXZLoP71hn+/pEadcHcQ1HMYnePtZRh3+zT/17RkhTD9DtDths7dmJ0fNZxxH72UPEXJV1foobJGX8tb+ysZvi9Lm1mSHeYQPv402jJyqwIlGZc2jKnh9doYwyx2xfsYhFmPSdJpwTFmanY5y39x9bhkTsfcGMBM/7PpeBnLiFx73vG90+3FGbkUuivblOS5W+7+j9ZCaRnRk6IXh/6zpJeFJmXtDkyNX1Dcdbn/v1DJywrSiJXJK2PTE9fW4zkc3C/c+N7xzc/f/+Oe0Nhu05X2o64XYOjLq2wMF6Z+kJSqejVS86DRo2lYj0PFXn0XAybfNY5tWPq8KlTiXx/zllF5Y260vKg5w75T93wz6f657kb6FDxq5yuHROHv/nqWj+urC3lGg1d0rxSu+DjKqo4IiqmY14p33b+QmPRhq6ctSySX3K6Ldc/cHzz8wcWd1ahWqdLl7Do8vYFGsu/NWtLkvKSMuOX5CSbwqst/Zr4NRE5UasjYuOX5UCw0v5qg7tz5dNXuu2Z/jlVtzC0DstWiye3Tn6o4f//nGwYC29A0mqFqcHj/5B/6DE1nDh+ZGSTME8er6yPKhD1DJ/o0JQ25+ewSOkVv5vn4a/A9sipFm1tebqgZ5c6eYWsdjA6Zk3Wwobwgp171DHLw69kh0dd9MiAWGD9ano6KhIEgAgmkk0p8wXGA5hdzAy10OwJM0WbVqBk5osRR2aMXewxtgpR6CBpVKzYmeFUIcxLW0JJfbtDRSmCajSRbJAQqH1sLRlsFoxODCToBkCBJcE6giVBTk0CNVgSxpTcp1s9hUfBAe8nBFZVnX6Pq9wv0MMAjgiJ9JZJF6kp2ILAgyOCjDgiGO/hiGCocESIfMJiYW6S7aSPovRGuHlNDrOT6CnEBKjYPGzWYtNs9t5igBwVVwuMWpzXobiJx3FwqBQPbFYpLybMaCng0lJgBp5NYoKdyrgTwzIqbwV5tWVsZmxaDJKZ3T6h6NvjEWiqVQeGTWt1QWa86EjN9GWwa9nYwB1sM4EawOreL2WvAAqiKOd+HhNehVrnBaO2DrSUkjDoNGbNngDoNNaTMrYsGMTr0CoCtinPSLwPgS2ZuTufjAFqy9s6YIa2GWyqxKN6lbUsMKoSDkjglCwl6qZWAnZcErULl8yLc5FQ2nY7BlUXBsbbA6vGaZ5OOGL8Tl2TpOHEstgw/ouhdHXgNaxTUzwBC48qUedssys702wW0ZjXztyQjbf58k+bgT+Q9WTnl97/Pbzhbfnn7Scn7RQAYDUgUnCiP6EVqxvxYvTM5GVQQclyKpecNGuY006PhjaqbBYX8CC10M3qQIgXBzjVQMwtXuZ156RMt87mc9lJ84zAaWEFuty6S4Aa5MUYe0JTMhY4IplEI6xMr1thXlwymZbrpCHAaZNhy7kBEC/TsSoLwQhsHzxet0hZM+HxjDRmQcRCqTbsI24gJmdZCRqxXS1Iy3IDim0tsJQKVMFWbmF5tOg+NLGMpxlpo1G2zsyIj4zSar2fRMmyM8E+uU5aiUzYIMRkT3n8LFSuEAKXPQUKigCrGoix+8i8wzkp01IaGQHDkbhYrXcABEZWBRdA9fqIW9WBeNhshBiEGBTAjPnIvKMKUVgRYqAziNbL6WMHhDAjqcLwfYwBLu+scB98LiKNGYBYKNVGJGEHYnKWlWAYJgfqxw6ho2RJiAGxML4XVF47iLJZgAAQ0D/9kN91eKt/5h02nAcAuP/+OhwAftqSP3Fv6lGXrF4MAAwoAAAB/leYEGEu6LdvLwcE49r19v0Jj0iP1QmpSn91g8x47V198MzjdesRqBl46ClYJUIFjrFqHOmxlq66VNZcCnh8rAQMTE8QtRXlY3U9MirY5u/9ZOp1opTaebzDaJ/9OIIeLoHEOyBUu1025EUfl2Cb1ztKM+pD2hq4kIufJoaayqEujvZ4H3UaKeURkhEhMC40w0n/CTfwqBx4JH3ZIlo5Cd3S3UJNhaz6bfpZOUAA9Oojhh6it44U0v54Fns0pMMHcJOTQXBsBsXPG4aA0hGDFsZlCKX622CEpcjnR9WyIog/xPG8IcFFtwyNPtqNWuh1aKVTR8tAbjFlai63eYJqj3aNZga1Wsnla9WiXq1q496Xameg1aJVGzlFAIHQqxGflShRHV1xL9pVSVCtRZNEIiLaKF4X7I2u8i1uVKtOu0aVWiVLoJQkXYaNNllvkwzjdOJ342ZLJpeFWF0bnRbN5KFskR/SeEqVUiRRSlVLqaoK2ygbWrapbqPQD6KNaQ3RKLQxoq40dp6VchWpbbXctCQa3EhgrN9/JYcBX0ade0ZfAwAAAA==) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-latin-ext-400-normal-64a98f58.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-latin-400-normal-0364d368.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-cyrillic-ext-500-normal-8b5f6999.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-cyrillic-500-normal-f6bd191e.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-greek-ext-500-normal-528b79aa.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-greek-500-normal-ddbf6a70.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(data:font/woff2;base64,d09GMgABAAAAAA8cABAAAAAAIogAAA69AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqgikYwuCEgABNgIkA4QgBCAFhEAHIAwHG7sdo6KEtGaS7C+TNyY9PDQk2CZOW5KYaMRo0Jq5s3BCFfKGVoHIF9FOZ3x/PDx/7D33vUU2bcANNNFKHX5cYWnZaIJlTbT/DKI5m70kl8uFQvCghQqiQWvoYxbEgkuCWkWEGnUqJnzFHWp+h3OZazvKXdlPzs1NyZbViG2TG+XnCm4ehZnRqJDyHxYAVbgUgC86AX8CGgC4Oa/jdQvA8sns/+ZKm+zP9OWAIM2rOyHL4A7UyQozmby52Qm82+PsQQF4r0S7RVLAuhIQdF9tFbrasiNhKpQqC+0QHt9UfR+Q5HRMHpCF2gwLwyizxrUXFKAFQKLevmeEJinCkDHClA3CjivC3TDECEGIEKGIcLGIBEkIhXxEIRWiUg2iVSuCgCZSZqi1wPA4GC6ruhyGyEZeZTkkCHU6gAAJg6IlFAoHQMQpfNDfr619yhnOUuWUP8NjqExqvlnz5b5JKR98SM9Zj4QalFehdAWKjI9+4NTVdYZilbnZukidghbsN9VPzkR3OhPo6q9Qqj9c6QTFjJp1ZKEZcsYJUGh/CXNJQ5keyg9GnuED2Tnu1Abb9bMQCy7pol1svBwRfR6DPguWrFizYUfGiTMXrnz5CxElQaIkaUqVKadESZQpSSai8KfXRpOKFhVtKjpUdKnoUdGnIqViRMWYip9McpnZfXkSqBzpiypLBSOKpcm1ELW5zibqinqivigVjURjk2TqKGofGAD0A12QwmBwMJ0/KuANQRAKiaTGlBSIAm6IaARikVzIjpA9RywZV8JKYIAS6boE6k/fidUoKGhIkY9XD3xRZKm3OacACwKTVwnCJfE/4HUJxMX+oo850KWMIEPQKtfzM6zBTRaOUFPvEF8ggPq5uk58WFb+dCRfIBFkQMKfgJYdlS/s+kXE4khQZk9s938BTfepm7iDOgwwQQ1BMCjQgwIzqJOCwmqiARysvJpIEHwSBIjB+ALICCr0gfINkEAGPXgI6MGPQaCLBA8VPKIZ1lFElsWWsZ9m6zmOiEQkYRWFpCs2j3Xtz80J/u4ELTr0nqL/whkzBSQjtAphKIG9QqYU7BThCcQXRMAXzY+QP0YAkf+wPIh5UeOtHx/qPGkKpyWCtkg6ouiS0xNNXwypWEYSGUvSXwozqcylGSDdQBkGyTRYFgvZLOWwkstaHhv5HBRzVEKmlJMyzsq5UHKl4q7SEFWGqjZMDYIUjg+oQHSARchdUNsHtdfkeUAtqrB9NqJ02zkWXqbXgKK7BYH15zdxBVg7VjxfAuGXHpsX5aRmOQrD16vhq/ElHczOo8fKSItOfYnlH4Kovz6r3zMeXyRtk7So8yVL0qZfz59ZUi+tKRLQsqOb3dj9d4ldRVo2MRWFZLvdvIM5f9Kz/aFfrVH+aEXcQCiQ2QqcEM77nPu+1L83+7j+3ZixdMx7qb0vwv7Fbt4ZR5+gs4o4rjoayrI14NLDxwPZfgZGDix1Z0RwYztaM04T262ewPgnz/EFMJItkoUrHHFTG4sJ5BUesiMcOAF8rg0QqE5Wa+o/4Mzi2Nc5v5UbnYDo3OsUr6IIwhvsbsfwfP4BP6tX6fY7mVgrwM9xnLuXLcqf05L7Z9CyXM1fjTPhKrLlNUe2AlMxfvRPZcaKB3n0AtzoXnfOTE6rz3P9RGnRG2ahgWt3iVfckquCYBWXBWcGkhgG6RGST/pkD+OVICsAq15My+zZ05eSecfkEUnzUOcV2t5CjcVeZIWl9Og6N7MiOJWFeUQr6tSRW+AvblkjXsVlypLdW0/OJ6PVhVKu7Iztsggw9JC1ehrP/fXafBxtMYQuEYI2zGhHqxzvY2sfecSPj6nBDlLkyRMWPMh9ssTsarEV3wr1v9Rfv3HbskD++eP8KPuNj4Tqhvabv7w45e3z6uzub9bdAAM3MNAe5H1h3gU8BgO5D9iLqsmiyVV3WZgXDo+GFn8E993o+iNiqeu7GXQlsyJsR3MK+tWVoLdly1bdLcZ/Cca7dYse71zUd4/+oSt07Hdu/uj/+SuuZM+SWQh3CPxung4tO/Dta8PKb17/HHaDwGZS483HjQsXPWmsvzkJHYUl309WavKn3r0wfW666y4NacKHPxQZ5lUr9PSXJ8Oh+t4g10EYZz7zben4i/NG5qxZm3XZqVRtgsZ6nQhHd+GomdNmzNsw2kwu9XaadGTD78hJqRdsdlRUXen+M+iK2ukq5c4Qz77mLVmpS1L+5xSGVVpl6v4J7FSXuEy5coUKsnbTfQMOrcz++XN11sD9e6dtSs9s2az10xYMBvUZdOW2bE4L+dexbXzq5+VdKX1bx4wat32S4uP8zpSvO6bC7UP/p4HHtmT3vdtS4HX6xsjP8Ud3KwddLu551FWbsWtDUXXrvsbcE1WbO0tvHleNip8ky8syDDJ0Nm/etI/Ox2nQsG15RIHvI8sLQ0J5pMmhIezw0eGG/rd8e7bm9PZtzcO4deXk9fV6zDQ3fk3ePSvp6+w27rfdcyZP2TPHPLNm6wftnllIvVHy8t01Cbrz8+LM51veGJh+eCHZLaPsQMOClbg2vlq+cfaTke3k0GXbjYs37p0Utzq2fC0K9ULvY2nCjeslhzZ2qHyMx5tWZY2yjTd9uXzTrKexm/ZOvIcx3n5lOuuDvkTrtgmykwfnDcobaKHjI43rlrS797Wce962btzq/bGINsO/aDn+YUDt+dfnRridg/23867nwqtncMi3PefE58XqGulrfmas0YCB+75TgtXbekZ7pljJXeVWzsODE31PqK3ZfmgkglKtglzDrN2GBibA9RTzbW3vlbNn3l9Z+zUssbKkSFEB+xd73wnPFvETHdQEjfZJzMqnb6ahAdkjUyPFcL6iFaEsCA3FGxFZbph7glvitY9j+rovXOjtHvPBKzVNVZ6eZhWzWPT9pajvXP84uscv0mR0JBv9Ulj0O8f1+7V3GP169dlTb1aPedsvRVFSlqJIyLjGrsihkk15bG3/ZHHrzVulKRGt/mEM3Cyv9Y57u/7c6ffrx733UqQqy1JSfW5PtM4dOSsvLE0W5+hh6+HnMsk8p2Nhvn24cZBFmLGdjZc/ePmH5ygezlVY3O952FN//1Kpk0Up/K3oeQrL+z0PeixmKn58PF9+07ocTuMN2xVC7smfJ8I2xfGl+wTrYwVR5taygkFRzJQDR+sL45VyPwZDhtJLApk/Pb97REsCY1OaLKIbxqY5Bxutumtl+X5wXX957YQ060BD3wF+RhaWDyC+OvPivIugLEAACNFEYiintghpQG0WOlNG6iiyhPxUR0NAMeoY4k+eKGNxhlzYD0s0ECuqVm0joRQd2I7aQfwpnbEjSSBlWtRjE4mpkID26Ta1md5HGSmNWE6BPACwlCQh3FRJEoLzSAIxkkTGVjqF+HoDfC8O4bZbBlNl/jXmslr43YBkEirMp08rzEQm8A+ZQB4ygZWSSQixQSZoPOSD6VZ1ZB5FXD1esJkMtZE0UigpsG37EIlso0dw7yiQb9vNglJk57/fsRCrYzBstwxU6E5BC/0RegEYIzfgw/CtmrANKG1YB9qw7NMi/+Sx1E5V7cBK6KgjsRqmY0fhH/dTetWA8epoLg+MMCaMezKWxlibCxtL0Ldn8ExA8OhxVCP12kmWmmbV4gbnZIdloQSFwVwiW9FobO0qowiP+0nuGBSjMFgrhQkOGvRh+U2ZICA4XpbV+O8SYMe/seU9iLNAHEyVkkPoFik5mu4GSg7W5aTkaK4JUnI09nFW8p1x+aDkwCWloOhbh01uMI36v1vJPCZqI6YDJXm7oA/jUIE0gX6DpXbRJOiWilzfUREsR0UwERXBZKsiYZ+5It004QvuDMkLNSwiN6Y9MBoagPe/tr3cy98POeXnpf8OH6AAAIGAsIxlEPi3V1jG+AoxayPrxBQ8KOnZHmLJoqGscjX2FxrokD014jB4TD/BRwYqA6FiNpj1mkgIMcX19FwYTMeIPdSSZWZglWgB+MXRcahTYhaHdBxqKAMstUThNcZY5p5pEEbeFFNY5G2I7SGWLBrMKrfDjGQ7qRKzanhFMI2Y0XjMPRB6zPT8vWOVDHy5mCUfUT+2k/X0KGYapgR+gDBghE3+21vJwFeJWXW80BEdLGhlGBV+4cjcXpcw0SHX1MH0TREldUpuUQ/QYCPywJKNqmgdPy2LsdwT+gIDC/nnzEeL8Akjc49DRWww4zURfU9Ecct6LgymHUQeEUuW8WGUXCfAGxud9jRAbRCxWKEDKFMmZlRJG1eG0sYT0b0iitvmAZZPlYaOTBvrbGEH02k4S8X0ivjuoEtwmnsnOIZwGlslDTR1n5N8hOlMJ+sJXvLfXh86FPK/RwRvBYuwu5KG10QXzCPAbQaE0QxAAPD49w9K51/P0PD4yhiJAQD3Pu03AoD78fIb3x/9aTYuVgMAGhQAgAD/OfSYtA/kL1+2AIKfBzZePIjQwu0IbKJH6wf2zgduM70cj1fjeryH+s4A/ku0mEazh5gqLGXWtlgVuEiXtpZMEzwWTcBKoTpP8hWOh18RaT90rJlbtN/3CcbSi1qMXo1bRn/qIFYw4jTPkOs04h26C32+Q1voWp3bJkvbQfREnN5GaINzV/MkX3oE5HkEGtxfQT1leZ1knSAHNwTtOCPQwCWo/TEB/ui9bAMFmjjLtarjmkCCy7Q63GkNDKG1MJU2JEz/VR0ME6DiSgsV4VvHrPWXarNJRmpEgDOuFEJqukJR163wONjlzx8rAu6eKTRphoo615wVCTbyczWphcohGgA1E+zx+OnPrCAG0Rv1o6TSoFKRAoWqmXEma14zcXti3o2GKFctTyUzcpWUiuXJCV7YV41qhZQqVTFjVYA5sUqV4Rw5KlA0PHGNbA5yKJVxxFumitKi4kDrKTzCeO7At0aZGHkK5FOWylLJhQMZJ8OMECNWhFgjci3aCwlkkua4UgPMkvRucXvvm8WNExl33SmZbEX0gdGtrkrO08ZVG69SMqGulMMTwQtGe0UJFF4z99Y3Ud4TbsY+KBKo4PlZXFWGIyZ8iRuzMwUAAA==) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-latin-ext-500-normal-4fba9ae6.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-latin-500-normal-d5333670.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-cyrillic-ext-600-normal-2ea11f8c.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-cyrillic-600-normal-9bc492f5.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-greek-ext-600-normal-c37a11b3.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-greek-600-normal-4591e350.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(data:font/woff2;base64,d09GMgABAAAAAA8kABAAAAAAIsAAAA7EAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqjCkbguCEgABNgIkA4QgBCAFhFAHIAwHG9Ydo6KK9D2KfybYdOoXFAbFQsoQic1SmyJAqzA0XiGE8RnceESOhCssixkPT3NS70+ayTRdAFYrVwNqwDsFgBJQAqpbeYjGoUPQRP1HNGezl4soFwpJEG0LgSLuIYJKsAQtySEBKmbUDWn/n3fk37FScYGguu391E2UUGiBhc1rHohl0Nw/ONlSqIYB16er/zf3bzaTO3OavhSAclIgYYFQVVaYSfImPP15VEJ8r0gKWBKg5uPR1bZLbteRXrVCWBZerZqpHqCkaykyLDM0Q492v3tTASwAoOBV/2UInwhizBRizh7iwAPixRfiLxoSKw6SQAKRUUAylULKqSF1GiFt2iAIGIlYwg4fTUgH435xQw0YQ9deXlcDBITHACCAggGjLw7ktAAiBuHA6vh0VXPBh7KwmhKBoWklv2xq/E181bBSCgflzU6AwAH5D8hdANIlQ7CAuwG51kuTczklIQcZUQztm4/liGbIfLV+SJnfyP9dJC2Tkc+lC6jcFKII5rflTXP5/AO5CpAvaIaPZAgImWN9G+wmL21xoX/U402YcTnC9TkGIRu2xOzYc+DClRt3HkJFiJVMRk4hR5VqNVQwcvkU8iHlcxUePjV9ajOoGVAzpCagJqQmomZCzZRauHwp8kP2pZBRK5SP1FhtGbKy8B19oBmOQUGGjuABCZEImSBTD7m7Yzh/HQDggiGIYDY4eW5/GgiGaIgDuR7oEVGI6hgDmQAboZs5oHPkjMWFB3o4MABDtO4yvA/y4hyZMunJUoqSBDhi+rxqzjxgAdWjhAM9Ff+r6xnATmb+4YGWxiAxBv2owEvG5hFzGpPBqShQwbCrbgE+aYp2nxroblJQOwAFvgUsuGb8hz1xJkpgIDDLl8aD/ysAxufLQRDnARUDsAUHgjBgwAoYsAN255XlDUgP4NZe04AICI6AALG+KIAOgoUQkO9AATpgBQoErIDHLGAZAgUWFMQPu1BGd5zc9NHypZwmCiJCHOWxK05s2tVJhot+dR6iz4CA6MfCzfP+x81fm1jGZByVM5fJgRJFFFw0qlA04egiMERiCsMSgC0IRzCuEDyB+BLoSzRDEgPJDKUQSCWURkTChJwpBQtZLGWzksNarpnyzJJvtgI2CtkqIlbMTgl7pZxUcFbJRRVX1dzUcKfiQc1LHW/1fDTw1QhBmRYDPAyIJcA+0C0D/U7QPwO63QA9LLl9HdRhVzunoLibFDCGZZZrcH7ZK6BcWxnzRWq8Go55IYoA8ZdzMHABjnNwgmBcBwIWh9vwhYTtsMDsK2QJDYxjM0U8gsPDWZTgCen4zARdhCupJK695s3Ni+dySK6Go2U1zyj6fB6Fu/RdRh3nFotH0Vs+l7DOuqHVcMhmxAc2SWIEzodDdhzSMDVn2Z2idPVtrsMuPvtHbpy1hEnQ7TH20lwmuZ2fg5ZGYw40OpvEWuKiAVdjzgR0OAhLrTHpsNnVuZpxDrV6icdRR14cOboh1HGJIumFE7lti9MCg4NYA4xmntsF7QWOR9UPdKqeN9bV1i6ubOqD9khORjs8l16iY5oj7pjwEsCy4I9PSaTDggJ5wZBz4z7QaG+0gza9G+iQc8xwgHMJdHXjAgHJHkvPQcvVPH0MOlfDobCGirCWeArFaLrLdyXZuhFjnnlOgzFbqbp4ZanpIZdrPzJaHnqUxLQUMotbTJZyM0hZOgeVcUuAlK3e8E4gl46SPrpV+uTqZo7JuZf9ci1HNhHzPWbJlyp9jPTmXVO7OIrR9gqzuAqdJZObIY5lk7G7ozJWZLqdZmKIvSuWJX3Ul5IMS+xDlrFL7qPpqm3opxNxymoyWKXXbnWsjDok0LHRWJl0/uCv8bdbLTOZAy+N+K5n0A5rvgZY83NIs/ZvB+QHC/8ucxTBsKMYlm3zyiasJL4+9j6gG0LfjpttW+nz+PFKL9GWf9ihlq7n3zweCg55MnLxrW0vAAPqgQH688Lu/HAHhoEBkhDw/tGhxbvFecgbZk7azg3tOMS/Gz/4kcs9+Ikd44TwccqGuIerQqb3HjhQUSY/5A8uaH0aaKad7+LRdc0j+P/fh1wjRwH1QPX7/K/Exv5Pn0vXPxOvDGojP9smd6t//1O9fPlfatXvOuh4JpM6pDKir7s9uX51gVNfuJ13KsoD2LNZssSgvPU9TuvxL3VfoN58zYPyBX9u7Mw7tK/kHw8VewH3gCDBxYNWO59sm7+l3jgp1dl2ac9FZm636rL7uaaakc149v8cvdM/u9NhRszqnTLZSuk5boqwiF/A9TjGaneNVUQVry6B18bnzPr2FXyFgxdZnD218FhmSVuP3rdKYEDxK0GPsuWY3Fxc390iub5+fdrlXZpGTXdr6tWVq9Ju7NaBl6X5/aSBM4Uvn54tjRy8suJL5k/fqWYNqx6/WQVl8t3bcspVByqyj0Lp2IKC708UNyW3O+TIhSGpsy3mn/7NsAr60aACFbGjpmRkXWpaSTK5ti4t1ZpwbvDUmd+M/fVs0bNnZ0sa96ZAJULRta9ZafcsSLm9bHnKnT0Lta17FyJYvkz+pN27AHJtCl+9uQL64fIK6awd4v0GMf1i/lugXcTvYh6fcNc92XNs470FHVjvfxVb1uw80pmyPjF/C1TZJD/cn3vjdu3Q+QWaCKuV1reztJVAg/wzu8LqZ4/ihre5ZV9ciyBJYpQkIFFunKXMPM163FInmLWIEHgs6rBp6rfXLD/+RzakrQKrtJNgBVb3hq8PFroNgsMpvQmKruET9bvXOzw9nIE87QkTzQkeGO2/MIWf7hlaGJpnn+KdaO/sGyaFsHEGnH7vl/kQDQVzYrxj7d08wyXgOUnonfgyOTn+ZRKOL4xRqKsqMlXgLPvNgPuDkiJ3YlIb7eSM0x+mVwIJuV3ZyWxwXWMn19anpj5w2d3zgdf9UQosmZ+4dOnLiaUQmJ/bWF+QGxC1n6L3nDJFGM+z6L+Tl+WTi0uqK8y1iHiJ9n4SB0YBlvxzdGri41FYMucWyGvrCxTZRU/0NxdjmebArjeTs5fceVANeRCri0xkgFfPKFr++eTk2NeTsCw5eYqG2gK53c1tTlDUubY4vshJ4Rgg9g9z3you6thc6phkEj+bb9HRxj8CKE0/rYu5tSHGcbLnUk/D71fVQR5qiBJOr49xnOiZ6pmzOob24krtLe9acB1kz48RPh18NijkH96fa0c43el4kvVs5yLrROaGX4bnKlNVyeFM8Lk/vSlA8KzncY/x5oBk+UKHVNWCTNc4k9chJraz/PGumZBYvSjLNtYo0jrKyMbaLQTYe7rvfn8XMBsIAOhAomJMqa10Q6C20ElMX+2K79AzdR4WeqPOj2x0VVlgAv17ELagQaKSoLajHIybqoPaEQqMM7ozMrAZkY2SqDhGAGqm1akttLuYvqKFfQX0vYANJuSsx4TsN0JAKCYyQGeMVid7GMGrDHn6vG+UL1FxSxVtxbcBYLMM9Bz2AcPP2EwuVGIGacQM9mIzOSyIGcmHHDDfai7agiFnM7y00i2oWtSFgRnF5xgglszJZp1vGGAxd0iFfOKQfF5ZdivYggXu6YYVhlKglfYJjCjIJ55gCX5bkXAQlHboxnVtDSwyOc6IdayoHbbhqJ22m6F0BZp+tq0NaLID2c8olJTET9qVYdg0dF7/74PlZT/T0A8AMSMXlkrsP4VttV7RJhib9uPxIZBL4uHXMBUtzAf6yoHG41cJEhIP+3G8OJOtfvwO064sQUx6hMtj1Jcmy8sLnv4Dh6WpGX9CkhGaxDNWBcYkA0pJBvThDHEPzkh5wiGz91wn1MCqOa/MXIuq1iZgBvEyA2whZXgHe4QprsyEXqwUd6KEm0QJ3UQJe/1aL/+E3s+3wfQEC4LDYbOkvV9ZBT2wb7T35f1/r6fq153ffrhYAHAEDG+OhMiaGE43mZgxu90fimj4HXAH+GJXYmwyJ54jA+mDpXqKMCxVGqUEKMKQWNEahm8YH+ZxKd4ZWC+fOZh9sXsGVpMmMLnTdY3y3YwJp/6fKOkN4Kkmz/CimUp5R54xh30aH1omE+OdLnegL3aFxqbttEPjWtAQJt1oM8U0rcFw3hxi0oP/R5p4A1KzztZMzce1VtdwUUzRMgWB4V4TbaSaiDeQ1BymBrvONbDf2QgKzynnIXVmnPaJSwfWd+0hszflIvFOwRo8dfDFpkQ1KFMygZx36+0GRR5G9l2UKpdCmrcowpAZ0cO/tIe5QsKdnpFTB7Mvdk/FaMq1oHvSdbN+UD6YMmHH/xMlvBWZuE849hln0GM8zG7JQomC+Ag+BrYw2tY2bHVoVDdPPVoL9eeT/n0R+mmJV4BW7AG2ZjjS1lpdIVr6f2KqmiykBqqAlMLxeAVJGSbFO5C7wXBJAwigm1xdmrO3z1sc8DvDZAaAz3+5YALAF6dTxt/f+K/F9JoFAFQYQIB/E4ONr0X67c0WIC8n9/BMEYbDO0cqdLjqj3TIh9xdTxheLY/LoKOh3+SZpkZDqafaAhvaX5UuSF1WlvYXiugbnq6ghYGVeaK1w4Cgdsw0dWvORZ3ez5FownzNq+UK9G3X7MCw/m5mrm102aWeZBBGDVrV6tldljaKbKf0bzOQBsQ80doqE1LRapPf+uZi/oCxtf/N5V7nh97JL0T/NfCf4RfYv3fzE+7X0S+9i1+rI+904peeNtbwMDV8U/0Q8LB1ONToPyKvl7db5DgKNGECeAQIBTG1SsHwHI1SRIeRjBsVKi9PFBrTsFZ4PCJIIbCirgQfES1lIT3gxDIR8U1IEqbHkInrYcOpqGnUUSpTroElNy5VV0vpGpU8bKwaDUrUsZSijkqFEkWerqEam4uVU6lTz5I4ivLiavX8OHNWRmm7eKNCToqoVHNG12r1SFNmpNrldZUo4W9bKYxKlWJpSpRpVKVAHXdOXLjy5S+NRCIJ/5DKOyKZnr0/JZUalo9spY6j7FrAs3PqXXgp4aIwlu2XXXWvV/RhOuqr7vWc8rpXcfp4jlXGWbIoCaHzvuotV/JVuJK9GvYYxUv75i4GjPt+TD/w+mQ5AAAA) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-latin-ext-600-normal-cc23fe6f.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-latin-600-normal-048d136d.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-cyrillic-ext-700-normal-b7bb121f.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-cyrillic-700-normal-f6c6dcaf.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-greek-ext-700-normal-22174f43.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-greek-700-normal-9e078f49.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(data:font/woff2;base64,d09GMgABAAAAAA8wABAAAAAAIpQAAA7TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqjykcwuCEgABNgIkA4QgBCAFhBgHIAwHG6MdUZSR1tyR/ThwyuwFjhZdZivZRoQ5HpLjqB75nN/yDJ/joXeN/JNNdq/ECkl4oOcrPIMFlICqp8pgJDlW4mB8eH6bf+4DH48HKGasdLOCZSraiOJCZyEmw5jKAhfNdNHp1vrD78+VGEsXLsPV14coXgorgEx0Anb4/01V6tPXvSfZ7lA6p57SbkDDytdAgQXkfPZZOkuXtYfTvdmYOLxjjccDWF9pC1DZwoUFhPUVFmAyzUzN24VKSudMcA2WaQaiYZpRdPWbewowHUBhnsoJSw6z5sRFc+Ot+QrVZAZqg43XwkVokRI0pWQtRbaWQ6vplPJZXxB5d2AqBx6oHbsiFXC6qSWFcEIO7dEVQoowZwMIUDAoViIgOQEiGvHBovy4WbLwy1mqsIxheXxJK+vVWc+hVko2PpT3nR0pMeQ5cjuQgTkCDc5DGg1Lz7n0yefZyAzwIbrJ2vzXcmSa7X2LHtOYpmtJj+TnowyEFIoFirjJenvPnDvZClkD+Ry06t8cAbVmV4ftuB/bvdrL4SJCPr4L4X0fgz1PXvrqx5uvQEGChQg10hjhYiglSTZZvgKFilCSpEmWhsj5NWaypGVFy5qWDS1bWna07Gk50HKm5UJrtDSx0mov5FHSGppHWkcLExrLklsBWXObCdkiO2SPHJAzcrFJTSZF/I4BgARswQH6gL8d/F6B4TAeIiCJxtjSAGTGnYCcQYTIvXwJ+AnAChRKEAkMUIjOVDLfv2uLpUhhYaJsvHjgI6EwT32aAAtmNi8SBNvjv8MzlUTBWwvf50DHMsROYJVg58ewEc+ZHOrgXy5pMKzpN+Knzuh+qevuUZh1gIK/DKbPjD/Z3RuVgO1Bebxg908kw9SnZT8xCj0GWEaMIBgUmI8Cq1Dn9uWUEAvg1BWWECmCT4oAsbhcQoegwh7ITlBAB+bjIWA+fvQGc0nxUMEjltEvNLEjji/5vuwFxxGFSKNv5MT2OLZk+7I/rvF/VLBiw26Psl24NfmP22CzhHOi5CeHmxS+NHjG4RvPzEi00QTGYIwlNAprCJFhxIaTGMHcUJYiWYliLZqNGLZi2YljL56DBM6SuEjmbiIPk/QwWU9T9JKqtzR9TOUpnZcMfWXqJ4u3bP5yBcgTKF+QAsEKhSgSSktGp79iA5QYqBRBMs0CXIeYDTZDNxfaBmgP6DYBGipJdzz8kk2np+DVLD1QbB4YffMDNdwNZTaDB8Q28TPgCweNVP5lGL5d5Yv50tnMGGfHotJzjr3U68AlzLdn7eeX6wsdZkqnm/M5QzrTfuB3lw4OVdOur55fOYtyfWILsd6iQlzJlltTVpbmPIulj++QqtuP2I/PaHzYRs1pba+sEOvLiSVEej0lpSzJ9Uuuz7cXL3t0mzf3zmOJz8pcc7tmdklTKwxtJtHSljt6yck4MbndtQpPXIWhqLBLQuQ+ZDrCW0DBCXZYWKKwROly5XyxWcGS5mZS1fKDJyGDkKozT1ekt7Q8tkyMBEZM2KbQxBXxZPcdD01pMJjWBK6HOsqDRAJJxYyPJ1Q1n4Ey3lQxuklVt4emNqCSZ3kiWYHrKA+Z2tTUPmZUVC75Rg4LTDA02b7rrDYer7U95bxxetFXVUx2qfyPaGdxPHbowi5pvq0USOiLKnpRYhO7OuxJMFga02XQRJOpJSmpcqd83sfTU5U8/URJpj5botIrFWKilmThNqOqJYnTRX+0kERLscrfOEMvafqnW+Q3jUqrFCv5QW67mtkk40OFqUlRvlXicksMEUmS7Va6bk+xGKmUJEqmCKVkR0gZpDptcy81mW0kQ8bERMNfQq8go4ey+QL+7ebp1aKsmgRF0dXT22ZidaGKzZ4zC1jlntEwBQZ2LFGduCc0ZpU6KKuuTyzRczZWpwGrc0bogdPr7DsL6+u+A+Dv2xfXPex8pT0+CSbET8Ai22JeHb1onkfH43nuZgvrJMW9wy5/fv/n8BHv/6770qcVYHACDCx/G/d/x/84CQbKEcg69Tw/K/9FbRY8BxRvD8NviPnfdLLTwvLE15+m6JiUd6LT0oJk2fZsdJuh34sNW7aQ6NZtDx9d6FszrXp3jbS+uzL/Gv/TwdrbpAzACZgFtzfFzLzQzUn6rZj2x77Dy0hKs89cVM+cdUGtn+RSVJ2LsP43vwez/lX7BmOW5+XpAyva8fajwzVEZ5N+eTr8z/g2HW1Cqsuqjux5f603TD6yQ/Nf2DR2vmSXQ3hQEJ1api4oXphpK1/s7rr02D92hecMLwefnan5bbF4tUnce7w+/8gQQZ8p1RFxs+N2DRljkyhNFPeOYIsChsYOSZqVggcOx5xO704jzIEpTkcPVB1W5houS6gDYLC70+pB/ozDcWy8erk28u/Fi+V/VheoNdXTwv+cvyDin+U6yNLc3ijqatM/vanNiv7j0Xo67bf6gt6/lcZJwRgmxRiXxU6eujo5YTVSfuoUezap8saXeiXEqBY7uhrP3exZgoOg02KScQ2pC2apknmqKMkq8/jlIIPbi/iG2szXb0lov3hwv33d9ml4rrF8wo0FC9jEWJGbV1OBz9qacqRmp3R3f3ASH8wtSPba1S+bri6YELxcd+nv9QZ7aciC97uObHyxdA7BqZsHF2Bh9ZaKqPnj4pdC65n4FUeyXn4svXll6Zxwz9VeCYm6A6CxviJ+Uc0gzfvBHx8et8zhZurQCLtyXvJg5/EOI3qW+dZZP8mR2tjk/NpHuddbv/Lcg0wkvMdohRSj0SO74VbDksAG+DxtCGxY3NSAoU/PNX5q/JRnvrp26Jpaczh5Xn5NXb3090KMy/SNHRzu61MzRDH2OU0uXfxnAeSZvvJB4/38QofFQdbq0A9n2HuPnwjvnfXCmJSCgtyJeQg8e3OI7SkNX+VPm+n6KNk6kV01ZiNl3qRYEQLTh6cunKlSLZyZmrpASXozDFA32a6UnO14wp7FCimblVZRkZkWN+A41+crdyJSs+1yce3TUbUwRpqenSaTfZeO/gZqssEKyYlnT9kTWGElViumV6iVmWq+gzGLmugukWidlaLVHzsLkY4Jc8bEMBiQ1GSNlaKzjx+Jzq6yHJyurCzNVlg9PxqaPndNplztO8lviNfAUdQhf6RXrVP7xTpF94pz8us9YAx4axtWyp6uloXc3Gfapzv2oixiVBnGf/2+RhZya1/TvqAVMpu3L0vfji5FsKBrsazPvaPtR/sslrUtvGe1JpEX1auX/1T3cOH2v01l+XJt9CgWg/Z9Xxns2b7vzj7vNcHyhFXBiM1eoAyIdhzTa5SjZ88cz2qv6MwFSV4RjnKPcMfe7p6jIco49vPpT1CeIAAE0JMyyhgzBb0AY4bgd4o15pI75JExD+ak3ZhPSkiLvgAd5NYgvFBBGCrWmE2KKOttDTCqSD7F1+eQPEroePXaNyhRCnrpbNYzWASgV2IfBboB8JSlHk4lSz24gqUQIEsVxLMm1GY54m2wh7vgODZVzEJNM2MmvwaQXb2CBNYffHFcO/JQItnVg2Gyq4fsll09xFZ2dZMBZiy41U4nWynImHL8NFuaMCqJkUIwQPjkYTT2iWC5/xngkPBtBQrsCyd34Osy46L6irAaOCjCJJGCYYDdIiwAhsCgWj22AtRnYx2sHa88DeK0NctgCBqjCqvBN+ZgFYT6XMLjHp3oiYrAGPbqccs4PMi9maOwaIQk044GNZ8xg34DFiZUL6QmUxeM7OXLzCiDiRsl5LUQj+XwKUC9EksB2i+wQt4bDMVy2CnLJWtHvi1ZZsdLYqJDpKe7VSS+rt19gRWweFvVew+r3AyEqhdwwyqIxyqolVVSX1m1jVwgJXc6TphiGuXmU7CZSaMS24FgvVDn4ShWyyfZV7ATmkbQKGskT6wBd6yBWqyBS860CtHxQLNTGCeugz57cD/gUSrLhoyGBTC8e/Z57tnYA67o07buq5coAMBoQNDJOmB0V72gk7HJIkFOXFPRCOECx8PrZWfth+3AMNEpe7GHRrtOKrQToQJ4RQI3G9dIMIC9xq21UmMxPV3kIo5HTRd2FgoB/nzvbShONGBXVz2lZYDlOp4RMy4K98QjElS4sdcwwyazjblgyfHwethZx7nGGpXUMmvHeTpeYzJxkns8KFrGdV3WJAZChHINU/xZo5nzewnaMBEYBAiulIgqXfVJDCzxBOiDle4tbvWMA10dhGEs5TDhKWlx8WDHXOOoWVyJ1DilTxS6OB6lZNpG2gowjXvWf2cgni7OyqdCexEo3COvUOBm4hoNLsw1rlLsRmZPFLp4HI+adswszgi8Xd57HQSoT0IBNnbVUxqmVIQiEiloFApC1ViBtVjhUvjlOJ8ZoxJh1o5D+890Cg5yr3s/oIOj/Wj4PNZpXcPwnTGaOVec0lXfjk5EYFcdPYqErr1JNCxhgARvAbcWBDoGIAB4/HudK1vXpFoM+cI4iwAAdz9edAaAe4mxzV/b/5/hkisGCGhQAAAC/CcxztVQUD5/Pg4Iflz8i0TLSC9mEEanDQG3tpdxMkxO4dkV8DtRqD7OuYvZiOXMx6gbt51hd/QR02mcFK70MjRDeKxR8A2D1pNOR/r+uZJlbhemYSmrkL8PV4l8qhsbUXGQ58cZldp4ui7PP0uUun25au7oMyKgWhw8YfjX6YewWGOvE7jYDMvuVl7snjKMvbeHzeBTi3beqveQcevnLa7FWz+/XXKnW6wLvdzARhvWJDv6gghs8c4KcN0d02kJXjt244OmW6tDqhBwgwedYNXoFMZGncfbTp3Pxj+6GZl2nWYTu9nmQuO9ALGAOKboUmzk6vbMo8R2bfOs2xXRqqCjoZajhIdggSndg2KBstqHK1Qii06uFUunSK4sGc70kUqV5ywb6xTz0DeACNea9EECfmaqaYrXLpXOX4YiBQKEKC9mrCZ4635Nvu4oRfJlCuEvUJCBBouXIEqCwZ5Yv7lvh+bSVlqtmOaYQh5BrCfux/KpwgTp4GWyBEoPZhtiU2axjP1K1yoR2z88M5//DnB1qXeMcSIlydpTngB7aiSPnzPVSm2hDs+P6CYD1Wn4Nbgrb6sR) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-latin-ext-700-normal-1cc47d25.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-latin-700-normal-ced2d8e0.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-cyrillic-ext-800-normal-f15d8f83.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-cyrillic-800-normal-82994ee8.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-greek-ext-800-normal-bddb6f8e.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-greek-800-normal-fb5de277.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(data:font/woff2;base64,d09GMgABAAAAAA8wABAAAAAAIugAAA7TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqlCkdwuCEgABNgIkA4QgBCAFhFgHIAwHG+cdUZSQ1uSRfXHAk/EahJESYUWtxdYd2Ko1UY4oE1hTjvBc/iMeiaAay3p2w+AAVSrCslAxgkFGRqIKS3LwIORLcqzU3x755zezLyQ+qMAbHVTUV1VuWZbnA7TNf3cHx3H0rGLKMnCVJksrNnSBuGFsPyRE0Mk6WKWrKGIR6SoOZXA7ACeaAFf/AxQq/Gvu02bzdmfyqcyZ/JaFJHZVwLLCbPayt8nl72EOqcSkgHU9EDlAVUVkq+paV1+hVKdCSzT19ae7sHYkzHJXcP1MOpm/nFMATQAkkvwzQ3I6yMAEWQSgkBSUkYeK1qFNW9COY+jMBXSlDXVRaGYJffIJQqCBjg2ZW9s5AcM+LsZggKut2RhkkIQKIICEh1DYAoVDABFf8IDefp60T3hDGtIG6Y3wJKIl81KRheuS0gKwQHrN/mREoCzFOaC01B0DHKtMB7B/igmMUrniDETAgVBZ4FJ3PaFodfgVemULT8coSuCWcy2DrAzIIMr2Yn1OptuTMg0oD4IMu6Q78M42q4225a4H3nxFF20R5RUI66cYtDy8fPwCQmLiEpJS6lZs2nfm3IVbQyNjE8S5BxceoO5PQws5SoFSolQoNUqD0qJ0KCPKhGp6cODBuz/jDFXoAVFMRX9pAbmjAFI6qoTUjuYKaZEOGZHJRU8mIfrDAIAY1KADN0TcxF8FqrAOW3DOYlxZAGI7BiAjCBGeK4QrLEogJoUbCTwgiJN5RrJ/xxa5ckXqWhsTDyzEl5I8WxUQANtlIoG7NNYfPPOMMHhx/t8cOHE8EgMoEjXuQnWus3CgqnYiK7FB7VjNAvyQ2vmnI9Q5EnYGEtYAaDrlfEfnZ/cY/hFk4GVr/1+Ahse0lriHGjzAABGEeAjQhQAjyGGnu0AZ2N3xAuUQiwwCoj8rgQyR6AWUryABGejqZ+lBs2IE6CDDIJGjPRqFHpfFlr4ftvU4iBRt0TAKcGls7lvanjMd498SQUFFs0f/hTOxACRFn2wyOBPWZXElpIexhmUdWx1HE9cKnlV8DQIlQhUiVWI1EmVyOxR2Ke1R2ad2QOOQ1hGdY0bnTC5YXbO5YXfL4Y7TPZcHbo88nng983nh1xLQFtEXNRAzFDeSMJY0kUJlzGTN5SzkLSEsyABOINqASZA7QPU4qL4ijwNUIwU7RsHET3YNifF0FYFQzHc1i/OquBLIUxE8TyxB3Fu2uSERrzbv7jAMz5/HE/PkcuY03p/lsPqKAHmDhiLMD2ADfMtjCgOlcrGUx9pyaYCAN6NcEMjT8808U5ZlcsUyqVlmlJrYf3zIOgopJZvovU3Yb3nY82uc/PAmWXnjgckoNpdRPqTIbCblpIKOuX14c+WTB+JJj55RVc8fS2yJT4eOOfwE1w3YbrpFE723zZKR8WLiacWMlgyj7UZx7FuEWcLY3MnxvpgdCSyB5SgqpcmMony4Mp6Yb5jg8RB275mTjgyCsB+4Vkq+1/vYdjMMjJhgXTHZI9KIlWeenbYqDTb3mGGPblFVtw37pooEEuNpot1zAMYEt/HYT9inf+i+CZgohWcgOYWcxuA2eS7Xg+MCidE04YY2C9ywufTs4+yb3NqNB1mHjd6cDfKWvYvNDFHTsRM8t9IEEvpDS5klNpcdPR+Dtl7FJ2afFXnbtDDtFE2X6TKTJsqcLRlqHi7JNKeliAmdZBieMuzedMaLToudCi/FtcA8s8T14FF7lM6iPt8kTvN6w1d42PTJD1PcrpR/1ipM6lI7X5aW0iqVL0lV3WXSJMti0oJ8wUtg4lysSVmpC2ETyKib5vmAqOXkmXWiYZ7ElOLJs6cJxLqiTHb4aYaBTdszFlbKDRvvkrrDmMcdbAmbnPIhW1Vg9hFk70x3WfexI3pMpPk2aY+ZfLl8w/1+y+u7M8oyMC1ytWzDu39MzN27ZvrDYotideMOJz5/Odet++fzJz9HvQAYvAcDhSqhjqQOnGCQ2R0zVq3MmZmzatUMNFxbvFxUjkES5d73ycd37xfSNTCJdO/95OtD2j7cj4FnSnyuTZ418/pkcc68UqTPnHUNX1yUF6Qom/zQ+D2Zor3Oj5rtPU16Q7wDv9HTm0nVe0h+TvcmPX37/Xz/tzBn1Zrc4uLVubmrCmF/0aHuZX0j0eJPrxaPK1AeWZ9on4LKQKMQn8w6/NVq1NydsuHNBmiCZj7Krzwzz5a5eZHhYvt/hJWiJcHxrVvw++qTs/L+TZYlHJP5TFx9R2W9NPNb792VQw+afC94xA37WkfUqJt062/tpinRzEhcFiNLEPn2ZrXNWse37jOyP8771fhtXjWYL1uf679mmXF9UrE9NIYVvASDJz9k4bGl5hqN2pJZPrTXbou1505rXmZ2+ZDuOy2WHrstQxE9LexjzqF9+V/e7R+aeurFStmwk6cNqoOm5BKElqBvnNHSe2CSPV5jIfrVHZQwaWzfQT30UZqYyCPikDkH7rUywQkaL0FDFrtdN3NcnjaH6QpmjNPmie7DIdoWVpt1at/QN29Bxa199b99M/m7kgzjiO6HrTZSpmdkW6jZrBTfsNDuGiikOaXPhpGjMhuva6z+5n6Gccvn6l+AxrVweetJn1duXPR2ahWJjddfjobFPrUk4Z/uvS34JzqL2mH4DPPd09Mm9m3ibHK8v/7liD6+rNyw+E0529TSp3eyW4Yz+N8R+XEB/whSmhY0i6zfHood8XLF53hKFT2zUfm8Ix8MSNVieGoJhkPpOX722NZmx9D4SWmunHuXu3v2nHp+8vkCyZbDgzcfliB4zqG/xPmjlycgsaD5gK6xzRvaopMQ+5Mkzxy+Nh4a6Fv06RLTvHGrTv3Q7oWyJ/YHPv7wIfAx9ndDj+wRRSOy9Whd//7QkDV6KrM5xTfUTWUvKZtMhR1p1TkDRag9LZgxXqudOV6XaL5DdPjmaoC5oQc/vA88iLlKoT7PatXlDWu690cX7kdB8VaaEXy4tuxhzAgzF+ZpGlHKrqfaMcDVEHPDd3/9ErSbmFtPbBhYXmFIKRwRqqwaTuZEsFJDUIpoKUdPCB0RMyZmIIMOz131MS9k//t3oOl3QZRQl1RhHNmf+vCvA/KqZg/RGBprm3RWte9B7lcj3z5b1ywpKCkyJai5Ut0b1Oqz01UvZ6k6Xpx/eX7R/K+m9AEmJDyvnanqcHH+lfnR01SRb3+U/RhYhtZx76ao1OdnXZulnqp6bH4XNDGN7KOKaJYbFseuu37vX0NcSd+eInROr53UsO21+efnd5rWMK7/kvYYkONIbj4gKKFuTFC9iF18ZxNosqtT6/UN7K/sE6AKDomBqM0hhUQBsj4IAAKYiXGkMsoFrQHDwkhJwqgifqLXGAMf4oJRTUwirukO1KLnABrAiO8k1qggKsngJW0w7ISN+D2qkrASf4PMuc6JJDlS+3SmYRF0JAndhBoSbAVQD8sDXFcsD2A3kUM4kUMUq8J0VhBeBge4g5Ggqhp/qFC1y3ljABwWFCTyfYX6OCxA1iFh0ISEwUocFiBYHBYi5JAI4dv8TywjUb6MoEVNAcNEzCERHSCb9ENX3KQK/RF4fHfhkmxaC+JxUw0bBYVJxAkISLUHTkv1PEAk1QHwgqghAzpuY8YsKL0CUxAcadAfVWXxJmVs48mwYxL326jEBO6vXkXQnHf7+jDyYviPxx/BkY7aPM7CKBqOv54T4eBr8QcD4keMJfuRKxRuYPbU/g8uTiM1XoghGoi0qJswA2DzBYnUzA3qEw0swRqVjmjWhUVuTEpKFUcG/t6RqT9rTYvy9ZECDpzp0dnkM4P2MnMuEEUyoQvJhF04Uw3FmUtERkJW7v/YlgbSKAs44dUEDRPWAtF+qeuHo0SHT/NrGCj1leAG1qtdiB4GET1cInpwRUodsvaV9VZh2nK13A8+pBRV3R0aMqDb34q93PNf97niT0v+Hj5AAgB6AkwnVomef2pEMtoT0Qixu/CGkEgcCbQG2eq1sLcQEm2SDkuaEk5Uolsw0ICgiPazOeMIUthdXIVWNxTTE0RiRgI907HV0AG8GdbTUMEiGnP+1JCTGKBaKjENmVCNexIQ0UN7sLswUiezG/qkmJFAa4Ct3spXgQPUy3VMjoViKl4KnNwzgbZm/J9N4jEgtTB2Q9iNdYi+KCvFZEwHqAHBrxIV7U+Nx4OmFosm7GRrMf8Ro6Ryi3IObTEk3KQ6igVqZhfLVnNadUN1ulAojgSWkmnfNDmN4dwrgZRBCvx5Zmup0T0pNO4xhQU/kzOOoDOzi9NpdwPLjRKKPWGgZ3qmmnMA1Dbmq9D8hWh25hTGQVkSiUpYFEpCVlJCxpESpSTK4vh65xSODF8mJ1FOQQ+Ek3tD52vFSeHRgGmx17IbTCzjEH1KDrVSTEFnQfnnCG0oUVEWeTQ0tVikeA648YCgigEIABTvriIqRjFY1vkLEyICANyp3R8CAHdTB3i+PfhtCS0UAwANEgBAAP8mxofZCtrnz1sBgbuDf5zoCNGaKUfPPCAMN54+B+caXIWOp+qhgPcHdGIifA6zEdXCAIo5scRITUvzYJjgFziFc6kImHoe6CbTEuqepEuRvFZO2x4oYDEc3aGXQ7sGp0M+FYHZGOakojmHmHoK+gq0Al9oMXtag7OSlubBKvRfcG7HhGPt61zRTXoylM3wUzmO/YaUJBDWdPZnfBtq+AZsRMtfg4Dfiq+tkD8aW3ilhVjJL8EmuhAdaQN60CbU0HOIozfP9VMAJy41obgqDt1qfaEWX2RYVQ+c8qoji8+Lk7LOSPnVPEtny/ivc1iqr0uk6q3LCOKonpyiykailSgu1ZAPWKy3ZlL0W6911gT11kxPR9eCTUIsp9uctFDrWjeNLbTM2ByYmehreTaeu25poWtiZs7GF0BxbGquICqqo1c89tKTiGcTI1FQceaM6wUv6a/yY656Y2HmUcPE0IsjLR1LQ49mkiJi4vKKjhzbdazoblUYnbGq6T0TLmHz8zl+TcJiHqXFxWS0xDzF8bXyk8y555106EnmXKRO5lBkb5xOaZ99a3bC5nWSe671RbjH62S2JMZd/yot8Q9jf477Ft5k) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-latin-ext-800-normal-b6167428.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-latin-800-normal-a51ac27d.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-cyrillic-ext-900-normal-b1c13874.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-cyrillic-900-normal-768011c3.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-greek-ext-900-normal-bebcb6fc.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-greek-900-normal-ffa82654.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(data:font/woff2;base64,d09GMgABAAAAAA68ABAAAAAAIsQAAA5cAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqkykcQuCEgABNgIkA4QgBCAFhDgHIAwHG8Edo6KGkVbdI/urA9uY9tCHApEtajW0DpSlMYxIKI2hfIPF0YbhM9A7UN7x+HENZp9HVATf7/fbc+97qFY8EbqHRKmmlUgkeyUyJEq0hqf0j//fful982cJKMS8wLNUYCFjVGVVj4+sjJBFFS4D4ItewGsU6azelbQaBZt1RCSDs0iFCFl3LCA4lRFZAjvLmaC3Aae0xksos/6jHn1Zd6/CckhZDvkuUy5dypRfTlmwh2saKgUexihZyXw6QPrcxq4g9FBJEqasxrY5KrFawkK8D1amCPu/udJm9k9ec4gKc3stCwnEqrLC/M0mnSSbOdwjKPNeAUkBS3i+KQBZ9GVZWwX4PAnjy8Kr+urr0nNYOxJmmRJ8bjDpgJu/d04BBgAU+vgvIyZOxM2L+KWRrBFkzCQybR3ZtIXsOEbOXCBXCkiJQNp6yA8/EAJ9nILY5trOCdz/2G3Ajbbz7QaMiJ4VEKBQYsy2ICUEIv7hYHrvRk0zPkzNGsyEYRXMzlxsueieoZQCOJRn2XAYaSHbIT0AaZAWABcigoedywYbZ+dMt6EDS+1sde+oE9Juaa/e5a58o4Ko/sBygGQA4kRlQJQpGJCEKZ7s7GsenF/FCdaqjXZg0xP/eEcrHWD6CoT1ZQwOcQlJKWlZAwYNGTZi0YpN+86cu3Crpq6hiTn34MIDUuoVQ0wEM8FCsBJsBDvBQXASPAQvYdmDAw+5+0vOCEEeiKCCpcPUTIYZxGJYA7EZ9gVxECfxEK+HcooZ7R8GADqwgRNi0OcZ+qvAPKzDFpwrPh6jA5EZbhAPaAidK0shp5/agBEKT1ACI/LiM/r3d2ytK1cMrhVI/sCJiuvjbEVADTKP5AmKpfE/ePEZjfPiqr85yDOUJLrBnG23CepxnSmBprtPJqCF7iXmU/DBifXTm+wchawCCj4DDIw1+s1u3e4x3igW3K/e03cBfY/0HogHoIsSmKFFiBIDExhYwM6LpS4FAcff6BILwhkRELMyAVSEhQMgX4ECKpggITCBRxQwxkjCQiITFU3V0lbqyIi3UfslCaKQkdJTNeShDo/wVOfEMf62CGZW9nf0XzgvP6CY9sMmtzM5JX5Xssoka7h1MovklimsUFqlskRthsYcrXk6C/Rmmeww22Wxx2qfzQG7Qw5HnI55nPO6EHAt6EbIrbA7EfeiHsQ8inuS8CzpRUpeWkGfin5VA2oG1Q1pGNY0QhjTNq5jQtekHkIpMQAuIUYAK1DHgHYJaK+hLgNoscSOSShoo13DSDkdRRhivoupNK+CK4GNmfM8sQRtVdvcEEYNL1By+3SolhtZ5SjTzoHTiD6/3uu/EhL96nl9jT5uosHxpMMo0XPqY2xGL9bA1iPAbORnfMWuA27oWH5Uzap8h7ppF/GNCnzqk+0yuc2nvRcKZ3RCAUA84gcDqvZwu58yM//07v8oW/bfXh37FHKIZ16kXQRVM1PiwwqFlv5ueB11VAWDGw86HrpuZHF8Wo4dDRO6iHZnzIlsp1TAN54YSej4qDw4Qcuif3w7n0fEwTwXzMkaBfjlIGf0tSzWGTYVencNONg3EDE3nM7eOiOcSfhGedDEZQRL/cKdXE2aMaxd5fA5LAptaoXX/Yl4yNnr4WBHfD4nHjsc1O3K3q3Q2YeUlhGKVwWqmAsr+lQHeHjt+birr4tMMzkZWBxotm/KZb0jIJbCpFqCFTUORku8qpYRyBsn08zQP1hXwatzHdThrL+9Ptfmg9erWWmKbnsWT2Zb56GP+jo3k77AS5urhC6owMx/hkVGPcI0TiFN93Ox5kwEHVEaUNRp9AR3d44Kq2JZGr27qpbgUCBXd0Z8ZWluu/nhG3dzuL5lrT5GGTZTEb60mpiznHXYzCF6zRyvO88rx4VrYowZb+iFmhiu+IxN2F7jqYHL4At33Z/Z8Pj+/abHP870DPUZjJ+9eHeX497evfNiFAEI4kDAChZ9ih4CCKZy8LrsFq/F7vQiVj09BBOqVD3XngzXXX1GeqxVqLj6RDc8YNU323bGHrjQvHEjIS9+5vzaxTpiikt6YQv2b7T5FPnrc01rWV9F1IOfrZvOKFWx8Efrg0u7uCczKp3Oyhn2rkr+JM5AM9EbvplvGLDj3YttQr3u2i9T7JVkBI4QGceGH4cjQbFa0AtID+761b7uxidrbcc+afwseynhVe7wgpQ4uXFKjrl0lklVGFB1dPsT//3XToXldLv9VH243KeNtzXX7koonZKzILlgZiE/Mehf9+RvD+LGcXpuUj5OD9kxeP+OaerhB6YM3upq2l+yqDmimGj1IBgT0EYWL125p3DGbotjYta2hqZo46iyWOqqMrY1NUXkRwRp3vBXsy5cmvXm0eXZ0248OhRSf+uz+tGneZsXBjtyuTmOjIL8hRl5s6k884QPFi3KrcicHplvfPcmZMuVBx/yEMFAjzoGpXkat3TV1BQ2NHYDwW7bIR3h72bfvDjH7weGxd+d7V5uLpw7Lf3g8hXpBxBbOKF2WuaK5RLxGYtZjHnowAFjQw8sWDY1/lCsoje7/0e0x/7s70/tGDbxP293HNj6pEuQYXeP3o7GpvU1BXOy0hxYXmhncX5x/0D+n6/+21WeuNWQbM64mz/kzNgfzumWteUHNwwoiwg5P/KmiQsS9GzQdb1pNMNHr+2+Sy1BlRft8TSIKvRevuyLvYzom97Yg3B5aP7NM9d+WAy9rb13ix9elhZhjJf13fhmE0ochvLcPMOYzv1tw6ylv73+XQdVDEdiCZefOM6QbkFGr34qro7vfd8Xkb+YEwdOrWmonzIXya1+cfT/6ujJCeywuohKzQ8puR9TG6jK1ikVGvxc/7XcWXZbTwa6Y6+/fzfuOroNZMGs5g31s1ZGXXtuVT5XBF+sS3+zP+ImXDofCmaFa0Au293qMVLdiRfkspgL/DAywhaVNrcuqmhsSBm/bD49LSo4si64UrN/wNCFVD1lai2oIIUErxTjfT5SSH1Jy5rGotDX3+ZghrB5lqUxem60cVQaR9/Lxqz1zvnxNp1tZLUuISLRBNnNzz4e4u8awt3quNdRv0G2bs6MdSi6VdGNd+wS/q9cJZ+xCkltv67HMp1fdW2VCS/D44WIXFdFW8aGxU8OLdAc/6F38cK8xuJcDT5U+tsiTdc6zndYOiLzi/bnoKyitSy+Ulc80qwbEy5ndidgQoVQMaYsuDKyNHh0cJAZGtln+hQ96HGgACixivqUhnCuUXKAczWZSL1xbqB11GeSgCpnNm+hdqTlVgqU7xDGYwV6aV/nOspJRy3Jk7A+hHoR00x1WuPbOrtTDgsKZCxqmyXlHIaklThAQ+1BADWGsgHSGMoG4AhlA6ClrCS90IoosiQEfzoHSF4rpKikcDKRuEa+HFgy4r3WG1FvRL0R9UbUG9HgCBihLzMvRlPUcoplJRlSV1IeGsyBx6Yhg8bGMz5oVQQon/C4UmCkcV7sEfMwMb9643hqDvypBnmNciigtBjixFRYDFnbrMJGQF4HAVHm+LRWZPFwnfJaENaHSC/abgYvb6CI9NlOxmGFz8cpSKQz5S1wWscwaH3iW7AM7Y34myUwj2qjOVoUdLwrkbgUPdIJL8qFDLEIylSSV8IFKO0Flhe1DVixCNy0yPHGKupXxq8FBFg2z4D+Xy1buQCFi1t/1iDQSV6mTGgtgxo+qS2gFyeBXpwEJ+gkB0snLfHGEyaXL8OJMJjB8qiRVoxR6kocAVg+n5+GHnE+/VFbgshrC0EvrXVYxVpwi7Xwp1gLfqsxg51dyUBSMueXzxvzSecDYxAE5PSvOyv98/4Xqfl8S//lCzQAgAMIr9aD63MSnshcjTzF3Sx20kCOhrUiiSJ8xShIs4cLlgI9BMQyZgIJCNTI/dWOCZQNardUIx2dgxi3OkAWmzOdWoQdkHus/WVpGnlqLPoIAVZzLDGRcEn6M0AjHz5H7cZUGaDuRPCAZrFWf7W4A1W4mifM1aTpsCBwOQ4EqVfpQIHQ52EvAdCiUHdUZWqepdxWhA/RwwCQDA1Z6nN6CSRaVHIh0ST1MnIVwleIOaRKQao9DmGQ0krcFCFKFuiM4knAYrVcZmjwlWOq5FeOIQgBfZ8ZVhKmIiTpT4QKf+IQlF63JB2dg5h2ErBYbE4lIko8yLxWQ+TQLJUcUwPoE8SlcdFTEN1eZDFxiKLoEUVBdFu2kkJ4xqBJ0wFEHYwZouRnXBJEZC8DuCy6m7pDnIRnKcGB1jqIk7GD7fO6gsXmqhKhpZ4Gh7QaUDoJQAGQyX9KefTH0xlBxpckTAMA+PHZ+TAA+MlWdv/1r4HV4XVaAGBAAwAo4H/EzAhekV682AoobA6Dds0L4ogXsU9YaTXjg7CGVJKZshT0V8hhZwVpiBerVUbEnFhiqkRtHpRG+QSCyo3MoMi5o7ukBoZeZHiY1ipZqoOVOkxFD5gjsC4pYaCMg4g8iT9XYn6FVZkCK89OeVKNNG0eFD4G4nakAW6aK7rL7AFbh8IBKJbT8qukGpgn8Ct4eBQitsL4XgcEvK9tgMKJ3bjjdjgVndjOtMPIiDAxbpxgvNREhTMgngTQDsoAQfHT8bTyQkP+qKhRAa44y8TuVWb0fsuSrL+Lc12WGfNflrNvuKw3sjjZSB0Phgm0UhMZoI2uAv4LizlK5lDIeq3LmoTP2sqKSrqChgzEwqCTCslf66aGrry2oANtTRV5z8ZzL+rpKmlq6whKOiCOLXRM6devqKweu+dJn2dNdf1ANjqUUXZeMlXk3EtqHj2rOpJX1JNvu21YnwGDJk07cmzXsemsunPCmZsOVNbUEFxqbfoY5Ax4NGrQgDF5A558WJ/UkdGpJraVCaNDir9RY+UdGEVtn31rdlxmH5Wfy79pz3FC0XMkm951DHjD+C+TWo7wTQAAAA==) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-latin-ext-900-normal-3cff82a5.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-latin-900-normal-f2db7f82.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD} diff --git a/invokeai/frontend/web/dist/assets/index-bcc89564.js b/invokeai/frontend/web/dist/assets/index-bcc89564.js new file mode 100644 index 0000000000..9d79c3693d --- /dev/null +++ b/invokeai/frontend/web/dist/assets/index-bcc89564.js @@ -0,0 +1,115 @@ +function h2(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const AL="modulepreload",IL=function(t,e){return new URL(t,e).href},qS={},p2=function(e,n,r){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=IL(a,r),a in qS)return;qS[a]=!0;const s=a.endsWith(".css"),u=s?'[rel="stylesheet"]':"";if(!!r)for(let h=i.length-1;h>=0;h--){const p=i[h];if(p.href===a&&(!s||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${u}`))return;const f=document.createElement("link");if(f.rel=s?"stylesheet":AL,s||(f.as="script",f.crossOrigin=""),f.href=a,document.head.appendChild(f),s)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e())};var yn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function g2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Zt={},LL={get exports(){return Zt},set exports(t){Zt=t}},hh={},be={},ML={get exports(){return be},set exports(t){be=t}},De={};/** + * @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 Ku=Symbol.for("react.element"),DL=Symbol.for("react.portal"),NL=Symbol.for("react.fragment"),BL=Symbol.for("react.strict_mode"),FL=Symbol.for("react.profiler"),$L=Symbol.for("react.provider"),zL=Symbol.for("react.context"),GL=Symbol.for("react.forward_ref"),UL=Symbol.for("react.suspense"),jL=Symbol.for("react.memo"),HL=Symbol.for("react.lazy"),KS=Symbol.iterator;function WL(t){return t===null||typeof t!="object"?null:(t=KS&&t[KS]||t["@@iterator"],typeof t=="function"?t:null)}var m2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v2=Object.assign,y2={};function Us(t,e,n){this.props=t,this.context=e,this.refs=y2,this.updater=n||m2}Us.prototype.isReactComponent={};Us.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Us.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function S2(){}S2.prototype=Us.prototype;function my(t,e,n){this.props=t,this.context=e,this.refs=y2,this.updater=n||m2}var vy=my.prototype=new S2;vy.constructor=my;v2(vy,Us.prototype);vy.isPureReactComponent=!0;var YS=Array.isArray,_2=Object.prototype.hasOwnProperty,yy={current:null},w2={key:!0,ref:!0,__self:!0,__source:!0};function b2(t,e,n){var r,i={},a=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(a=""+e.key),e)_2.call(e,r)&&!w2.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1>>1,ve=H[oe];if(0>>1;oei(At,Q))mei(Vt,At)?(H[oe]=Vt,H[me]=Q,oe=me):(H[oe]=At,H[Ue]=Q,oe=Ue);else if(mei(Vt,Q))H[oe]=Vt,H[me]=Q,oe=me;else break e}}return K}function i(H,K){var Q=H.sortIndex-K.sortIndex;return Q!==0?Q:H.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],f=[],h=1,p=null,g=3,y=!1,v=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(H){for(var K=n(f);K!==null;){if(K.callback===null)r(f);else if(K.startTime<=H)r(f),K.sortIndex=K.expirationTime,e(c,K);else break;K=n(f)}}function O(H){if(w=!1,C(H),!v)if(n(c)!==null)v=!0,V(I);else{var K=n(f);K!==null&&ie(O,K.startTime-H)}}function I(H,K){v=!1,w&&(w=!1,_(U),U=-1),y=!0;var Q=g;try{for(C(K),p=n(c);p!==null&&(!(p.expirationTime>K)||H&&!te());){var oe=p.callback;if(typeof oe=="function"){p.callback=null,g=p.priorityLevel;var ve=oe(p.expirationTime<=K);K=t.unstable_now(),typeof ve=="function"?p.callback=ve:p===n(c)&&r(c),C(K)}else r(c);p=n(c)}if(p!==null)var we=!0;else{var Ue=n(f);Ue!==null&&ie(O,Ue.startTime-K),we=!1}return we}finally{p=null,g=Q,y=!1}}var L=!1,D=null,U=-1,X=5,Y=-1;function te(){return!(t.unstable_now()-YH||125oe?(H.sortIndex=Q,e(f,H),n(c)===null&&H===n(f)&&(w?(_(U),U=-1):w=!0,ie(O,Q-oe))):(H.sortIndex=ve,e(c,H),v||y||(v=!0,V(I))),H},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(H){var K=g;return function(){var Q=g;g=K;try{return H.apply(this,arguments)}finally{g=Q}}}})(x2);(function(t){t.exports=x2})(rM);/** + * @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 k2=be,Yn=$m;function ae(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zm=Object.prototype.hasOwnProperty,iM=/^[: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]*$/,JS={},ZS={};function aM(t){return zm.call(ZS,t)?!0:zm.call(JS,t)?!1:iM.test(t)?ZS[t]=!0:(JS[t]=!0,!1)}function oM(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function sM(t,e,n,r){if(e===null||typeof e>"u"||oM(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function wn(t,e,n,r,i,a,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=s}var nn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){nn[t]=new wn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];nn[e]=new wn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){nn[t]=new wn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){nn[t]=new wn(t,2,!1,t,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(t){nn[t]=new wn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){nn[t]=new wn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){nn[t]=new wn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){nn[t]=new wn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){nn[t]=new wn(t,5,!1,t.toLowerCase(),null,!1,!1)});var _y=/[\-:]([a-z])/g;function wy(t){return t[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(t){var e=t.replace(_y,wy);nn[e]=new wn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(_y,wy);nn[e]=new wn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(_y,wy);nn[e]=new wn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){nn[t]=new wn(t,1,!1,t.toLowerCase(),null,!1,!1)});nn.xlinkHref=new wn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){nn[t]=new wn(t,1,!1,t.toLowerCase(),null,!0,!0)});function by(t,e,n,r){var i=nn.hasOwnProperty(e)?nn[e]:null;(i!==null?i.type!==0:r||!(2u||i[s]!==a[u]){var c=` +`+i[s].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=s&&0<=u);break}}}finally{Hg=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Kl(t):""}function lM(t){switch(t.tag){case 5:return Kl(t.type);case 16:return Kl("Lazy");case 13:return Kl("Suspense");case 19:return Kl("SuspenseList");case 0:case 2:case 15:return t=Wg(t.type,!1),t;case 11:return t=Wg(t.type.render,!1),t;case 1:return t=Wg(t.type,!0),t;default:return""}}function Hm(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ls:return"Fragment";case ss:return"Portal";case Gm:return"Profiler";case Cy:return"StrictMode";case Um:return"Suspense";case jm:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case O2:return(t.displayName||"Context")+".Consumer";case P2:return(t._context.displayName||"Context")+".Provider";case xy:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ky:return e=t.displayName||null,e!==null?e:Hm(t.type)||"Memo";case ca:e=t._payload,t=t._init;try{return Hm(t(e))}catch{}}return null}function uM(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Hm(e);case 8:return e===Cy?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Oa(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function R2(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function cM(t){var e=R2(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function hf(t){t._valueTracker||(t._valueTracker=cM(t))}function A2(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=R2(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function kd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Wm(t,e){var n=e.checked;return mt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function t_(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Oa(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function I2(t,e){e=e.checked,e!=null&&by(t,"checked",e,!1)}function Vm(t,e){I2(t,e);var n=Oa(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?qm(t,e.type,n):e.hasOwnProperty("defaultValue")&&qm(t,e.type,Oa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function n_(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function qm(t,e,n){(e!=="number"||kd(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Yl=Array.isArray;function _s(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=pf.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function bu(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ou={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},fM=["Webkit","ms","Moz","O"];Object.keys(ou).forEach(function(t){fM.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ou[e]=ou[t]})});function N2(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ou.hasOwnProperty(t)&&ou[t]?(""+e).trim():e+"px"}function B2(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=N2(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var dM=mt({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 Xm(t,e){if(e){if(dM[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ae(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ae(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ae(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ae(62))}}function Qm(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Jm=null;function Ey(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Zm=null,ws=null,bs=null;function a_(t){if(t=Qu(t)){if(typeof Zm!="function")throw Error(ae(280));var e=t.stateNode;e&&(e=yh(e),Zm(t.stateNode,t.type,e))}}function F2(t){ws?bs?bs.push(t):bs=[t]:ws=t}function $2(){if(ws){var t=ws,e=bs;if(bs=ws=null,a_(t),e)for(t=0;t>>=0,t===0?32:31-(CM(t)/xM|0)|0}var gf=64,mf=4194304;function Xl(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Td(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,a=t.pingedLanes,s=n&268435455;if(s!==0){var u=s&~i;u!==0?r=Xl(u):(a&=s,a!==0&&(r=Xl(a)))}else s=n&~i,s!==0?r=Xl(s):a!==0&&(r=Xl(a));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Yu(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Br(e),t[e]=n}function OM(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=lu),p_=String.fromCharCode(32),g_=!1;function aC(t,e){switch(t){case"keyup":return nD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oC(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var us=!1;function iD(t,e){switch(t){case"compositionend":return oC(e);case"keypress":return e.which!==32?null:(g_=!0,p_);case"textInput":return t=e.data,t===p_&&g_?null:t;default:return null}}function aD(t,e){if(us)return t==="compositionend"||!My&&aC(t,e)?(t=rC(),Zf=Ay=ga=null,us=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=S_(n)}}function cC(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?cC(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function fC(){for(var t=window,e=kd();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=kd(t.document)}return e}function Dy(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function pD(t){var e=fC(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&cC(n.ownerDocument.documentElement,n)){if(r!==null&&Dy(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!t.extend&&a>r&&(i=r,r=a,a=i),i=__(n,a);var s=__(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,cs=null,av=null,cu=null,ov=!1;function w_(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ov||cs==null||cs!==kd(r)||(r=cs,"selectionStart"in r&&Dy(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}),cu&&Ou(cu,r)||(cu=r,r=Id(av,"onSelect"),0hs||(t.current=dv[hs],dv[hs]=null,hs--)}function at(t,e){hs++,dv[hs]=t.current,t.current=e}var Ta={},fn=La(Ta),Rn=La(!1),so=Ta;function Ls(t,e){var n=t.type.contextTypes;if(!n)return Ta;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=e[a];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function An(t){return t=t.childContextTypes,t!=null}function Md(){lt(Rn),lt(fn)}function O_(t,e,n){if(fn.current!==Ta)throw Error(ae(168));at(fn,e),at(Rn,n)}function _C(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ae(108,uM(t)||"Unknown",i));return mt({},n,r)}function Dd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ta,so=fn.current,at(fn,t),at(Rn,Rn.current),!0}function T_(t,e,n){var r=t.stateNode;if(!r)throw Error(ae(169));n?(t=_C(t,e,so),r.__reactInternalMemoizedMergedChildContext=t,lt(Rn),lt(fn),at(fn,t)):lt(Rn),at(Rn,n)}var Mi=null,Sh=!1,am=!1;function wC(t){Mi===null?Mi=[t]:Mi.push(t)}function ED(t){Sh=!0,wC(t)}function Ma(){if(!am&&Mi!==null){am=!0;var t=0,e=Qe;try{var n=Mi;for(Qe=1;t>=s,i-=s,Di=1<<32-Br(e)+i|n<U?(X=D,D=null):X=D.sibling;var Y=g(_,D,C[U],O);if(Y===null){D===null&&(D=X);break}t&&D&&Y.alternate===null&&e(_,D),S=a(Y,S,U),L===null?I=Y:L.sibling=Y,L=Y,D=X}if(U===C.length)return n(_,D),ft&&Qa(_,U),I;if(D===null){for(;UU?(X=D,D=null):X=D.sibling;var te=g(_,D,Y.value,O);if(te===null){D===null&&(D=X);break}t&&D&&te.alternate===null&&e(_,D),S=a(te,S,U),L===null?I=te:L.sibling=te,L=te,D=X}if(Y.done)return n(_,D),ft&&Qa(_,U),I;if(D===null){for(;!Y.done;U++,Y=C.next())Y=p(_,Y.value,O),Y!==null&&(S=a(Y,S,U),L===null?I=Y:L.sibling=Y,L=Y);return ft&&Qa(_,U),I}for(D=r(_,D);!Y.done;U++,Y=C.next())Y=y(D,_,U,Y.value,O),Y!==null&&(t&&Y.alternate!==null&&D.delete(Y.key===null?U:Y.key),S=a(Y,S,U),L===null?I=Y:L.sibling=Y,L=Y);return t&&D.forEach(function(ce){return e(_,ce)}),ft&&Qa(_,U),I}function x(_,S,C,O){if(typeof C=="object"&&C!==null&&C.type===ls&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case df:e:{for(var I=C.key,L=S;L!==null;){if(L.key===I){if(I=C.type,I===ls){if(L.tag===7){n(_,L.sibling),S=i(L,C.props.children),S.return=_,_=S;break e}}else if(L.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===ca&&N_(I)===L.type){n(_,L.sibling),S=i(L,C.props),S.ref=Ll(_,L,C),S.return=_,_=S;break e}n(_,L);break}else e(_,L);L=L.sibling}C.type===ls?(S=oo(C.props.children,_.mode,O,C.key),S.return=_,_=S):(O=sd(C.type,C.key,C.props,null,_.mode,O),O.ref=Ll(_,S,C),O.return=_,_=O)}return s(_);case ss:e:{for(L=C.key;S!==null;){if(S.key===L)if(S.tag===4&&S.stateNode.containerInfo===C.containerInfo&&S.stateNode.implementation===C.implementation){n(_,S.sibling),S=i(S,C.children||[]),S.return=_,_=S;break e}else{n(_,S);break}else e(_,S);S=S.sibling}S=hm(C,_.mode,O),S.return=_,_=S}return s(_);case ca:return L=C._init,x(_,S,L(C._payload),O)}if(Yl(C))return v(_,S,C,O);if(Ol(C))return w(_,S,C,O);Cf(_,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,S!==null&&S.tag===6?(n(_,S.sibling),S=i(S,C),S.return=_,_=S):(n(_,S),S=dm(C,_.mode,O),S.return=_,_=S),s(_)):n(_,S)}return x}var Ds=TC(!0),RC=TC(!1),Ju={},si=La(Ju),Iu=La(Ju),Lu=La(Ju);function ro(t){if(t===Ju)throw Error(ae(174));return t}function Hy(t,e){switch(at(Lu,e),at(Iu,t),at(si,Ju),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ym(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ym(e,t)}lt(si),at(si,e)}function Ns(){lt(si),lt(Iu),lt(Lu)}function AC(t){ro(Lu.current);var e=ro(si.current),n=Ym(e,t.type);e!==n&&(at(Iu,t),at(si,n))}function Wy(t){Iu.current===t&&(lt(si),lt(Iu))}var pt=La(0);function Gd(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var om=[];function Vy(){for(var t=0;tn?n:4,t(!0);var r=sm.transition;sm.transition={};try{t(!1),e()}finally{Qe=n,sm.transition=r}}function qC(){return mr().memoizedState}function RD(t,e,n){var r=xa(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},KC(t))YC(e,n);else if(n=kC(t,e,n,r),n!==null){var i=Sn();Fr(n,t,r,i),XC(n,e,r)}}function AD(t,e,n){var r=xa(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(KC(t))YC(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var s=e.lastRenderedState,u=a(s,n);if(i.hasEagerState=!0,i.eagerState=u,Gr(u,s)){var c=e.interleaved;c===null?(i.next=i,Uy(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}n=kC(t,e,i,r),n!==null&&(i=Sn(),Fr(n,t,r,i),XC(n,e,r))}}function KC(t){var e=t.alternate;return t===gt||e!==null&&e===gt}function YC(t,e){fu=Ud=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function XC(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Oy(t,n)}}var jd={readContext:gr,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useInsertionEffect:on,useLayoutEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useMutableSource:on,useSyncExternalStore:on,useId:on,unstable_isNewReconciler:!1},ID={readContext:gr,useCallback:function(t,e){return Zr().memoizedState=[t,e===void 0?null:e],t},useContext:gr,useEffect:F_,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,rd(4194308,4,UC.bind(null,e,t),n)},useLayoutEffect:function(t,e){return rd(4194308,4,t,e)},useInsertionEffect:function(t,e){return rd(4,2,t,e)},useMemo:function(t,e){var n=Zr();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Zr();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=RD.bind(null,gt,t),[r.memoizedState,t]},useRef:function(t){var e=Zr();return t={current:t},e.memoizedState=t},useState:B_,useDebugValue:Qy,useDeferredValue:function(t){return Zr().memoizedState=t},useTransition:function(){var t=B_(!1),e=t[0];return t=TD.bind(null,t[1]),Zr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=gt,i=Zr();if(ft){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=e(),Ht===null)throw Error(ae(349));uo&30||MC(r,e,n)}i.memoizedState=n;var a={value:n,getSnapshot:e};return i.queue=a,F_(NC.bind(null,r,a,t),[t]),r.flags|=2048,Nu(9,DC.bind(null,r,a,n,e),void 0,null),n},useId:function(){var t=Zr(),e=Ht.identifierPrefix;if(ft){var n=Ni,r=Di;n=(r&~(1<<32-Br(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Mu++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ri]=e,t[Au]=r,ax(t,e,!1,!1),e.stateNode=t;e:{switch(s=Qm(n,r),n){case"dialog":ot("cancel",t),ot("close",t),i=r;break;case"iframe":case"object":case"embed":ot("load",t),i=r;break;case"video":case"audio":for(i=0;iFs&&(e.flags|=128,r=!0,Ml(a,!1),e.lanes=4194304)}else{if(!r)if(t=Gd(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ml(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!ft)return sn(e),null}else 2*Et()-a.renderingStartTime>Fs&&n!==1073741824&&(e.flags|=128,r=!0,Ml(a,!1),e.lanes=4194304);a.isBackwards?(s.sibling=e.child,e.child=s):(n=a.last,n!==null?n.sibling=s:e.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Et(),e.sibling=null,n=pt.current,at(pt,r?n&1|2:n&1),e):(sn(e),null);case 22:case 23:return r0(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?jn&1073741824&&(sn(e),e.subtreeFlags&6&&(e.flags|=8192)):sn(e),null;case 24:return null;case 25:return null}throw Error(ae(156,e.tag))}function zD(t,e){switch(By(e),e.tag){case 1:return An(e.type)&&Md(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ns(),lt(Rn),lt(fn),Vy(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Wy(e),null;case 13:if(lt(pt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ae(340));Ms()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return lt(pt),null;case 4:return Ns(),null;case 10:return Gy(e.type._context),null;case 22:case 23:return r0(),null;case 24:return null;default:return null}}var kf=!1,cn=!1,GD=typeof WeakSet=="function"?WeakSet:Set,he=null;function vs(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wt(t,e,r)}else n.current=null}function xv(t,e,n){try{n()}catch(r){wt(t,e,r)}}var q_=!1;function UD(t,e){if(sv=Rd,t=fC(),Dy(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,u=-1,c=-1,f=0,h=0,p=t,g=null;t:for(;;){for(var y;p!==n||i!==0&&p.nodeType!==3||(u=s+i),p!==a||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===t)break t;if(g===n&&++f===i&&(u=s),g===a&&++h===r&&(c=s),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(lv={focusedElem:t,selectionRange:n},Rd=!1,he=e;he!==null;)if(e=he,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,he=t;else for(;he!==null;){e=he;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,x=v.memoizedState,_=e.stateNode,S=_.getSnapshotBeforeUpdate(e.elementType===e.type?w:Ir(e.type,w),x);_.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var C=e.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(O){wt(e,e.return,O)}if(t=e.sibling,t!==null){t.return=e.return,he=t;break}he=e.return}return v=q_,q_=!1,v}function du(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&xv(e,n,a)}i=i.next}while(i!==r)}}function bh(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function kv(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function lx(t){var e=t.alternate;e!==null&&(t.alternate=null,lx(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ri],delete e[Au],delete e[fv],delete e[xD],delete e[kD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function ux(t){return t.tag===5||t.tag===3||t.tag===4}function K_(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ux(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ev(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ld));else if(r!==4&&(t=t.child,t!==null))for(Ev(t,e,n),t=t.sibling;t!==null;)Ev(t,e,n),t=t.sibling}function Pv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Pv(t,e,n),t=t.sibling;t!==null;)Pv(t,e,n),t=t.sibling}var Jt=null,Lr=!1;function sa(t,e,n){for(n=n.child;n!==null;)cx(t,e,n),n=n.sibling}function cx(t,e,n){if(oi&&typeof oi.onCommitFiberUnmount=="function")try{oi.onCommitFiberUnmount(ph,n)}catch{}switch(n.tag){case 5:cn||vs(n,e);case 6:var r=Jt,i=Lr;Jt=null,sa(t,e,n),Jt=r,Lr=i,Jt!==null&&(Lr?(t=Jt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Jt.removeChild(n.stateNode));break;case 18:Jt!==null&&(Lr?(t=Jt,n=n.stateNode,t.nodeType===8?im(t.parentNode,n):t.nodeType===1&&im(t,n),Eu(t)):im(Jt,n.stateNode));break;case 4:r=Jt,i=Lr,Jt=n.stateNode.containerInfo,Lr=!0,sa(t,e,n),Jt=r,Lr=i;break;case 0:case 11:case 14:case 15:if(!cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&xv(n,e,s),i=i.next}while(i!==r)}sa(t,e,n);break;case 1:if(!cn&&(vs(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){wt(n,e,u)}sa(t,e,n);break;case 21:sa(t,e,n);break;case 22:n.mode&1?(cn=(r=cn)||n.memoizedState!==null,sa(t,e,n),cn=r):sa(t,e,n);break;default:sa(t,e,n)}}function Y_(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new GD),e.forEach(function(r){var i=QD.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Tr(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~a}if(r=i,r=Et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*HD(r/1960))-r,10t?16:t,ma===null)var r=!1;else{if(t=ma,ma=null,Vd=0,$e&6)throw Error(ae(331));var i=$e;for($e|=4,he=t.current;he!==null;){var a=he,s=a.child;if(he.flags&16){var u=a.deletions;if(u!==null){for(var c=0;cEt()-t0?ao(t,0):e0|=n),In(t,e)}function yx(t,e){e===0&&(t.mode&1?(e=mf,mf<<=1,!(mf&130023424)&&(mf=4194304)):e=1);var n=Sn();t=Gi(t,e),t!==null&&(Yu(t,e,n),In(t,n))}function XD(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),yx(t,n)}function QD(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(e),yx(t,n)}var Sx;Sx=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Rn.current)Tn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Tn=!1,FD(t,e,n);Tn=!!(t.flags&131072)}else Tn=!1,ft&&e.flags&1048576&&bC(e,Bd,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;id(t,e),t=e.pendingProps;var i=Ls(e,fn.current);xs(e,n),i=Ky(null,e,r,t,i,n);var a=Yy();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,An(r)?(a=!0,Dd(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jy(e),i.updater=_h,e.stateNode=i,i._reactInternals=e,vv(e,r,t,n),e=_v(null,e,r,!0,a,n)):(e.tag=0,ft&&a&&Ny(e),vn(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(id(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=ZD(r),t=Ir(r,t),i){case 0:e=Sv(null,e,r,t,n);break e;case 1:e=H_(null,e,r,t,n);break e;case 11:e=U_(null,e,r,t,n);break e;case 14:e=j_(null,e,r,Ir(r.type,t),n);break e}throw Error(ae(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ir(r,i),Sv(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ir(r,i),H_(t,e,r,i,n);case 3:e:{if(nx(e),t===null)throw Error(ae(387));r=e.pendingProps,a=e.memoizedState,i=a.element,EC(t,e),zd(e,r,null,n);var s=e.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Bs(Error(ae(423)),e),e=W_(t,e,r,n,i);break e}else if(r!==i){i=Bs(Error(ae(424)),e),e=W_(t,e,r,n,i);break e}else for(Wn=wa(e.stateNode.containerInfo.firstChild),Vn=e,ft=!0,Dr=null,n=RC(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ms(),r===i){e=Ui(t,e,n);break e}vn(t,e,r,n)}e=e.child}return e;case 5:return AC(e),t===null&&pv(e),r=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,s=i.children,uv(r,i)?s=null:a!==null&&uv(r,a)&&(e.flags|=32),tx(t,e),vn(t,e,s,n),e.child;case 6:return t===null&&pv(e),null;case 13:return rx(t,e,n);case 4:return Hy(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ds(e,null,r,n):vn(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ir(r,i),U_(t,e,r,i,n);case 7:return vn(t,e,e.pendingProps,n),e.child;case 8:return vn(t,e,e.pendingProps.children,n),e.child;case 12:return vn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,a=e.memoizedProps,s=i.value,at(Fd,r._currentValue),r._currentValue=s,a!==null)if(Gr(a.value,s)){if(a.children===i.children&&!Rn.current){e=Ui(t,e,n);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var u=a.dependencies;if(u!==null){s=a.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=Bi(-1,n&-n),c.tag=2;var f=a.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),gv(a.return,n,e),u.lanes|=n;break}c=c.next}}else if(a.tag===10)s=a.type===e.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(ae(341));s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),gv(s,n,e),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}vn(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,xs(e,n),i=gr(i),r=r(i),e.flags|=1,vn(t,e,r,n),e.child;case 14:return r=e.type,i=Ir(r,e.pendingProps),i=Ir(r.type,i),j_(t,e,r,i,n);case 15:return ZC(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ir(r,i),id(t,e),e.tag=1,An(r)?(t=!0,Dd(e)):t=!1,xs(e,n),OC(e,r,i),vv(e,r,i,n),_v(null,e,r,!0,t,n);case 19:return ix(t,e,n);case 22:return ex(t,e,n)}throw Error(ae(156,e.tag))};function _x(t,e){return V2(t,e)}function JD(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 hr(t,e,n,r){return new JD(t,e,n,r)}function a0(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ZD(t){if(typeof t=="function")return a0(t)?1:0;if(t!=null){if(t=t.$$typeof,t===xy)return 11;if(t===ky)return 14}return 2}function ka(t,e){var n=t.alternate;return n===null?(n=hr(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function sd(t,e,n,r,i,a){var s=2;if(r=t,typeof t=="function")a0(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case ls:return oo(n.children,i,a,e);case Cy:s=8,i|=8;break;case Gm:return t=hr(12,n,e,i|2),t.elementType=Gm,t.lanes=a,t;case Um:return t=hr(13,n,e,i),t.elementType=Um,t.lanes=a,t;case jm:return t=hr(19,n,e,i),t.elementType=jm,t.lanes=a,t;case T2:return xh(n,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case P2:s=10;break e;case O2:s=9;break e;case xy:s=11;break e;case ky:s=14;break e;case ca:s=16,r=null;break e}throw Error(ae(130,t==null?t:typeof t,""))}return e=hr(s,n,e,i),e.elementType=t,e.type=r,e.lanes=a,e}function oo(t,e,n,r){return t=hr(7,t,r,e),t.lanes=n,t}function xh(t,e,n,r){return t=hr(22,t,r,e),t.elementType=T2,t.lanes=n,t.stateNode={isHidden:!1},t}function dm(t,e,n){return t=hr(6,t,null,e),t.lanes=n,t}function hm(t,e,n){return e=hr(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function e3(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qg(0),this.expirationTimes=qg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qg(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function o0(t,e,n,r,i,a,s,u,c){return t=new e3(t,e,n,u,c),e===1?(e=1,a===!0&&(e|=8)):e=0,a=hr(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jy(a),t}function t3(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}e(),t.exports=Qn})(nM);const PG=g2(_u);var rw=_u;Fm.createRoot=rw.createRoot,Fm.hydrateRoot=rw.hydrateRoot;var Iv={},o3={get exports(){return Iv},set exports(t){Iv=t}},xx={};/** + * @license React + * use-sync-external-store-shim.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 $s=be;function s3(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var l3=typeof Object.is=="function"?Object.is:s3,u3=$s.useState,c3=$s.useEffect,f3=$s.useLayoutEffect,d3=$s.useDebugValue;function h3(t,e){var n=e(),r=u3({inst:{value:n,getSnapshot:e}}),i=r[0].inst,a=r[1];return f3(function(){i.value=n,i.getSnapshot=e,pm(i)&&a({inst:i})},[t,n,e]),c3(function(){return pm(i)&&a({inst:i}),t(function(){pm(i)&&a({inst:i})})},[t]),d3(n),n}function pm(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!l3(t,n)}catch{return!0}}function p3(t,e){return e()}var g3=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p3:h3;xx.useSyncExternalStore=$s.useSyncExternalStore!==void 0?$s.useSyncExternalStore:g3;(function(t){t.exports=xx})(o3);var Lv={},m3={get exports(){return Lv},set exports(t){Lv=t}},kx={};/** + * @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 Th=be,v3=Iv;function y3(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var S3=typeof Object.is=="function"?Object.is:y3,_3=v3.useSyncExternalStore,w3=Th.useRef,b3=Th.useEffect,C3=Th.useMemo,x3=Th.useDebugValue;kx.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var a=w3(null);if(a.current===null){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=C3(function(){function c(y){if(!f){if(f=!0,h=y,y=r(y),i!==void 0&&s.hasValue){var v=s.value;if(i(v,y))return p=v}return p=y}if(v=p,S3(h,y))return v;var w=r(y);return i!==void 0&&i(v,w)?v:(h=y,p=w)}var f=!1,h,p,g=n===void 0?null:n;return[function(){return c(e())},g===null?void 0:function(){return c(g())}]},[e,n,r,i]);var u=_3(t,a[0],a[1]);return b3(function(){s.hasValue=!0,s.value=u},[u]),x3(u),u};(function(t){t.exports=kx})(m3);function k3(t){t()}let Ex=k3;const E3=t=>Ex=t,P3=()=>Ex,Yd=be.createContext(null);function O3(){return be.useContext(Yd)}const T3=()=>{throw new Error("uSES not initialized!")};let Px=T3;const R3=t=>{Px=t},A3=(t,e)=>t===e;function I3(t=Yd){const e=t===Yd?O3:()=>be.useContext(t);return function(r,i=A3){const{store:a,subscription:s,getServerState:u}=e(),c=Px(s.addNestedSub,a.getState,u||a.getState,r,i);return be.useDebugValue(c),c}}const OG=I3();function Xd(){return Xd=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let r=e;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=e;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,a=n={callback:r,next:null,prev:n};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const aw={notify(){},get:()=>[]};function W3(t,e){let n,r=aw;function i(p){return c(),r.subscribe(p)}function a(){r.notify()}function s(){h.onStateChange&&h.onStateChange()}function u(){return Boolean(n)}function c(){n||(n=e?e.addNestedSub(s):t.subscribe(s),r=H3())}function f(){n&&(n(),n=void 0,r.clear(),r=aw)}const h={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:s,isSubscribed:u,trySubscribe:c,tryUnsubscribe:f,getListeners:()=>r};return h}const V3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q3=V3?be.useLayoutEffect:be.useEffect;function K3({store:t,context:e,children:n,serverState:r}){const i=be.useMemo(()=>{const u=W3(t);return{store:t,subscription:u,getServerState:r?()=>r:void 0}},[t,r]),a=be.useMemo(()=>t.getState(),[t]);q3(()=>{const{subscription:u}=i;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==t.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[i,a]);const s=e||Yd;return As.createElement(s.Provider,{value:i},n)}R3(Lv.useSyncExternalStoreWithSelector);E3(_u.unstable_batchedUpdates);function ld(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ld=function(n){return typeof n}:ld=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ld(t)}function Y3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ow(t,e){for(var n=0;n1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:g0(t)?2:m0(t)?3:0}function Es(t,e){return Ws(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Z3(t,e){return Ws(t)===2?t.get(e):t[e]}function Lx(t,e,n){var r=Ws(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Mx(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function g0(t){return aN&&t instanceof Map}function m0(t){return oN&&t instanceof Set}function Za(t){return t.o||t.t}function v0(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Nx(t);delete e[ct];for(var n=Ps(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=eN),Object.freeze(t),e&&ho(t,function(n,r){return y0(r,!0)},!0)),t}function eN(){Nr(2)}function S0(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function li(t){var e=zv[t];return e||Nr(18,t),e}function tN(t,e){zv[t]||(zv[t]=e)}function Bv(){return Fu}function gm(t,e){e&&(li("Patches"),t.u=[],t.s=[],t.v=e)}function Qd(t){Fv(t),t.p.forEach(nN),t.p=null}function Fv(t){t===Fu&&(Fu=t.l)}function sw(t){return Fu={p:[],l:Fu,h:t,m:!0,_:0}}function nN(t){var e=t[ct];e.i===0||e.i===1?e.j():e.O=!0}function mm(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.g||li("ES5").S(e,t,r),r?(n[ct].P&&(Qd(e),Nr(4)),ji(t)&&(t=Jd(e,t),e.l||Zd(e,t)),e.u&&li("Patches").M(n[ct].t,t,e.u,e.s)):t=Jd(e,n,[]),Qd(e),e.u&&e.v(e.u,e.s),t!==Dx?t:void 0}function Jd(t,e,n){if(S0(e))return e;var r=e[ct];if(!r)return ho(e,function(u,c){return lw(t,r,e,u,c,n)},!0),e;if(r.A!==t)return e;if(!r.P)return Zd(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=v0(r.k):r.o,a=i,s=!1;r.i===3&&(a=new Set(i),i.clear(),s=!0),ho(a,function(u,c){return lw(t,r,i,u,c,n,s)}),Zd(t,i,!1),n&&t.u&&li("Patches").N(r,n,t.u,t.s)}return r.o}function lw(t,e,n,r,i,a,s){if(Ra(i)){var u=Jd(t,i,a&&e&&e.i!==3&&!Es(e.R,r)?a.concat(r):void 0);if(Lx(n,r,u),!Ra(u))return;t.m=!1}else s&&n.add(i);if(ji(i)&&!S0(i)){if(!t.h.D&&t._<1)return;Jd(t,i),e&&e.A.l||Zd(t,i)}}function Zd(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&y0(e,n)}function vm(t,e){var n=t[ct];return(n?Za(n):t)[e]}function uw(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function pa(t){t.P||(t.P=!0,t.l&&pa(t.l))}function ym(t){t.o||(t.o=v0(t.t))}function $v(t,e,n){var r=g0(e)?li("MapSet").F(e,n):m0(e)?li("MapSet").T(e,n):t.g?function(i,a){var s=Array.isArray(i),u={i:s?1:0,A:a?a.A:Bv(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},c=u,f=$u;s&&(c=[u],f=Jl);var h=Proxy.revocable(c,f),p=h.revoke,g=h.proxy;return u.k=g,u.j=p,g}(e,n):li("ES5").J(e,n);return(n?n.A:Bv()).p.push(r),r}function rN(t){return Ra(t)||Nr(22,t),function e(n){if(!ji(n))return n;var r,i=n[ct],a=Ws(n);if(i){if(!i.P&&(i.i<4||!li("ES5").K(i)))return i.t;i.I=!0,r=cw(n,a),i.I=!1}else r=cw(n,a);return ho(r,function(s,u){i&&Z3(i.t,s)===u||Lx(r,s,e(u))}),a===3?new Set(r):r}(t)}function cw(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return v0(t)}function iN(){function t(a,s){var u=i[a];return u?u.enumerable=s:i[a]=u={configurable:!0,enumerable:s,get:function(){var c=this[ct];return $u.get(c,a)},set:function(c){var f=this[ct];$u.set(f,a,c)}},u}function e(a){for(var s=a.length-1;s>=0;s--){var u=a[s][ct];if(!u.P)switch(u.i){case 5:r(u)&&pa(u);break;case 4:n(u)&&pa(u)}}}function n(a){for(var s=a.t,u=a.k,c=Ps(u),f=c.length-1;f>=0;f--){var h=c[f];if(h!==ct){var p=s[h];if(p===void 0&&!Es(s,h))return!0;var g=u[h],y=g&&g[ct];if(y?y.t!==p:!Mx(g,p))return!0}}var v=!!s[ct];return c.length!==Ps(s).length+(v?0:1)}function r(a){var s=a.k;if(s.length!==a.t.length)return!0;var u=Object.getOwnPropertyDescriptor(s,s.length-1);if(u&&!u.get)return!0;for(var c=0;c1?_-1:0),C=1;C<_;C++)S[C-1]=arguments[C];return c.produce(w,function(O){var I;return(I=a).call.apply(I,[x,O].concat(S))})}}var f;if(typeof a!="function"&&Nr(6),s!==void 0&&typeof s!="function"&&Nr(7),ji(i)){var h=sw(r),p=$v(r,i,void 0),g=!0;try{f=a(p),g=!1}finally{g?Qd(h):Fv(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(w){return gm(h,s),mm(w,h)},function(w){throw Qd(h),w}):(gm(h,s),mm(f,h))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Dx&&(f=void 0),r.D&&y0(f,!0),s){var y=[],v=[];li("Patches").M(i,f,y,v),s(y,v)}return f}Nr(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),g=1;g=0;i--){var a=r[i];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}i>-1&&(r=r.slice(i+1));var s=li("Patches").$;return Ra(n)?s(n,r):this.produce(n,function(u){return s(u,r)})},t}(),Xn=new lN,Bx=Xn.produce;Xn.produceWithPatches.bind(Xn);Xn.setAutoFreeze.bind(Xn);Xn.setUseProxies.bind(Xn);Xn.applyPatches.bind(Xn);Xn.createDraft.bind(Xn);Xn.finishDraft.bind(Xn);function $r(t){return $r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$r(t)}function uN(t,e){if($r(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if($r(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fx(t){var e=uN(t,"string");return $r(e)==="symbol"?e:String(e)}function Ur(t,e,n){return e=Fx(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function gw(t){for(var e=1;e"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(un(1));return n(w0)(t,e)}if(typeof t!="function")throw new Error(un(2));var i=t,a=e,s=[],u=s,c=!1;function f(){u===s&&(u=s.slice())}function h(){if(c)throw new Error(un(3));return a}function p(w){if(typeof w!="function")throw new Error(un(4));if(c)throw new Error(un(5));var x=!0;return f(),u.push(w),function(){if(x){if(c)throw new Error(un(6));x=!1,f();var S=u.indexOf(w);u.splice(S,1),s=null}}}function g(w){if(!cN(w))throw new Error(un(7));if(typeof w.type>"u")throw new Error(un(8));if(c)throw new Error(un(9));try{c=!0,a=i(a,w)}finally{c=!1}for(var x=s=u,_=0;_"u")throw new Error(un(12));if(typeof n(void 0,{type:eh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(un(13))})}function $x(t){for(var e=Object.keys(t),n={},r=0;r"u")throw f&&f.type,new Error(un(14));p[y]=x,h=h||x!==w}return h=h||a.length!==Object.keys(c).length,h?p:c}}function th(){for(var t=arguments.length,e=new Array(t),n=0;n0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]{Object.keys(L).forEach(function(D){C(D)&&h[D]!==L[D]&&g.indexOf(D)===-1&&g.push(D)}),Object.keys(h).forEach(function(D){L[D]===void 0&&C(D)&&g.indexOf(D)===-1&&h[D]!==void 0&&g.push(D)}),y===null&&(y=setInterval(_,i)),h=L},a)}function _(){if(g.length===0){y&&clearInterval(y),y=null;return}var L=g.shift(),D=r.reduce(function(U,X){return X.in(U,L,h)},h[L]);if(D!==void 0)try{p[L]=c(D)}catch(U){console.error("redux-persist/createPersistoid: error serializing state",U)}else delete p[L];g.length===0&&S()}function S(){Object.keys(p).forEach(function(L){h[L]===void 0&&delete p[L]}),v=u.setItem(s,c(p)).catch(O)}function C(L){return!(n&&n.indexOf(L)===-1&&L!=="_persist"||e&&e.indexOf(L)!==-1)}function O(L){f&&f(L)}var I=function(){for(;g.length!==0;)_();return v||Promise.resolve()};return{update:x,flush:I}}function jN(t){return JSON.stringify(t)}function HN(t){var e=t.transforms||[],n="".concat(t.keyPrefix!==void 0?t.keyPrefix:C0).concat(t.key),r=t.storage;t.debug;var i;return t.deserialize===!1?i=function(s){return s}:typeof t.deserialize=="function"?i=t.deserialize:i=WN,r.getItem(n).then(function(a){if(a)try{var s={},u=i(a);return Object.keys(u).forEach(function(c){s[c]=e.reduceRight(function(f,h){return h.out(f,c,u)},i(u[c]))}),s}catch(c){throw c}else return})}function WN(t){return JSON.parse(t)}function VN(t){var e=t.storage,n="".concat(t.keyPrefix!==void 0?t.keyPrefix:C0).concat(t.key);return e.removeItem(n,qN)}function qN(t){}function Cw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ti(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function XN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var QN=5e3;function JN(t,e){var n=t.version!==void 0?t.version:FN;t.debug;var r=t.stateReconciler===void 0?GN:t.stateReconciler,i=t.getStoredState||HN,a=t.timeout!==void 0?t.timeout:QN,s=null,u=!1,c=!0,f=function(p){return p._persist.rehydrated&&s&&!c&&s.update(p),p};return function(h,p){var g=h||{},y=g._persist,v=YN(g,["_persist"]),w=v;if(p.type===Wx){var x=!1,_=function(U,X){x||(p.rehydrate(t.key,U,X),x=!0)};if(a&&setTimeout(function(){!x&&_(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(t.key,'"')))},a),c=!1,s||(s=UN(t)),y)return Ti({},e(w,p),{_persist:y});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(t.key),i(t).then(function(D){var U=t.migrate||function(X,Y){return Promise.resolve(X)};U(D,n).then(function(X){_(X)},function(X){_(void 0,X)})},function(D){_(void 0,D)}),Ti({},e(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===Vx)return u=!0,p.result(VN(t)),Ti({},e(w,p),{_persist:y});if(p.type===jx)return p.result(s&&s.flush()),Ti({},e(w,p),{_persist:y});if(p.type===Hx)c=!0;else if(p.type===x0){if(u)return Ti({},w,{_persist:Ti({},y,{rehydrated:!0})});if(p.key===t.key){var S=e(w,p),C=p.payload,O=r!==!1&&C!==void 0?r(C,h,S,t):S,I=Ti({},O,{_persist:Ti({},y,{rehydrated:!0})});return f(I)}}}if(!y)return e(h,p);var L=e(w,p);return L===w?h:f(Ti({},L,{_persist:y}))}}function xw(t){return t5(t)||e5(t)||ZN()}function ZN(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function e5(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function t5(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&arguments[0]!==void 0?arguments[0]:Kx,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case qx:return Uv({},e,{registry:[].concat(xw(e.registry),[n.key])});case x0:var r=e.registry.indexOf(n.key),i=xw(e.registry);return i.splice(r,1),Uv({},e,{registry:i,bootstrapped:i.length===0});default:return e}};function i5(t,e,n){var r=n||!1,i=w0(r5,Kx,e&&e.enhancer?e.enhancer:void 0),a=function(f){i.dispatch({type:qx,key:f})},s=function(f,h,p){var g={type:x0,payload:h,err:p,key:f};t.dispatch(g),i.dispatch(g),r&&u.getState().bootstrapped&&(r(),r=!1)},u=Uv({},i,{purge:function(){var f=[];return t.dispatch({type:Vx,result:function(p){f.push(p)}}),Promise.all(f)},flush:function(){var f=[];return t.dispatch({type:jx,result:function(p){f.push(p)}}),Promise.all(f)},pause:function(){t.dispatch({type:Hx})},persist:function(){t.dispatch({type:Wx,register:a,rehydrate:s})}});return e&&e.manualPersist||u.persist(),u}var k0={},E0={};E0.__esModule=!0;E0.default=s5;function dd(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dd=function(n){return typeof n}:dd=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dd(t)}function bm(){}var a5={getItem:bm,setItem:bm,removeItem:bm};function o5(t){if((typeof self>"u"?"undefined":dd(self))!=="object"||!(t in self))return!1;try{var e=self[t],n="redux-persist ".concat(t," test");e.setItem(n,"test"),e.getItem(n),e.removeItem(n)}catch{return!1}return!0}function s5(t){var e="".concat(t,"Storage");return o5(e)?self[e]:a5}k0.__esModule=!0;k0.default=c5;var l5=u5(E0);function u5(t){return t&&t.__esModule?t:{default:t}}function c5(t){var e=(0,l5.default)(t);return{getItem:function(r){return new Promise(function(i,a){i(e.getItem(r))})},setItem:function(r,i){return new Promise(function(a,s){a(e.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,a){i(e.removeItem(r))})}}}var Yx=void 0,f5=d5(k0);function d5(t){return t&&t.__esModule?t:{default:t}}var h5=(0,f5.default)("local");Yx=h5;var Xx={},Qx={},po={};Object.defineProperty(po,"__esModule",{value:!0});po.PLACEHOLDER_UNDEFINED=po.PACKAGE_NAME=void 0;po.PACKAGE_NAME="redux-deep-persist";po.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var P0={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigType=void 0,function(e){e[e.WHITELIST=0]="WHITELIST",e[e.BLACKLIST=1]="BLACKLIST"}(t.ConfigType||(t.ConfigType={}))})(P0);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRootKeysGroup=t.throwError=t.configValidator=t.transformsValidator=t.singleTransformValidator=t.findDuplicatesAndSubsets=t.unique=t.preserveUndefined=t.mergeDeep=t.dissocPath=t.assocPath=t.path=t.difference=t.cloneDeep=t._cloneDeep=t.getCircularPath=t.isEmpty=t.isDate=t.isString=t.isIntegerString=t.isPlainObject=t.isArray=t.isLength=t.isObjectLike=void 0;const e=po,n=P0,r=function(j){return typeof j=="object"&&j!==null};t.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};t.isLength=i,t.isArray=Array.isArray||function(j){return(0,t.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const a=function(j){return!!j&&typeof j=="object"&&!(0,t.isArray)(j)};t.isPlainObject=a;const s=function(j){return String(~~j)===j&&Number(j)>=0};t.isIntegerString=s;const u=function(j){return Object.prototype.toString.call(j)==="[object String]"};t.isString=u;const c=function(j){return Object.prototype.toString.call(j)==="[object Date]"};t.isDate=c;const f=function(j){return Object.keys(j).length===0};t.isEmpty=f;const h=Object.prototype.hasOwnProperty,p=function(j,T,$){$||($=new Set([j])),T||(T="");for(const V in j){const ie=T?`${T}.${V}`:V,H=j[V];if((0,t.isObjectLike)(H))return $.has(H)?`${T}.${V}:`:($.add(H),(0,t.getCircularPath)(H,ie,$))}return null};t.getCircularPath=p;const g=function(j){if(!(0,t.isObjectLike)(j))return j;if((0,t.isDate)(j))return new Date(+j);const T=(0,t.isArray)(j)?[]:{};for(const $ in j){const V=j[$];T[$]=(0,t._cloneDeep)(V)}return T};t._cloneDeep=g;const y=function(j){const T=(0,t.getCircularPath)(j);if(T)throw new Error(`${e.PACKAGE_NAME}: circular dependency detected under the path '${T}' of object you're trying to persist: ${j}`);return(0,t._cloneDeep)(j)};t.cloneDeep=y;const v=function(j,T){if(j===T)return{};if(!(0,t.isObjectLike)(j)||!(0,t.isObjectLike)(T))return T;const $=(0,t.cloneDeep)(j),V=(0,t.cloneDeep)(T),ie=Object.keys($).reduce((K,Q)=>(h.call(V,Q)||(K[Q]=void 0),K),{});if((0,t.isDate)($)||(0,t.isDate)(V))return $.valueOf()===V.valueOf()?{}:V;const H=Object.keys(V).reduce((K,Q)=>{if(!h.call($,Q))return K[Q]=V[Q],K;const oe=(0,t.difference)($[Q],V[Q]);return(0,t.isObjectLike)(oe)&&(0,t.isEmpty)(oe)&&!(0,t.isDate)(oe)?(0,t.isArray)($)&&!(0,t.isArray)(V)||!(0,t.isArray)($)&&(0,t.isArray)(V)?V:K:(K[Q]=oe,K)},ie);return delete H._persist,H};t.difference=v;const w=function(j,T){return T.reduce(($,V)=>{if($){const ie=parseInt(V,10),H=(0,t.isIntegerString)(V)&&ie<0?$.length+ie:V;return(0,t.isString)($)?$.charAt(H):$[H]}},j)};t.path=w;const x=function(j,T){return[...j].reverse().reduce((ie,H,K)=>{const Q=(0,t.isIntegerString)(H)?[]:{};return Q[H]=K===0?T:ie,Q},{})};t.assocPath=x;const _=function(j,T){const $=(0,t.cloneDeep)(j);return T.reduce((V,ie,H)=>(H===T.length-1&&V&&(0,t.isObjectLike)(V)&&delete V[ie],V&&V[ie]),$),$};t.dissocPath=_;const S=function(j,T,...$){if(!$||!$.length)return T;const V=$.shift(),{preservePlaceholder:ie,preserveUndefined:H}=j;if((0,t.isObjectLike)(T)&&(0,t.isObjectLike)(V))for(const K in V)if((0,t.isObjectLike)(V[K])&&(0,t.isObjectLike)(T[K]))T[K]||(T[K]={}),S(j,T[K],V[K]);else if((0,t.isArray)(T)){let Q=V[K];const oe=ie?e.PLACEHOLDER_UNDEFINED:void 0;H||(Q=typeof Q<"u"?Q:T[parseInt(K,10)]),Q=Q!==e.PLACEHOLDER_UNDEFINED?Q:oe,T[parseInt(K,10)]=Q}else{const Q=V[K]!==e.PLACEHOLDER_UNDEFINED?V[K]:void 0;T[K]=Q}return S(j,T,...$)},C=function(j,T,$){return S({preservePlaceholder:$==null?void 0:$.preservePlaceholder,preserveUndefined:$==null?void 0:$.preserveUndefined},(0,t.cloneDeep)(j),(0,t.cloneDeep)(T))};t.mergeDeep=C;const O=function(j,T=[],$,V,ie){if(!(0,t.isObjectLike)(j))return j;for(const H in j){const K=j[H],Q=(0,t.isArray)(j),oe=V?V+"."+H:H;K===null&&($===n.ConfigType.WHITELIST&&T.indexOf(oe)===-1||$===n.ConfigType.BLACKLIST&&T.indexOf(oe)!==-1)&&Q&&(j[parseInt(H,10)]=void 0),K===void 0&&ie&&$===n.ConfigType.BLACKLIST&&T.indexOf(oe)===-1&&Q&&(j[parseInt(H,10)]=e.PLACEHOLDER_UNDEFINED),O(K,T,$,oe,ie)}},I=function(j,T,$,V){const ie=(0,t.cloneDeep)(j);return O(ie,T,$,"",V),ie};t.preserveUndefined=I;const L=function(j,T,$){return $.indexOf(j)===T};t.unique=L;const D=function(j){return j.reduce((T,$)=>{const V=j.filter(ve=>ve===$),ie=j.filter(ve=>($+".").indexOf(ve+".")===0),{duplicates:H,subsets:K}=T,Q=V.length>1&&H.indexOf($)===-1,oe=ie.length>1;return{duplicates:[...H,...Q?V:[]],subsets:[...K,...oe?ie:[]].filter(t.unique).sort()}},{duplicates:[],subsets:[]})};t.findDuplicatesAndSubsets=D;const U=function(j,T,$){const V=$===n.ConfigType.WHITELIST?"whitelist":"blacklist",ie=`${e.PACKAGE_NAME}: incorrect ${V} configuration.`,H=`Check your create${$===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,t.isString)(T)||T.length<1)throw new Error(`${ie} Name (key) of reducer is required. ${H}`);if(!j||!j.length)return;const{duplicates:K,subsets:Q}=(0,t.findDuplicatesAndSubsets)(j);if(K.length>1)throw new Error(`${ie} Duplicated paths. + + ${JSON.stringify(K)} + + ${H}`);if(Q.length>1)throw new Error(`${ie} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(Q)} + + ${H}`)};t.singleTransformValidator=U;const X=function(j){if(!(0,t.isArray)(j))return;const T=(j==null?void 0:j.map($=>$.deepPersistKey).filter($=>$))||[];if(T.length){const $=T.filter((V,ie)=>T.indexOf(V)!==ie);if($.length)throw new Error(`${e.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify($)}`)}};t.transformsValidator=X;const Y=function({whitelist:j,blacklist:T}){if(j&&j.length&&T&&T.length)throw new Error(`${e.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(j){const{duplicates:$,subsets:V}=(0,t.findDuplicatesAndSubsets)(j);(0,t.throwError)({duplicates:$,subsets:V},"whitelist")}if(T){const{duplicates:$,subsets:V}=(0,t.findDuplicatesAndSubsets)(T);(0,t.throwError)({duplicates:$,subsets:V},"blacklist")}};t.configValidator=Y;const te=function({duplicates:j,subsets:T},$){if(j.length)throw new Error(`${e.PACKAGE_NAME}: duplicates of paths found in your ${$}. + + ${JSON.stringify(j)}`);if(T.length)throw new Error(`${e.PACKAGE_NAME}: subsets of some parent keys found in your ${$}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(T)}`)};t.throwError=te;const ce=function(j){return(0,t.isArray)(j)?j.filter(t.unique).reduce((T,$)=>{const V=$.split("."),ie=V[0],H=V.slice(1).join(".")||void 0,K=T.filter(oe=>Object.keys(oe)[0]===ie)[0],Q=K?Object.values(K)[0]:void 0;return K||T.push({[ie]:H?[H]:void 0}),K&&!Q&&H&&(K[ie]=[H]),K&&Q&&H&&Q.push(H),T},[]):[]};t.getRootKeysGroup=ce})(Qx);(function(t){var e=yn&&yn.__rest||function(p,g){var y={};for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&g.indexOf(v)<0&&(y[v]=p[v]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,v=Object.getOwnPropertySymbols(p);w!x(S)&&p?p(_,S,C):_,out:(_,S,C)=>!x(S)&&g?g(_,S,C):_,deepPersistKey:v&&v[0]}},s=(p,g,y,{debug:v,whitelist:w,blacklist:x,transforms:_})=>{if(w||x)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(_);const S=(0,n.cloneDeep)(y);let C=p;if(C&&(0,n.isObjectLike)(C)){const O=(0,n.difference)(g,y);(0,n.isEmpty)(O)||(C=(0,n.mergeDeep)(p,O,{preserveUndefined:!0}),v&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(O)}`)),Object.keys(C).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(S[I])){S[I]=(0,n.mergeDeep)(S[I],C[I]);return}S[I]=C[I]}})}return v&&C&&(0,n.isObjectLike)(C)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(C)}`),S};t.autoMergeDeep=s;const u=(p,g)=>((0,n.singleTransformValidator)(g,p,i.ConfigType.WHITELIST),a(y=>{if(!g||!g.length)return y;let v=null,w;return g.forEach(x=>{const _=x.split(".");w=(0,n.path)(y,_),typeof w>"u"&&(0,n.isIntegerString)(_[_.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const S=(0,n.assocPath)(_,w),C=(0,n.isArray)(S)?[]:{};v=(0,n.mergeDeep)(v||C,S,{preservePlaceholder:!0})}),v||y},y=>(0,n.preserveUndefined)(y,g,i.ConfigType.WHITELIST),{whitelist:[p]}));t.createWhitelist=u;const c=(p,g)=>((0,n.singleTransformValidator)(g,p,i.ConfigType.BLACKLIST),a(y=>{if(!g||!g.length)return;const v=(0,n.preserveUndefined)(y,g,i.ConfigType.BLACKLIST,!0);return g.map(x=>x.split(".")).reduce((x,_)=>(0,n.dissocPath)(x,_),v)},y=>(0,n.preserveUndefined)(y,g,i.ConfigType.BLACKLIST),{whitelist:[p]}));t.createBlacklist=c;const f=function(p,g){return g.map(y=>{const v=Object.keys(y)[0],w=y[v];return p===i.ConfigType.WHITELIST?(0,t.createWhitelist)(v,w):(0,t.createBlacklist)(v,w)})};t.getTransforms=f;const h=p=>{var{key:g,whitelist:y,blacklist:v,storage:w,transforms:x,rootReducer:_}=p,S=e(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:y,blacklist:v});const C=(0,n.getRootKeysGroup)(y),O=(0,n.getRootKeysGroup)(v),I=Object.keys(_(void 0,{type:""})),L=C.map(ce=>Object.keys(ce)[0]),D=O.map(ce=>Object.keys(ce)[0]),U=I.filter(ce=>L.indexOf(ce)===-1&&D.indexOf(ce)===-1),X=(0,t.getTransforms)(i.ConfigType.WHITELIST,C),Y=(0,t.getTransforms)(i.ConfigType.BLACKLIST,O),te=(0,n.isArray)(y)?U.map(ce=>(0,t.createBlacklist)(ce)):[];return Object.assign(Object.assign({},S),{key:g,storage:w,transforms:[...X,...Y,...te,...x||[]],stateReconciler:t.autoMergeDeep})};t.getPersistConfig=h})(Xx);const Of=(t,e)=>Math.floor(t/e)*e,va=(t,e)=>Math.round(t/e)*e;var _t={},p5={get exports(){return _t},set exports(t){_t=t}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(t,e){(function(){var n,r="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,g=2,y=4,v=1,w=2,x=1,_=2,S=4,C=8,O=16,I=32,L=64,D=128,U=256,X=512,Y=30,te="...",ce=800,j=16,T=1,$=2,V=3,ie=1/0,H=9007199254740991,K=17976931348623157e292,Q=0/0,oe=4294967295,ve=oe-1,we=oe>>>1,Ue=[["ary",D],["bind",x],["bindKey",_],["curry",C],["curryRight",O],["flip",X],["partial",I],["partialRight",L],["rearg",U]],At="[object Arguments]",me="[object Array]",Vt="[object AsyncFunction]",Bt="[object Boolean]",bn="[object Date]",_r="[object DOMException]",Ft="[object Error]",xe="[object Function]",Hr="[object GeneratorFunction]",Pt="[object Map]",gi="[object Number]",Xs="[object Null]",Mn="[object Object]",Fa="[object Promise]",Qs="[object Proxy]",er="[object RegExp]",qt="[object Set]",Dn="[object String]",bt="[object Symbol]",$a="[object Undefined]",Wr="[object WeakMap]",Co="[object WeakSet]",Vr="[object ArrayBuffer]",wr="[object DataView]",xo="[object Float32Array]",ko="[object Float64Array]",Eo="[object Int8Array]",Po="[object Int16Array]",Oo="[object Int32Array]",Js="[object Uint8Array]",Zs="[object Uint8ClampedArray]",br="[object Uint16Array]",Ki="[object Uint32Array]",sp=/\b__p \+= '';/g,nc=/\b(__p \+=) '' \+/g,lp=/(__e\(.*?\)|\b__t\)) \+\n'';/g,el=/&(?:amp|lt|gt|quot|#39);/g,Yi=/[&<>"']/g,up=RegExp(el.source),mi=RegExp(Yi.source),cp=/<%-([\s\S]+?)%>/g,fp=/<%([\s\S]+?)%>/g,rc=/<%=([\s\S]+?)%>/g,dp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hp=/^\w*$/,Cr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tl=/[\\^$.*+?()[\]{}|]/g,pp=RegExp(tl.source),nl=/^\s+/,gp=/\s/,mp=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xi=/\{\n\/\* \[wrapped with (.+)\] \*/,vp=/,? & /,yp=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sp=/[()=,{}\[\]\/\s]/,_p=/\\(\\)?/g,wp=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vi=/\w*$/,bp=/^[-+]0x[0-9a-f]+$/i,Cp=/^0b[01]+$/i,xp=/^\[object .+?Constructor\]$/,kp=/^0o[0-7]+$/i,Ep=/^(?:0|[1-9]\d*)$/,Pp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qi=/($^)/,Op=/['\n\r\u2028\u2029\\]/g,yi="\\ud800-\\udfff",rl="\\u0300-\\u036f",Tp="\\ufe20-\\ufe2f",To="\\u20d0-\\u20ff",il=rl+Tp+To,ic="\\u2700-\\u27bf",ac="a-z\\xdf-\\xf6\\xf8-\\xff",Rp="\\xac\\xb1\\xd7\\xf7",oc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ap="\\u2000-\\u206f",Ip=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",sc="A-Z\\xc0-\\xd6\\xd8-\\xde",lc="\\ufe0e\\ufe0f",uc=Rp+oc+Ap+Ip,al="['’]",Lp="["+yi+"]",cc="["+uc+"]",Ro="["+il+"]",fc="\\d+",Ao="["+ic+"]",Io="["+ac+"]",dc="[^"+yi+uc+fc+ic+ac+sc+"]",ol="\\ud83c[\\udffb-\\udfff]",hc="(?:"+Ro+"|"+ol+")",pc="[^"+yi+"]",sl="(?:\\ud83c[\\udde6-\\uddff]){2}",ll="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+sc+"]",gc="\\u200d",mc="(?:"+Io+"|"+dc+")",Mp="(?:"+Si+"|"+dc+")",Lo="(?:"+al+"(?:d|ll|m|re|s|t|ve))?",vc="(?:"+al+"(?:D|LL|M|RE|S|T|VE))?",yc=hc+"?",Sc="["+lc+"]?",Mo="(?:"+gc+"(?:"+[pc,sl,ll].join("|")+")"+Sc+yc+")*",ul="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Do=Sc+yc+Mo,Dp="(?:"+[Ao,sl,ll].join("|")+")"+Do,_c="(?:"+[pc+Ro+"?",Ro,sl,ll,Lp].join("|")+")",fl=RegExp(al,"g"),wc=RegExp(Ro,"g"),xr=RegExp(ol+"(?="+ol+")|"+_c+Do,"g"),za=RegExp([Si+"?"+Io+"+"+Lo+"(?="+[cc,Si,"$"].join("|")+")",Mp+"+"+vc+"(?="+[cc,Si+mc,"$"].join("|")+")",Si+"?"+mc+"+"+Lo,Si+"+"+vc,cl,ul,fc,Dp].join("|"),"g"),Np=RegExp("["+gc+yi+il+lc+"]"),bc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bp=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Cc=-1,nt={};nt[xo]=nt[ko]=nt[Eo]=nt[Po]=nt[Oo]=nt[Js]=nt[Zs]=nt[br]=nt[Ki]=!0,nt[At]=nt[me]=nt[Vr]=nt[Bt]=nt[wr]=nt[bn]=nt[Ft]=nt[xe]=nt[Pt]=nt[gi]=nt[Mn]=nt[er]=nt[qt]=nt[Dn]=nt[Wr]=!1;var et={};et[At]=et[me]=et[Vr]=et[wr]=et[Bt]=et[bn]=et[xo]=et[ko]=et[Eo]=et[Po]=et[Oo]=et[Pt]=et[gi]=et[Mn]=et[er]=et[qt]=et[Dn]=et[bt]=et[Js]=et[Zs]=et[br]=et[Ki]=!0,et[Ft]=et[xe]=et[Wr]=!1;var xc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Fp={"&":"&","<":"<",">":">",'"':""","'":"'"},P={"&":"&","<":"<",">":">",""":'"',"'":"'"},N={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},W=parseFloat,fe=parseInt,Ie=typeof yn=="object"&&yn&&yn.Object===Object&&yn,Ye=typeof self=="object"&&self&&self.Object===Object&&self,Ee=Ie||Ye||Function("return this")(),Te=e&&!e.nodeType&&e,ze=Te&&!0&&t&&!t.nodeType&&t,dn=ze&&ze.exports===Te,Kt=dn&&Ie.process,$t=function(){try{var F=ze&&ze.require&&ze.require("util").types;return F||Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),No=$t&&$t.isArrayBuffer,Bo=$t&&$t.isDate,dl=$t&&$t.isMap,W0=$t&&$t.isRegExp,V0=$t&&$t.isSet,q0=$t&&$t.isTypedArray;function Nn(F,J,q){switch(q.length){case 0:return F.call(J);case 1:return F.call(J,q[0]);case 2:return F.call(J,q[0],q[1]);case 3:return F.call(J,q[0],q[1],q[2])}return F.apply(J,q)}function eP(F,J,q,de){for(var Ce=-1,je=F==null?0:F.length;++Ce-1}function $p(F,J,q){for(var de=-1,Ce=F==null?0:F.length;++de-1;);return q}function t1(F,J){for(var q=F.length;q--&&Fo(J,F[q],0)>-1;);return q}function uP(F,J){for(var q=F.length,de=0;q--;)F[q]===J&&++de;return de}var cP=jp(xc),fP=jp(Fp);function dP(F){return"\\"+N[F]}function hP(F,J){return F==null?n:F[J]}function $o(F){return Np.test(F)}function pP(F){return bc.test(F)}function gP(F){for(var J,q=[];!(J=F.next()).done;)q.push(J.value);return q}function qp(F){var J=-1,q=Array(F.size);return F.forEach(function(de,Ce){q[++J]=[Ce,de]}),q}function n1(F,J){return function(q){return F(J(q))}}function ea(F,J){for(var q=-1,de=F.length,Ce=0,je=[];++q-1}function nO(o,l){var d=this.__data__,m=Uc(d,o);return m<0?(++this.size,d.push([o,l])):d[m][1]=l,this}_i.prototype.clear=JP,_i.prototype.delete=ZP,_i.prototype.get=eO,_i.prototype.has=tO,_i.prototype.set=nO;function wi(o){var l=-1,d=o==null?0:o.length;for(this.clear();++l=l?o:l)),o}function ir(o,l,d,m,b,E){var R,M=l&p,z=l&g,Z=l&y;if(d&&(R=b?d(o,m,b,E):d(o)),R!==n)return R;if(!ht(o))return o;var ee=ke(o);if(ee){if(R=oT(o),!M)return Cn(o,R)}else{var ne=an(o),ue=ne==xe||ne==Hr;if(oa(o))return F1(o,M);if(ne==Mn||ne==At||ue&&!b){if(R=z||ue?{}:rS(o),!M)return z?YO(o,yO(R,o)):KO(o,p1(R,o))}else{if(!et[ne])return b?o:{};R=sT(o,ne,M)}}E||(E=new Er);var ge=E.get(o);if(ge)return ge;E.set(o,R),IS(o)?o.forEach(function(_e){R.add(ir(_e,l,d,_e,o,E))}):RS(o)&&o.forEach(function(_e,Le){R.set(Le,ir(_e,l,d,Le,o,E))});var Se=Z?z?Sg:yg:z?kn:zt,Oe=ee?n:Se(o);return tr(Oe||o,function(_e,Le){Oe&&(Le=_e,_e=o[Le]),Sl(R,Le,ir(_e,l,d,Le,o,E))}),R}function SO(o){var l=zt(o);return function(d){return g1(d,o,l)}}function g1(o,l,d){var m=d.length;if(o==null)return!m;for(o=rt(o);m--;){var b=d[m],E=l[b],R=o[b];if(R===n&&!(b in o)||!E(R))return!1}return!0}function m1(o,l,d){if(typeof o!="function")throw new nr(s);return El(function(){o.apply(n,d)},l)}function _l(o,l,d,m){var b=-1,E=kc,R=!0,M=o.length,z=[],Z=l.length;if(!M)return z;d&&(l=ut(l,Bn(d))),m?(E=$p,R=!1):l.length>=i&&(E=hl,R=!1,l=new ja(l));e:for(;++bb?0:b+d),m=m===n||m>b?b:Pe(m),m<0&&(m+=b),m=d>m?0:MS(m);d0&&d(M)?l>1?Yt(M,l-1,d,m,b):Zi(b,M):m||(b[b.length]=M)}return b}var eg=H1(),S1=H1(!0);function qr(o,l){return o&&eg(o,l,zt)}function tg(o,l){return o&&S1(o,l,zt)}function Hc(o,l){return Ji(l,function(d){return Ei(o[d])})}function Wa(o,l){l=ia(l,o);for(var d=0,m=l.length;o!=null&&dl}function bO(o,l){return o!=null&&Xe.call(o,l)}function CO(o,l){return o!=null&&l in rt(o)}function xO(o,l,d){return o>=rn(l,d)&&o=120&&ee.length>=120)?new ja(R&&ee):n}ee=o[0];var ne=-1,ue=M[0];e:for(;++ne-1;)M!==o&&Dc.call(M,z,1),Dc.call(o,z,1);return o}function R1(o,l){for(var d=o?l.length:0,m=d-1;d--;){var b=l[d];if(d==m||b!==E){var E=b;ki(b)?Dc.call(o,b,1):fg(o,b)}}return o}function lg(o,l){return o+Fc(c1()*(l-o+1))}function BO(o,l,d,m){for(var b=-1,E=Lt(Bc((l-o)/(d||1)),0),R=q(E);E--;)R[m?E:++b]=o,o+=d;return R}function ug(o,l){var d="";if(!o||l<1||l>H)return d;do l%2&&(d+=o),l=Fc(l/2),l&&(o+=o);while(l);return d}function Re(o,l){return Eg(oS(o,l,En),o+"")}function FO(o){return h1(Xo(o))}function $O(o,l){var d=Xo(o);return tf(d,Ha(l,0,d.length))}function Cl(o,l,d,m){if(!ht(o))return o;l=ia(l,o);for(var b=-1,E=l.length,R=E-1,M=o;M!=null&&++bb?0:b+l),d=d>b?b:d,d<0&&(d+=b),b=l>d?0:d-l>>>0,l>>>=0;for(var E=q(b);++m>>1,R=o[E];R!==null&&!$n(R)&&(d?R<=l:R=i){var Z=l?null:ZO(o);if(Z)return Pc(Z);R=!1,b=hl,z=new ja}else z=l?[]:M;e:for(;++m=m?o:ar(o,l,d)}var B1=RP||function(o){return Ee.clearTimeout(o)};function F1(o,l){if(l)return o.slice();var d=o.length,m=a1?a1(d):new o.constructor(d);return o.copy(m),m}function gg(o){var l=new o.constructor(o.byteLength);return new Lc(l).set(new Lc(o)),l}function HO(o,l){var d=l?gg(o.buffer):o.buffer;return new o.constructor(d,o.byteOffset,o.byteLength)}function WO(o){var l=new o.constructor(o.source,vi.exec(o));return l.lastIndex=o.lastIndex,l}function VO(o){return yl?rt(yl.call(o)):{}}function $1(o,l){var d=l?gg(o.buffer):o.buffer;return new o.constructor(d,o.byteOffset,o.length)}function z1(o,l){if(o!==l){var d=o!==n,m=o===null,b=o===o,E=$n(o),R=l!==n,M=l===null,z=l===l,Z=$n(l);if(!M&&!Z&&!E&&o>l||E&&R&&z&&!M&&!Z||m&&R&&z||!d&&z||!b)return 1;if(!m&&!E&&!Z&&o=M)return z;var Z=d[m];return z*(Z=="desc"?-1:1)}}return o.index-l.index}function G1(o,l,d,m){for(var b=-1,E=o.length,R=d.length,M=-1,z=l.length,Z=Lt(E-R,0),ee=q(z+Z),ne=!m;++M1?d[b-1]:n,R=b>2?d[2]:n;for(E=o.length>3&&typeof E=="function"?(b--,E):n,R&&pn(d[0],d[1],R)&&(E=b<3?n:E,b=1),l=rt(l);++m-1?b[E?l[R]:R]:n}}function q1(o){return xi(function(l){var d=l.length,m=d,b=rr.prototype.thru;for(o&&l.reverse();m--;){var E=l[m];if(typeof E!="function")throw new nr(s);if(b&&!R&&Zc(E)=="wrapper")var R=new rr([],!0)}for(m=R?m:d;++m1&&Ne.reverse(),ee&&zM))return!1;var Z=E.get(o),ee=E.get(l);if(Z&&ee)return Z==l&&ee==o;var ne=-1,ue=!0,ge=d&w?new ja:n;for(E.set(o,l),E.set(l,o);++ne1?"& ":"")+l[m],l=l.join(d>2?", ":" "),o.replace(mp,`{ +/* [wrapped with `+l+`] */ +`)}function uT(o){return ke(o)||Ka(o)||!!(l1&&o&&o[l1])}function ki(o,l){var d=typeof o;return l=l??H,!!l&&(d=="number"||d!="symbol"&&Ep.test(o))&&o>-1&&o%1==0&&o0){if(++l>=ce)return arguments[0]}else l=0;return o.apply(n,arguments)}}function tf(o,l){var d=-1,m=o.length,b=m-1;for(l=l===n?m:l;++d1?o[l-1]:n;return d=typeof d=="function"?(o.pop(),d):n,yS(o,d)});function SS(o){var l=k(o);return l.__chain__=!0,l}function _R(o,l){return l(o),o}function nf(o,l){return l(o)}var wR=xi(function(o){var l=o.length,d=l?o[0]:0,m=this.__wrapped__,b=function(E){return Zp(E,o)};return l>1||this.__actions__.length||!(m instanceof Me)||!ki(d)?this.thru(b):(m=m.slice(d,+d+(l?1:0)),m.__actions__.push({func:nf,args:[b],thisArg:n}),new rr(m,this.__chain__).thru(function(E){return l&&!E.length&&E.push(n),E}))});function bR(){return SS(this)}function CR(){return new rr(this.value(),this.__chain__)}function xR(){this.__values__===n&&(this.__values__=LS(this.value()));var o=this.__index__>=this.__values__.length,l=o?n:this.__values__[this.__index__++];return{done:o,value:l}}function kR(){return this}function ER(o){for(var l,d=this;d instanceof Gc;){var m=dS(d);m.__index__=0,m.__values__=n,l?b.__wrapped__=m:l=m;var b=m;d=d.__wrapped__}return b.__wrapped__=o,l}function PR(){var o=this.__wrapped__;if(o instanceof Me){var l=o;return this.__actions__.length&&(l=new Me(this)),l=l.reverse(),l.__actions__.push({func:nf,args:[Pg],thisArg:n}),new rr(l,this.__chain__)}return this.thru(Pg)}function OR(){return D1(this.__wrapped__,this.__actions__)}var TR=Kc(function(o,l,d){Xe.call(o,d)?++o[d]:bi(o,d,1)});function RR(o,l,d){var m=ke(o)?K0:_O;return d&&pn(o,l,d)&&(l=n),m(o,ye(l,3))}function AR(o,l){var d=ke(o)?Ji:y1;return d(o,ye(l,3))}var IR=V1(hS),LR=V1(pS);function MR(o,l){return Yt(rf(o,l),1)}function DR(o,l){return Yt(rf(o,l),ie)}function NR(o,l,d){return d=d===n?1:Pe(d),Yt(rf(o,l),d)}function _S(o,l){var d=ke(o)?tr:na;return d(o,ye(l,3))}function wS(o,l){var d=ke(o)?tP:v1;return d(o,ye(l,3))}var BR=Kc(function(o,l,d){Xe.call(o,d)?o[d].push(l):bi(o,d,[l])});function FR(o,l,d,m){o=xn(o)?o:Xo(o),d=d&&!m?Pe(d):0;var b=o.length;return d<0&&(d=Lt(b+d,0)),uf(o)?d<=b&&o.indexOf(l,d)>-1:!!b&&Fo(o,l,d)>-1}var $R=Re(function(o,l,d){var m=-1,b=typeof l=="function",E=xn(o)?q(o.length):[];return na(o,function(R){E[++m]=b?Nn(l,R,d):wl(R,l,d)}),E}),zR=Kc(function(o,l,d){bi(o,d,l)});function rf(o,l){var d=ke(o)?ut:x1;return d(o,ye(l,3))}function GR(o,l,d,m){return o==null?[]:(ke(l)||(l=l==null?[]:[l]),d=m?n:d,ke(d)||(d=d==null?[]:[d]),O1(o,l,d))}var UR=Kc(function(o,l,d){o[d?0:1].push(l)},function(){return[[],[]]});function jR(o,l,d){var m=ke(o)?zp:J0,b=arguments.length<3;return m(o,ye(l,4),d,b,na)}function HR(o,l,d){var m=ke(o)?nP:J0,b=arguments.length<3;return m(o,ye(l,4),d,b,v1)}function WR(o,l){var d=ke(o)?Ji:y1;return d(o,sf(ye(l,3)))}function VR(o){var l=ke(o)?h1:FO;return l(o)}function qR(o,l,d){(d?pn(o,l,d):l===n)?l=1:l=Pe(l);var m=ke(o)?gO:$O;return m(o,l)}function KR(o){var l=ke(o)?mO:GO;return l(o)}function YR(o){if(o==null)return 0;if(xn(o))return uf(o)?zo(o):o.length;var l=an(o);return l==Pt||l==qt?o.size:ag(o).length}function XR(o,l,d){var m=ke(o)?Gp:UO;return d&&pn(o,l,d)&&(l=n),m(o,ye(l,3))}var QR=Re(function(o,l){if(o==null)return[];var d=l.length;return d>1&&pn(o,l[0],l[1])?l=[]:d>2&&pn(l[0],l[1],l[2])&&(l=[l[0]]),O1(o,Yt(l,1),[])}),af=AP||function(){return Ee.Date.now()};function JR(o,l){if(typeof l!="function")throw new nr(s);return o=Pe(o),function(){if(--o<1)return l.apply(this,arguments)}}function bS(o,l,d){return l=d?n:l,l=o&&l==null?o.length:l,Ci(o,D,n,n,n,n,l)}function CS(o,l){var d;if(typeof l!="function")throw new nr(s);return o=Pe(o),function(){return--o>0&&(d=l.apply(this,arguments)),o<=1&&(l=n),d}}var Tg=Re(function(o,l,d){var m=x;if(d.length){var b=ea(d,Ko(Tg));m|=I}return Ci(o,m,l,d,b)}),xS=Re(function(o,l,d){var m=x|_;if(d.length){var b=ea(d,Ko(xS));m|=I}return Ci(l,m,o,d,b)});function kS(o,l,d){l=d?n:l;var m=Ci(o,C,n,n,n,n,n,l);return m.placeholder=kS.placeholder,m}function ES(o,l,d){l=d?n:l;var m=Ci(o,O,n,n,n,n,n,l);return m.placeholder=ES.placeholder,m}function PS(o,l,d){var m,b,E,R,M,z,Z=0,ee=!1,ne=!1,ue=!0;if(typeof o!="function")throw new nr(s);l=sr(l)||0,ht(d)&&(ee=!!d.leading,ne="maxWait"in d,E=ne?Lt(sr(d.maxWait)||0,l):E,ue="trailing"in d?!!d.trailing:ue);function ge(xt){var Or=m,Oi=b;return m=b=n,Z=xt,R=o.apply(Oi,Or),R}function Se(xt){return Z=xt,M=El(Le,l),ee?ge(xt):R}function Oe(xt){var Or=xt-z,Oi=xt-Z,VS=l-Or;return ne?rn(VS,E-Oi):VS}function _e(xt){var Or=xt-z,Oi=xt-Z;return z===n||Or>=l||Or<0||ne&&Oi>=E}function Le(){var xt=af();if(_e(xt))return Ne(xt);M=El(Le,Oe(xt))}function Ne(xt){return M=n,ue&&m?ge(xt):(m=b=n,R)}function zn(){M!==n&&B1(M),Z=0,m=z=b=M=n}function gn(){return M===n?R:Ne(af())}function Gn(){var xt=af(),Or=_e(xt);if(m=arguments,b=this,z=xt,Or){if(M===n)return Se(z);if(ne)return B1(M),M=El(Le,l),ge(z)}return M===n&&(M=El(Le,l)),R}return Gn.cancel=zn,Gn.flush=gn,Gn}var ZR=Re(function(o,l){return m1(o,1,l)}),eA=Re(function(o,l,d){return m1(o,sr(l)||0,d)});function tA(o){return Ci(o,X)}function of(o,l){if(typeof o!="function"||l!=null&&typeof l!="function")throw new nr(s);var d=function(){var m=arguments,b=l?l.apply(this,m):m[0],E=d.cache;if(E.has(b))return E.get(b);var R=o.apply(this,m);return d.cache=E.set(b,R)||E,R};return d.cache=new(of.Cache||wi),d}of.Cache=wi;function sf(o){if(typeof o!="function")throw new nr(s);return function(){var l=arguments;switch(l.length){case 0:return!o.call(this);case 1:return!o.call(this,l[0]);case 2:return!o.call(this,l[0],l[1]);case 3:return!o.call(this,l[0],l[1],l[2])}return!o.apply(this,l)}}function nA(o){return CS(2,o)}var rA=jO(function(o,l){l=l.length==1&&ke(l[0])?ut(l[0],Bn(ye())):ut(Yt(l,1),Bn(ye()));var d=l.length;return Re(function(m){for(var b=-1,E=rn(m.length,d);++b=l}),Ka=w1(function(){return arguments}())?w1:function(o){return St(o)&&Xe.call(o,"callee")&&!s1.call(o,"callee")},ke=q.isArray,yA=No?Bn(No):EO;function xn(o){return o!=null&&lf(o.length)&&!Ei(o)}function Ct(o){return St(o)&&xn(o)}function SA(o){return o===!0||o===!1||St(o)&&hn(o)==Bt}var oa=LP||Gg,_A=Bo?Bn(Bo):PO;function wA(o){return St(o)&&o.nodeType===1&&!Pl(o)}function bA(o){if(o==null)return!0;if(xn(o)&&(ke(o)||typeof o=="string"||typeof o.splice=="function"||oa(o)||Yo(o)||Ka(o)))return!o.length;var l=an(o);if(l==Pt||l==qt)return!o.size;if(kl(o))return!ag(o).length;for(var d in o)if(Xe.call(o,d))return!1;return!0}function CA(o,l){return bl(o,l)}function xA(o,l,d){d=typeof d=="function"?d:n;var m=d?d(o,l):n;return m===n?bl(o,l,n,d):!!m}function Ag(o){if(!St(o))return!1;var l=hn(o);return l==Ft||l==_r||typeof o.message=="string"&&typeof o.name=="string"&&!Pl(o)}function kA(o){return typeof o=="number"&&u1(o)}function Ei(o){if(!ht(o))return!1;var l=hn(o);return l==xe||l==Hr||l==Vt||l==Qs}function TS(o){return typeof o=="number"&&o==Pe(o)}function lf(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=H}function ht(o){var l=typeof o;return o!=null&&(l=="object"||l=="function")}function St(o){return o!=null&&typeof o=="object"}var RS=dl?Bn(dl):TO;function EA(o,l){return o===l||ig(o,l,wg(l))}function PA(o,l,d){return d=typeof d=="function"?d:n,ig(o,l,wg(l),d)}function OA(o){return AS(o)&&o!=+o}function TA(o){if(dT(o))throw new Ce(a);return b1(o)}function RA(o){return o===null}function AA(o){return o==null}function AS(o){return typeof o=="number"||St(o)&&hn(o)==gi}function Pl(o){if(!St(o)||hn(o)!=Mn)return!1;var l=Mc(o);if(l===null)return!0;var d=Xe.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&Rc.call(d)==PP}var Ig=W0?Bn(W0):RO;function IA(o){return TS(o)&&o>=-H&&o<=H}var IS=V0?Bn(V0):AO;function uf(o){return typeof o=="string"||!ke(o)&&St(o)&&hn(o)==Dn}function $n(o){return typeof o=="symbol"||St(o)&&hn(o)==bt}var Yo=q0?Bn(q0):IO;function LA(o){return o===n}function MA(o){return St(o)&&an(o)==Wr}function DA(o){return St(o)&&hn(o)==Co}var NA=Jc(og),BA=Jc(function(o,l){return o<=l});function LS(o){if(!o)return[];if(xn(o))return uf(o)?kr(o):Cn(o);if(pl&&o[pl])return gP(o[pl]());var l=an(o),d=l==Pt?qp:l==qt?Pc:Xo;return d(o)}function Pi(o){if(!o)return o===0?o:0;if(o=sr(o),o===ie||o===-ie){var l=o<0?-1:1;return l*K}return o===o?o:0}function Pe(o){var l=Pi(o),d=l%1;return l===l?d?l-d:l:0}function MS(o){return o?Ha(Pe(o),0,oe):0}function sr(o){if(typeof o=="number")return o;if($n(o))return Q;if(ht(o)){var l=typeof o.valueOf=="function"?o.valueOf():o;o=ht(l)?l+"":l}if(typeof o!="string")return o===0?o:+o;o=Z0(o);var d=Cp.test(o);return d||kp.test(o)?fe(o.slice(2),d?2:8):bp.test(o)?Q:+o}function DS(o){return Kr(o,kn(o))}function FA(o){return o?Ha(Pe(o),-H,H):o===0?o:0}function Ve(o){return o==null?"":Fn(o)}var $A=Vo(function(o,l){if(kl(l)||xn(l)){Kr(l,zt(l),o);return}for(var d in l)Xe.call(l,d)&&Sl(o,d,l[d])}),NS=Vo(function(o,l){Kr(l,kn(l),o)}),cf=Vo(function(o,l,d,m){Kr(l,kn(l),o,m)}),zA=Vo(function(o,l,d,m){Kr(l,zt(l),o,m)}),GA=xi(Zp);function UA(o,l){var d=Wo(o);return l==null?d:p1(d,l)}var jA=Re(function(o,l){o=rt(o);var d=-1,m=l.length,b=m>2?l[2]:n;for(b&&pn(l[0],l[1],b)&&(m=1);++d1),E}),Kr(o,Sg(o),d),m&&(d=ir(d,p|g|y,eT));for(var b=l.length;b--;)fg(d,l[b]);return d});function sI(o,l){return FS(o,sf(ye(l)))}var lI=xi(function(o,l){return o==null?{}:DO(o,l)});function FS(o,l){if(o==null)return{};var d=ut(Sg(o),function(m){return[m]});return l=ye(l),T1(o,d,function(m,b){return l(m,b[0])})}function uI(o,l,d){l=ia(l,o);var m=-1,b=l.length;for(b||(b=1,o=n);++ml){var m=o;o=l,l=m}if(d||o%1||l%1){var b=c1();return rn(o+b*(l-o+W("1e-"+((b+"").length-1))),l)}return lg(o,l)}var _I=qo(function(o,l,d){return l=l.toLowerCase(),o+(d?GS(l):l)});function GS(o){return Dg(Ve(o).toLowerCase())}function US(o){return o=Ve(o),o&&o.replace(Pp,cP).replace(wc,"")}function wI(o,l,d){o=Ve(o),l=Fn(l);var m=o.length;d=d===n?m:Ha(Pe(d),0,m);var b=d;return d-=l.length,d>=0&&o.slice(d,b)==l}function bI(o){return o=Ve(o),o&&mi.test(o)?o.replace(Yi,fP):o}function CI(o){return o=Ve(o),o&&pp.test(o)?o.replace(tl,"\\$&"):o}var xI=qo(function(o,l,d){return o+(d?"-":"")+l.toLowerCase()}),kI=qo(function(o,l,d){return o+(d?" ":"")+l.toLowerCase()}),EI=W1("toLowerCase");function PI(o,l,d){o=Ve(o),l=Pe(l);var m=l?zo(o):0;if(!l||m>=l)return o;var b=(l-m)/2;return Qc(Fc(b),d)+o+Qc(Bc(b),d)}function OI(o,l,d){o=Ve(o),l=Pe(l);var m=l?zo(o):0;return l&&m>>0,d?(o=Ve(o),o&&(typeof l=="string"||l!=null&&!Ig(l))&&(l=Fn(l),!l&&$o(o))?aa(kr(o),0,d):o.split(l,d)):[]}var DI=qo(function(o,l,d){return o+(d?" ":"")+Dg(l)});function NI(o,l,d){return o=Ve(o),d=d==null?0:Ha(Pe(d),0,o.length),l=Fn(l),o.slice(d,d+l.length)==l}function BI(o,l,d){var m=k.templateSettings;d&&pn(o,l,d)&&(l=n),o=Ve(o),l=cf({},l,m,J1);var b=cf({},l.imports,m.imports,J1),E=zt(b),R=Vp(b,E),M,z,Z=0,ee=l.interpolate||Qi,ne="__p += '",ue=Kp((l.escape||Qi).source+"|"+ee.source+"|"+(ee===rc?wp:Qi).source+"|"+(l.evaluate||Qi).source+"|$","g"),ge="//# sourceURL="+(Xe.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Cc+"]")+` +`;o.replace(ue,function(_e,Le,Ne,zn,gn,Gn){return Ne||(Ne=zn),ne+=o.slice(Z,Gn).replace(Op,dP),Le&&(M=!0,ne+=`' + +__e(`+Le+`) + +'`),gn&&(z=!0,ne+=`'; +`+gn+`; +__p += '`),Ne&&(ne+=`' + +((__t = (`+Ne+`)) == null ? '' : __t) + +'`),Z=Gn+_e.length,_e}),ne+=`'; +`;var Se=Xe.call(l,"variable")&&l.variable;if(!Se)ne=`with (obj) { +`+ne+` +} +`;else if(Sp.test(Se))throw new Ce(u);ne=(z?ne.replace(sp,""):ne).replace(nc,"$1").replace(lp,"$1;"),ne="function("+(Se||"obj")+`) { +`+(Se?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(M?", __e = _.escape":"")+(z?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+ne+`return __p +}`;var Oe=HS(function(){return je(E,ge+"return "+ne).apply(n,R)});if(Oe.source=ne,Ag(Oe))throw Oe;return Oe}function FI(o){return Ve(o).toLowerCase()}function $I(o){return Ve(o).toUpperCase()}function zI(o,l,d){if(o=Ve(o),o&&(d||l===n))return Z0(o);if(!o||!(l=Fn(l)))return o;var m=kr(o),b=kr(l),E=e1(m,b),R=t1(m,b)+1;return aa(m,E,R).join("")}function GI(o,l,d){if(o=Ve(o),o&&(d||l===n))return o.slice(0,r1(o)+1);if(!o||!(l=Fn(l)))return o;var m=kr(o),b=t1(m,kr(l))+1;return aa(m,0,b).join("")}function UI(o,l,d){if(o=Ve(o),o&&(d||l===n))return o.replace(nl,"");if(!o||!(l=Fn(l)))return o;var m=kr(o),b=e1(m,kr(l));return aa(m,b).join("")}function jI(o,l){var d=Y,m=te;if(ht(l)){var b="separator"in l?l.separator:b;d="length"in l?Pe(l.length):d,m="omission"in l?Fn(l.omission):m}o=Ve(o);var E=o.length;if($o(o)){var R=kr(o);E=R.length}if(d>=E)return o;var M=d-zo(m);if(M<1)return m;var z=R?aa(R,0,M).join(""):o.slice(0,M);if(b===n)return z+m;if(R&&(M+=z.length-M),Ig(b)){if(o.slice(M).search(b)){var Z,ee=z;for(b.global||(b=Kp(b.source,Ve(vi.exec(b))+"g")),b.lastIndex=0;Z=b.exec(ee);)var ne=Z.index;z=z.slice(0,ne===n?M:ne)}}else if(o.indexOf(Fn(b),M)!=M){var ue=z.lastIndexOf(b);ue>-1&&(z=z.slice(0,ue))}return z+m}function HI(o){return o=Ve(o),o&&up.test(o)?o.replace(el,SP):o}var WI=qo(function(o,l,d){return o+(d?" ":"")+l.toUpperCase()}),Dg=W1("toUpperCase");function jS(o,l,d){return o=Ve(o),l=d?n:l,l===n?pP(o)?bP(o):aP(o):o.match(l)||[]}var HS=Re(function(o,l){try{return Nn(o,n,l)}catch(d){return Ag(d)?d:new Ce(d)}}),VI=xi(function(o,l){return tr(l,function(d){d=Yr(d),bi(o,d,Tg(o[d],o))}),o});function qI(o){var l=o==null?0:o.length,d=ye();return o=l?ut(o,function(m){if(typeof m[1]!="function")throw new nr(s);return[d(m[0]),m[1]]}):[],Re(function(m){for(var b=-1;++bH)return[];var d=oe,m=rn(o,oe);l=ye(l),o-=oe;for(var b=Wp(m,l);++d0||l<0)?new Me(d):(o<0?d=d.takeRight(-o):o&&(d=d.drop(o)),l!==n&&(l=Pe(l),d=l<0?d.dropRight(-l):d.take(l-o)),d)},Me.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Me.prototype.toArray=function(){return this.take(oe)},qr(Me.prototype,function(o,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),b=k[m?"take"+(l=="last"?"Right":""):l],E=m||/^find/.test(l);b&&(k.prototype[l]=function(){var R=this.__wrapped__,M=m?[1]:arguments,z=R instanceof Me,Z=M[0],ee=z||ke(R),ne=function(Le){var Ne=b.apply(k,Zi([Le],M));return m&&ue?Ne[0]:Ne};ee&&d&&typeof Z=="function"&&Z.length!=1&&(z=ee=!1);var ue=this.__chain__,ge=!!this.__actions__.length,Se=E&&!ue,Oe=z&&!ge;if(!E&&ee){R=Oe?R:new Me(this);var _e=o.apply(R,M);return _e.__actions__.push({func:nf,args:[ne],thisArg:n}),new rr(_e,ue)}return Se&&Oe?o.apply(this,M):(_e=this.thru(ne),Se?m?_e.value()[0]:_e.value():_e)})}),tr(["pop","push","shift","sort","splice","unshift"],function(o){var l=Oc[o],d=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",m=/^(?:pop|shift)$/.test(o);k.prototype[o]=function(){var b=arguments;if(m&&!this.__chain__){var E=this.value();return l.apply(ke(E)?E:[],b)}return this[d](function(R){return l.apply(ke(R)?R:[],b)})}}),qr(Me.prototype,function(o,l){var d=k[l];if(d){var m=d.name+"";Xe.call(Ho,m)||(Ho[m]=[]),Ho[m].push({name:l,func:d})}}),Ho[Yc(n,_).name]=[{name:"wrapper",func:n}],Me.prototype.clone=HP,Me.prototype.reverse=WP,Me.prototype.value=VP,k.prototype.at=wR,k.prototype.chain=bR,k.prototype.commit=CR,k.prototype.next=xR,k.prototype.plant=ER,k.prototype.reverse=PR,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=OR,k.prototype.first=k.prototype.head,pl&&(k.prototype[pl]=kR),k},Go=CP();ze?((ze.exports=Go)._=Go,Te._=Go):Ee._=Go}).call(yn)})(p5,_t);const Jo=(t,e,n,r,i,a,s)=>{const u=t/2-(n+i/2)*s,c=e/2-(r+a/2)*s;return{x:u,y:c}},Zo=(t,e,n,r,i=.95)=>{const a=t*i/n,s=e*i/r;return Math.min(1,Math.min(a,s))},TG=.999,RG=.1,AG=20,Nl=.95,IG=30,LG=10,Ew=t=>({x:Math.floor(t.x),y:Math.floor(t.y)}),Ya=t=>{const{width:e,height:n}=t,r={width:e,height:n},i=512*512,a=e/n;let s=e*n,u=448;for(;s1?(r.width=u,r.height=va(u/a,64)):a<1&&(r.height=u,r.width=va(u*a,64)),s=r.width*r.height;return r},g5=t=>({width:va(t.width,64),height:va(t.height,64)}),MG=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],DG=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],Jx=t=>t.kind==="line"&&t.layer==="mask",NG=t=>t.kind==="line"&&t.layer==="base",Pw=t=>t.kind==="image"&&t.layer==="base",BG=t=>t.kind==="fillRect"&&t.layer==="base",FG=t=>t.kind==="eraseRect"&&t.layer==="base",m5=t=>t.kind==="line",Zl={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},v5={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:Zl,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},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"},Zx=vo({name:"canvas",initialState:v5,reducers:{setTool:(t,e)=>{const n=e.payload;t.tool=e.payload,n!=="move"&&(t.isTransformingBoundingBox=!1,t.isMouseOverBoundingBox=!1,t.isMovingBoundingBox=!1,t.isMovingStage=!1)},setLayer:(t,e)=>{t.layer=e.payload},toggleTool:t=>{const e=t.tool;e!=="move"&&(t.tool=e==="brush"?"eraser":"brush")},setMaskColor:(t,e)=>{t.maskColor=e.payload},setBrushColor:(t,e)=>{t.brushColor=e.payload},setBrushSize:(t,e)=>{t.brushSize=e.payload},clearMask:t=>{t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.layerState.objects=t.layerState.objects.filter(e=>!Jx(e)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:t=>{t.shouldPreserveMaskedArea=!t.shouldPreserveMaskedArea},toggleShouldShowMask:t=>{t.isMaskEnabled=!t.isMaskEnabled},setShouldPreserveMaskedArea:(t,e)=>{t.shouldPreserveMaskedArea=e.payload},setIsMaskEnabled:(t,e)=>{t.isMaskEnabled=e.payload,t.layer=e.payload?"mask":"base"},setShouldShowCheckboardTransparency:(t,e)=>{t.shouldShowCheckboardTransparency=e.payload},setShouldShowBrushPreview:(t,e)=>{t.shouldShowBrushPreview=e.payload},setShouldShowBrush:(t,e)=>{t.shouldShowBrush=e.payload},setCursorPosition:(t,e)=>{t.cursorPosition=e.payload},setInitialCanvasImage:(t,e)=>{const n=e.payload,{stageDimensions:r}=t,i={width:Of(_t.clamp(n.width,64,512),64),height:Of(_t.clamp(n.height,64,512),64)},a={x:va(n.width/2-i.width/2,64),y:va(n.height/2-i.height/2,64)};if(t.boundingBoxScaleMethod==="auto"){const c=Ya(i);t.scaledBoundingBoxDimensions=c}t.boundingBoxDimensions=i,t.boundingBoxCoordinates=a,t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.layerState={...Zl,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},t.futureLayerStates=[],t.isCanvasInitialized=!1;const s=Zo(r.width,r.height,n.width,n.height,Nl),u=Jo(r.width,r.height,0,0,n.width,n.height,s);t.stageScale=s,t.stageCoordinates=u,t.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(t,e)=>{const n=g5(e.payload);if(t.boundingBoxDimensions=n,t.boundingBoxScaleMethod==="auto"){const r=Ya(n);t.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(t,e)=>{t.boundingBoxCoordinates=Ew(e.payload)},setStageCoordinates:(t,e)=>{t.stageCoordinates=e.payload},setBoundingBoxPreviewFill:(t,e)=>{t.boundingBoxPreviewFill=e.payload},setDoesCanvasNeedScaling:(t,e)=>{t.doesCanvasNeedScaling=e.payload},setStageScale:(t,e)=>{t.stageScale=e.payload},setShouldDarkenOutsideBoundingBox:(t,e)=>{t.shouldDarkenOutsideBoundingBox=e.payload},setIsDrawing:(t,e)=>{t.isDrawing=e.payload},clearCanvasHistory:t=>{t.pastLayerStates=[],t.futureLayerStates=[]},setShouldLockBoundingBox:(t,e)=>{t.shouldLockBoundingBox=e.payload},toggleShouldLockBoundingBox:t=>{t.shouldLockBoundingBox=!t.shouldLockBoundingBox},setShouldShowBoundingBox:(t,e)=>{t.shouldShowBoundingBox=e.payload},setIsTransformingBoundingBox:(t,e)=>{t.isTransformingBoundingBox=e.payload},setIsMovingBoundingBox:(t,e)=>{t.isMovingBoundingBox=e.payload},setIsMouseOverBoundingBox:(t,e)=>{t.isMouseOverBoundingBox=e.payload},setIsMoveBoundingBoxKeyHeld:(t,e)=>{t.isMoveBoundingBoxKeyHeld=e.payload},setIsMoveStageKeyHeld:(t,e)=>{t.isMoveStageKeyHeld=e.payload},addImageToStagingArea:(t,e)=>{const{boundingBox:n,image:r}=e.payload;!n||!r||(t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),t.layerState.stagingArea.selectedImageIndex=t.layerState.stagingArea.images.length-1,t.futureLayerStates=[])},discardStagedImages:t=>{t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.stagingArea={...Zl.stagingArea},t.futureLayerStates=[],t.shouldShowStagingOutline=!0,t.shouldShowStagingOutline=!0},addFillRect:t=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:n,brushColor:r}=t;t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.objects.push({kind:"fillRect",layer:"base",...e,...n,color:r}),t.futureLayerStates=[]},addEraseRect:t=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:n}=t;t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.objects.push({kind:"eraseRect",layer:"base",...e,...n}),t.futureLayerStates=[]},addLine:(t,e)=>{const{tool:n,layer:r,brushColor:i,brushSize:a,shouldRestrictStrokesToBox:s}=t;if(n==="move"||n==="colorPicker")return;const u=a/2,c=r==="base"&&n==="brush"?{color:i}:{};t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const f={kind:"line",layer:r,tool:n,strokeWidth:u,points:e.payload,...c};s&&(f.clip={...t.boundingBoxCoordinates,...t.boundingBoxDimensions}),t.layerState.objects.push(f),t.futureLayerStates=[]},addPointToCurrentLine:(t,e)=>{const n=t.layerState.objects.findLast(m5);n&&n.points.push(...e.payload)},undo:t=>{const e=t.pastLayerStates.pop();e&&(t.futureLayerStates.unshift(_t.cloneDeep(t.layerState)),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=e)},redo:t=>{const e=t.futureLayerStates.shift();e&&(t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=e)},setShouldShowGrid:(t,e)=>{t.shouldShowGrid=e.payload},setIsMovingStage:(t,e)=>{t.isMovingStage=e.payload},setShouldSnapToGrid:(t,e)=>{t.shouldSnapToGrid=e.payload},setShouldAutoSave:(t,e)=>{t.shouldAutoSave=e.payload},setShouldShowIntermediates:(t,e)=>{t.shouldShowIntermediates=e.payload},resetCanvas:t=>{t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.layerState=Zl,t.futureLayerStates=[]},setCanvasContainerDimensions:(t,e)=>{t.canvasContainerDimensions=e.payload},resizeAndScaleCanvas:t=>{const{width:e,height:n}=t.canvasContainerDimensions,r=t.layerState.objects.find(Pw),i={width:Math.floor(e),height:Math.floor(n)};if(!r){const h=Zo(i.width,i.height,512,512,Nl),p=Jo(i.width,i.height,0,0,512,512,h),g={width:512,height:512};if(t.stageScale=h,t.stageCoordinates=p,t.stageDimensions=i,t.boundingBoxCoordinates={x:0,y:0},t.boundingBoxDimensions=g,t.boundingBoxScaleMethod==="auto"){const y=Ya(g);t.scaledBoundingBoxDimensions=y}return}const{width:a,height:s}=r,c=Zo(e,n,a,s,.95),f=Jo(i.width,i.height,0,0,a,s,c);t.minimumStageScale=c,t.stageScale=c,t.stageCoordinates=Ew(f),t.stageDimensions=i,t.isCanvasInitialized=!0},resizeCanvas:t=>{const{width:e,height:n}=t.canvasContainerDimensions,r={width:Math.floor(e),height:Math.floor(n)};if(t.stageDimensions=r,!t.layerState.objects.find(Pw)){const i=Zo(r.width,r.height,512,512,Nl),a=Jo(r.width,r.height,0,0,512,512,i),s={width:512,height:512};if(t.stageScale=i,t.stageCoordinates=a,t.boundingBoxCoordinates={x:0,y:0},t.boundingBoxDimensions=s,t.boundingBoxScaleMethod==="auto"){const u=Ya(s);t.scaledBoundingBoxDimensions=u}}},resetCanvasView:(t,e)=>{const{contentRect:n,shouldScaleTo1:r}=e.payload,{stageDimensions:{width:i,height:a}}=t,{x:s,y:u,width:c,height:f}=n;if(c!==0&&f!==0){const h=r?1:Zo(i,a,c,f,Nl),p=Jo(i,a,s,u,c,f,h);t.stageScale=h,t.stageCoordinates=p}else{const h=Zo(i,a,512,512,Nl),p=Jo(i,a,0,0,512,512,h),g={width:512,height:512};if(t.stageScale=h,t.stageCoordinates=p,t.boundingBoxCoordinates={x:0,y:0},t.boundingBoxDimensions=g,t.boundingBoxScaleMethod==="auto"){const y=Ya(g);t.scaledBoundingBoxDimensions=y}}},nextStagingAreaImage:t=>{const e=t.layerState.stagingArea.selectedImageIndex,n=t.layerState.stagingArea.images.length;t.layerState.stagingArea.selectedImageIndex=Math.min(e+1,n-1)},prevStagingAreaImage:t=>{const e=t.layerState.stagingArea.selectedImageIndex;t.layerState.stagingArea.selectedImageIndex=Math.max(e-1,0)},commitStagingAreaImage:t=>{const{images:e,selectedImageIndex:n}=t.layerState.stagingArea;t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.objects.push({...e[n]}),t.layerState.stagingArea={...Zl.stagingArea},t.futureLayerStates=[],t.shouldShowStagingOutline=!0,t.shouldShowStagingImage=!0},fitBoundingBoxToStage:t=>{const{boundingBoxDimensions:e,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=t,a=r.width/i,s=r.height/i;if(n.x<0||n.x+e.width>a||n.y<0||n.y+e.height>s){const u={width:Of(_t.clamp(a,64,512),64),height:Of(_t.clamp(s,64,512),64)},c={x:va(a/2-u.width/2,64),y:va(s/2-u.height/2,64)};if(t.boundingBoxDimensions=u,t.boundingBoxCoordinates=c,t.boundingBoxScaleMethod==="auto"){const f=Ya(u);t.scaledBoundingBoxDimensions=f}}},setBoundingBoxScaleMethod:(t,e)=>{if(t.boundingBoxScaleMethod=e.payload,e.payload==="auto"){const n=Ya(t.boundingBoxDimensions);t.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(t,e)=>{t.scaledBoundingBoxDimensions=e.payload},setShouldShowStagingImage:(t,e)=>{t.shouldShowStagingImage=e.payload},setShouldShowStagingOutline:(t,e)=>{t.shouldShowStagingOutline=e.payload},setShouldShowCanvasDebugInfo:(t,e)=>{t.shouldShowCanvasDebugInfo=e.payload},setShouldRestrictStrokesToBox:(t,e)=>{t.shouldRestrictStrokesToBox=e.payload},setShouldCropToBoundingBoxOnSave:(t,e)=>{t.shouldCropToBoundingBoxOnSave=e.payload},setColorPickerColor:(t,e)=>{t.colorPickerColor=e.payload},commitColorPickerColor:t=>{t.brushColor={...t.colorPickerColor,a:t.brushColor.a},t.tool="brush"},setMergedCanvas:(t,e)=>{t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.futureLayerStates=[],t.layerState.objects=[e.payload]},resetCanvasInteractionState:t=>{t.cursorPosition=null,t.isDrawing=!1,t.isMouseOverBoundingBox=!1,t.isMoveBoundingBoxKeyHeld=!1,t.isMoveStageKeyHeld=!1,t.isMovingBoundingBox=!1,t.isMovingStage=!1,t.isTransformingBoundingBox=!1},mouseLeftCanvas:t=>{t.cursorPosition=null,t.isDrawing=!1,t.isMouseOverBoundingBox=!1,t.isMovingBoundingBox=!1,t.isTransformingBoundingBox=!1}}}),{addEraseRect:$G,addFillRect:zG,addImageToStagingArea:y5,addLine:GG,addPointToCurrentLine:UG,clearCanvasHistory:jG,clearMask:HG,commitColorPickerColor:WG,commitStagingAreaImage:VG,discardStagedImages:qG,fitBoundingBoxToStage:KG,mouseLeftCanvas:YG,nextStagingAreaImage:XG,prevStagingAreaImage:QG,redo:JG,resetCanvas:ZG,resetCanvasInteractionState:eU,resetCanvasView:tU,resizeAndScaleCanvas:nU,resizeCanvas:rU,setBoundingBoxCoordinates:iU,setBoundingBoxDimensions:aU,setBoundingBoxPreviewFill:oU,setBoundingBoxScaleMethod:sU,setBrushColor:lU,setBrushSize:uU,setCanvasContainerDimensions:cU,setColorPickerColor:fU,setCursorPosition:dU,setDoesCanvasNeedScaling:hU,setInitialCanvasImage:pU,setIsDrawing:gU,setIsMaskEnabled:mU,setIsMouseOverBoundingBox:vU,setIsMoveBoundingBoxKeyHeld:yU,setIsMoveStageKeyHeld:SU,setIsMovingBoundingBox:_U,setIsMovingStage:wU,setIsTransformingBoundingBox:bU,setLayer:CU,setMaskColor:xU,setMergedCanvas:kU,setShouldAutoSave:EU,setShouldCropToBoundingBoxOnSave:PU,setShouldDarkenOutsideBoundingBox:OU,setShouldLockBoundingBox:TU,setShouldPreserveMaskedArea:RU,setShouldShowBoundingBox:AU,setShouldShowBrush:IU,setShouldShowBrushPreview:LU,setShouldShowCanvasDebugInfo:MU,setShouldShowCheckboardTransparency:DU,setShouldShowGrid:NU,setShouldShowIntermediates:BU,setShouldShowStagingImage:FU,setShouldShowStagingOutline:$U,setShouldSnapToGrid:zU,setStageCoordinates:GU,setStageScale:UU,setTool:jU,toggleShouldLockBoundingBox:HU,toggleTool:WU,undo:VU,setScaledBoundingBoxDimensions:qU,setShouldRestrictStrokesToBox:KU}=Zx.actions,S5=Zx.reducer,_5={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},ek=vo({name:"gallery",initialState:_5,reducers:{setCurrentImage:(t,e)=>{t.currentImage=e.payload,t.currentImageUuid=e.payload.uuid},removeImage:(t,e)=>{const{uuid:n,category:r}=e.payload,i=t.categories[r].images,a=i.filter(s=>s.uuid!==n);if(n===t.currentImageUuid){const s=i.findIndex(c=>c.uuid===n),u=_t.clamp(s,0,a.length-1);t.currentImage=a.length?a[u]:void 0,t.currentImageUuid=a.length?a[u].uuid:""}t.categories[r].images=a},addImage:(t,e)=>{const{image:n,category:r}=e.payload,{uuid:i,url:a,mtime:s}=n,u=t.categories[r];u.images.find(c=>c.url===a&&c.mtime===s)||(u.images.unshift(n),t.shouldAutoSwitchToNewImages&&(t.currentImageUuid=i,t.currentImage=n,t.currentCategory=r),t.intermediateImage=void 0,u.latest_mtime=s)},setIntermediateImage:(t,e)=>{t.intermediateImage=e.payload},clearIntermediateImage:t=>{t.intermediateImage=void 0},selectNextImage:t=>{const{currentImage:e}=t;if(!e)return;const n=t.categories[e.category].images;if(e){const r=n.findIndex(i=>i.uuid===e.uuid);if(r{const{currentImage:e}=t;if(!e)return;const n=t.categories[e.category].images;if(e){const r=n.findIndex(i=>i.uuid===e.uuid);if(r>0){const i=n[r-1];t.currentImage=i,t.currentImageUuid=i.uuid}}},addGalleryImages:(t,e)=>{const{images:n,areMoreImagesAvailable:r,category:i}=e.payload,a=t.categories[i].images;if(n.length>0){const s=n.filter(u=>!a.find(c=>c.url===u.url&&c.mtime===u.mtime));if(t.categories[i].images=a.concat(s).sort((u,c)=>c.mtime-u.mtime),!t.currentImage){const u=n[0];t.currentImage=u,t.currentImageUuid=u.uuid}t.categories[i].latest_mtime=n[0].mtime,t.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(t.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(t,e)=>{t.shouldPinGallery=e.payload},setShouldShowGallery:(t,e)=>{t.shouldShowGallery=e.payload},setGalleryImageMinimumWidth:(t,e)=>{t.galleryImageMinimumWidth=e.payload},setGalleryImageObjectFit:(t,e)=>{t.galleryImageObjectFit=e.payload},setShouldHoldGalleryOpen:(t,e)=>{t.shouldHoldGalleryOpen=e.payload},setShouldAutoSwitchToNewImages:(t,e)=>{t.shouldAutoSwitchToNewImages=e.payload},setCurrentCategory:(t,e)=>{t.currentCategory=e.payload},setGalleryWidth:(t,e)=>{t.galleryWidth=e.payload},setShouldUseSingleGalleryColumn:(t,e)=>{t.shouldUseSingleGalleryColumn=e.payload}}}),{addImage:Tf,clearIntermediateImage:Cm,removeImage:tk,setCurrentImage:YU,addGalleryImages:w5,setIntermediateImage:b5,selectNextImage:XU,selectPrevImage:QU,setShouldPinGallery:JU,setShouldShowGallery:ZU,setGalleryImageMinimumWidth:ej,setGalleryImageObjectFit:tj,setShouldHoldGalleryOpen:nj,setShouldAutoSwitchToNewImages:rj,setCurrentCategory:ij,setGalleryWidth:aj,setShouldUseSingleGalleryColumn:oj}=ek.actions,C5=ek.reducer,x5={isLightboxOpen:!1},k5=x5,nk=vo({name:"lightbox",initialState:k5,reducers:{setIsLightboxOpen:(t,e)=>{t.isLightboxOpen=e.payload}}}),{setIsLightboxOpen:sj}=nk.actions,E5=nk.reducer,hd=t=>typeof t=="string"?t:t.length===1?t[0].prompt:t.map(e=>`${e.prompt}:${e.weight}`).join(" ");function P5(t){let e=typeof t=="string"?t:hd(t),n="";const r=new RegExp(/\[([^\][]*)]/,"gi"),i=[...e.matchAll(r)].map(a=>a[1]);return i.length&&(n=i.join(" "),i.forEach(a=>{e=e.replace(`[${a}]`,"").replaceAll("[]","").trim()})),[e,n]}const O5=t=>{const r=t.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return T5(r)?r:!1},T5=t=>Boolean(typeof t=="string"?O5(t):t.length&&!t.some(e=>{const{seed:n,weight:r}=e,i=!isNaN(parseInt(n.toString(),10)),a=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&a)})),Ow=t=>t.reduce((e,n,r,i)=>{const{seed:a,weight:s}=n;return e+=`${a}:${s}`,r!==i.length-1&&(e+=","),e},""),R5=t=>t.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0],10),parseFloat(r[1])]),rk={cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,maskPath:"",perlin:0,prompt:"",negativePrompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:30,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,tileSize:32,variationAmount:.1,width:512,shouldUseSymmetry:!1,horizontalSymmetrySteps:0,verticalSymmetrySteps:0},A5=rk,ik=vo({name:"generation",initialState:A5,reducers:{setPrompt:(t,e)=>{const n=e.payload;typeof n=="string"?t.prompt=n:t.prompt=hd(n)},setNegativePrompt:(t,e)=>{const n=e.payload;typeof n=="string"?t.negativePrompt=n:t.negativePrompt=hd(n)},setIterations:(t,e)=>{t.iterations=e.payload},setSteps:(t,e)=>{t.steps=e.payload},clampSymmetrySteps:t=>{t.horizontalSymmetrySteps=_t.clamp(t.horizontalSymmetrySteps,0,t.steps),t.verticalSymmetrySteps=_t.clamp(t.verticalSymmetrySteps,0,t.steps)},setCfgScale:(t,e)=>{t.cfgScale=e.payload},setThreshold:(t,e)=>{t.threshold=e.payload},setPerlin:(t,e)=>{t.perlin=e.payload},setHeight:(t,e)=>{t.height=e.payload},setWidth:(t,e)=>{t.width=e.payload},setSampler:(t,e)=>{t.sampler=e.payload},setSeed:(t,e)=>{t.seed=e.payload,t.shouldRandomizeSeed=!1},setImg2imgStrength:(t,e)=>{t.img2imgStrength=e.payload},setMaskPath:(t,e)=>{t.maskPath=e.payload},setSeamless:(t,e)=>{t.seamless=e.payload},setShouldFitToWidthHeight:(t,e)=>{t.shouldFitToWidthHeight=e.payload},resetSeed:t=>{t.seed=-1},setParameter:(t,e)=>{const{key:n,value:r}=e.payload,i={...t,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(t,e)=>{t.shouldGenerateVariations=e.payload},setVariationAmount:(t,e)=>{t.variationAmount=e.payload},setSeedWeights:(t,e)=>{t.seedWeights=e.payload,t.shouldGenerateVariations=!0,t.variationAmount=0},setAllTextToImageParameters:(t,e)=>{const{sampler:n,prompt:r,seed:i,variations:a,steps:s,cfg_scale:u,threshold:c,perlin:f,seamless:h,_hires_fix:p,width:g,height:y}=e.payload.image;a&&a.length>0?(t.seedWeights=Ow(a),t.shouldGenerateVariations=!0,t.variationAmount=0):t.shouldGenerateVariations=!1,i&&(t.seed=i,t.shouldRandomizeSeed=!1),r&&(t.prompt=hd(r)),n&&(t.sampler=n),s&&(t.steps=s),u&&(t.cfgScale=u),typeof c>"u"?t.threshold=0:t.threshold=c,typeof f>"u"?t.perlin=0:t.perlin=f,typeof h=="boolean"&&(t.seamless=h),g&&(t.width=g),y&&(t.height=y)},setAllImageToImageParameters:(t,e)=>{const{type:n,strength:r,fit:i,init_image_path:a,mask_image_path:s}=e.payload.image;n==="img2img"&&(a&&(t.initialImage=a),s&&(t.maskPath=s),r&&(t.img2imgStrength=r),typeof i=="boolean"&&(t.shouldFitToWidthHeight=i))},setAllParameters:(t,e)=>{const{type:n,sampler:r,prompt:i,seed:a,variations:s,steps:u,cfg_scale:c,threshold:f,perlin:h,seamless:p,_hires_fix:g,width:y,height:v,strength:w,fit:x,init_image_path:_,mask_image_path:S}=e.payload.image;if(n==="img2img"&&(_&&(t.initialImage=_),S&&(t.maskPath=S),w&&(t.img2imgStrength=w),typeof x=="boolean"&&(t.shouldFitToWidthHeight=x)),s&&s.length>0?(t.seedWeights=Ow(s),t.shouldGenerateVariations=!0,t.variationAmount=0):t.shouldGenerateVariations=!1,a&&(t.seed=a,t.shouldRandomizeSeed=!1),i){const[C,O]=P5(i);C&&(t.prompt=C),O?t.negativePrompt=O:t.negativePrompt=""}r&&(t.sampler=r),u&&(t.steps=u),c&&(t.cfgScale=c),typeof f>"u"?t.threshold=0:t.threshold=f,typeof h>"u"?t.perlin=0:t.perlin=h,typeof p=="boolean"&&(t.seamless=p),y&&(t.width=y),v&&(t.height=v)},resetParametersState:t=>({...t,...rk}),setShouldRandomizeSeed:(t,e)=>{t.shouldRandomizeSeed=e.payload},setInitialImage:(t,e)=>{t.initialImage=e.payload},clearInitialImage:t=>{t.initialImage=void 0},setSeamSize:(t,e)=>{t.seamSize=e.payload},setSeamBlur:(t,e)=>{t.seamBlur=e.payload},setSeamStrength:(t,e)=>{t.seamStrength=e.payload},setSeamSteps:(t,e)=>{t.seamSteps=e.payload},setTileSize:(t,e)=>{t.tileSize=e.payload},setInfillMethod:(t,e)=>{t.infillMethod=e.payload},setShouldUseSymmetry:(t,e)=>{t.shouldUseSymmetry=e.payload},setHorizontalSymmetrySteps:(t,e)=>{t.horizontalSymmetrySteps=e.payload},setVerticalSymmetrySteps:(t,e)=>{t.verticalSymmetrySteps=e.payload}}}),{clampSymmetrySteps:lj,clearInitialImage:I5,resetParametersState:uj,resetSeed:cj,setAllImageToImageParameters:fj,setAllParameters:dj,setAllTextToImageParameters:hj,setCfgScale:pj,setHeight:gj,setImg2imgStrength:mj,setInfillMethod:L5,setInitialImage:M5,setIterations:vj,setMaskPath:D5,setParameter:yj,setPerlin:Sj,setPrompt:_j,setNegativePrompt:wj,setSampler:bj,setSeamBlur:Cj,setSeamless:xj,setSeamSize:kj,setSeamSteps:Ej,setSeamStrength:Pj,setSeed:Oj,setSeedWeights:Tj,setShouldFitToWidthHeight:Rj,setShouldGenerateVariations:Aj,setShouldRandomizeSeed:Ij,setSteps:Lj,setThreshold:Mj,setTileSize:Dj,setVariationAmount:Nj,setWidth:Bj,setShouldUseSymmetry:Fj,setHorizontalSymmetrySteps:$j,setVerticalSymmetrySteps:zj}=ik.actions,N5=ik.reducer,ak={codeformerFidelity:.75,facetoolStrength:.75,facetoolType:"gfpgan",hiresFix:!1,hiresStrength:.75,shouldLoopback:!1,shouldRunESRGAN:!1,shouldRunFacetool:!1,upscalingLevel:4,upscalingDenoising:.75,upscalingStrength:.75},B5=ak,ok=vo({name:"postprocessing",initialState:B5,reducers:{setFacetoolStrength:(t,e)=>{t.facetoolStrength=e.payload},setCodeformerFidelity:(t,e)=>{t.codeformerFidelity=e.payload},setUpscalingLevel:(t,e)=>{t.upscalingLevel=e.payload},setUpscalingDenoising:(t,e)=>{t.upscalingDenoising=e.payload},setUpscalingStrength:(t,e)=>{t.upscalingStrength=e.payload},setHiresFix:(t,e)=>{t.hiresFix=e.payload},setHiresStrength:(t,e)=>{t.hiresStrength=e.payload},resetPostprocessingState:t=>({...t,...ak}),setShouldRunFacetool:(t,e)=>{t.shouldRunFacetool=e.payload},setFacetoolType:(t,e)=>{t.facetoolType=e.payload},setShouldRunESRGAN:(t,e)=>{t.shouldRunESRGAN=e.payload},setShouldLoopback:(t,e)=>{t.shouldLoopback=e.payload}}}),{resetPostprocessingState:Gj,setCodeformerFidelity:Uj,setFacetoolStrength:jj,setFacetoolType:Hj,setHiresFix:Wj,setHiresStrength:Vj,setShouldLoopback:qj,setShouldRunESRGAN:Kj,setShouldRunFacetool:Yj,setUpscalingLevel:Xj,setUpscalingDenoising:Qj,setUpscalingStrength:Jj}=ok.actions,F5=ok.reducer;function yr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tw(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:{};yr(this,t),this.init(e,n)}return Sr(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||G5,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i1?r-1:0),a=1;a-1?u.replace(/###/g,"."):u}function i(){return!t||typeof t=="string"}for(var a=typeof e!="string"?[].concat(e):e.split(".");a.length>1;){if(i())return{};var s=r(a.shift());!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={}}return i()?{}:{obj:t,k:r(a.shift())}}function Mw(t,e,n){var r=O0(t,e,Object),i=r.obj,a=r.k;i[a]=n}function H5(t,e,n,r){var i=O0(t,e,Object),a=i.obj,s=i.k;a[s]=a[s]||[],r&&(a[s]=a[s].concat(n)),r||a[s].push(n)}function rh(t,e){var n=O0(t,e),r=n.obj,i=n.k;if(r)return r[i]}function Dw(t,e,n){var r=rh(t,n);return r!==void 0?r:rh(e,n)}function ck(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):ck(t[r],e[r],n):t[r]=e[r]);return t}function es(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var W5={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function V5(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return W5[e]}):t}var Qh=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,q5=[" ",",","?","!",";"];function K5(t,e,n){e=e||"",n=n||"";var r=q5.filter(function(u){return e.indexOf(u)<0&&n.indexOf(u)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(u){return u==="?"?"\\?":u}).join("|"),")")),a=!i.test(t);if(!a){var s=t.indexOf(n);s>0&&!i.test(t.substring(0,s))&&(a=!0)}return a}function Nw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Rf(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fk(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[e])return t[e];for(var r=e.split(n),i=t,a=0;aa+s;)s++,u=r.slice(a,a+s).join(n),c=i[u];if(c===void 0)return;if(c===null)return null;if(e.endsWith(u)){if(typeof c=="string")return c;if(u&&typeof c[u]=="string")return c[u]}var f=r.slice(a+s).join(n);return f?fk(c,f,n):void 0}i=i[r[a]]}return i}}var Q5=function(t){Xh(n,t);var e=Y5(n);function n(r){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return yr(this,n),i=e.call(this),Qh&&Aa.call(Pa(i)),i.data=r||{},i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Sr(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var a=this.options.ns.indexOf(i);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(i,a,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,f=u.ignoreJSONStructure!==void 0?u.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[i,a];s&&typeof s!="string"&&(h=h.concat(s)),s&&typeof s=="string"&&(h=h.concat(c?s.split(c):s)),i.indexOf(".")>-1&&(h=i.split("."));var p=rh(this.data,h);return p||!f||typeof s!="string"?p:fk(this.data&&this.data[i]&&this.data[i][a],s,c)}},{key:"addResource",value:function(i,a,s,u){var c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},f=this.options.keySeparator;f===void 0&&(f=".");var h=[i,a];s&&(h=h.concat(f?s.split(f):s)),i.indexOf(".")>-1&&(h=i.split("."),u=a,a=h[1]),this.addNamespaces(a),Mw(this.data,h,u),c.silent||this.emit("added",i,a,s,u)}},{key:"addResources",value:function(i,a,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var c in s)(typeof s[c]=="string"||Object.prototype.toString.apply(s[c])==="[object Array]")&&this.addResource(i,a,c,s[c],{silent:!0});u.silent||this.emit("added",i,a,s)}},{key:"addResourceBundle",value:function(i,a,s,u,c){var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},h=[i,a];i.indexOf(".")>-1&&(h=i.split("."),u=s,s=a,a=h[1]),this.addNamespaces(a);var p=rh(this.data,h)||{};u?ck(p,s,c):p=Rf(Rf({},p),s),Mw(this.data,h,p),f.silent||this.emit("added",i,a,s)}},{key:"removeResourceBundle",value:function(i,a){this.hasResourceBundle(i,a)&&delete this.data[i][a],this.removeNamespaces(a),this.emit("removed",i,a)}},{key:"hasResourceBundle",value:function(i,a){return this.getResource(i,a)!==void 0}},{key:"getResourceBundle",value:function(i,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Rf(Rf({},{}),this.getResource(i,a)):this.getResource(i,a)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var a=this.getDataByLanguage(i),s=a&&Object.keys(a)||[];return!!s.find(function(u){return a[u]&&Object.keys(a[u]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Aa),dk={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,r,i,a){var s=this;return e.forEach(function(u){s.processors[u]&&(n=s.processors[u].process(n,r,i,a))}),n}};function Bw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function mn(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Fw={},$w=function(t){Xh(n,t);var e=J5(n);function n(r){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return yr(this,n),i=e.call(this),Qh&&Aa.call(Pa(i)),j5(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Pa(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=ii.create("translator"),i}return Sr(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var s=this.resolve(i,a);return s&&s.res!==void 0}},{key:"extractFromKey",value:function(i,a){var s=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");var u=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=a.ns||this.options.defaultNS||[],f=s&&i.indexOf(s)>-1,h=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!K5(i,s,u);if(f&&!h){var p=i.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:i,namespaces:c};var g=i.split(s);(s!==u||s===u&&this.options.ns.indexOf(g[0])>-1)&&(c=g.shift()),i=g.join(u)}return typeof c=="string"&&(c=[c]),{key:i,namespaces:c}}},{key:"translate",value:function(i,a,s){var u=this;if($r(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var c=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,f=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,h=this.extractFromKey(i[i.length-1],a),p=h.key,g=h.namespaces,y=g[g.length-1],v=a.lng||this.language,w=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(w){var x=a.nsSeparator||this.options.nsSeparator;return c?{res:"".concat(y).concat(x).concat(p),usedKey:p,exactUsedKey:p,usedLng:v,usedNS:y}:"".concat(y).concat(x).concat(p)}return c?{res:p,usedKey:p,exactUsedKey:p,usedLng:v,usedNS:y}:p}var _=this.resolve(i,a),S=_&&_.res,C=_&&_.usedKey||p,O=_&&_.exactUsedKey||p,I=Object.prototype.toString.apply(S),L=["[object Number]","[object Function]","[object RegExp]"],D=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,U=!this.i18nFormat||this.i18nFormat.handleAsObject,X=typeof S!="string"&&typeof S!="boolean"&&typeof S!="number";if(U&&S&&X&&L.indexOf(I)<0&&!(typeof D=="string"&&I==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,S,mn(mn({},a),{},{ns:g})):"key '".concat(p," (").concat(this.language,")' returned an object instead of string.");return c?(_.res=Y,_):Y}if(f){var te=I==="[object Array]",ce=te?[]:{},j=te?O:C;for(var T in S)if(Object.prototype.hasOwnProperty.call(S,T)){var $="".concat(j).concat(f).concat(T);ce[T]=this.translate($,mn(mn({},a),{joinArrays:!1,ns:g})),ce[T]===$&&(ce[T]=S[T])}S=ce}}else if(U&&typeof D=="string"&&I==="[object Array]")S=S.join(D),S&&(S=this.extendTranslation(S,i,a,s));else{var V=!1,ie=!1,H=a.count!==void 0&&typeof a.count!="string",K=n.hasDefaultValue(a),Q=H?this.pluralResolver.getSuffix(v,a.count,a):"",oe=a["defaultValue".concat(Q)]||a.defaultValue;!this.isValidLookup(S)&&K&&(V=!0,S=oe),this.isValidLookup(S)||(ie=!0,S=p);var ve=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,we=ve&&ie?void 0:S,Ue=K&&oe!==S&&this.options.updateMissing;if(ie||V||Ue){if(this.logger.log(Ue?"updateKey":"missingKey",v,y,p,Ue?oe:S),f){var At=this.resolve(p,mn(mn({},a),{},{keySeparator:!1}));At&&At.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.")}var me=[],Vt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Vt&&Vt[0])for(var Bt=0;Bt1&&arguments[1]!==void 0?arguments[1]:{},u,c,f,h,p;return typeof i=="string"&&(i=[i]),i.forEach(function(g){if(!a.isValidLookup(u)){var y=a.extractFromKey(g,s),v=y.key;c=v;var w=y.namespaces;a.options.fallbackNS&&(w=w.concat(a.options.fallbackNS));var x=s.count!==void 0&&typeof s.count!="string",_=x&&!s.ordinal&&s.count===0&&a.pluralResolver.shouldUseIntlApi(),S=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",C=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);w.forEach(function(O){a.isValidLookup(u)||(p=O,!Fw["".concat(C[0],"-").concat(O)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(p)&&(Fw["".concat(C[0],"-").concat(O)]=!0,a.logger.warn('key "'.concat(c,'" for languages "').concat(C.join(", "),`" won't get resolved as namespace "`).concat(p,'" 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!!!")),C.forEach(function(I){if(!a.isValidLookup(u)){h=I;var L=[v];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(L,v,I,O,s);else{var D;x&&(D=a.pluralResolver.getSuffix(I,s.count,s));var U="".concat(a.options.pluralSeparator,"zero");if(x&&(L.push(v+D),_&&L.push(v+U)),S){var X="".concat(v).concat(a.options.contextSeparator).concat(s.context);L.push(X),x&&(L.push(X+D),_&&L.push(X+U))}}for(var Y;Y=L.pop();)a.isValidLookup(u)||(f=Y,u=a.getResource(I,O,Y,s))}}))})}}),{res:u,usedKey:c,exactUsedKey:f,usedLng:h,usedNS:p}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,s,u):this.resourceStore.getResource(i,a,s,u)}}],[{key:"hasDefaultValue",value:function(i){var a="defaultValue";for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&a===s.substring(0,a.length)&&i[s]!==void 0)return!0;return!1}}]),n}(Aa);function xm(t){return t.charAt(0).toUpperCase()+t.slice(1)}var zw=function(){function t(e){yr(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ii.create("languageUtils")}return Sr(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(a){return a.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=xm(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=xm(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=xm(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(a){if(!i){var s=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(s))&&(i=s)}}),!i&&this.options.supportedLngs&&n.forEach(function(a){if(!i){var s=r.getLanguagePartFromCode(a);if(r.isSupportedCode(s))return i=s;i=r.options.supportedLngs.find(function(u){if(u.indexOf(s)===0)return u})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),s=[],u=function(f){f&&(i.isSupportedCode(f)?s.push(f):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(f)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(n))):typeof n=="string"&&u(this.formatLanguageCode(n)),a.forEach(function(c){s.indexOf(c)<0&&u(i.formatLanguageCode(c))}),s}}]),t}(),e4=[{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}],t4={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(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 Number(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 Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}},n4=["v1","v2","v3"],Gw={zero:0,one:1,two:2,few:3,many:4,other:5};function r4(){var t={};return e4.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:t4[e.fc]}})}),t}var i4=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};yr(this,t),this.languageUtils=e,this.options=n,this.logger=ii.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(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=r4()}return Sr(t,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(a){return"".concat(r).concat(a)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(n,i);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(s,u){return Gw[s]-Gw[u]}).map(function(s){return"".concat(r.options.prepend).concat(s)}):a.numbers.map(function(s){return r.getSuffix(n,s,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(n,i);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(r)):this.getSuffixRetroCompatible(a,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,a=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),s=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));var u=function(){return i.options.prepend&&s.toString()?i.options.prepend+s.toString():s.toString()};return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?"_plural_".concat(s.toString()):u():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?u():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!n4.includes(this.options.compatibilityJSON)}}]),t}();function Uw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Rr(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{};yr(this,t),this.logger=ii.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return Sr(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:V5,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?es(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?es(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?es(r.nestingPrefix):r.nestingPrefixEscaped||es("$t("),this.nestingSuffix=r.nestingSuffix?es(r.nestingSuffix):r.nestingSuffixEscaped||es(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,a){var s=this,u,c,f,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function p(x){return x.replace(/\$/g,"$$$$")}var g=function(_){if(_.indexOf(s.formatSeparator)<0){var S=Dw(r,h,_);return s.alwaysFormat?s.format(S,void 0,i,Rr(Rr(Rr({},a),r),{},{interpolationkey:_})):S}var C=_.split(s.formatSeparator),O=C.shift().trim(),I=C.join(s.formatSeparator).trim();return s.format(Dw(r,h,O),I,i,Rr(Rr(Rr({},a),r),{},{interpolationkey:O}))};this.resetRegExp();var y=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,v=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,w=[{regex:this.regexpUnescape,safeValue:function(_){return p(_)}},{regex:this.regexp,safeValue:function(_){return s.escapeValue?p(s.escape(_)):p(_)}}];return w.forEach(function(x){for(f=0;u=x.regex.exec(n);){var _=u[1].trim();if(c=g(_),c===void 0)if(typeof y=="function"){var S=y(n,u,a);c=typeof S=="string"?S:""}else if(a&&Object.prototype.hasOwnProperty.call(a,_))c="";else if(v){c=u[0];continue}else s.logger.warn("missed to pass in variable ".concat(_," for interpolating ").concat(n)),c="";else typeof c!="string"&&!s.useRawValueToEscape&&(c=Lw(c));var C=x.safeValue(c);if(n=n.replace(u[0],C),v?(x.regex.lastIndex+=c.length,x.regex.lastIndex-=u[0].length):x.regex.lastIndex=0,f++,f>=s.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,u,c;function f(y,v){var w=this.nestingOptionsSeparator;if(y.indexOf(w)<0)return y;var x=y.split(new RegExp("".concat(w,"[ ]*{"))),_="{".concat(x[1]);y=x[0],_=this.interpolate(_,c);var S=_.match(/'/g),C=_.match(/"/g);(S&&S.length%2===0&&!C||C.length%2!==0)&&(_=_.replace(/'/g,'"'));try{c=JSON.parse(_),v&&(c=Rr(Rr({},v),c))}catch(O){return this.logger.warn("failed parsing options string in nesting for key ".concat(y),O),"".concat(y).concat(w).concat(_)}return delete c.defaultValue,y}for(;s=this.nestingRegexp.exec(n);){var h=[];c=Rr({},a),c=c.replace&&typeof c.replace!="string"?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;var p=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){var g=s[1].split(this.formatSeparator).map(function(y){return y.trim()});s[1]=g.shift(),h=g,p=!0}if(u=r(f.call(this,s[1].trim(),c),c),u&&s[0]===n&&typeof u!="string")return u;typeof u!="string"&&(u=Lw(u)),u||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),u=""),p&&(u=h.reduce(function(y,v){return i.format(y,v,a.lng,Rr(Rr({},a),{},{interpolationkey:s[1].trim()}))},u.trim())),n=n.replace(s[0],u),this.regexp.lastIndex=0}return n}}]),t}();function jw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ri(t){for(var e=1;e-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(e==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var a=i.split(";");a.forEach(function(s){if(s){var u=s.split(":"),c=z5(u),f=c[0],h=c.slice(1),p=h.join(":").trim().replace(/^'+|'+$/g,"");n[f.trim()]||(n[f.trim()]=p),p==="false"&&(n[f.trim()]=!1),p==="true"&&(n[f.trim()]=!0),isNaN(p)||(n[f.trim()]=parseInt(p,10))}})}}return{formatName:e,formatOptions:n}}function ts(t){var e={};return function(r,i,a){var s=i+JSON.stringify(a),u=e[s];return u||(u=t(i,a),e[s]=u),u(r)}}var s4=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yr(this,t),this.logger=ii.create("formatter"),this.options=e,this.formats={number:ts(function(n,r){var i=new Intl.NumberFormat(n,Ri({},r));return function(a){return i.format(a)}}),currency:ts(function(n,r){var i=new Intl.NumberFormat(n,Ri(Ri({},r),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:ts(function(n,r){var i=new Intl.DateTimeFormat(n,Ri({},r));return function(a){return i.format(a)}}),relativetime:ts(function(n,r){var i=new Intl.RelativeTimeFormat(n,Ri({},r));return function(a){return i.format(a,r.range||"day")}}),list:ts(function(n,r){var i=new Intl.ListFormat(n,Ri({},r));return function(a){return i.format(a)}})},this.init(e)}return Sr(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=ts(r)}},{key:"format",value:function(n,r,i){var a=this,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=r.split(this.formatSeparator),c=u.reduce(function(f,h){var p=o4(h),g=p.formatName,y=p.formatOptions;if(a.formats[g]){var v=f;try{var w=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},x=w.locale||w.lng||s.locale||s.lng||i;v=a.formats[g](f,x,Ri(Ri(Ri({},y),s),w))}catch(_){a.logger.warn(_)}return v}else a.logger.warn("there was no format function for ".concat(g));return f},n);return c}}]),t}();function Hw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ww(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c4(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var f4=function(t){Xh(n,t);var e=l4(n);function n(r,i,a){var s,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return yr(this,n),s=e.call(this),Qh&&Aa.call(Pa(s)),s.backend=r,s.store=i,s.services=a,s.languageUtils=a.languageUtils,s.options=u,s.logger=ii.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=u.maxParallelReads||10,s.readingCalls=0,s.maxRetries=u.maxRetries>=0?u.maxRetries:5,s.retryTimeout=u.retryTimeout>=1?u.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(a,u.backend,u),s}return Sr(n,[{key:"queueLoad",value:function(i,a,s,u){var c=this,f={},h={},p={},g={};return i.forEach(function(y){var v=!0;a.forEach(function(w){var x="".concat(y,"|").concat(w);!s.reload&&c.store.hasResourceBundle(y,w)?c.state[x]=2:c.state[x]<0||(c.state[x]===1?h[x]===void 0&&(h[x]=!0):(c.state[x]=1,v=!1,h[x]===void 0&&(h[x]=!0),f[x]===void 0&&(f[x]=!0),g[w]===void 0&&(g[w]=!0)))}),v||(p[y]=!0)}),(Object.keys(f).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:u}),{toLoad:Object.keys(f),pending:Object.keys(h),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(g)}}},{key:"loaded",value:function(i,a,s){var u=i.split("|"),c=u[0],f=u[1];a&&this.emit("failedLoading",c,f,a),s&&this.store.addResourceBundle(c,f,s),this.state[i]=a?-1:2;var h={};this.queue.forEach(function(p){H5(p.loaded,[c],f),c4(p,i),a&&p.errors.push(a),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(function(g){h[g]||(h[g]={});var y=p.loaded[g];y.length&&y.forEach(function(v){h[g][v]===void 0&&(h[g][v]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(function(p){return!p.done})}},{key:"read",value:function(i,a,s){var u=this,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!i.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:s,tried:c,wait:f,callback:h});return}this.readingCalls++;var p=function(w,x){if(u.readingCalls--,u.waitingReads.length>0){var _=u.waitingReads.shift();u.read(_.lng,_.ns,_.fcName,_.tried,_.wait,_.callback)}if(w&&x&&c2&&arguments[2]!==void 0?arguments[2]:{},c=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."),c&&c();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var f=this.queueLoad(i,a,u,c);if(!f.toLoad.length)return f.pending.length||c(),null;f.toLoad.forEach(function(h){s.loadOne(h)})}},{key:"load",value:function(i,a,s){this.prepareLoading(i,a,{},s)}},{key:"reload",value:function(i,a,s){this.prepareLoading(i,a,{reload:!0},s)}},{key:"loadOne",value:function(i){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",u=i.split("|"),c=u[0],f=u[1];this.read(c,f,"read",void 0,void 0,function(h,p){h&&a.logger.warn("".concat(s,"loading namespace ").concat(f," for language ").concat(c," failed"),h),!h&&p&&a.logger.log("".concat(s,"loaded namespace ").concat(f," for language ").concat(c),p),a.loaded(i,h,p)})}},{key:"saveMissing",value:function(i,a,s,u,c){var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(s,'" as the namespace "').concat(a,'" 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(!(s==null||s==="")){if(this.backend&&this.backend.create){var p=Ww(Ww({},f),{},{isUpdate:c}),g=this.backend.create.bind(this.backend);if(g.length<6)try{var y;g.length===5?y=g(i,a,s,u,p):y=g(i,a,s,u),y&&typeof y.then=="function"?y.then(function(v){return h(null,v)}).catch(h):h(null,y)}catch(v){h(v)}else g(i,a,s,u,h,p)}!i||!i[0]||this.store.addResource(i[0],a,s,u)}}}]),n}(Aa);function Vw(){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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var n={};if($r(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),$r(e[2])==="object"||$r(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(e,n,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function qw(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function Kw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qr(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Af(){}function p4(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var ih=function(t){Xh(n,t);var e=d4(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(yr(this,n),r=e.call(this),Qh&&Aa.call(Pa(r)),r.options=qw(i),r.services={},r.logger=ii,r.modules={external:[]},p4(Pa(r)),a&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,a),Zu(r,Pa(r));setTimeout(function(){r.init(i,a)},0)}return r}return Sr(n,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(s=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var u=Vw();this.options=Qr(Qr(Qr({},u),this.options),qw(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Qr(Qr({},u.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function c(_){return _?typeof _=="function"?new _:_:null}if(!this.options.isClone){this.modules.logger?ii.init(c(this.modules.logger),this.options):ii.init(null,this.options);var f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=s4);var h=new zw(this.options);this.store=new Q5(this.options.resources,this.options);var p=this.services;p.logger=ii,p.resourceStore=this.store,p.languageUtils=h,p.pluralResolver=new i4(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===u.interpolation.format)&&(p.formatter=c(f),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new a4(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new f4(c(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(_){for(var S=arguments.length,C=new Array(S>1?S-1:0),O=1;O1?S-1:0),O=1;O0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var y=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];y.forEach(function(_){i[_]=function(){var S;return(S=i.store)[_].apply(S,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(_){i[_]=function(){var S;return(S=i.store)[_].apply(S,arguments),i}});var w=Bl(),x=function(){var S=function(O,I){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),w.resolve(I),s(O,I)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return S(null,i.t.bind(i));i.changeLanguage(i.options.lng,S)};return this.options.resources||!this.options.initImmediate?x():setTimeout(x,0),w}},{key:"loadResources",value:function(i){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Af,u=s,c=typeof i=="string"?i:this.language;if(typeof i=="function"&&(u=i),!this.options.resources||this.options.partialBundledLanguages){if(c&&c.toLowerCase()==="cimode")return u();var f=[],h=function(y){if(y){var v=a.services.languageUtils.toResolveHierarchy(y);v.forEach(function(w){f.indexOf(w)<0&&f.push(w)})}};if(c)h(c);else{var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.forEach(function(g){return h(g)})}this.options.preload&&this.options.preload.forEach(function(g){return h(g)}),this.services.backendConnector.load(f,this.options.ns,function(g){!g&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),u(g)})}else u(null)}},{key:"reloadResources",value:function(i,a,s){var u=Bl();return i||(i=this.languages),a||(a=this.options.ns),s||(s=Af),this.services.backendConnector.reload(i,a,function(c){u.resolve(),s(c)}),u}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&dk.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var a=0;a-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,a){var s=this;this.isLanguageChangingTo=i;var u=Bl();this.emit("languageChanging",i);var c=function(g){s.language=g,s.languages=s.services.languageUtils.toResolveHierarchy(g),s.resolvedLanguage=void 0,s.setResolvedLanguage(g)},f=function(g,y){y?(c(y),s.translator.changeLanguage(y),s.isLanguageChangingTo=void 0,s.emit("languageChanged",y),s.logger.log("languageChanged",y)):s.isLanguageChangingTo=void 0,u.resolve(function(){return s.t.apply(s,arguments)}),a&&a(g,function(){return s.t.apply(s,arguments)})},h=function(g){!i&&!g&&s.services.languageDetector&&(g=[]);var y=typeof g=="string"?g:s.services.languageUtils.getBestMatchFromCodes(g);y&&(s.language||c(y),s.translator.language||s.translator.changeLanguage(y),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage&&s.services.languageDetector.cacheUserLanguage(y)),s.loadResources(y,function(v){f(v,y)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(i),u}},{key:"getFixedT",value:function(i,a,s){var u=this,c=function f(h,p){var g;if($r(p)!=="object"){for(var y=arguments.length,v=new Array(y>2?y-2:0),w=2;w1&&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;var u=this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(u.toLowerCase()==="cimode")return!0;var h=function(y,v){var w=a.services.backendConnector.state["".concat(y,"|").concat(v)];return w===-1||w===2};if(s.precheck){var p=s.precheck(this,h);if(p!==void 0)return p}return!!(this.hasResourceBundle(u,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(u,i)&&(!c||h(f,i)))}},{key:"loadNamespaces",value:function(i,a){var s=this,u=Bl();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(c){s.options.ns.indexOf(c)<0&&s.options.ns.push(c)}),this.loadResources(function(c){u.resolve(),a&&a(c)}),u):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var s=Bl();typeof i=="string"&&(i=[i]);var u=this.options.preload||[],c=i.filter(function(f){return u.indexOf(f)<0});return c.length?(this.options.preload=u.concat(c),this.loadResources(function(f){s.resolve(),a&&a(f)}),s):(a&&a(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var a=["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"],s=this.services&&this.services.languageUtils||new zw(Vw());return a.indexOf(s.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Af,u=Qr(Qr(Qr({},this.options),a),{isClone:!0}),c=new n(u);(a.debug!==void 0||a.prefix!==void 0)&&(c.logger=c.logger.clone(a));var f=["store","services","language"];return f.forEach(function(h){c[h]=i[h]}),c.services=Qr({},this.services),c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c.translator=new $w(c.services,c.options),c.translator.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),y=1;y0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new ih(t,e)});var Ae=ih.createInstance();Ae.createInstance=ih.createInstance;Ae.createInstance;Ae.dir;Ae.init;Ae.loadResources;Ae.reloadResources;Ae.use;Ae.changeLanguage;Ae.getFixedT;Ae.t;Ae.exists;Ae.setDefaultNamespace;Ae.hasLoadedNamespace;Ae.loadNamespaces;Ae.loadLanguages;var hk=[],g4=hk.forEach,m4=hk.slice;function v4(t){return g4.call(m4.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var Yw=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,y4=function(e,n,r){var i=r||{};i.path=i.path||"/";var a=encodeURIComponent(n),s="".concat(e,"=").concat(a);if(i.maxAge>0){var u=i.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(u))}if(i.domain){if(!Yw.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(i.domain)}if(i.path){if(!Yw.test(i.path))throw new TypeError("option path is invalid");s+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite){var c=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},Xw={create:function(e,n,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+r*60*1e3)),i&&(a.domain=i),document.cookie=y4(e,encodeURIComponent(n),a)},read:function(e){for(var n="".concat(e,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),a=i.split("&"),s=0;s0){var c=a[s].substring(0,u);c===e.lookupQuerystring&&(n=a[s].substring(u+1))}}}return n}},Fl=null,Qw=function(){if(Fl!==null)return Fl;try{Fl=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Fl=!1}return Fl},w4={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&Qw()){var r=window.localStorage.getItem(e.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&Qw()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},$l=null,Jw=function(){if($l!==null)return $l;try{$l=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{$l=!1}return $l},b4={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&Jw()){var r=window.sessionStorage.getItem(e.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&Jw()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},C4={name:"navigator",lookup:function(e){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},x4={name:"htmlTag",lookup:function(e){var n,r=e.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},k4={name:"path",lookup:function(e){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof r[e.lookupFromPathIndex]!="string")return;n=r[e.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},E4={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function P4(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var pk=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};yr(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return Sr(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=v4(r,this.options||{},P4()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(S4),this.addDetector(_4),this.addDetector(w4),this.addDetector(b4),this.addDetector(C4),this.addDetector(x4),this.addDetector(k4),this.addDetector(E4)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(a){if(r.detectors[a]){var s=r.detectors[a].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(i=i.concat(s))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(a){i.detectors[a]&&i.detectors[a].cacheUserLanguage(n,i.options)}))}}]),t}();pk.type="languageDetector";function Hv(t){return Hv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hv(t)}var gk=[],O4=gk.forEach,T4=gk.slice;function Wv(t){return O4.call(T4.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}function mk(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Hv(XMLHttpRequest))==="object"}function R4(t){return!!t&&typeof t.then=="function"}function A4(t){return R4(t)?t:Promise.resolve(t)}function I4(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zu={},L4={get exports(){return zu},set exports(t){zu=t}},gu={},M4={get exports(){return gu},set exports(t){gu=t}},Zw;function D4(){return Zw||(Zw=1,function(t,e){var n=typeof self<"u"?self:yn,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(T){return T&&DataView.prototype.isPrototypeOf(T)}if(u.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(T){return T&&f.indexOf(Object.prototype.toString.call(T))>-1};function p(T){if(typeof T!="string"&&(T=String(T)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(T))throw new TypeError("Invalid character in header field name");return T.toLowerCase()}function g(T){return typeof T!="string"&&(T=String(T)),T}function y(T){var $={next:function(){var V=T.shift();return{done:V===void 0,value:V}}};return u.iterable&&($[Symbol.iterator]=function(){return $}),$}function v(T){this.map={},T instanceof v?T.forEach(function($,V){this.append(V,$)},this):Array.isArray(T)?T.forEach(function($){this.append($[0],$[1])},this):T&&Object.getOwnPropertyNames(T).forEach(function($){this.append($,T[$])},this)}v.prototype.append=function(T,$){T=p(T),$=g($);var V=this.map[T];this.map[T]=V?V+", "+$:$},v.prototype.delete=function(T){delete this.map[p(T)]},v.prototype.get=function(T){return T=p(T),this.has(T)?this.map[T]:null},v.prototype.has=function(T){return this.map.hasOwnProperty(p(T))},v.prototype.set=function(T,$){this.map[p(T)]=g($)},v.prototype.forEach=function(T,$){for(var V in this.map)this.map.hasOwnProperty(V)&&T.call($,this.map[V],V,this)},v.prototype.keys=function(){var T=[];return this.forEach(function($,V){T.push(V)}),y(T)},v.prototype.values=function(){var T=[];return this.forEach(function($){T.push($)}),y(T)},v.prototype.entries=function(){var T=[];return this.forEach(function($,V){T.push([V,$])}),y(T)},u.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function w(T){if(T.bodyUsed)return Promise.reject(new TypeError("Already read"));T.bodyUsed=!0}function x(T){return new Promise(function($,V){T.onload=function(){$(T.result)},T.onerror=function(){V(T.error)}})}function _(T){var $=new FileReader,V=x($);return $.readAsArrayBuffer(T),V}function S(T){var $=new FileReader,V=x($);return $.readAsText(T),V}function C(T){for(var $=new Uint8Array(T),V=new Array($.length),ie=0;ie<$.length;ie++)V[ie]=String.fromCharCode($[ie]);return V.join("")}function O(T){if(T.slice)return T.slice(0);var $=new Uint8Array(T.byteLength);return $.set(new Uint8Array(T)),$.buffer}function I(){return this.bodyUsed=!1,this._initBody=function(T){this._bodyInit=T,T?typeof T=="string"?this._bodyText=T:u.blob&&Blob.prototype.isPrototypeOf(T)?this._bodyBlob=T:u.formData&&FormData.prototype.isPrototypeOf(T)?this._bodyFormData=T:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(T)?this._bodyText=T.toString():u.arrayBuffer&&u.blob&&c(T)?(this._bodyArrayBuffer=O(T.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(T)||h(T))?this._bodyArrayBuffer=O(T):this._bodyText=T=Object.prototype.toString.call(T):this._bodyText="",this.headers.get("content-type")||(typeof T=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(T)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var T=w(this);if(T)return T;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?w(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var T=w(this);if(T)return T;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(X)}),this.json=function(){return this.text().then(JSON.parse)},this}var L=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function D(T){var $=T.toUpperCase();return L.indexOf($)>-1?$:T}function U(T,$){$=$||{};var V=$.body;if(T instanceof U){if(T.bodyUsed)throw new TypeError("Already read");this.url=T.url,this.credentials=T.credentials,$.headers||(this.headers=new v(T.headers)),this.method=T.method,this.mode=T.mode,this.signal=T.signal,!V&&T._bodyInit!=null&&(V=T._bodyInit,T.bodyUsed=!0)}else this.url=String(T);if(this.credentials=$.credentials||this.credentials||"same-origin",($.headers||!this.headers)&&(this.headers=new v($.headers)),this.method=D($.method||this.method||"GET"),this.mode=$.mode||this.mode||null,this.signal=$.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(V)}U.prototype.clone=function(){return new U(this,{body:this._bodyInit})};function X(T){var $=new FormData;return T.trim().split("&").forEach(function(V){if(V){var ie=V.split("="),H=ie.shift().replace(/\+/g," "),K=ie.join("=").replace(/\+/g," ");$.append(decodeURIComponent(H),decodeURIComponent(K))}}),$}function Y(T){var $=new v,V=T.replace(/\r?\n[\t ]+/g," ");return V.split(/\r?\n/).forEach(function(ie){var H=ie.split(":"),K=H.shift().trim();if(K){var Q=H.join(":").trim();$.append(K,Q)}}),$}I.call(U.prototype);function te(T,$){$||($={}),this.type="default",this.status=$.status===void 0?200:$.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in $?$.statusText:"OK",this.headers=new v($.headers),this.url=$.url||"",this._initBody(T)}I.call(te.prototype),te.prototype.clone=function(){return new te(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},te.error=function(){var T=new te(null,{status:0,statusText:""});return T.type="error",T};var ce=[301,302,303,307,308];te.redirect=function(T,$){if(ce.indexOf($)===-1)throw new RangeError("Invalid status code");return new te(null,{status:$,headers:{location:T}})},s.DOMException=a.DOMException;try{new s.DOMException}catch{s.DOMException=function($,V){this.message=$,this.name=V;var ie=Error($);this.stack=ie.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function j(T,$){return new Promise(function(V,ie){var H=new U(T,$);if(H.signal&&H.signal.aborted)return ie(new s.DOMException("Aborted","AbortError"));var K=new XMLHttpRequest;function Q(){K.abort()}K.onload=function(){var oe={status:K.status,statusText:K.statusText,headers:Y(K.getAllResponseHeaders()||"")};oe.url="responseURL"in K?K.responseURL:oe.headers.get("X-Request-URL");var ve="response"in K?K.response:K.responseText;V(new te(ve,oe))},K.onerror=function(){ie(new TypeError("Network request failed"))},K.ontimeout=function(){ie(new TypeError("Network request failed"))},K.onabort=function(){ie(new s.DOMException("Aborted","AbortError"))},K.open(H.method,H.url,!0),H.credentials==="include"?K.withCredentials=!0:H.credentials==="omit"&&(K.withCredentials=!1),"responseType"in K&&u.blob&&(K.responseType="blob"),H.headers.forEach(function(oe,ve){K.setRequestHeader(ve,oe)}),H.signal&&(H.signal.addEventListener("abort",Q),K.onreadystatechange=function(){K.readyState===4&&H.signal.removeEventListener("abort",Q)}),K.send(typeof H._bodyInit>"u"?null:H._bodyInit)})}return j.polyfill=!0,a.fetch||(a.fetch=j,a.Headers=v,a.Request=U,a.Response=te),s.Headers=v,s.Request=U,s.Response=te,s.fetch=j,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e}(M4,gu)),gu}(function(t,e){var n;if(typeof fetch=="function"&&(typeof yn<"u"&&yn.fetch?n=yn.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof I4<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||D4();r.default&&(r=r.default),e.default=r,t.exports=e.default}})(L4,zu);const vk=zu,eb=h2({__proto__:null,default:vk},[zu]);function ah(t){return ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ah(t)}var Fi;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Fi=global.fetch:typeof window<"u"&&window.fetch?Fi=window.fetch:Fi=fetch);var Gu;mk()&&(typeof global<"u"&&global.XMLHttpRequest?Gu=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Gu=window.XMLHttpRequest));var oh;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?oh=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(oh=window.ActiveXObject));!Fi&&eb&&!Gu&&!oh&&(Fi=vk||eb);typeof Fi!="function"&&(Fi=void 0);var Vv=function(e,n){if(n&&ah(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},tb=function(e,n,r){Fi(e,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(a){r(null,{status:i.status,data:a})}).catch(r)}).catch(r)},nb=!1,N4=function(e,n,r,i){e.queryStringParams&&(n=Vv(n,e.queryStringParams));var a=Wv({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);r&&(a["Content-Type"]="application/json");var s=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,u=Wv({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:a},nb?{}:s);try{tb(n,u,i)}catch(c){if(!s||Object.keys(s).length===0||!c.message||c.message.indexOf("not implemented")<0)return i(c);try{Object.keys(s).forEach(function(f){delete u[f]}),tb(n,u,i),nb=!0}catch(f){i(f)}}},B4=function(e,n,r,i){r&&ah(r)==="object"&&(r=Vv("",r).slice(1)),e.queryStringParams&&(n=Vv(n,e.queryStringParams));try{var a;Gu?a=new Gu:a=new oh("MSXML2.XMLHTTP.3.0"),a.open(r?"POST":"GET",n,1),e.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!e.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=e.customHeaders;if(s=typeof s=="function"?s():s,s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(c){console&&console.log(c)}},F4=function(e,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Fi&&n.indexOf("file:")!==0)return N4(e,n,r,i);if(mk()||typeof ActiveXObject=="function")return B4(e,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Uu(t){return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uu(t)}function $4(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rb(t,e){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};$4(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return z4(t,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=Wv(i,this.options||{},j4()),this.allOptions=a,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,a,s){var u=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,i)),c=A4(c),c.then(function(f){if(!f)return s(null,{});var h=u.services.interpolator.interpolate(f,{lng:n.join("+"),ns:i.join("+")});u.loadUrl(h,s,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var s=this;this.options.request(this.options,n,void 0,function(u,c){if(c&&(c.status>=500&&c.status<600||!c.status))return r("failed loading "+n+"; status code: "+c.status,!0);if(c&&c.status>=400&&c.status<500)return r("failed loading "+n+"; status code: "+c.status,!1);if(!c&&u&&u.message&&u.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+u.message,!0);if(u)return r(u,!1);var f,h;try{typeof c.data=="string"?f=s.options.parse(c.data,i,a):f=c.data}catch{h="failed parsing "+n+" to json"}if(h)return r(h,!1);r(null,f)})}},{key:"create",value:function(n,r,i,a,s){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,i,a),f=0,h=[],p=[];n.forEach(function(g){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(g,r));var v=u.services.interpolator.interpolate(y,{lng:g,ns:r});u.options.request(u.options,v,c,function(w,x){f+=1,h.push(w),p.push(x),f===n.length&&typeof s=="function"&&s(h,p)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,s=r.logger,u=i.language;if(!(u&&u.toLowerCase()==="cimode")){var c=[],f=function(p){var g=a.toResolveHierarchy(p);g.forEach(function(y){c.indexOf(y)<0&&c.push(y)})};f(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(h){return f(h)}),c.forEach(function(h){n.allOptions.ns.forEach(function(p){i.read(h,p,"read",null,null,function(g,y){g&&s.warn("loading namespace ".concat(p," for language ").concat(h," failed"),g),!g&&y&&s.log("loaded namespace ".concat(p," for language ").concat(h),y),i.loaded("".concat(h,"|").concat(p),g,y)})})})}}}]),t}();Sk.type="backend";function H4(){if(console&&console.warn){for(var t,e=arguments.length,n=new Array(e),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,a=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var s=function(c,f){var h=e.services.backendConnector.state["".concat(c,"|").concat(f)];return h===-1||h===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(r,t)&&(!i||s(a,t)))}function V4(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return qv("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(t,{precheck:function(a,s){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!s(a.isLanguageChangingTo,t))return!1}}):W4(t,e,n)}var q4=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,K4={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Y4=function(e){return K4[e]},X4=function(e){return e.replace(q4,Y4)};function ob(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sb(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{};Kv=sb(sb({},Kv),t)}function J4(){return Kv}var _k;function Z4(t){_k=t}function eB(){return _k}var tB={type:"3rdParty",init:function(e){Q4(e.options.react),Z4(e)}},nB=be.createContext(),rB=function(){function t(){yr(this,t),this.usedNamespaces={}}return Sr(t,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();function iB(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,u=[],c=!0,f=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function aB(t,e){return sk(t)||iB(t,e)||lk(t,e)||uk()}function lb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function km(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=be.useContext(nB)||{},i=r.i18n,a=r.defaultNS,s=n||i||eB();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new rB),!s){qv("You will need to pass in an i18next instance by using initReactI18next");var u=function(X){return Array.isArray(X)?X[X.length-1]:X},c=[u,{},!1];return c.t=u,c.i18n={},c.ready=!1,c}s.options.react&&s.options.react.wait!==void 0&&qv("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var f=km(km(km({},J4()),s.options.react),e),h=f.useSuspense,p=f.keyPrefix,g=t||a||s.options&&s.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(g);var y=(s.isInitialized||s.initializedStoreOnce)&&g.every(function(U){return V4(U,s,f)});function v(){return s.getFixedT(null,f.nsMode==="fallback"?g:g[0],p)}var w=be.useState(v),x=aB(w,2),_=x[0],S=x[1],C=g.join(),O=oB(C),I=be.useRef(!0);be.useEffect(function(){var U=f.bindI18n,X=f.bindI18nStore;I.current=!0,!y&&!h&&ab(s,g,function(){I.current&&S(v)}),y&&O&&O!==C&&I.current&&S(v);function Y(){I.current&&S(v)}return U&&s&&s.on(U,Y),X&&s&&s.store.on(X,Y),function(){I.current=!1,U&&s&&U.split(" ").forEach(function(te){return s.off(te,Y)}),X&&s&&X.split(" ").forEach(function(te){return s.store.off(te,Y)})}},[s,C]);var L=be.useRef(!0);be.useEffect(function(){I.current&&!L.current&&S(v),L.current=!1},[s,p]);var D=[_,s,y];if(D.t=_,D.i18n=s,D.ready=y,y||!y&&!h)return D;throw new Promise(function(U){ab(s,g,function(){U()})})}Ae.use(Sk).use(pk).use(tB).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const lB={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:Ae.isInitialized?Ae.t("common.statusDisconnected"):"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[],searchFolder:null,foundModels:null,openModel:null,cancelOptions:{cancelType:"immediate",cancelAfter:null}},wk=vo({name:"system",initialState:lB,reducers:{setShouldDisplayInProgressType:(t,e)=>{t.shouldDisplayInProgressType=e.payload},setIsProcessing:(t,e)=>{t.isProcessing=e.payload},setCurrentStatus:(t,e)=>{t.currentStatus=e.payload},setSystemStatus:(t,e)=>({...t,...e.payload}),errorOccurred:t=>{t.hasError=!0,t.isProcessing=!1,t.isCancelable=!0,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.currentStatusHasSteps=!1,t.currentStatus=Ae.t("common.statusError"),t.wasErrorSeen=!1},errorSeen:t=>{t.hasError=!1,t.wasErrorSeen=!0,t.currentStatus=t.isConnected?Ae.t("common.statusConnected"):Ae.t("common.statusDisconnected")},addLogEntry:(t,e)=>{const{timestamp:n,message:r,level:i}=e.payload,s={timestamp:n,message:r,level:i||"info"};t.log.push(s)},setShouldShowLogViewer:(t,e)=>{t.shouldShowLogViewer=e.payload},setIsConnected:(t,e)=>{t.isConnected=e.payload,t.isProcessing=!1,t.isCancelable=!0,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.currentStatusHasSteps=!1,t.hasError=!1},setSocketId:(t,e)=>{t.socketId=e.payload},setShouldConfirmOnDelete:(t,e)=>{t.shouldConfirmOnDelete=e.payload},setOpenAccordions:(t,e)=>{t.openAccordions=e.payload},setSystemConfig:(t,e)=>({...t,...e.payload}),setShouldDisplayGuides:(t,e)=>{t.shouldDisplayGuides=e.payload},processingCanceled:t=>{t.isProcessing=!1,t.isCancelable=!0,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.currentStatusHasSteps=!1,t.currentStatus=Ae.t("common.statusProcessingCanceled")},generationRequested:t=>{t.isProcessing=!0,t.isCancelable=!0,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.currentStatusHasSteps=!1,t.currentStatus=Ae.t("common.statusPreparing")},setModelList:(t,e)=>{t.model_list=e.payload},setIsCancelable:(t,e)=>{t.isCancelable=e.payload},modelChangeRequested:t=>{t.currentStatus=Ae.t("common.statusLoadingModel"),t.isCancelable=!1,t.isProcessing=!0,t.currentStatusHasSteps=!1},modelConvertRequested:t=>{t.currentStatus=Ae.t("common.statusConvertingModel"),t.isCancelable=!1,t.isProcessing=!0,t.currentStatusHasSteps=!1},modelMergingRequested:t=>{t.currentStatus=Ae.t("common.statusMergingModels"),t.isCancelable=!1,t.isProcessing=!0,t.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(t,e)=>{t.saveIntermediatesInterval=e.payload},setEnableImageDebugging:(t,e)=>{t.enableImageDebugging=e.payload},addToast:(t,e)=>{t.toastQueue.push(e.payload)},clearToastQueue:t=>{t.toastQueue=[]},setProcessingIndeterminateTask:(t,e)=>{t.isProcessing=!0,t.currentStatus=e.payload,t.currentStatusHasSteps=!1},setSearchFolder:(t,e)=>{t.searchFolder=e.payload},setFoundModels:(t,e)=>{t.foundModels=e.payload},setOpenModel:(t,e)=>{t.openModel=e.payload},setCancelType:(t,e)=>{t.cancelOptions.cancelType=e.payload},setCancelAfter:(t,e)=>{t.cancelOptions.cancelAfter=e.payload}}}),{setShouldDisplayInProgressType:Zj,setIsProcessing:ei,addLogEntry:Gt,setShouldShowLogViewer:eH,setIsConnected:ub,setSocketId:tH,setShouldConfirmOnDelete:nH,setOpenAccordions:rH,setSystemStatus:uB,setCurrentStatus:ns,setSystemConfig:cB,setShouldDisplayGuides:iH,processingCanceled:fB,errorOccurred:cb,errorSeen:aH,setModelList:rs,setIsCancelable:If,modelChangeRequested:dB,modelConvertRequested:hB,modelMergingRequested:pB,setSaveIntermediatesInterval:oH,setEnableImageDebugging:sH,generationRequested:gB,addToast:zl,clearToastQueue:lH,setProcessingIndeterminateTask:uH,setSearchFolder:mB,setFoundModels:vB,setOpenModel:cH,setCancelType:fH,setCancelAfter:dH}=wk.actions,yB=wk.reducer,bk=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],SB={activeTab:0,currentTheme:"dark",parametersPanelScrollPosition:0,shouldHoldParametersPanelOpen:!1,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,addNewModelUIOption:null},_B=SB,Ck=vo({name:"ui",initialState:_B,reducers:{setActiveTab:(t,e)=>{typeof e.payload=="number"?t.activeTab=e.payload:t.activeTab=bk.indexOf(e.payload)},setCurrentTheme:(t,e)=>{t.currentTheme=e.payload},setParametersPanelScrollPosition:(t,e)=>{t.parametersPanelScrollPosition=e.payload},setShouldPinParametersPanel:(t,e)=>{t.shouldPinParametersPanel=e.payload},setShouldShowParametersPanel:(t,e)=>{t.shouldShowParametersPanel=e.payload},setShouldHoldParametersPanelOpen:(t,e)=>{t.shouldHoldParametersPanelOpen=e.payload},setShouldShowImageDetails:(t,e)=>{t.shouldShowImageDetails=e.payload},setShouldUseCanvasBetaLayout:(t,e)=>{t.shouldUseCanvasBetaLayout=e.payload},setShouldShowExistingModelsInSearch:(t,e)=>{t.shouldShowExistingModelsInSearch=e.payload},setShouldUseSliders:(t,e)=>{t.shouldUseSliders=e.payload},setAddNewModelUIOption:(t,e)=>{t.addNewModelUIOption=e.payload}}}),{setActiveTab:hH,setCurrentTheme:pH,setParametersPanelScrollPosition:gH,setShouldHoldParametersPanelOpen:mH,setShouldPinParametersPanel:vH,setShouldShowParametersPanel:yH,setShouldShowImageDetails:SH,setShouldUseCanvasBetaLayout:_H,setShouldShowExistingModelsInSearch:wH,setShouldUseSliders:bH,setAddNewModelUIOption:CH}=Ck.actions,wB=Ck.reducer,di=Object.create(null);di.open="0";di.close="1";di.ping="2";di.pong="3";di.message="4";di.upgrade="5";di.noop="6";const pd=Object.create(null);Object.keys(di).forEach(t=>{pd[di[t]]=t});const bB={type:"error",data:"parser error"},CB=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",xB=typeof ArrayBuffer=="function",kB=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,xk=({type:t,data:e},n,r)=>CB&&e instanceof Blob?n?r(e):fb(e,r):xB&&(e instanceof ArrayBuffer||kB(e))?n?r(e):fb(new Blob([e]),r):r(di[t]+(e||"")),fb=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)},db="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,r,i=0,a,s,u,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),h=new Uint8Array(f);for(r=0;r>4,h[i++]=(s&15)<<4|u>>2,h[i++]=(u&3)<<6|c&63;return f},PB=typeof ArrayBuffer=="function",kk=(t,e)=>{if(typeof t!="string")return{type:"message",data:Ek(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:OB(t.substring(1),e)}:pd[n]?t.length>1?{type:pd[n],data:t.substring(1)}:{type:pd[n]}:bB},OB=(t,e)=>{if(PB){const n=EB(t);return Ek(n,e)}else return{base64:!0,data:t}},Ek=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},Pk=String.fromCharCode(30),TB=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((a,s)=>{xk(a,!1,u=>{r[s]=u,++i===n&&e(r.join(Pk))})})},RB=(t,e)=>{const n=t.split(Pk),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Tk(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const IB=fr.setTimeout,LB=fr.clearTimeout;function Jh(t,e){e.useNativeTimers?(t.setTimeoutFn=IB.bind(fr),t.clearTimeoutFn=LB.bind(fr)):(t.setTimeoutFn=fr.setTimeout.bind(fr),t.clearTimeoutFn=fr.clearTimeout.bind(fr))}const MB=1.33;function DB(t){return typeof t=="string"?NB(t):Math.ceil((t.byteLength||t.size)*MB)}function NB(t){let e=0,n=0;for(let r=0,i=t.length;r=57344?n+=3:(r++,n+=4);return n}class BB extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class Rk extends Rt{constructor(e){super(),this.writable=!1,Jh(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new BB(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=kk(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}}const Ak="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Yv=64,FB={};let hb=0,Lf=0,pb;function gb(t){let e="";do e=Ak[t%Yv]+e,t=Math.floor(t/Yv);while(t>0);return e}function Ik(){const t=gb(+new Date);return t!==pb?(hb=0,pb=t):t+"."+gb(hb++)}for(;Lf{this.readyState="paused",e()};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(e){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)};RB(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,TB(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=Ik()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=Lk(e),a=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new ui(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class ui extends Rt{constructor(e,n){super(),Jh(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const e=Tk(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const n=this.xhr=new Dk(e);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=ui.requestsCount++,ui.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=GB,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ui.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ui.requestsCount=0;ui.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mb);else if(typeof addEventListener=="function"){const t="onpagehide"in fr?"pagehide":"unload";addEventListener(t,mb,!1)}}function mb(){for(let t in ui.requests)ui.requests.hasOwnProperty(t)&&ui.requests[t].abort()}const Nk=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0))(),Mf=fr.WebSocket||fr.MozWebSocket,vb=!0,HB="arraybuffer",yb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WB extends Rk{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=yb?{}:Tk(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=vb&&!yb?n?new Mf(e,n):new Mf(e):new Mf(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||HB,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{const s={};try{vb&&this.ws.send(a)}catch{}i&&Nk(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=Ik()),this.supportsBinary||(e.b64=1);const i=Lk(e),a=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Mf}}const VB={websocket:WB,polling:jB},qB=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,KB=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Xv(t){const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=qB.exec(t||""),a={},s=14;for(;s--;)a[KB[s]]=i[s]||"";return n!=-1&&r!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=YB(a,a.path),a.queryKey=XB(a,a.query),a}function YB(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function XB(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,a){i&&(n[i]=a)}),n}let Bk=class os extends Rt{constructor(e,n={}){super(),this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Xv(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Xv(n.host).host),Jh(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"],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:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=$B(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(e){const n=Object.assign({},this.opts.query);n.EIO=Ok,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[e],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new VB[e](r)}open(){let e;if(this.opts.rememberUpgrade&&os.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.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(e){let n=this.createTransport(e),r=!1;os.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;os.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function a(){r||(r=!0,h(),n.close(),n=null)}const s=p=>{const g=new Error("probe error: "+p);g.transport=n.name,a(),this.emitReserved("upgradeError",g)};function u(){s("transport closed")}function c(){s("socket closed")}function f(p){n&&p.name!==n.name&&a()}const h=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",u),this.off("close",c),this.off("upgrading",f)};n.once("open",i),n.once("error",s),n.once("close",u),this.once("close",c),this.once("upgrading",f),n.open()}onOpen(){if(this.readyState="open",os.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e{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 e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.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(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,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 a={type:e,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},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():e()}):this.upgrading?r():e()),this}onError(e){os.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,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",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Fk=Object.prototype.toString,eF=typeof Blob=="function"||typeof Blob<"u"&&Fk.call(Blob)==="[object BlobConstructor]",tF=typeof File=="function"||typeof File<"u"&&Fk.call(File)==="[object FileConstructor]";function T0(t){return JB&&(t instanceof ArrayBuffer||ZB(t))||eF&&t instanceof Blob||tF&&t instanceof File}function gd(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n=0&&t.num0;case Be.ACK:case Be.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class oF{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=rF(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const sF=Object.freeze(Object.defineProperty({__proto__:null,Decoder:R0,Encoder:aF,get PacketType(){return Be},protocol:iF},Symbol.toStringTag,{value:"Module"}));function Mr(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const lF=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class $k extends Rt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Mr(e,"open",this.onopen.bind(this)),Mr(e,"packet",this.onpacket.bind(this)),Mr(e,"error",this.onerror.bind(this)),Mr(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(lF.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Be.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,u=n.pop();this._registerAckCallback(s,u),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s{this.io.clearTimeoutFn(a),n.apply(this,[null,...s])}}emitWithAck(e,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,a)=>{n.push((s,u)=>r?s?a(s):i(u):i(s)),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this.ids++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...a)=>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,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(){if(this._queue.length===0)return;const e=this._queue[0];if(e.pending)return;e.pending=!0,e.tryCount++;const n=this.ids;this.ids=e.id,this.flags=e.flags,this.emit.apply(this,e.args),this.ids=n}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Be.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Be.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.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 Be.EVENT:case Be.BINARY_EVENT:this.onevent(e);break;case Be.ACK:case Be.BINARY_ACK:this.onack(e);break;case Be.DISCONNECT:this.ondisconnect();break;case Be.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Be.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Be.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Vs.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0};Vs.prototype.reset=function(){this.attempts=0};Vs.prototype.setMin=function(t){this.ms=t};Vs.prototype.setMax=function(t){this.max=t};Vs.prototype.setJitter=function(t){this.jitter=t};class Zv extends Rt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Jh(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 Vs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||sF;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Bk(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Mr(n,"open",function(){r.onopen(),e&&e()}),a=Mr(n,"error",s=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",s),e?e(s):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const s=this._timeout;s===0&&i();const u=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},s);this.opts.autoUnref&&u.unref(),this.subs.push(function(){clearTimeout(u)})}return this.subs.push(i),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Mr(e,"ping",this.onping.bind(this)),Mr(e,"data",this.ondata.bind(this)),Mr(e,"error",this.onerror.bind(this)),Mr(e,"close",this.onclose.bind(this)),Mr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Nk(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r||(r=new $k(this,e,n),this.nsps[e]=r),this._autoConnect&&r.connect(),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;re()),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(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=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(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Gl={};function md(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=QB(t,e.path||"/socket.io"),r=n.source,i=n.id,a=n.path,s=Gl[i]&&a in Gl[i].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return u?c=new Zv(r,e):(Gl[i]||(Gl[i]=new Zv(r,e)),c=Gl[i]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(md,{Manager:Zv,Socket:$k,io:md,connect:md});const xH=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_dpmpp_2_a","k_euler","k_euler_a","k_heun"],kH=["ddim","plms","k_lms","dpmpp_2","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_euler","k_euler_a","k_heun"],EH=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],PH=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],OH=[{key:"2x",value:2},{key:"4x",value:4}],uF=0,cF=4294967295,TH=["gfpgan","codeformer"],RH=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}];var fF=Math.PI/180;function dF(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Os=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},pe={_global:Os,version:"8.4.2",isBrowser:dF(),isUnminified:/param/.test(function(t){}.toString()),dblClickWindow:400,getAngle(t){return pe.angleDeg?t*fF:t},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 pe.DD.isDragging},isDragReady(){return!!pe.DD.node},releaseCanvasOnDestroy:!0,document:Os.document,_injectGlobal(t){Os.Konva=t}},yt=t=>{pe[t.prototype.getClassName()]=t};pe._injectGlobal(pe);class Hn{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.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 Hn(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var n=this.m;return{x:n[0]*e.x+n[2]*e.y+n[4],y:n[1]*e.x+n[3]*e.y+n[5]}}translate(e,n){return this.m[4]+=this.m[0]*e+this.m[2]*n,this.m[5]+=this.m[1]*e+this.m[3]*n,this}scale(e,n){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=n,this.m[3]*=n,this}rotate(e){var n=Math.cos(e),r=Math.sin(e),i=this.m[0]*n+this.m[2]*r,a=this.m[1]*n+this.m[3]*r,s=this.m[0]*-r+this.m[2]*n,u=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=a,this.m[2]=s,this.m[3]=u,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,a=this.m[2]+this.m[0]*e,s=this.m[3]+this.m[1]*e;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=s,this}multiply(e){var n=this.m[0]*e.m[0]+this.m[2]*e.m[1],r=this.m[1]*e.m[0]+this.m[3]*e.m[1],i=this.m[0]*e.m[2]+this.m[2]*e.m[3],a=this.m[1]*e.m[2]+this.m[3]*e.m[3],s=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],u=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this.m[4]=s,this.m[5]=u,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*e,r=-this.m[1]*e,i=-this.m[2]*e,a=this.m[0]*e,s=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),u=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this.m[4]=s,this.m[5]=u,this}getMatrix(){return this.m}decompose(){var e=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],a=this.m[4],s=this.m[5],u=e*i-n*r;let c={x:a,y:s,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||n!=0){var f=Math.sqrt(e*e+n*n);c.rotation=n>0?Math.acos(e/f):-Math.acos(e/f),c.scaleX=f,c.scaleY=u/f,c.skewX=(e*r+n*i)/u,c.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);c.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),c.scaleX=u/h,c.scaleY=h,c.skewX=0,c.skewY=(e*r+n*i)/u}return c.rotation=G._getRotation(c.rotation),c}}var hF="[object Array]",pF="[object Number]",gF="[object String]",mF="[object Boolean]",vF=Math.PI/180,yF=180/Math.PI,Em="#",SF="",_F="0",wF="Konva warning: ",Sb="Konva error: ",bF="rgb(",Pm={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]},CF=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Df=[];const xF=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(t){setTimeout(t,60)},G={_isElement(t){return!!(t&&t.nodeType==1)},_isFunction(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isPlainObject(t){return!!t&&t.constructor===Object},_isArray(t){return Object.prototype.toString.call(t)===hF},_isNumber(t){return Object.prototype.toString.call(t)===pF&&!isNaN(t)&&isFinite(t)},_isString(t){return Object.prototype.toString.call(t)===gF},_isBoolean(t){return Object.prototype.toString.call(t)===mF},isObject(t){return t instanceof Object},isValidSelector(t){if(typeof t!="string")return!1;var e=t[0];return e==="#"||e==="."||e===e.toUpperCase()},_sign(t){return t===0||t>0?1:-1},requestAnimFrame(t){Df.push(t),Df.length===1&&xF(function(){const e=Df;Df=[],e.forEach(function(n){n()})})},createCanvasElement(){var t=document.createElement("canvas");try{t.style=t.style||{}}catch{}return t},createImageElement(){return document.createElement("img")},_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,e){var n=G.createImageElement();n.onload=function(){e(n)},n.src=t},_rgbToHex(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb(t){t=t.replace(Em,SF);var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:e&255}},getRandomColor(){for(var t=(Math.random()*16777215<<0).toString(16);t.length<6;)t=_F+t;return Em+t},getRGB(t){var e;return t in Pm?(e=Pm[t],{r:e[0],g:e[1],b:e[2]}):t[0]===Em?this._hexToRgb(t.substring(1)):t.substr(0,4)===bF?(e=CF.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA(t){return t=t||"black",G._namedColorToRBA(t)||G._hex3ColorToRGBA(t)||G._hex4ColorToRGBA(t)||G._hex6ColorToRGBA(t)||G._hex8ColorToRGBA(t)||G._rgbColorToRGBA(t)||G._rgbaColorToRGBA(t)||G._hslColorToRGBA(t)},_namedColorToRBA(t){var e=Pm[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(t.indexOf("rgb(")===0){t=t.match(/rgb\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(t.indexOf("rgba(")===0){t=t.match(/rgba\(([^)]+)\)/)[1];var e=t.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex8ColorToRGBA(t){if(t[0]==="#"&&t.length===9)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:parseInt(t.slice(7,9),16)/255}},_hex6ColorToRGBA(t){if(t[0]==="#"&&t.length===7)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex4ColorToRGBA(t){if(t[0]==="#"&&t.length===5)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:parseInt(t[4]+t[4],16)/255}},_hex3ColorToRGBA(t){if(t[0]==="#"&&t.length===4)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){const[e,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),r=Number(n[0])/360,i=Number(n[1])/100,a=Number(n[2])/100;let s,u,c;if(i===0)return c=a*255,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};a<.5?s=a*(1+i):s=a+i-a*i;const f=2*a-s,h=[0,0,0];for(let p=0;p<3;p++)u=r+1/3*-(p-1),u<0&&u++,u>1&&u--,6*u<1?c=f+(s-f)*6*u:2*u<1?c=s:3*u<2?c=f+(s-f)*(2/3-u)*6:c=f,h[p]=c*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(t,e){return!(e.x>t.x+t.width||e.x+e.widtht.y+t.height||e.y+e.height1?(s=n,u=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(s=t+h*(n-t),u=e+h*(r-e),c=(s-i)*(s-i)+(u-a)*(u-a))}return[s,u,c]},_getProjectionToLine(t,e,n){var r=G.cloneObject(t),i=Number.MAX_VALUE;return e.forEach(function(a,s){if(!(!n&&s===e.length-1)){var u=e[(s+1)%e.length],c=G._getProjectionToSegment(a.x,a.y,u.x,u.y,t.x,t.y),f=c[0],h=c[1],p=c[2];pe.length){var s=e;e=t,t=s}for(r=0;r{e.width=0,e.height=0})},drawRoundedRectPath(t,e,n,r){let i=0,a=0,s=0,u=0;typeof r=="number"?i=a=s=u=Math.min(r,e/2,n/2):(i=Math.min(r[0]||0,e/2,n/2),a=Math.min(r[1]||0,e/2,n/2),u=Math.min(r[2]||0,e/2,n/2),s=Math.min(r[3]||0,e/2,n/2)),t.moveTo(i,0),t.lineTo(e-a,0),t.arc(e-a,a,a,Math.PI*3/2,0,!1),t.lineTo(e,n-u),t.arc(e-u,n-u,u,0,Math.PI/2,!1),t.lineTo(s,n),t.arc(s,n-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,i),t.arc(i,i,i,Math.PI,Math.PI*3/2,!1)}};function Da(t){return G._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||G._isBoolean(t)?t:Object.prototype.toString.call(t)}function zk(t){return t>255?255:t<0?0:Math.round(t)}function le(){if(pe.isUnminified)return function(t,e){return G._isNumber(t)||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function A0(t){if(pe.isUnminified)return function(e,n){let r=G._isNumber(e),i=G._isArray(e)&&e.length==t;return!r&&!i&&G.warn(Da(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+t+")"),e}}function I0(){if(pe.isUnminified)return function(t,e){var n=G._isNumber(t),r=t==="auto";return n||r||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function qs(){if(pe.isUnminified)return function(t,e){return G._isString(t)||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function Gk(){if(pe.isUnminified)return function(t,e){const n=G._isString(t),r=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return n||r||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function kF(){if(pe.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(G._isArray(t)?t.forEach(function(r){G._isNumber(r)||G.warn('"'+e+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function jr(){if(pe.isUnminified)return function(t,e){var n=t===!0||t===!1;return n||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function EF(t){if(pe.isUnminified)return function(e,n){return e==null||G.isObject(e)||G.warn(Da(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}var Ul="get",jl="set";const A={addGetterSetter(t,e,n,r,i){A.addGetter(t,e,n),A.addSetter(t,e,r,i),A.addOverloadedGetterSetter(t,e)},addGetter(t,e,n){var r=Ul+G._capitalize(e);t.prototype[r]=t.prototype[r]||function(){var i=this.attrs[e];return i===void 0?n:i}},addSetter(t,e,n,r){var i=jl+G._capitalize(e);t.prototype[i]||A.overWriteSetter(t,e,n,r)},overWriteSetter(t,e,n,r){var i=jl+G._capitalize(e);t.prototype[i]=function(a){return n&&a!==void 0&&a!==null&&(a=n.call(this,a,e)),this._setAttr(e,a),r&&r.call(this),this}},addComponentsGetterSetter(t,e,n,r,i){var a=n.length,s=G._capitalize,u=Ul+s(e),c=jl+s(e),f,h;t.prototype[u]=function(){var g={};for(f=0;f{this._setAttr(e+s(w),void 0)}),this._fireChangeEvent(e,y,g),i&&i.call(this),this},A.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){var n=G._capitalize(e),r=jl+n,i=Ul+n;t.prototype[e]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(t,e,n,r){G.error("Adding deprecated "+e);var i=Ul+G._capitalize(e),a=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[i]=function(){G.error(a);var s=this.attrs[e];return s===void 0?n:s},A.addSetter(t,e,r,function(){G.error(a)}),A.addOverloadedGetterSetter(t,e)},backCompat(t,e){G.each(e,function(n,r){var i=t.prototype[r],a=Ul+G._capitalize(n),s=jl+G._capitalize(n);function u(){i.apply(this,arguments),G.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}t.prototype[n]=u,t.prototype[a]=u,t.prototype[s]=u})},afterSetFilter(){this._filterUpToDate=!1}};function PF(t){var e=[],n=t.length,r=G,i,a;for(i=0;itypeof h=="number"?Math.floor(h):h)),a+=OF+f.join(_b)+TF)):(a+=u.property,e||(a+=MF+u.val)),a+=IF;return a}clearTrace(){this.traceArr=[]}_trace(e){var n=this.traceArr,r;n.push(e),r=n.length,r>=NF&&n.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var n=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(e){var n=e.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(e){var n=e.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(e){var n=e.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(e,n){this._context[e]=n}arc(e,n,r,i,a,s){this._context.arc(e,n,r,i,a,s)}arcTo(e,n,r,i,a){this._context.arcTo(e,n,r,i,a)}beginPath(){this._context.beginPath()}bezierCurveTo(e,n,r,i,a,s){this._context.bezierCurveTo(e,n,r,i,a,s)}clearRect(e,n,r,i){this._context.clearRect(e,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,n){var r=arguments;if(r.length===2)return this._context.createImageData(e,n);if(r.length===1)return this._context.createImageData(e)}createLinearGradient(e,n,r,i){return this._context.createLinearGradient(e,n,r,i)}createPattern(e,n){return this._context.createPattern(e,n)}createRadialGradient(e,n,r,i,a,s){return this._context.createRadialGradient(e,n,r,i,a,s)}drawImage(e,n,r,i,a,s,u,c,f){var h=arguments,p=this._context;h.length===3?p.drawImage(e,n,r):h.length===5?p.drawImage(e,n,r,i,a):h.length===9&&p.drawImage(e,n,r,i,a,s,u,c,f)}ellipse(e,n,r,i,a,s,u,c){this._context.ellipse(e,n,r,i,a,s,u,c)}isPointInPath(e,n,r,i){return r?this._context.isPointInPath(r,e,n,i):this._context.isPointInPath(e,n,i)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,n,r,i){this._context.fillRect(e,n,r,i)}strokeRect(e,n,r,i){this._context.strokeRect(e,n,r,i)}fillText(e,n,r,i){i?this._context.fillText(e,n,r,i):this._context.fillText(e,n,r)}measureText(e){return this._context.measureText(e)}getImageData(e,n,r,i){return this._context.getImageData(e,n,r,i)}lineTo(e,n){this._context.lineTo(e,n)}moveTo(e,n){this._context.moveTo(e,n)}rect(e,n,r,i){this._context.rect(e,n,r,i)}putImageData(e,n,r){this._context.putImageData(e,n,r)}quadraticCurveTo(e,n,r,i){this._context.quadraticCurveTo(e,n,r,i)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,n){this._context.scale(e,n)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,n,r,i,a,s){this._context.setTransform(e,n,r,i,a,s)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,n,r,i){this._context.strokeText(e,n,r,i)}transform(e,n,r,i,a,s){this._context.transform(e,n,r,i,a,s)}translate(e,n){this._context.translate(e,n)}_enableTrace(){var e=this,n=wb.length,r=this.setAttr,i,a,s=function(u){var c=e[u],f;e[u]=function(){return a=PF(Array.prototype.slice.call(arguments,0)),f=c.apply(e,arguments),e._trace({method:u,args:a}),f}};for(i=0;i{e.dragStatus==="dragging"&&(t=!0)}),t},justDragged:!1,get node(){var t;return Ge._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){const e=[];Ge._dragElements.forEach((n,r)=>{const{node:i}=n,a=i.getStage();a.setPointersPositions(t),n.pointerId===void 0&&(n.pointerId=G._getFirstPointerId(t));const s=a._changedPointerPositions.find(f=>f.id===n.pointerId);if(s){if(n.dragStatus!=="dragging"){var u=i.dragDistance(),c=Math.max(Math.abs(s.x-n.startPointerPos.x),Math.abs(s.y-n.startPointerPos.y));if(c{n.fire("dragmove",{type:"dragmove",target:n,evt:t},!0)})},_endDragBefore(t){const e=[];Ge._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(t&&i.setPointersPositions(t),!i._changedPointerPositions.find(u=>u.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(Ge.justDragged=!0,pe._mouseListenClick=!1,pe._touchListenClick=!1,pe._pointerListenClick=!1,n.dragStatus="stopped");const s=n.node.getLayer()||n.node instanceof pe.Stage&&n.node;s&&e.indexOf(s)===-1&&e.push(s)}),e.forEach(n=>{n.draw()})},_endDragAfter(t){Ge._dragElements.forEach((e,n)=>{e.dragStatus==="stopped"&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),e.dragStatus!=="dragging"&&Ge._dragElements.delete(n)})}};pe.isBrowser&&(window.addEventListener("mouseup",Ge._endDragBefore,!0),window.addEventListener("touchend",Ge._endDragBefore,!0),window.addEventListener("mousemove",Ge._drag),window.addEventListener("touchmove",Ge._drag),window.addEventListener("mouseup",Ge._endDragAfter,!1),window.addEventListener("touchend",Ge._endDragAfter,!1));var vd="absoluteOpacity",Bf="allEventListeners",Ii="absoluteTransform",bb="absoluteScale",Xa="canvas",zF="Change",GF="children",UF="konva",ey="listening",Cb="mouseenter",xb="mouseleave",kb="set",Eb="Shape",yd=" ",Pb="stage",ua="transform",jF="Stage",ty="visible",HF=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(yd);let WF=1;class se{constructor(e){this._id=WF++,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(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===ua||e===Ii)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,n){var r=this._cache.get(e),i=e===ua||e===Ii,a=r===void 0||i&&r.dirty===!0;return a&&(r=n.call(this),this._cache.set(e,r)),r}_calculate(e,n,r){if(!this._attachedDepsListeners.get(e)){const i=n.map(a=>a+"Change.konva").join(yd);this.on(i,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,r)}_getCanvasCache(){return this._cache.get(Xa)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===Ii&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Xa)){const{scene:e,filter:n,hit:r}=this._cache.get(Xa);G.releaseCanvas(e,n,r),this._cache.delete(Xa)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var n=e||{},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()}));var i=Math.ceil(n.width||r.width),a=Math.ceil(n.height||r.height),s=n.pixelRatio,u=n.x===void 0?Math.floor(r.x):n.x,c=n.y===void 0?Math.floor(r.y):n.y,f=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!a){G.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=f*2+1,a+=f*2+1,u-=f,c-=f;var g=new Ts({pixelRatio:s,width:i,height:a}),y=new Ts({pixelRatio:s,width:0,height:0}),v=new L0({pixelRatio:p,width:i,height:a}),w=g.getContext(),x=v.getContext();return v.isCache=!0,g.isCache=!0,this._cache.delete(Xa),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(g.getContext()._context.imageSmoothingEnabled=!1,y.getContext()._context.imageSmoothingEnabled=!1),w.save(),x.save(),w.translate(-u,-c),x.translate(-u,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(vd),this._clearSelfAndDescendantCache(bb),this.drawScene(g,this),this.drawHit(v,this),this._isUnderCache=!1,w.restore(),x.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,a),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Xa,{scene:g,filter:y,hit:v,x:u,y:c}),this._requestDraw(),this}isCached(){return this._cache.has(Xa)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,n){var r=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],i,a,s,u,c=this.getAbsoluteTransform(n);return r.forEach(function(f){var h=c.point(f);i===void 0&&(i=s=h.x,a=u=h.y),i=Math.min(i,h.x),a=Math.min(a,h.y),s=Math.max(s,h.x),u=Math.max(u,h.y)}),{x:i,y:a,width:s-i,height:u-a}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();e.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;e.drawImage(r._canvas,0,0,r.width/i,r.height/i),e.restore()}_drawCachedHitCanvas(e){var n=this._getCanvasCache(),r=n.hit;e.save(),e.translate(n.x,n.y),e.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,a=i.getContext(),s,u,c,f;if(e){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(s=e.length,a.clear(),a.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),u=a.getImageData(0,0,i.getWidth(),i.getHeight()),c=0;c{var n,r;if(!e)return this;for(n in e)n!==GF&&(r=kb+G._capitalize(n),G._isFunction(this[r])?this[r](e[n]):this._setAttr(n,e[n]))}),this}isListening(){return this._getCache(ey,this._isListening)}_isListening(e){if(!this.listening())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isListening(e):!0}isVisible(){return this._getCache(ty,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isVisible(e):!0}shouldDrawHit(e,n=!1){if(e)return this._isVisible(e)&&this._isListening(e);var r=this.getLayer(),i=!1;Ge._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(s.node.nodeType==="Stage"||s.node.getLayer()===r)&&(i=!0)});var a=!n&&!pe.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),n=this,r=0,i,a,s,u;function c(f){for(i=[],a=f.length,s=0;s0&&i[0].getDepth()<=e&&c(i)}return n.nodeType!==jF&&c(n.getStage().getChildren()),r}getDepth(){for(var e=0,n=this.parent;n;)e++,n=n.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ua),this._clearSelfAndDescendantCache(Ii)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(e)}getAbsolutePosition(e){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!e&&(e=!0);var i=this.getAbsoluteTransform(e).getMatrix(),a=new Hn,s=this.offset();return a.m=i.slice(),a.translate(s.x,s.y),a.getTranslation()}setAbsolutePosition(e){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(ua);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(e.x,e.y),e={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:e.x,y:e.y}),this._clearCache(ua),this._clearSelfAndDescendantCache(Ii),this}_setTransform(e){var n;for(n in e)this.attrs[n]=e[n]}_clearTransform(){var e={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,e}move(e){var n=e.x,r=e.y,i=this.x(),a=this.y();return n!==void 0&&(i+=n),r!==void 0&&(a+=r),this.setPosition({x:i,y:a}),this}_eachAncestorReverse(e,n){var r=[],i=this.getParent(),a,s;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(a=r.length,s=0;s0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return G.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return G.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&G.warn("Unexpected value "+e+" 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(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(vd,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(e*=n.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e={},n=this.getAttrs(),r,i,a,s,u;e.attrs={};for(r in n)i=n[r],u=G.isObject(i)&&!G._isPlainObject(i)&&!G._isArray(i),!u&&(a=typeof this[r]=="function"&&this[r],delete n[r],s=a?a.call(this):null,n[r]=i,s!==i&&(e.attrs[r]=i));return e.className=this.getClassName(),G._prepareToStringify(e)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,n,r){var i=[];n&&this._isMatch(e)&&i.push(this);for(var a=this.parent;a;){if(a===r)return i;a._isMatch(e)&&i.push(a),a=a.parent}return i}isAncestorOf(e){return!1}findAncestor(e,n,r){return this.findAncestors(e,n,r)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);var n=e.replace(/ /g,"").split(","),r=n.length,i,a;for(i=0;i{try{const i=e==null?void 0:e.callback;i&&delete e.callback,G._urlToImage(this.toDataURL(e),function(a){n(a),i==null||i(a)})}catch(i){r(i)}})}toBlob(e){return new Promise((n,r)=>{try{const i=e==null?void 0:e.callback;i&&delete e.callback,this.toCanvas(e).toBlob(a=>{n(a),i==null||i(a)})}catch(i){r(i)}})}setSize(e){return this.width(e.width),this.height(e.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():pe.dragDistance}_off(e,n,r){var i=this.eventListeners[e],a,s,u;for(a=0;a=0;if(r&&!this.isDragging()){var i=!1;Ge._dragElements.forEach(a=>{this.isAncestorOf(a.node)&&(i=!0)}),i||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var e=this.getStage();if(!e)return;const n=Ge._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&Ge._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-e.x,y:-e.y,width:n.width()+2*e.x,height:n.height()+2*e.y};return G.haveIntersection(r,this.getClientRect())}static create(e,n){return G._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)}static _createNode(e,n){var r=se.prototype.getClassName.call(e),i=e.children,a,s,u;n&&(e.attrs.container=n),pe[r]||(G.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const c=pe[r];if(a=new c(e.attrs),i)for(s=i.length,u=0;u0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(e,n){var r=[];return this._descendants(i=>{const a=i._isMatch(e);return a&&r.push(i),!!(a&&n)}),r}_descendants(e){let n=!1;const r=this.getChildren();for(const i of r){if(n=e(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(e),n))return!0}return!1}toObject(){var e=se.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(n=>{e.children.push(n.toObject())}),e}isAncestorOf(e){for(var n=e.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(e){var n=se.prototype.clone.call(this,e);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(e){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(e)&&n.push(r)}),n}_clearSelfAndDescendantCache(e){var n;super._clearSelfAndDescendantCache(e),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(e,n){var r=this.getLayer(),i=e||r&&r.getCanvas(),a=i&&i.getContext(),s=this._getCanvasCache(),u=s&&s.scene,c=i&&i.isCache;if(!this.isVisible()&&!c)return this;if(u){a.save();var f=this.getAbsoluteTransform(n).getMatrix();a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(e,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=e||r&&r.hitCanvas,a=i&&i.getContext(),s=this._getCanvasCache(),u=s&&s.hit;if(u){a.save();var c=this.getAbsoluteTransform(n).getMatrix();a.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(e,n,r){var i,a=n&&n.getContext(),s=this.clipWidth(),u=this.clipHeight(),c=this.clipFunc(),f=s&&u||c;const h=r===this;if(f){a.save();var p=this.getAbsoluteTransform(r),g=p.getMatrix();if(a.transform(g[0],g[1],g[2],g[3],g[4],g[5]),a.beginPath(),c)c.call(this,a,this);else{var y=this.clipX(),v=this.clipY();a.rect(y,v,s,u)}a.clip(),g=p.copy().invert().getMatrix(),a.transform(g[0],g[1],g[2],g[3],g[4],g[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";w&&(a.save(),a._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(x){x[e](n,r)}),w&&a.restore(),f&&a.restore()}getClientRect(e){var n;e=e||{};var r=e.skipTransform,i=e.relativeTo,a,s,u,c,f={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(w.visible()){var x=w.getClientRect({relativeTo:h,skipShadow:e.skipShadow,skipStroke:e.skipStroke});x.width===0&&x.height===0||(a===void 0?(a=x.x,s=x.y,u=x.x+x.width,c=x.y+x.height):(a=Math.min(a,x.x),s=Math.min(s,x.y),u=Math.max(u,x.x+x.width),c=Math.max(c,x.y+x.height)))}});for(var p=this.find("Shape"),g=!1,y=0;yt.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",is=t=>{const e=iu(t);if(e==="pointer")return pe.pointerEventsEnabled&&Tm.pointer;if(e==="touch")return Tm.touch;if(e==="mouse")return Tm.mouse};function Tb(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&G.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}const JF="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);",Sd=[];class tp extends qn{constructor(e){super(Tb(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Sd.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{Tb(this.attrs)}),this._checkVisibility()}_validateAdd(e){const n=e.getType()==="Layer",r=e.getType()==="FastLayer";n||r||G.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if(typeof e===qF){if(e.charAt(0)==="."){var n=e.slice(1);e=document.getElementsByClassName(n)[0]}else{var r;e.charAt(0)!=="#"?r=e:r=e.slice(1),e=document.getElementById(r)}if(!e)throw"Can not find container in document with id "+r}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e=this.children,n=e.length,r;for(r=0;r-1&&Sd.splice(n,1),G.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(G.warn(JF),null)}_getPointerById(e){return this._pointerPositions.find(n=>n.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e=e||{},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var n=new Ts({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(e.x||e.y)&&r.translate(-1*e.x,-1*e.y),i.forEach(function(a){if(a.isVisible()){var s=a._toKonvaCanvas(e);r.drawImage(s._canvas,e.x,e.y,s.getWidth()/s.getPixelRatio(),s.getHeight()/s.getPixelRatio())}}),n}getIntersection(e){if(!e)return null;var n=this.children,r=n.length,i=r-1,a;for(a=i;a>=0;a--){const s=n[a].getIntersection(e);if(s)return s}return null}_resizeDOM(){var e=this.width(),n=this.height();this.content&&(this.content.style.width=e+Ob,this.content.style.height=n+Ob),this.bufferCanvas.setSize(e,n),this.bufferHitCanvas.setSize(e,n),this.children.forEach(r=>{r.setSize({width:e,height:n}),r.draw()})}add(e,...n){if(arguments.length>1){for(var r=0;rXF&&G.warn("The stage has "+i+" 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."),e.setSize({width:this.width(),height:this.height()}),e.draw(),pe.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return jk(e,this)}setPointerCapture(e){Hk(e,this)}releaseCapture(e){mu(e)}getLayers(){return this.children}_bindContentEvents(){pe.isBrowser&&QF.forEach(([e,n])=>{this.content.addEventListener(e,r=>{this[n](r)},{passive:!1})})}_pointerenter(e){this.setPointersPositions(e);const n=is(e.type);this._fire(n.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const n=is(e.type);this._fire(n.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let n=this[e+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(e){const n=is(e.type),r=iu(e.type);if(n){this.setPointersPositions(e);var i=this._getTargetShape(r),a=!Ge.isDragging||pe.hitOnDragEnabled;i&&a?(i._fireAndBubble(n.pointerout,{evt:e}),i._fireAndBubble(n.pointerleave,{evt:e}),this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this[r+"targetShape"]=null):a&&(this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){const n=is(e.type),r=iu(e.type);if(n){this.setPointersPositions(e);var i=!1;this._changedPointerPositions.forEach(a=>{var s=this.getIntersection(a);if(Ge.justDragged=!1,pe["_"+r+"ListenClick"]=!0,!(s&&s.isListening()))return;pe.capturePointerEventsEnabled&&s.setPointerCapture(a.id),this[r+"ClickStartShape"]=s,s._fireAndBubble(n.pointerdown,{evt:e,pointerId:a.id}),i=!0;const c=e.type.indexOf("touch")>=0;s.preventDefault()&&e.cancelable&&c&&e.preventDefault()}),i||this._fire(n.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){const n=is(e.type),r=iu(e.type);if(!n)return;Ge.isDragging&&Ge.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e);var i=!Ge.isDragging||pe.hitOnDragEnabled;if(!i)return;var a={};let s=!1;var u=this._getTargetShape(r);this._changedPointerPositions.forEach(c=>{const f=Om(c.id)||this.getIntersection(c),h=c.id,p={evt:e,pointerId:h};var g=u!==f;if(g&&u&&(u._fireAndBubble(n.pointerout,Object.assign({},p),f),u._fireAndBubble(n.pointerleave,Object.assign({},p),f)),f){if(a[f._id])return;a[f._id]=!0}f&&f.isListening()?(s=!0,g&&(f._fireAndBubble(n.pointerover,Object.assign({},p),u),f._fireAndBubble(n.pointerenter,Object.assign({},p),u),this[r+"targetShape"]=f),f._fireAndBubble(n.pointermove,Object.assign({},p))):u&&(this._fire(n.pointerover,{evt:e,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),s||this._fire(n.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const n=is(e.type),r=iu(e.type);if(!n)return;this.setPointersPositions(e);const i=this[r+"ClickStartShape"],a=this[r+"ClickEndShape"];var s={};let u=!1;this._changedPointerPositions.forEach(c=>{const f=Om(c.id)||this.getIntersection(c);if(f){if(f.releaseCapture(c.id),s[f._id])return;s[f._id]=!0}const h=c.id,p={evt:e,pointerId:h};let g=!1;pe["_"+r+"InDblClickWindow"]?(g=!0,clearTimeout(this[r+"DblTimeout"])):Ge.justDragged||(pe["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){pe["_"+r+"InDblClickWindow"]=!1},pe.dblClickWindow),f&&f.isListening()?(u=!0,this[r+"ClickEndShape"]=f,f._fireAndBubble(n.pointerup,Object.assign({},p)),pe["_"+r+"ListenClick"]&&i&&i===f&&(f._fireAndBubble(n.pointerclick,Object.assign({},p)),g&&a&&a===f&&f._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,pe["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:h}),g&&this._fire(n.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:h}))}),u||this._fire(n.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),pe["_"+r+"ListenClick"]=!1,e.cancelable&&r!=="touch"&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(ny,{evt:e}):this._fire(ny,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(ry,{evt:e}):this._fire(ry,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const n=Om(e.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Ss,M0(e)),mu(e.pointerId)}_lostpointercapture(e){mu(e.pointerId)}setPointersPositions(e){var n=this._getContentPosition(),r=null,i=null;e=e||window.event,e.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,a=>{this._pointerPositions.push({id:a.identifier,x:(a.clientX-n.left)/n.scaleX,y:(a.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,a=>{this._changedPointerPositions.push({id:a.identifier,x:(a.clientX-n.left)/n.scaleX,y:(a.clientY-n.top)/n.scaleY})})):(r=(e.clientX-n.left)/n.scaleX,i=(e.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:G._getFirstPointerId(e)}],this._changedPointerPositions=[{x:r,y:i,id:G._getFirstPointerId(e)}])}_setPointerPosition(e){G.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Ts({width:this.width(),height:this.height()}),this.bufferHitCanvas=new L0({pixelRatio:1,width:this.width(),height:this.height()}),!!pe.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.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"),e.appendChild(this.content),this._resizeDOM()}}cache(){return G.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(e){e.batchDraw()}),this}}tp.prototype.nodeType=VF;yt(tp);A.addGetterSetter(tp,"container");var tE="hasShadow",nE="shadowRGBA",rE="patternImage",iE="linearGradient",aE="radialGradient";let Uf;function Rm(){return Uf||(Uf=G.createCanvasElement().getContext("2d"),Uf)}const vu={};function ZF(t){t.fill()}function e$(t){t.stroke()}function t$(t){t.fill()}function n$(t){t.stroke()}function r$(){this._clearCache(tE)}function i$(){this._clearCache(nE)}function a$(){this._clearCache(rE)}function o$(){this._clearCache(iE)}function s$(){this._clearCache(aE)}class re extends se{constructor(e){super(e);let n;for(;n=G.getRandomColor(),!(n&&!(n in vu)););this.colorKey=n,vu[n]=this}getContext(){return G.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return G.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(tE,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(rE,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var e=Rm();const n=e.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new Hn;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(pe.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),a=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(a)}return n}}_getLinearGradient(){return this._getCache(iE,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var n=Rm(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),a=n.createLinearGradient(r.x,r.y,i.x,i.y),s=0;sthis.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 n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data,i[3]>0}destroy(){return se.prototype.destroy.call(this),delete vu[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=e||this.hasFill(),a=this.hasStroke(),s=this.getAbsoluteOpacity()!==1;if(i&&a&&s)return!0;const u=this.hasShadow(),c=this.shadowForStrokeEnabled();return!!(i&&a&&u&&c)}setStrokeHitEnabled(e){G.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 n=e.skipTransform,r=e.relativeTo,i=this.getSelfRect(),s=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,u=i.width+s,c=i.height+s,f=!e.skipShadow&&this.hasShadow(),h=f?this.shadowOffsetX():0,p=f?this.shadowOffsetY():0,g=u+Math.abs(h),y=c+Math.abs(p),v=f&&this.shadowBlur()||0,w=g+v*2,x=y+v*2,_={width:w,height:x,x:-(s/2+v)+Math.min(h,0)+i.x,y:-(s/2+v)+Math.min(p,0)+i.y};return n?_:this._transformedRect(_,r)}drawScene(e,n){var r=this.getLayer(),i=e||r.getCanvas(),a=i.getContext(),s=this._getCanvasCache(),u=this.getSceneFunc(),c=this.hasShadow(),f,h,p,g=i.isCache,y=n===this;if(!this.isVisible()&&!y)return this;if(s){a.save();var v=this.getAbsoluteTransform(n).getMatrix();return a.transform(v[0],v[1],v[2],v[3],v[4],v[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!u)return this;if(a.save(),this._useBufferCanvas()&&!g){f=this.getStage(),h=f.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),u.call(this,p,this),p.restore();var x=h.pixelRatio;c&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(h._canvas,0,0,h.width/x,h.height/x)}else{if(a._applyLineJoin(this),!y){var w=this.getAbsoluteTransform(n).getMatrix();a.transform(w[0],w[1],w[2],w[3],w[4],w[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}c&&a._applyShadow(this),u.call(this,a,this)}return a.restore(),this}drawHit(e,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),a=e||i.hitCanvas,s=a&&a.getContext(),u=this.hitFunc()||this.sceneFunc(),c=this._getCanvasCache(),f=c&&c.hit;if(this.colorKey||G.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()"),f){s.save();var h=this.getAbsoluteTransform(n).getMatrix();return s.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(s),s.restore(),this}if(!u)return this;if(s.save(),s._applyLineJoin(this),!(this===n)){var g=this.getAbsoluteTransform(n).getMatrix();s.transform(g[0],g[1],g[2],g[3],g[4],g[5])}return u.call(this,s,this),s.restore(),this}drawHitFromCache(e=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,a=i.getContext(),s=i.getWidth(),u=i.getHeight(),c,f,h,p,g,y;a.clear(),a.drawImage(r._canvas,0,0,s,u);try{for(c=a.getImageData(0,0,s,u),f=c.data,h=f.length,p=G._hexToRgb(this.colorKey),g=0;ge?(f[g]=p.r,f[g+1]=p.g,f[g+2]=p.b,f[g+3]=255):f[g+3]=0;a.putImageData(c,0,0)}catch(v){G.error("Unable to draw hit graph from cached scene canvas. "+v.message)}return this}hasPointerCapture(e){return jk(e,this)}setPointerCapture(e){Hk(e,this)}releaseCapture(e){mu(e)}}re.prototype._fillFunc=ZF;re.prototype._strokeFunc=e$;re.prototype._fillFuncHit=t$;re.prototype._strokeFuncHit=n$;re.prototype._centroid=!1;re.prototype.nodeType="Shape";yt(re);re.prototype.eventListeners={};re.prototype.on.call(re.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",r$);re.prototype.on.call(re.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",i$);re.prototype.on.call(re.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",a$);re.prototype.on.call(re.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",o$);re.prototype.on.call(re.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",s$);A.addGetterSetter(re,"stroke",void 0,Gk());A.addGetterSetter(re,"strokeWidth",2,le());A.addGetterSetter(re,"fillAfterStrokeEnabled",!1);A.addGetterSetter(re,"hitStrokeWidth","auto",I0());A.addGetterSetter(re,"strokeHitEnabled",!0,jr());A.addGetterSetter(re,"perfectDrawEnabled",!0,jr());A.addGetterSetter(re,"shadowForStrokeEnabled",!0,jr());A.addGetterSetter(re,"lineJoin");A.addGetterSetter(re,"lineCap");A.addGetterSetter(re,"sceneFunc");A.addGetterSetter(re,"hitFunc");A.addGetterSetter(re,"dash");A.addGetterSetter(re,"dashOffset",0,le());A.addGetterSetter(re,"shadowColor",void 0,qs());A.addGetterSetter(re,"shadowBlur",0,le());A.addGetterSetter(re,"shadowOpacity",1,le());A.addComponentsGetterSetter(re,"shadowOffset",["x","y"]);A.addGetterSetter(re,"shadowOffsetX",0,le());A.addGetterSetter(re,"shadowOffsetY",0,le());A.addGetterSetter(re,"fillPatternImage");A.addGetterSetter(re,"fill",void 0,Gk());A.addGetterSetter(re,"fillPatternX",0,le());A.addGetterSetter(re,"fillPatternY",0,le());A.addGetterSetter(re,"fillLinearGradientColorStops");A.addGetterSetter(re,"strokeLinearGradientColorStops");A.addGetterSetter(re,"fillRadialGradientStartRadius",0);A.addGetterSetter(re,"fillRadialGradientEndRadius",0);A.addGetterSetter(re,"fillRadialGradientColorStops");A.addGetterSetter(re,"fillPatternRepeat","repeat");A.addGetterSetter(re,"fillEnabled",!0);A.addGetterSetter(re,"strokeEnabled",!0);A.addGetterSetter(re,"shadowEnabled",!0);A.addGetterSetter(re,"dashEnabled",!0);A.addGetterSetter(re,"strokeScaleEnabled",!0);A.addGetterSetter(re,"fillPriority","color");A.addComponentsGetterSetter(re,"fillPatternOffset",["x","y"]);A.addGetterSetter(re,"fillPatternOffsetX",0,le());A.addGetterSetter(re,"fillPatternOffsetY",0,le());A.addComponentsGetterSetter(re,"fillPatternScale",["x","y"]);A.addGetterSetter(re,"fillPatternScaleX",1,le());A.addGetterSetter(re,"fillPatternScaleY",1,le());A.addComponentsGetterSetter(re,"fillLinearGradientStartPoint",["x","y"]);A.addComponentsGetterSetter(re,"strokeLinearGradientStartPoint",["x","y"]);A.addGetterSetter(re,"fillLinearGradientStartPointX",0);A.addGetterSetter(re,"strokeLinearGradientStartPointX",0);A.addGetterSetter(re,"fillLinearGradientStartPointY",0);A.addGetterSetter(re,"strokeLinearGradientStartPointY",0);A.addComponentsGetterSetter(re,"fillLinearGradientEndPoint",["x","y"]);A.addComponentsGetterSetter(re,"strokeLinearGradientEndPoint",["x","y"]);A.addGetterSetter(re,"fillLinearGradientEndPointX",0);A.addGetterSetter(re,"strokeLinearGradientEndPointX",0);A.addGetterSetter(re,"fillLinearGradientEndPointY",0);A.addGetterSetter(re,"strokeLinearGradientEndPointY",0);A.addComponentsGetterSetter(re,"fillRadialGradientStartPoint",["x","y"]);A.addGetterSetter(re,"fillRadialGradientStartPointX",0);A.addGetterSetter(re,"fillRadialGradientStartPointY",0);A.addComponentsGetterSetter(re,"fillRadialGradientEndPoint",["x","y"]);A.addGetterSetter(re,"fillRadialGradientEndPointX",0);A.addGetterSetter(re,"fillRadialGradientEndPointY",0);A.addGetterSetter(re,"fillPatternRotation",0);A.backCompat(re,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var l$="#",u$="beforeDraw",c$="draw",oE=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],f$=oE.length;class yo extends qn{constructor(e){super(e),this.canvas=new Ts,this.hitCanvas=new L0({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(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),e{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(e,n){var r=this.getLayer(),i=e||r&&r.getCanvas();return this._fire(u$,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),qn.prototype.drawScene.call(this,i,n),this._fire(c$,{node:this}),this}drawHit(e,n){var r=this.getLayer(),i=e||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),qn.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){G.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return G.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return G.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}yo.prototype.nodeType="Layer";yt(yo);A.addGetterSetter(yo,"imageSmoothingEnabled",!0);A.addGetterSetter(yo,"clearBeforeDraw",!0);A.addGetterSetter(yo,"hitGraphEnabled",!0,jr());class D0 extends yo{constructor(e){super(e),this.listening(!1),G.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}D0.prototype.nodeType="FastLayer";yt(D0);class zs extends qn{_validateAdd(e){var n=e.getType();n!=="Group"&&n!=="Shape"&&G.throw("You may only add groups and shapes to groups.")}}zs.prototype.nodeType="Group";yt(zs);var Am=function(){return Os.performance&&Os.performance.now?function(){return Os.performance.now()}:function(){return new Date().getTime()}}();class dr{constructor(e,n){this.id=dr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Am(),frameRate:0},this.func=e,this.setLayers(n)}setLayers(e){var n=[];return e?e.length>0?n=e:n=[e]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(e){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=Rb,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=Ab,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,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 e=this.getTimer()-this._startTime;this.state===Rb?this.setTime(e):this.state===Ab&&this.setTime(this.duration-e)}pause(){this.state=h$,this.fire("onPause")}getTimer(){return new Date().getTime()}}class kt{constructor(e){var n=this,r=e.node,i=r._id,a,s=e.easing||yu.Linear,u=!!e.yoyo,c;typeof e.duration>"u"?a=.3:e.duration===0?a=.001:a=e.duration,this.node=r,this._id=p$++;var f=r.getLayer()||(r instanceof pe.Stage?r.getLayers():null);f||G.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new dr(function(){n.tween.onEnterFrame()},f),this.tween=new g$(c,function(h){n._tweenFunc(h)},s,0,1,a*1e3,u),this._addListeners(),kt.attrs[i]||(kt.attrs[i]={}),kt.attrs[i][this._id]||(kt.attrs[i][this._id]={}),kt.tweens[i]||(kt.tweens[i]={});for(c in e)d$[c]===void 0&&this._addAttr(c,e[c]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,n){var r=this.node,i=r._id,a,s,u,c,f,h,p,g;if(u=kt.tweens[i][e],u&&delete kt.attrs[i][u][e],a=r.getAttr(e),G._isArray(n))if(s=[],f=Math.max(n.length,a.length),e==="points"&&n.length!==a.length&&(n.length>a.length?(p=a,a=G._prepareArrayForTween(a,n,r.closed())):(h=n,n=G._prepareArrayForTween(n,a,r.closed()))),e.indexOf("fill")===0)for(c=0;c{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var e=this.node,n=kt.attrs[e._id][this._id];n.points&&n.points.trueEnd&&e.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var e=this.node,n=kt.attrs[e._id][this._id];n.points&&n.points.trueStart&&e.points(n.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(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var e=this.node._id,n=this._id,r=kt.tweens[e],i;this.pause();for(i in r)delete kt.tweens[e][i];delete kt.attrs[e][n]}}kt.attrs={};kt.tweens={};se.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()};var n=new kt(t);n.play()};const yu={BackEaseIn(t,e,n,r){var i=1.70158;return n*(t/=r)*t*((i+1)*t-i)+e},BackEaseOut(t,e,n,r){var i=1.70158;return n*((t=t/r-1)*t*((i+1)*t+i)+1)+e},BackEaseInOut(t,e,n,r){var i=1.70158;return(t/=r/2)<1?n/2*(t*t*(((i*=1.525)+1)*t-i))+e:n/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)+e},ElasticEaseIn(t,e,n,r,i,a){var s=0;return t===0?e:(t/=r)===1?e+n:(a||(a=r*.3),!i||i0?e:n),h=s*n,p=u*(u>0?e:n),g=c*(c>0?n:e);return{x:f,y:r?-1*g:p,width:h-f,height:g-p}}}Wi.prototype._centroid=!0;Wi.prototype.className="Arc";Wi.prototype._attrsAffectingSize=["innerRadius","outerRadius"];yt(Wi);A.addGetterSetter(Wi,"innerRadius",0,le());A.addGetterSetter(Wi,"outerRadius",0,le());A.addGetterSetter(Wi,"angle",0,le());A.addGetterSetter(Wi,"clockwise",!1,jr());function iy(t,e,n,r,i,a,s){var u=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),c=Math.sqrt(Math.pow(i-n,2)+Math.pow(a-r,2)),f=s*u/(u+c),h=s*c/(u+c),p=n-f*(i-t),g=r-f*(a-e),y=n+h*(i-t),v=r+h*(a-e);return[p,g,y,v]}function Mb(t,e){var n=t.length,r=[],i,a;for(i=2;i4){for(u=this.getTensionPoints(),c=u.length,f=a?0:4,a||e.quadraticCurveTo(u[0],u[1],u[2],u[3]);fh?f:h,x=f>h?1:f/h,_=f>h?h/f:1;e.translate(u,c),e.rotate(y),e.scale(x,_),e.arc(0,0,w,p,p+g,1-v),e.scale(1/x,1/_),e.rotate(-y),e.translate(-u,-c);break;case"z":r=!0,e.closePath();break}}!r&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach(function(f){if(f.command==="A"){var h=f.points[4],p=f.points[5],g=f.points[4]+p,y=Math.PI/180;if(Math.abs(h-g)g;v-=y){const w=tt.getPointOnEllipticalArc(f.points[0],f.points[1],f.points[2],f.points[3],v,0);e.push(w.x,w.y)}else for(let v=h+y;vthis.dataArray[r].pathLength;)e-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(e<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var a=this.dataArray[r],s=a.points;switch(a.command){case"L":return tt.getPointOnLine(e,a.start.x,a.start.y,s[0],s[1]);case"C":return tt.getPointOnCubicBezier(e/a.pathLength,a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return tt.getPointOnQuadraticBezier(e/a.pathLength,a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":var u=s[0],c=s[1],f=s[2],h=s[3],p=s[4],g=s[5],y=s[6];return p+=g*e/a.pathLength,tt.getPointOnEllipticalArc(u,c,f,h,p,y)}return null}static getLineLength(e,n,r,i){return Math.sqrt((r-e)*(r-e)+(i-n)*(i-n))}static getPointOnLine(e,n,r,i,a,s,u){s===void 0&&(s=n),u===void 0&&(u=r);var c=(a-r)/(i-n+1e-8),f=Math.sqrt(e*e/(1+c*c));i0&&!isNaN(v[0]);){var S=null,C=[],O=c,I=f,L,D,U,X,Y,te,ce,j,T,$;switch(y){case"l":c+=v.shift(),f+=v.shift(),S="L",C.push(c,f);break;case"L":c=v.shift(),f=v.shift(),C.push(c,f);break;case"m":var V=v.shift(),ie=v.shift();if(c+=V,f+=ie,S="M",s.length>2&&s[s.length-1].command==="z"){for(var H=s.length-2;H>=0;H--)if(s[H].command==="M"){c=s[H].points[0]+V,f=s[H].points[1]+ie;break}}C.push(c,f),y="l";break;case"M":c=v.shift(),f=v.shift(),S="M",C.push(c,f),y="L";break;case"h":c+=v.shift(),S="L",C.push(c,f);break;case"H":c=v.shift(),S="L",C.push(c,f);break;case"v":f+=v.shift(),S="L",C.push(c,f);break;case"V":f=v.shift(),S="L",C.push(c,f);break;case"C":C.push(v.shift(),v.shift(),v.shift(),v.shift()),c=v.shift(),f=v.shift(),C.push(c,f);break;case"c":C.push(c+v.shift(),f+v.shift(),c+v.shift(),f+v.shift()),c+=v.shift(),f+=v.shift(),S="C",C.push(c,f);break;case"S":D=c,U=f,L=s[s.length-1],L.command==="C"&&(D=c+(c-L.points[2]),U=f+(f-L.points[3])),C.push(D,U,v.shift(),v.shift()),c=v.shift(),f=v.shift(),S="C",C.push(c,f);break;case"s":D=c,U=f,L=s[s.length-1],L.command==="C"&&(D=c+(c-L.points[2]),U=f+(f-L.points[3])),C.push(D,U,c+v.shift(),f+v.shift()),c+=v.shift(),f+=v.shift(),S="C",C.push(c,f);break;case"Q":C.push(v.shift(),v.shift()),c=v.shift(),f=v.shift(),C.push(c,f);break;case"q":C.push(c+v.shift(),f+v.shift()),c+=v.shift(),f+=v.shift(),S="Q",C.push(c,f);break;case"T":D=c,U=f,L=s[s.length-1],L.command==="Q"&&(D=c+(c-L.points[0]),U=f+(f-L.points[1])),c=v.shift(),f=v.shift(),S="Q",C.push(D,U,c,f);break;case"t":D=c,U=f,L=s[s.length-1],L.command==="Q"&&(D=c+(c-L.points[0]),U=f+(f-L.points[1])),c+=v.shift(),f+=v.shift(),S="Q",C.push(D,U,c,f);break;case"A":X=v.shift(),Y=v.shift(),te=v.shift(),ce=v.shift(),j=v.shift(),T=c,$=f,c=v.shift(),f=v.shift(),S="A",C=this.convertEndpointToCenterParameterization(T,$,c,f,ce,j,X,Y,te);break;case"a":X=v.shift(),Y=v.shift(),te=v.shift(),ce=v.shift(),j=v.shift(),T=c,$=f,c+=v.shift(),f+=v.shift(),S="A",C=this.convertEndpointToCenterParameterization(T,$,c,f,ce,j,X,Y,te);break}s.push({command:S||y,points:C,start:{x:O,y:I},pathLength:this.calcLength(O,I,S||y,C)})}(y==="z"||y==="Z")&&s.push({command:"z",points:[],start:void 0,pathLength:0})}return s}static calcLength(e,n,r,i){var a,s,u,c,f=tt;switch(r){case"L":return f.getLineLength(e,n,i[0],i[1]);case"C":for(a=0,s=f.getPointOnCubicBezier(0,e,n,i[0],i[1],i[2],i[3],i[4],i[5]),c=.01;c<=1;c+=.01)u=f.getPointOnCubicBezier(c,e,n,i[0],i[1],i[2],i[3],i[4],i[5]),a+=f.getLineLength(s.x,s.y,u.x,u.y),s=u;return a;case"Q":for(a=0,s=f.getPointOnQuadraticBezier(0,e,n,i[0],i[1],i[2],i[3]),c=.01;c<=1;c+=.01)u=f.getPointOnQuadraticBezier(c,e,n,i[0],i[1],i[2],i[3]),a+=f.getLineLength(s.x,s.y,u.x,u.y),s=u;return a;case"A":a=0;var h=i[4],p=i[5],g=i[4]+p,y=Math.PI/180;if(Math.abs(h-g)g;c-=y)u=f.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=f.getLineLength(s.x,s.y,u.x,u.y),s=u;else for(c=h+y;c1&&(u*=Math.sqrt(y),c*=Math.sqrt(y));var v=Math.sqrt((u*u*(c*c)-u*u*(g*g)-c*c*(p*p))/(u*u*(g*g)+c*c*(p*p)));a===s&&(v*=-1),isNaN(v)&&(v=0);var w=v*u*g/c,x=v*-c*p/u,_=(e+r)/2+Math.cos(h)*w-Math.sin(h)*x,S=(n+i)/2+Math.sin(h)*w+Math.cos(h)*x,C=function(Y){return Math.sqrt(Y[0]*Y[0]+Y[1]*Y[1])},O=function(Y,te){return(Y[0]*te[0]+Y[1]*te[1])/(C(Y)*C(te))},I=function(Y,te){return(Y[0]*te[1]=1&&(X=0),s===0&&X>0&&(X=X-2*Math.PI),s===1&&X<0&&(X=X+2*Math.PI),[_,S,u,c,L,X,h,s]}}tt.prototype.className="Path";tt.prototype._attrsAffectingSize=["data"];yt(tt);A.addGetterSetter(tt,"data");class So extends Vi{_sceneFunc(e){super._sceneFunc(e);var n=Math.PI*2,r=this.points(),i=r,a=this.tension()!==0&&r.length>4;a&&(i=this.getTensionPoints());var s=this.pointerLength(),u=r.length,c,f;if(a){const g=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[u-2],r[u-1]],y=tt.calcLength(i[i.length-4],i[i.length-3],"C",g),v=tt.getPointOnQuadraticBezier(Math.min(1,1-s/y),g[0],g[1],g[2],g[3],g[4],g[5]);c=r[u-2]-v.x,f=r[u-1]-v.y}else c=r[u-2]-r[u-4],f=r[u-1]-r[u-3];var h=(Math.atan2(f,c)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(r[u-2],r[u-1]),e.rotate(h),e.moveTo(0,0),e.lineTo(-s,p/2),e.lineTo(-s,-p/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(r[0],r[1]),a?(c=(i[0]+i[2])/2-r[0],f=(i[1]+i[3])/2-r[1]):(c=r[2]-r[0],f=r[3]-r[1]),e.rotate((Math.atan2(-f,-c)+n)%n),e.moveTo(0,0),e.lineTo(-s,p/2),e.lineTo(-s,-p/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),n=this.pointerWidth()/2;return{x:e.x-n,y:e.y-n,width:e.width+n*2,height:e.height+n*2}}}So.prototype.className="Arrow";yt(So);A.addGetterSetter(So,"pointerLength",10,le());A.addGetterSetter(So,"pointerWidth",10,le());A.addGetterSetter(So,"pointerAtBeginning",!1);A.addGetterSetter(So,"pointerAtEnding",!0);class Ks extends re{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}Ks.prototype._centroid=!0;Ks.prototype.className="Circle";Ks.prototype._attrsAffectingSize=["radius"];yt(Ks);A.addGetterSetter(Ks,"radius",0,le());class Na extends re{_sceneFunc(e){var n=this.radiusX(),r=this.radiusY();e.beginPath(),e.save(),n!==r&&e.scale(1,r/n),e.arc(0,0,n,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}Na.prototype.className="Ellipse";Na.prototype._centroid=!0;Na.prototype._attrsAffectingSize=["radiusX","radiusY"];yt(Na);A.addComponentsGetterSetter(Na,"radius",["x","y"]);A.addGetterSetter(Na,"radiusX",0,le());A.addGetterSetter(Na,"radiusY",0,le());let hi=class sE extends re{constructor(e){super(e),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){const n=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),a=this.attrs.image;let s;if(a){const u=this.attrs.cropWidth,c=this.attrs.cropHeight;u&&c?s=[a,this.cropX(),this.cropY(),u,c,0,0,n,r]:s=[a,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(e.beginPath(),i?G.drawRoundedRectPath(e,n,r,i):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)),a&&(i&&e.clip(),e.drawImage.apply(e,s))}_hitFunc(e){var n=this.width(),r=this.height(),i=this.cornerRadius();e.beginPath(),i?G.drawRoundedRectPath(e,n,r,i):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,n;return(e=this.attrs.width)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var e,n;return(e=this.attrs.height)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(e,n,r=null){var i=G.createImageElement();i.onload=function(){var a=new sE({image:i});n(a)},i.onerror=r,i.crossOrigin="Anonymous",i.src=e}};hi.prototype.className="Image";yt(hi);A.addGetterSetter(hi,"cornerRadius",0,A0(4));A.addGetterSetter(hi,"image");A.addComponentsGetterSetter(hi,"crop",["x","y","width","height"]);A.addGetterSetter(hi,"cropX",0,le());A.addGetterSetter(hi,"cropY",0,le());A.addGetterSetter(hi,"cropWidth",0,le());A.addGetterSetter(hi,"cropHeight",0,le());var lE=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],m$="Change.konva",v$="none",ay="up",oy="right",sy="down",ly="left",y$=lE.length;class N0 extends zs{constructor(e){super(e),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(e){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,s.x),r=Math.max(r,s.x),i=Math.min(i,s.y),a=Math.max(a,s.y)}),{x:n,y:i,width:r-n,height:a-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}wo.prototype.className="RegularPolygon";wo.prototype._centroid=!0;wo.prototype._attrsAffectingSize=["radius"];yt(wo);A.addGetterSetter(wo,"radius",0,le());A.addGetterSetter(wo,"sides",0,le());var Db=Math.PI*2;class bo extends re{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,Db,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),Db,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}bo.prototype.className="Ring";bo.prototype._centroid=!0;bo.prototype._attrsAffectingSize=["innerRadius","outerRadius"];yt(bo);A.addGetterSetter(bo,"innerRadius",0,le());A.addGetterSetter(bo,"outerRadius",0,le());class pi extends re{constructor(e){super(e),this._updated=!0,this.anim=new dr(()=>{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(e){var n=this.animation(),r=this.frameIndex(),i=r*4,a=this.animations()[n],s=this.frameOffsets(),u=a[i+0],c=a[i+1],f=a[i+2],h=a[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,f,h),e.closePath(),e.fillStrokeShape(this)),p)if(s){var g=s[n],y=r*2;e.drawImage(p,u,c,f,h,g[y+0],g[y+1],f,h)}else e.drawImage(p,u,c,f,h,0,0,f,h)}_hitFunc(e){var n=this.animation(),r=this.frameIndex(),i=r*4,a=this.animations()[n],s=this.frameOffsets(),u=a[i+2],c=a[i+3];if(e.beginPath(),s){var f=s[n],h=r*2;e.rect(f[h+0],f[h+1],u,c)}else e.rect(0,0,u,c);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],a=i.length/4;e{e=e.trim();const n=e.indexOf(" ")>=0,r=e.indexOf('"')>=0||e.indexOf("'")>=0;return n&&!r&&(e=`"${e}"`),e}).join(", ")}var Hf;function Lm(){return Hf||(Hf=G.createCanvasElement().getContext(w$),Hf)}function I$(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function L$(t){t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function M$(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}let vt=class extends re{constructor(e){super(M$(e)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(_+=s)}}}_hitFunc(e){var n=this.getWidth(),r=this.getHeight();e.beginPath(),e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}setText(e){var n=G._isString(e)?e:e==null?"":e+"";return this._setAttr(b$,n),this}getWidth(){var e=this.attrs.width===as||this.attrs.width===void 0;return e?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var e=this.attrs.height===as||this.attrs.height===void 0;return e?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return G.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var n=Lm(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(e),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+jf+this.fontVariant()+jf+(this.fontSize()+E$)+A$(this.fontFamily())}_addTextLine(e){this.align()===Hl&&(e=e.trim());var r=this._getTextWidth(e);return this.textArr.push({text:e,width:r,lastInParagraph:!1})}_getTextWidth(e){var n=this.letterSpacing(),r=e.length;return Lm().measureText(e).width+(r?n*(r-1):0)}_setTextData(){var e=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,a=this.attrs.width,s=this.attrs.height,u=a!==as&&a!==void 0,c=s!==as&&s!==void 0,f=this.padding(),h=a-f*2,p=s-f*2,g=0,y=this.wrap(),v=y!==Fb,w=y!==T$&&v,x=this.ellipsis();this.textArr=[],Lm().font=this._getContextFont();for(var _=x?this._getTextWidth(Im):0,S=0,C=e.length;Sh)for(;O.length>0;){for(var L=0,D=O.length,U="",X=0;L>>1,te=O.slice(0,Y+1),ce=this._getTextWidth(te)+_;ce<=h?(L=Y+1,U=te,X=ce):D=Y}if(U){if(w){var j,T=O[U.length],$=T===jf||T===Nb;$&&X<=h?j=U.length:j=Math.max(U.lastIndexOf(jf),U.lastIndexOf(Nb))+1,j>0&&(L=j,U=U.slice(0,L),X=this._getTextWidth(U))}U=U.trimRight(),this._addTextLine(U),r=Math.max(r,X),g+=i;var V=this._shouldHandleEllipsis(g);if(V){this._tryToAddEllipsisToLastLine();break}if(O=O.slice(L),O=O.trimLeft(),O.length>0&&(I=this._getTextWidth(O),I<=h)){this._addTextLine(O),g+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(O),g+=i,r=Math.max(r,I),this._shouldHandleEllipsis(g)&&Sp)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(e){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,a=i!==as&&i!==void 0,s=this.padding(),u=i-s*2,c=this.wrap(),f=c!==Fb;return!f||a&&e+r>u}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,n=e!==as&&e!==void 0,r=this.padding(),i=e-r*2,a=this.ellipsis(),s=this.textArr[this.textArr.length-1];if(!(!s||!a)){if(n){var u=this._getTextWidth(s.text+Im)=1){var r=n[0].p0;e.moveTo(r.x,r.y)}for(var i=0;i0&&(u+=e.dataArray[c].pathLength);var f=0;i==="center"&&(f=Math.max(0,u/2-s/2)),i==="right"&&(f=Math.max(0,u-s));for(var h=uE(this.text()),p=this.text().split(" ").length-1,g,y,v,w=-1,x=0,_=function(){x=0;for(var ce=e.dataArray,j=w+1;j0)return w=j,ce[j];ce[j].command==="M"&&(g={x:ce[j].points[0],y:ce[j].points[1]})}return{}},S=function(ce){var j=e._getTextSize(ce).width+r;ce===" "&&i==="justify"&&(j+=(u-s)/p);var T=0,$=0;for(y=void 0;Math.abs(j-T)/j>.01&&$<20;){$++;for(var V=T;v===void 0;)v=_(),v&&V+v.pathLengthj?y=tt.getPointOnLine(j,g.x,g.y,v.points[0],v.points[1],g.x,g.y):v=void 0;break;case"A":var H=v.points[4],K=v.points[5],Q=v.points[4]+K;x===0?x=H+1e-8:j>T?x+=Math.PI/180*K/Math.abs(K):x-=Math.PI/360*K/Math.abs(K),(K<0&&x=0&&x>Q)&&(x=Q,ie=!0),y=tt.getPointOnEllipticalArc(v.points[0],v.points[1],v.points[2],v.points[3],x,v.points[6]);break;case"C":x===0?j>v.pathLength?x=1e-8:x=j/v.pathLength:j>T?x+=(j-T)/v.pathLength/2:x=Math.max(x-(T-j)/v.pathLength/2,0),x>1&&(x=1,ie=!0),y=tt.getPointOnCubicBezier(x,v.start.x,v.start.y,v.points[0],v.points[1],v.points[2],v.points[3],v.points[4],v.points[5]);break;case"Q":x===0?x=j/v.pathLength:j>T?x+=(j-T)/v.pathLength:x-=(T-j)/v.pathLength,x>1&&(x=1,ie=!0),y=tt.getPointOnQuadraticBezier(x,v.start.x,v.start.y,v.points[0],v.points[1],v.points[2],v.points[3]);break}y!==void 0&&(T=tt.getLineLength(g.x,g.y,y.x,y.y)),ie&&(ie=!1,v=void 0)}},C="C",O=e._getTextSize(C).width+r,I=f/O-1,L=0;Lt+`.${mE}`).join(" "),$b="nodesRect",B$=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],F$={"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 $$="ontouchstart"in pe._global;function z$(t,e){if(t==="rotater")return"crosshair";e+=G.degToRad(F$[t]||0);var n=(G.radToDeg(e)%360+360)%360;return G._inRange(n,315+22.5,360)||G._inRange(n,0,22.5)?"ns-resize":G._inRange(n,45-22.5,45+22.5)?"nesw-resize":G._inRange(n,90-22.5,90+22.5)?"ew-resize":G._inRange(n,135-22.5,135+22.5)?"nwse-resize":G._inRange(n,180-22.5,180+22.5)?"ns-resize":G._inRange(n,225-22.5,225+22.5)?"nesw-resize":G._inRange(n,270-22.5,270+22.5)?"ew-resize":G._inRange(n,315-22.5,315+22.5)?"nwse-resize":(G.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var sh=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],zb=1e8;function G$(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function vE(t,e,n){const r=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),i=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return Object.assign(Object.assign({},t),{rotation:t.rotation+e,x:r,y:i})}function U$(t,e){const n=G$(t);return vE(t,e,n)}function j$(t,e,n){let r=e;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=r._attrsAffectingSize.map(s=>s+"Change."+this._getEventNamespace()).join(" ");r.on(a,i),r.on(B$.map(s=>s+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(e){let n;e.on(`dragstart.${this._getEventNamespace()}`,r=>{n=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(r,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=e.getAbsolutePosition(),a=i.x-n.x,s=i.y-n.y;this.nodes().forEach(u=>{if(u===e||u.isDragging())return;const c=u.getAbsolutePosition();u.setAbsolutePosition({x:c.x+a,y:c.y+s}),u.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache($b),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache($b,this.__getNodeRect)}__getNodeShape(e,n=this.rotation(),r){var i=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=e.getAbsoluteScale(r),s=e.getAbsolutePosition(r),u=i.x*a.x-e.offsetX()*a.x,c=i.y*a.y-e.offsetY()*a.y;const f=(pe.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:s.x+u*Math.cos(f)+c*Math.sin(-f),y:s.y+c*Math.cos(f)+u*Math.sin(f),width:i.width*a.x,height:i.height*a.y,rotation:f};return vE(h,-pe.getAngle(n),{x:0,y:0})}__getNodeRect(){var e=this.getNode();if(!e)return{x:-zb,y:-zb,width:0,height:0,rotation:0};const n=[];this.nodes().map(f=>{const h=f.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],g=f.getAbsoluteTransform();p.forEach(function(y){var v=g.point(y);n.push(v)})});const r=new Hn;r.rotate(-pe.getAngle(this.rotation()));var i,a,s,u;n.forEach(function(f){var h=r.point(f);i===void 0&&(i=s=h.x,a=u=h.y),i=Math.min(i,h.x),a=Math.min(a,h.y),s=Math.max(s,h.x),u=Math.max(u,h.y)}),r.invert();const c=r.point({x:i,y:a});return{x:c.x,y:c.y,width:s-i,height:u-a,rotation:pe.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(),sh.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor("rotater")}_createAnchor(e){var n=new ec({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:$$?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=pe.getAngle(this.rotation()),a=z$(e,i);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 e=new re({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*G._sign(this.height())-i),n.fillStrokeShape(this)},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(e),this._proxyDrag(e),e.on("dragstart",n=>{n.cancelBubble=!0}),e.on("dragmove",n=>{n.cancelBubble=!0}),e.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,a=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/a),this.cos=Math.abs(r/a),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 s=e.target.getAbsolutePosition(),u=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:u.x-s.x,y:u.y-s.y},this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(c=>{c._fire("transformstart",{evt:e.evt,target:c})})}_handleMouseMove(e){var n,r,i,a=this.findOne("."+this._movingAnchorName),s=a.getStage();s.setPointersPositions(e);const u=s.getPointerPosition();let c={x:u.x-this._anchorDragOffset.x,y:u.y-this._anchorDragOffset.y};const f=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(f,c,e)),a.setAbsolutePosition(c);const h=a.getAbsolutePosition();if(!(f.x===h.x&&f.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=a.x()-p.width/2,r=-a.y()+p.height/2;let ce=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(ce-=Math.PI);var g=pe.getAngle(this.rotation());const j=g+ce,T=pe.getAngle(this.rotationSnapTolerance()),V=j$(this.rotationSnaps(),j,T)-p.rotation,ie=U$(p,V);this._fitNodesInto(ie,e);return}var y=this.keepRatio()||e.shiftKey,S=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(y){var v=S?{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(v.x-a.x(),2)+Math.pow(v.y-a.y(),2));var w=this.findOne(".top-left").x()>v.x?-1:1,x=this.findOne(".top-left").y()>v.y?-1:1;n=i*this.cos*w,r=i*this.sin*x,this.findOne(".top-left").x(v.x-n),this.findOne(".top-left").y(v.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(a.y());else if(this._movingAnchorName==="top-right"){if(y){var v=S?{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(a.x()-v.x,2)+Math.pow(v.y-a.y(),2));var w=this.findOne(".top-right").x()v.y?-1:1;n=i*this.cos*w,r=i*this.sin*x,this.findOne(".top-right").x(v.x+n),this.findOne(".top-right").y(v.y-r)}var _=a.position();this.findOne(".top-left").y(_.y),this.findOne(".bottom-right").x(_.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(a.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(a.x());else if(this._movingAnchorName==="bottom-left"){if(y){var v=S?{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(v.x-a.x(),2)+Math.pow(a.y()-v.y,2));var w=v.x{r._fire("transformend",{evt:e,target:r})}),this._movingAnchorName=null}}_fitNodesInto(e,n){var r=this._getNodeRect();const i=1;if(G._inRange(e.width,-this.padding()*2-i,i)){this.update();return}if(G._inRange(e.height,-this.padding()*2-i,i)){this.update();return}const a=this.flipEnabled();var s=new Hn;if(s.rotate(pe.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=s.point({x:-this.padding()*2,y:0});if(e.x+=p.x,e.y+=p.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!a){this.update();return}}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=s.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.width+=this.padding()*2,!a){this.update();return}}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=s.point({x:0,y:-this.padding()*2});if(e.x+=p.x,e.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.height+=this.padding()*2,!a){this.update();return}}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=s.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.height+=this.padding()*2,!a){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,e);p?e=p:G.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const u=1e7,c=new Hn;c.translate(r.x,r.y),c.rotate(r.rotation),c.scale(r.width/u,r.height/u);const f=new Hn;f.translate(e.x,e.y),f.rotate(e.rotation),f.scale(e.width/u,e.height/u);const h=f.multiply(c.invert());this._nodes.forEach(p=>{var g;const y=p.getParent().getAbsoluteTransform(),v=p.getTransform().copy();v.translate(p.offsetX(),p.offsetY());const w=new Hn;w.multiply(y.copy().invert()).multiply(h).multiply(y).multiply(v);const x=w.decompose();p.setAttrs(x),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(g=p.getLayer())===null||g===void 0||g.batchDraw()}),this.rotation(G._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,n){this.findOne(e).setAttrs(n)}update(){var e,n=this._getNodeRect();this.rotation(G._getRotation(n.rotation));var r=n.width,i=n.height,a=this.enabledAnchors(),s=this.resizeEnabled(),u=this.padding(),c=this.anchorSize();this.find("._anchor").forEach(f=>{f.setAttrs({width:c,height:c,offsetX:c/2,offsetY:c/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:c/2+u,offsetY:c/2+u,visible:s&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:c/2+u,visible:s&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:c/2-u,offsetY:c/2+u,visible:s&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:c/2+u,visible:s&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:c/2-u,visible:s&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:c/2+u,offsetY:c/2-u,visible:s&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:c/2-u,visible:s&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:c/2-u,offsetY:c/2-u,visible:s&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*G._sign(i)-u,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}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),zs.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return se.prototype.toObject.call(this)}clone(e){var n=se.prototype.clone.call(this,e);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function H$(t){return t instanceof Array||G.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){sh.indexOf(e)===-1&&G.warn("Unknown anchor name: "+e+". Available names are: "+sh.join(", "))}),t||[]}Ke.prototype.className="Transformer";yt(Ke);A.addGetterSetter(Ke,"enabledAnchors",sh,H$);A.addGetterSetter(Ke,"flipEnabled",!0,jr());A.addGetterSetter(Ke,"resizeEnabled",!0);A.addGetterSetter(Ke,"anchorSize",10,le());A.addGetterSetter(Ke,"rotateEnabled",!0);A.addGetterSetter(Ke,"rotationSnaps",[]);A.addGetterSetter(Ke,"rotateAnchorOffset",50,le());A.addGetterSetter(Ke,"rotationSnapTolerance",5,le());A.addGetterSetter(Ke,"borderEnabled",!0);A.addGetterSetter(Ke,"anchorStroke","rgb(0, 161, 255)");A.addGetterSetter(Ke,"anchorStrokeWidth",1,le());A.addGetterSetter(Ke,"anchorFill","white");A.addGetterSetter(Ke,"anchorCornerRadius",0,le());A.addGetterSetter(Ke,"borderStroke","rgb(0, 161, 255)");A.addGetterSetter(Ke,"borderStrokeWidth",1,le());A.addGetterSetter(Ke,"borderDash");A.addGetterSetter(Ke,"keepRatio",!0);A.addGetterSetter(Ke,"centeredScaling",!1);A.addGetterSetter(Ke,"ignoreStroke",!1);A.addGetterSetter(Ke,"padding",0,le());A.addGetterSetter(Ke,"node");A.addGetterSetter(Ke,"nodes");A.addGetterSetter(Ke,"boundBoxFunc");A.addGetterSetter(Ke,"anchorDragBoundFunc");A.addGetterSetter(Ke,"shouldOverdrawWholeArea",!1);A.addGetterSetter(Ke,"useSingleNodeRotation",!0);A.backCompat(Ke,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class qi extends re{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,pe.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}qi.prototype.className="Wedge";qi.prototype._centroid=!0;qi.prototype._attrsAffectingSize=["radius"];yt(qi);A.addGetterSetter(qi,"radius",0,le());A.addGetterSetter(qi,"angle",0,le());A.addGetterSetter(qi,"clockwise",!1);A.backCompat(qi,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function Gb(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var W$=[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],V$=[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 q$(t,e){var n=t.data,r=t.width,i=t.height,a,s,u,c,f,h,p,g,y,v,w,x,_,S,C,O,I,L,D,U,X,Y,te,ce,j=e+e+1,T=r-1,$=i-1,V=e+1,ie=V*(V+1)/2,H=new Gb,K=null,Q=H,oe=null,ve=null,we=W$[e],Ue=V$[e];for(u=1;u>Ue,te!==0?(te=255/te,n[h]=(g*we>>Ue)*te,n[h+1]=(y*we>>Ue)*te,n[h+2]=(v*we>>Ue)*te):n[h]=n[h+1]=n[h+2]=0,g-=x,y-=_,v-=S,w-=C,x-=oe.r,_-=oe.g,S-=oe.b,C-=oe.a,c=p+((c=a+e+1)>Ue,te>0?(te=255/te,n[c]=(g*we>>Ue)*te,n[c+1]=(y*we>>Ue)*te,n[c+2]=(v*we>>Ue)*te):n[c]=n[c+1]=n[c+2]=0,g-=x,y-=_,v-=S,w-=C,x-=oe.r,_-=oe.g,S-=oe.b,C-=oe.a,c=a+((c=s+V)<$?c:$)*r<<2,g+=O+=oe.r=n[c],y+=I+=oe.g=n[c+1],v+=L+=oe.b=n[c+2],w+=D+=oe.a=n[c+3],oe=oe.next,x+=U=ve.r,_+=X=ve.g,S+=Y=ve.b,C+=te=ve.a,O-=U,I-=X,L-=Y,D-=te,ve=ve.next,h+=r}}const K$=function(e){var n=Math.round(this.blurRadius());n>0&&q$(e,n)};A.addGetterSetter(se,"blurRadius",0,le(),A.afterSetFilter);const Y$=function(t){var e=this.brightness()*255,n=t.data,r=n.length,i;for(i=0;i255?255:i,a=a<0?0:a>255?255:a,s=s<0?0:s>255?255:s,n[u]=i,n[u+1]=a,n[u+2]=s};A.addGetterSetter(se,"contrast",0,le(),A.afterSetFilter);const Q$=function(t){var e=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),a=0,s=0,u=t.data,c=t.width,f=t.height,h=c*4,p=f;switch(r){case"top-left":a=-1,s=-1;break;case"top":a=-1,s=0;break;case"top-right":a=-1,s=1;break;case"right":a=0,s=1;break;case"bottom-right":a=1,s=1;break;case"bottom":a=1,s=0;break;case"bottom-left":a=1,s=-1;break;case"left":a=0,s=-1;break;default:G.error("Unknown emboss direction: "+r)}do{var g=(p-1)*h,y=a;p+y<1&&(y=0),p+y>f&&(y=0);var v=(p-1+y)*c*4,w=c;do{var x=g+(w-1)*4,_=s;w+_<1&&(_=0),w+_>c&&(_=0);var S=v+(w-1+_)*4,C=u[x]-u[S],O=u[x+1]-u[S+1],I=u[x+2]-u[S+2],L=C,D=L>0?L:-L,U=O>0?O:-O,X=I>0?I:-I;if(U>D&&(L=O),X>D&&(L=I),L*=e,i){var Y=u[x]+L,te=u[x+1]+L,ce=u[x+2]+L;u[x]=Y>255?255:Y<0?0:Y,u[x+1]=te>255?255:te<0?0:te,u[x+2]=ce>255?255:ce<0?0:ce}else{var j=n-L;j<0?j=0:j>255&&(j=255),u[x]=u[x+1]=u[x+2]=j}}while(--w)}while(--p)};A.addGetterSetter(se,"embossStrength",.5,le(),A.afterSetFilter);A.addGetterSetter(se,"embossWhiteLevel",.5,le(),A.afterSetFilter);A.addGetterSetter(se,"embossDirection","top-left",null,A.afterSetFilter);A.addGetterSetter(se,"embossBlend",!1,null,A.afterSetFilter);function Mm(t,e,n,r,i){var a=n-e,s=i-r,u;return a===0?r+s/2:s===0?r:(u=(t-e)/a,u=s*u+r,u)}const J$=function(t){var e=t.data,n=e.length,r=e[0],i=r,a,s=e[1],u=s,c,f=e[2],h=f,p,g,y=this.enhance();if(y!==0){for(g=0;gi&&(i=a),c=e[g+1],cu&&(u=c),p=e[g+2],ph&&(h=p);i===r&&(i=255,r=0),u===s&&(u=255,s=0),h===f&&(h=255,f=0);var v,w,x,_,S,C,O,I,L;for(y>0?(w=i+y*(255-i),x=r-y*(r-0),S=u+y*(255-u),C=s-y*(s-0),I=h+y*(255-h),L=f-y*(f-0)):(v=(i+r)*.5,w=i+y*(i-v),x=r+y*(r-v),_=(u+s)*.5,S=u+y*(u-_),C=s+y*(s-_),O=(h+f)*.5,I=h+y*(h-O),L=f+y*(f-O)),g=0;g_?x:_;var S=s,C=a,O,I,L=360/C*Math.PI/180,D,U;for(I=0;IC?S:C;var O=s,I=a,L,D,U=n.polarRotation||0,X,Y;for(h=0;he&&(O=C,I=0,L=-1),i=0;i=0&&y=0&&v=0&&y=0&&v=255*4?255:0}return s}function fz(t,e,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),s=[],u=0;u=0&&y=0&&v=n))for(a=w;a=r||(s=(n*a+i)*4,u+=O[s+0],c+=O[s+1],f+=O[s+2],h+=O[s+3],C+=1);for(u=u/C,c=c/C,f=f/C,h=h/C,i=y;i=n))for(a=w;a=r||(s=(n*a+i)*4,O[s+0]=u,O[s+1]=c,O[s+2]=f,O[s+3]=h)}};A.addGetterSetter(se,"pixelSize",8,le(),A.afterSetFilter);const gz=function(t){var e=Math.round(this.levels()*254)+1,n=t.data,r=n.length,i=255/e,a;for(a=0;a255?255:t<0?0:Math.round(t)});A.addGetterSetter(se,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});A.addGetterSetter(se,"blue",0,zk,A.afterSetFilter);const vz=function(t){var e=t.data,n=e.length,r=this.red(),i=this.green(),a=this.blue(),s=this.alpha(),u,c;for(u=0;u255?255:t<0?0:Math.round(t)});A.addGetterSetter(se,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});A.addGetterSetter(se,"blue",0,zk,A.afterSetFilter);A.addGetterSetter(se,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});const yz=function(t){var e=t.data,n=e.length,r,i,a,s;for(r=0;r127&&(f=255-f),h>127&&(h=255-h),p>127&&(p=255-p),e[c]=f,e[c+1]=h,e[c+2]=p}while(--u)}while(--a)},_z=function(t){var e=this.threshold()*255,n=t.data,r=n.length,i;for(i=0;i{const{width:n,height:r}=e,i=document.createElement("div"),a=new Vl.Stage({container:i,width:n,height:r}),s=new Vl.Layer,u=new Vl.Layer;s.add(new Vl.Rect({...e,fill:"white"})),t.forEach(f=>u.add(new Vl.Line({points:f.points,stroke:"black",strokeWidth:f.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:f.tool==="brush"?"source-over":"destination-out"}))),a.add(s),a.add(u);const c=a.toDataURL({...e});return i.remove(),c};let yE=null,SE=null;const IH=t=>{yE=t},bz=()=>yE,LH=t=>{SE=t},MH=()=>SE,Cz=t=>{const e=window.open("");e&&t.forEach(n=>{const r=new Image;r.src=n.base64,e.document.write(n.caption),e.document.write("
"),e.document.write(r.outerHTML),e.document.write("

")})},xz=(t,e)=>Math.floor(Math.random()*(e-t+1)+t),kz=t=>{const e=bz(),{generationMode:n,generationState:r,postprocessingState:i,canvasState:a,systemState:s}=t,{codeformerFidelity:u,facetoolStrength:c,facetoolType:f,hiresFix:h,hiresStrength:p,shouldRunESRGAN:g,shouldRunFacetool:y,upscalingLevel:v,upscalingStrength:w,upscalingDenoising:x}=i,{cfgScale:_,height:S,img2imgStrength:C,infillMethod:O,initialImage:I,iterations:L,perlin:D,prompt:U,negativePrompt:X,sampler:Y,seamBlur:te,seamless:ce,seamSize:j,seamSteps:T,seamStrength:$,seed:V,seedWeights:ie,shouldFitToWidthHeight:H,shouldGenerateVariations:K,shouldRandomizeSeed:Q,steps:oe,threshold:ve,tileSize:we,variationAmount:Ue,width:At,shouldUseSymmetry:me,horizontalSymmetrySteps:Vt,verticalSymmetrySteps:Bt}=r,{shouldDisplayInProgressType:bn,saveIntermediatesInterval:_r,enableImageDebugging:Ft}=s,xe={prompt:U,iterations:L,steps:oe,cfg_scale:_,threshold:ve,perlin:D,height:S,width:At,sampler_name:Y,seed:V,progress_images:bn==="full-res",progress_latents:bn==="latents",save_intermediates:_r,generation_mode:n,init_mask:""};let Hr=!1,Pt=!1;if(X!==""&&(xe.prompt=`${U} [${X}]`),xe.seed=Q?xz(uF,cF):V,me&&(Vt>0&&(xe.h_symmetry_time_pct=Math.max(0,Math.min(1,Vt/oe))),Bt>0&&(xe.v_symmetry_time_pct=Math.max(0,Math.min(1,Bt/oe)))),n==="txt2img"&&(xe.hires_fix=h,h&&(xe.strength=p)),["txt2img","img2img"].includes(n)&&(xe.seamless=ce,g&&(Hr={level:v,denoise_str:x,strength:w}),y&&(Pt={type:f,strength:c},f==="codeformer"&&(Pt.codeformer_fidelity=u))),n==="img2img"&&I&&(xe.init_img=typeof I=="string"?I:I.url,xe.strength=C,xe.fit=H),n==="unifiedCanvas"&&e){const{layerState:{objects:gi},boundingBoxCoordinates:Xs,boundingBoxDimensions:Mn,stageScale:Fa,isMaskEnabled:Qs,shouldPreserveMaskedArea:er,boundingBoxScaleMethod:qt,scaledBoundingBoxDimensions:Dn}=a,bt={...Xs,...Mn},$a=wz(Qs?gi.filter(Jx):[],bt);xe.init_mask=$a,xe.fit=!1,xe.strength=C,xe.invert_mask=er,xe.bounding_box=bt;const Wr=e.scale();e.scale({x:1/Fa,y:1/Fa});const Co=e.getAbsolutePosition(),Vr=e.toDataURL({x:bt.x+Co.x,y:bt.y+Co.y,width:bt.width,height:bt.height});Ft&&Cz([{base64:$a,caption:"mask sent as init_mask"},{base64:Vr,caption:"image sent as init_img"}]),e.scale(Wr),xe.init_img=Vr,xe.progress_images=!1,qt!=="none"&&(xe.inpaint_width=Dn.width,xe.inpaint_height=Dn.height),xe.seam_size=j,xe.seam_blur=te,xe.seam_strength=$,xe.seam_steps=T,xe.tile_size=we,xe.infill_method=O,xe.force_outpaint=!1}return K?(xe.variation_amount=Ue,ie&&(xe.with_variations=R5(ie))):xe.variation_amount=0,Ft&&(xe.enable_image_debugging=Ft),{generationParameters:xe,esrganParameters:Hr,facetoolParameters:Pt}};var Ez=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Pz=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Oz=/[^-+\dA-Z]/g;function Ut(t,e,n,r){if(arguments.length===1&&typeof t=="string"&&!/\d/.test(t)&&(e=t,t=void 0),t=t||t===0?t:new Date,t instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");e=String(Ub[e]||e||Ub.default);var i=e.slice(0,4);(i==="UTC:"||i==="GMT:")&&(e=e.slice(4),n=!0,i==="GMT:"&&(r=!0));var a=function(){return n?"getUTC":"get"},s=function(){return t[a()+"Date"]()},u=function(){return t[a()+"Day"]()},c=function(){return t[a()+"Month"]()},f=function(){return t[a()+"FullYear"]()},h=function(){return t[a()+"Hours"]()},p=function(){return t[a()+"Minutes"]()},g=function(){return t[a()+"Seconds"]()},y=function(){return t[a()+"Milliseconds"]()},v=function(){return n?0:t.getTimezoneOffset()},w=function(){return Tz(t)},x=function(){return Rz(t)},_={d:function(){return s()},dd:function(){return Un(s())},ddd:function(){return Pn.dayNames[u()]},DDD:function(){return jb({y:f(),m:c(),d:s(),_:a(),dayName:Pn.dayNames[u()],short:!0})},dddd:function(){return Pn.dayNames[u()+7]},DDDD:function(){return jb({y:f(),m:c(),d:s(),_:a(),dayName:Pn.dayNames[u()+7]})},m:function(){return c()+1},mm:function(){return Un(c()+1)},mmm:function(){return Pn.monthNames[c()]},mmmm:function(){return Pn.monthNames[c()+12]},yy:function(){return String(f()).slice(2)},yyyy:function(){return Un(f(),4)},h:function(){return h()%12||12},hh:function(){return Un(h()%12||12)},H:function(){return h()},HH:function(){return Un(h())},M:function(){return p()},MM:function(){return Un(p())},s:function(){return g()},ss:function(){return Un(g())},l:function(){return Un(y(),3)},L:function(){return Un(Math.floor(y()/10))},t:function(){return h()<12?Pn.timeNames[0]:Pn.timeNames[1]},tt:function(){return h()<12?Pn.timeNames[2]:Pn.timeNames[3]},T:function(){return h()<12?Pn.timeNames[4]:Pn.timeNames[5]},TT:function(){return h()<12?Pn.timeNames[6]:Pn.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Az(t)},o:function(){return(v()>0?"-":"+")+Un(Math.floor(Math.abs(v())/60)*100+Math.abs(v())%60,4)},p:function(){return(v()>0?"-":"+")+Un(Math.floor(Math.abs(v())/60),2)+":"+Un(Math.floor(Math.abs(v())%60),2)},S:function(){return["th","st","nd","rd"][s()%10>3?0:(s()%100-s()%10!=10)*s()%10]},W:function(){return w()},WW:function(){return Un(w())},N:function(){return x()}};return e.replace(Ez,function(S){return S in _?_[S]():S.slice(1,S.length-1)})}var Ub={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Pn={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Un=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(e).padStart(n,"0")},jb=function(e){var n=e.y,r=e.m,i=e.d,a=e._,s=e.dayName,u=e.short,c=u===void 0?!1:u,f=new Date,h=new Date;h.setDate(h[a+"Date"]()-1);var p=new Date;p.setDate(p[a+"Date"]()+1);var g=function(){return f[a+"Date"]()},y=function(){return f[a+"Month"]()},v=function(){return f[a+"FullYear"]()},w=function(){return h[a+"Date"]()},x=function(){return h[a+"Month"]()},_=function(){return h[a+"FullYear"]()},S=function(){return p[a+"Date"]()},C=function(){return p[a+"Month"]()},O=function(){return p[a+"FullYear"]()};return v()===n&&y()===r&&g()===i?c?"Tdy":"Today":_()===n&&x()===r&&w()===i?c?"Ysd":"Yesterday":O()===n&&C()===r&&S()===i?c?"Tmw":"Tomorrow":s},Tz=function(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var a=(n-r)/(864e5*7);return 1+Math.floor(a)},Rz=function(e){var n=e.getDay();return n===0&&(n=7),n},Az=function(e){return(String(e).match(Pz)||[""]).pop().replace(Oz,"").replace(/GMT\+0000/g,"UTC")};const Iz=(t,e)=>{const{dispatch:n,getState:r}=t;return{emitGenerateImage:i=>{n(ei(!0));const a=r(),{generation:s,postprocessing:u,system:c,canvas:f}=a,h={generationMode:i,generationState:s,postprocessingState:u,canvasState:f,systemState:c};n(gB());const{generationParameters:p,esrganParameters:g,facetoolParameters:y}=kz(h);e.emit("generateImage",p,g,y),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...g,...y})}`}))},emitRunESRGAN:i=>{n(ei(!0));const{postprocessing:{upscalingLevel:a,upscalingDenoising:s,upscalingStrength:u}}=r(),c={upscale:[a,s,u]};e.emit("runPostprocessing",i,{type:"esrgan",...c}),n(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...c})}`}))},emitRunFacetool:i=>{n(ei(!0));const{postprocessing:{facetoolType:a,facetoolStrength:s,codeformerFidelity:u}}=r(),c={facetool_strength:s};a==="codeformer"&&(c.codeformer_fidelity=u),e.emit("runPostprocessing",i,{type:a,...c}),n(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...c})}`}))},emitDeleteImage:i=>{const{url:a,uuid:s,category:u,thumbnail:c}=i;n(tk(i)),e.emit("deleteImage",a,c,s,u)},emitRequestImages:i=>{const a=r().gallery,{earliest_mtime:s}=a.categories[i];e.emit("requestImages",i,s)},emitRequestNewImages:i=>{const a=r().gallery,{latest_mtime:s}=a.categories[i];e.emit("requestLatestImages",i,s)},emitCancelProcessing:()=>{e.emit("cancel")},emitRequestSystemConfig:()=>{e.emit("requestSystemConfig")},emitSearchForModels:i=>{e.emit("searchForModels",i)},emitAddNewModel:i=>{e.emit("addNewModel",i)},emitDeleteModel:i=>{e.emit("deleteModel",i)},emitConvertToDiffusers:i=>{n(hB()),e.emit("convertToDiffusers",i)},emitMergeDiffusersModels:i=>{n(pB()),e.emit("mergeDiffusersModels",i)},emitRequestModelChange:i=>{n(dB()),e.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{e.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{e.emit("requestEmptyTempFolder")}}};let Vf;const Lz=new Uint8Array(16);function Mz(){if(!Vf&&(Vf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Vf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vf(Lz)}const Qt=[];for(let t=0;t<256;++t)Qt.push((t+256).toString(16).slice(1));function Dz(t,e=0){return(Qt[t[e+0]]+Qt[t[e+1]]+Qt[t[e+2]]+Qt[t[e+3]]+"-"+Qt[t[e+4]]+Qt[t[e+5]]+"-"+Qt[t[e+6]]+Qt[t[e+7]]+"-"+Qt[t[e+8]]+Qt[t[e+9]]+"-"+Qt[t[e+10]]+Qt[t[e+11]]+Qt[t[e+12]]+Qt[t[e+13]]+Qt[t[e+14]]+Qt[t[e+15]]).toLowerCase()}const Nz=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Hb={randomUUID:Nz};function qf(t,e,n){if(Hb.randomUUID&&!e&&!t)return Hb.randomUUID();t=t||{};const r=t.random||(t.rng||Mz)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return Dz(r)}const DH=dt("socketio/generateImage"),NH=dt("socketio/runESRGAN"),BH=dt("socketio/runFacetool"),FH=dt("socketio/deleteImage"),Wb=dt("socketio/requestImages"),Vb=dt("socketio/requestNewImages"),$H=dt("socketio/cancelProcessing"),Bz=dt("socketio/requestSystemConfig"),zH=dt("socketio/searchForModels"),GH=dt("socketio/addNewModel"),UH=dt("socketio/deleteModel"),jH=dt("socketio/convertToDiffusers"),HH=dt("socketio/mergeDiffusersModels"),WH=dt("socketio/requestModelChange"),VH=dt("socketio/saveStagingAreaImageToGallery"),qH=dt("socketio/requestEmptyTempFolder"),Fz=t=>{const{dispatch:e,getState:n}=t;return{onConnect:()=>{try{e(ub(!0)),e(ns(Ae.t("common.statusConnected"))),e(Bz());const r=n().gallery;r.categories.result.latest_mtime?e(Vb("result")):e(Wb("result")),r.categories.user.latest_mtime?e(Vb("user")):e(Wb("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{e(ub(!1)),e(ns(Ae.t("common.statusDisconnected"))),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{activeTab:a}=i.ui,{shouldLoopback:s}=i.postprocessing,{boundingBox:u,generationMode:c,...f}=r,h={uuid:qf(),...f};if(["txt2img","img2img"].includes(c)&&e(Tf({category:"result",image:{...h,category:"result"}})),c==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;e(y5({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&e(Tf({image:{...h,category:"result"},category:"result"}))}if(s)switch(bk[a]){case"img2img":{e(M5(h));break}}e(Cm()),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{e(b5({uuid:qf(),...r,category:"result"})),r.isBase64||e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{e(Tf({category:"result",image:{uuid:qf(),...r,category:"result"}})),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{e(ei(!0)),e(uB(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:a}=r;try{e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),e(cb()),e(Cm())}catch(s){console.error(s)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:a,category:s}=r,u=i.map(c=>({uuid:qf(),...c}));e(w5({images:u,areMoreImagesAvailable:a,category:s})),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{e(fB());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(e(Tf({category:"result",image:r})),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),e(Cm())),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;e(tk(r));const{generation:{initialImage:a,maskPath:s}}=n();(a===i||(a==null?void 0:a.url)===i)&&e(I5()),s===i&&e(D5("")),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{e(cB(r)),r.infill_methods.includes("patchmatch")||e(L5(r.infill_methods[0]))},onFoundModels:r=>{const{search_folder:i,found_models:a}=r;e(mB(i)),e(vB(a))},onNewModelAdded:r=>{const{new_model_name:i,model_list:a,update:s}=r;e(rs(a)),e(ei(!1)),e(ns(Ae.t("modelManager.modelAdded"))),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Model Added: ${i}`,level:"info"})),e(zl({title:s?`${Ae.t("modelManager.modelUpdated")}: ${i}`:`${Ae.t("modelManager.modelAdded")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelDeleted:r=>{const{deleted_model_name:i,model_list:a}=r;e(rs(a)),e(ei(!1)),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`${Ae.t("modelManager.modelAdded")}: ${i}`,level:"info"})),e(zl({title:`${Ae.t("modelManager.modelEntryDeleted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelConverted:r=>{const{converted_model_name:i,model_list:a}=r;e(rs(a)),e(ns(Ae.t("common.statusModelConverted"))),e(ei(!1)),e(If(!0)),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Model converted: ${i}`,level:"info"})),e(zl({title:`${Ae.t("modelManager.modelConverted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelsMerged:r=>{const{merged_models:i,merged_model_name:a,model_list:s}=r;e(rs(s)),e(ns(Ae.t("common.statusMergedModels"))),e(ei(!1)),e(If(!0)),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Models merged: ${i}`,level:"info"})),e(zl({title:`${Ae.t("modelManager.modelsMerged")}: ${a}`,status:"success",duration:2500,isClosable:!0}))},onModelChanged:r=>{const{model_name:i,model_list:a}=r;e(rs(a)),e(ns(Ae.t("common.statusModelChanged"))),e(ei(!1)),e(If(!0)),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:a}=r;e(rs(a)),e(ei(!1)),e(If(!0)),e(cb()),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{e(zl({title:Ae.t("toast.tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}},$z=()=>{const{origin:t}=new URL(window.location.href),e=md(t,{timeout:6e4,path:`${window.location.pathname}socket.io`});let n=!1;return i=>a=>s=>{const{onConnect:u,onDisconnect:c,onError:f,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:g,onProgressUpdate:y,onGalleryImages:v,onProcessingCanceled:w,onImageDeleted:x,onSystemConfig:_,onModelChanged:S,onFoundModels:C,onNewModelAdded:O,onModelDeleted:I,onModelConverted:L,onModelsMerged:D,onModelChangeFailed:U,onTempFolderEmptied:X}=Fz(i),{emitGenerateImage:Y,emitRunESRGAN:te,emitRunFacetool:ce,emitDeleteImage:j,emitRequestImages:T,emitRequestNewImages:$,emitCancelProcessing:V,emitRequestSystemConfig:ie,emitSearchForModels:H,emitAddNewModel:K,emitDeleteModel:Q,emitConvertToDiffusers:oe,emitMergeDiffusersModels:ve,emitRequestModelChange:we,emitSaveStagingAreaImageToGallery:Ue,emitRequestEmptyTempFolder:At}=Iz(i,e);switch(n||(e.on("connect",()=>u()),e.on("disconnect",()=>c()),e.on("error",me=>f(me)),e.on("generationResult",me=>p(me)),e.on("postprocessingResult",me=>h(me)),e.on("intermediateResult",me=>g(me)),e.on("progressUpdate",me=>y(me)),e.on("galleryImages",me=>v(me)),e.on("processingCanceled",()=>{w()}),e.on("imageDeleted",me=>{x(me)}),e.on("systemConfig",me=>{_(me)}),e.on("foundModels",me=>{C(me)}),e.on("newModelAdded",me=>{O(me)}),e.on("modelDeleted",me=>{I(me)}),e.on("modelConverted",me=>{L(me)}),e.on("modelsMerged",me=>{D(me)}),e.on("modelChanged",me=>{S(me)}),e.on("modelChangeFailed",me=>{U(me)}),e.on("tempFolderEmptied",()=>{X()}),n=!0),s.type){case"socketio/generateImage":{Y(s.payload);break}case"socketio/runESRGAN":{te(s.payload);break}case"socketio/runFacetool":{ce(s.payload);break}case"socketio/deleteImage":{j(s.payload);break}case"socketio/requestImages":{T(s.payload);break}case"socketio/requestNewImages":{$(s.payload);break}case"socketio/cancelProcessing":{V();break}case"socketio/requestSystemConfig":{ie();break}case"socketio/searchForModels":{H(s.payload);break}case"socketio/addNewModel":{K(s.payload);break}case"socketio/deleteModel":{Q(s.payload);break}case"socketio/convertToDiffusers":{oe(s.payload);break}case"socketio/mergeDiffusersModels":{ve(s.payload);break}case"socketio/requestModelChange":{we(s.payload);break}case"socketio/saveStagingAreaImageToGallery":{Ue(s.payload);break}case"socketio/requestEmptyTempFolder":{At();break}}a(s)}},zz=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(t=>`canvas.${t}`),Gz=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps","openModel","cancelOptions.cancelAfter"].map(t=>`system.${t}`),Uz=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(t=>`gallery.${t}`),_E=$x({generation:N5,postprocessing:F5,gallery:C5,system:yB,canvas:S5,ui:wB,lightbox:E5}),jz=Xx.getPersistConfig({key:"root",storage:Yx,rootReducer:_E,blacklist:[...zz,...Gz,...Uz],debounce:300}),Hz=JN(jz,_E),wE=ON({reducer:Hz,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat($z()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Wz=i5(wE);function Vz(t){if(t.sheet)return t.sheet;for(var e=0;e0?en(Ys,--Ln):0,Gs--,Ot===10&&(Gs=1,rp--),Ot}function Kn(){return Ot=Ln2||Wu(Ot)>3?"":" "}function i6(t,e){for(;--e&&Kn()&&!(Ot<48||Ot>102||Ot>57&&Ot<65||Ot>70&&Ot<97););return tc(t,_d()+(e<6&&ci()==32&&Kn()==32))}function cy(t){for(;Kn();)switch(Ot){case t:return Ln;case 34:case 39:t!==34&&t!==39&&cy(Ot);break;case 40:t===41&&cy(t);break;case 92:Kn();break}return Ln}function a6(t,e){for(;Kn()&&t+Ot!==47+10;)if(t+Ot===42+42&&ci()===47)break;return"/*"+tc(e,Ln-1)+"*"+np(t===47?t:Kn())}function o6(t){for(;!Wu(ci());)Kn();return tc(t,Ln)}function s6(t){return PE(bd("",null,null,null,[""],t=EE(t),0,[0],t))}function bd(t,e,n,r,i,a,s,u,c){for(var f=0,h=0,p=s,g=0,y=0,v=0,w=1,x=1,_=1,S=0,C="",O=i,I=a,L=r,D=C;x;)switch(v=S,S=Kn()){case 40:if(v!=108&&en(D,p-1)==58){uy(D+=qe(wd(S),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:D+=wd(S);break;case 9:case 10:case 13:case 32:D+=r6(v);break;case 92:D+=i6(_d()-1,7);continue;case 47:switch(ci()){case 42:case 47:Kf(l6(a6(Kn(),_d()),e,n),c);break;default:D+="/"}break;case 123*w:u[f++]=ti(D)*_;case 125*w:case 59:case 0:switch(S){case 0:case 125:x=0;case 59+h:y>0&&ti(D)-p&&Kf(y>32?Kb(D+";",r,n,p-1):Kb(qe(D," ","")+";",r,n,p-2),c);break;case 59:D+=";";default:if(Kf(L=qb(D,e,n,f,h,i,u,C,O=[],I=[],p),a),S===123)if(h===0)bd(D,e,L,L,O,a,p,u,I);else switch(g===99&&en(D,3)===110?100:g){case 100:case 109:case 115:bd(t,L,L,r&&Kf(qb(t,L,L,0,0,i,u,C,i,O=[],p),I),i,I,p,u,r?O:I);break;default:bd(D,L,L,L,[""],I,0,u,I)}}f=h=y=0,w=_=1,C=D="",p=s;break;case 58:p=1+ti(D),y=v;default:if(w<1){if(S==123)--w;else if(S==125&&w++==0&&n6()==125)continue}switch(D+=np(S),S*w){case 38:_=h>0?1:(D+="\f",-1);break;case 44:u[f++]=(ti(D)-1)*_,_=1;break;case 64:ci()===45&&(D+=wd(Kn())),g=ci(),h=p=ti(C=D+=o6(_d())),S++;break;case 45:v===45&&ti(D)==2&&(w=0)}}return a}function qb(t,e,n,r,i,a,s,u,c,f,h){for(var p=i-1,g=i===0?a:[""],y=$0(g),v=0,w=0,x=0;v0?g[_]+" "+S:qe(S,/&\f/g,g[_])))&&(c[x++]=C);return ip(t,e,n,i===0?B0:u,c,f,h)}function l6(t,e,n){return ip(t,e,n,bE,np(t6()),Hu(t,2,-2),0)}function Kb(t,e,n,r){return ip(t,e,n,F0,Hu(t,0,r),Hu(t,r+1,-1),r)}function Rs(t,e){for(var n="",r=$0(t),i=0;i6)switch(en(t,e+1)){case 109:if(en(t,e+4)!==45)break;case 102:return qe(t,/(.+:)(.+)-([^]+)/,"$1"+We+"$2-$3$1"+lh+(en(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~uy(t,"stretch")?TE(qe(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(en(t,e+1)!==115)break;case 6444:switch(en(t,ti(t)-3-(~uy(t,"!important")&&10))){case 107:return qe(t,":",":"+We)+t;case 101:return qe(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+We+(en(t,14)===45?"inline-":"")+"box$3$1"+We+"$2$3$1"+ln+"$2box$3")+t}break;case 5936:switch(en(t,e+11)){case 114:return We+t+ln+qe(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return We+t+ln+qe(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return We+t+ln+qe(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return We+t+ln+t+t}return t}var v6=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case F0:e.return=TE(e.value,e.length);break;case CE:return Rs([ql(e,{value:qe(e.value,"@","@"+We)})],i);case B0:if(e.length)return e6(e.props,function(a){switch(Zz(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rs([ql(e,{props:[qe(a,/:(read-\w+)/,":"+lh+"$1")]})],i);case"::placeholder":return Rs([ql(e,{props:[qe(a,/:(plac\w+)/,":"+We+"input-$1")]}),ql(e,{props:[qe(a,/:(plac\w+)/,":"+lh+"$1")]}),ql(e,{props:[qe(a,/:(plac\w+)/,ln+"input-$1")]})],i)}return""})}},y6=[v6],S6=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var x=w.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=e.stylisPlugins||y6,a={},s,u=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var x=w.getAttribute("data-emotion").split(" "),_=1;_=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var C6={animationIterationCount: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},x6=/[A-Z]|^ms/g,k6=/_EMO_([^_]+?)_([^]*?)_EMO_/g,IE=function(e){return e.charCodeAt(1)===45},Qb=function(e){return e!=null&&typeof e!="boolean"},Dm=OE(function(t){return IE(t)?t:t.replace(x6,"-$&").toLowerCase()}),Jb=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(k6,function(r,i,a){return ni={name:i,styles:a,next:ni},i})}return C6[e]!==1&&!IE(e)&&typeof n=="number"&&n!==0?n+"px":n};function Vu(t,e,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 ni={name:n.name,styles:n.styles,next:ni},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ni={name:r.name,styles:r.styles,next:ni},r=r.next;var i=n.styles+";";return i}return E6(t,e,n)}case"function":{if(t!==void 0){var a=ni,s=n(t);return ni=a,Vu(t,e,s)}break}}if(e==null)return n;var u=e[n];return u!==void 0?u:n}function E6(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i` or ``");return t}var NE=be.createContext({});NE.displayName="ColorModeContext";function BE(){const t=be.useContext(NE);if(t===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return t}function M6(){const t=BE(),e=L6();return{...t,theme:e}}var FE=(...t)=>t.filter(Boolean).join(" ");function D6(){return!1}function zr(t){const e=typeof t;return t!=null&&(e==="object"||e==="function")&&!Array.isArray(t)}var XH=t=>{const{condition:e,message:n}=t;e&&D6()&&console.warn(n)};function io(t,...e){return N6(t)?t(...e):t}var N6=t=>typeof t=="function",QH=t=>t?"":void 0,JH=t=>t?!0:void 0;function ZH(...t){return function(n){t.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function eW(...t){return function(n){t.forEach(r=>{r==null||r(n)})}}var uh={},B6={get exports(){return uh},set exports(t){uh=t}};(function(t,e){var n=200,r="__lodash_hash_undefined__",i=800,a=16,s=9007199254740991,u="[object Arguments]",c="[object Array]",f="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",g="[object Error]",y="[object Function]",v="[object GeneratorFunction]",w="[object Map]",x="[object Number]",_="[object Null]",S="[object Object]",C="[object Proxy]",O="[object RegExp]",I="[object Set]",L="[object String]",D="[object Undefined]",U="[object WeakMap]",X="[object ArrayBuffer]",Y="[object DataView]",te="[object Float32Array]",ce="[object Float64Array]",j="[object Int8Array]",T="[object Int16Array]",$="[object Int32Array]",V="[object Uint8Array]",ie="[object Uint8ClampedArray]",H="[object Uint16Array]",K="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,oe=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,we={};we[te]=we[ce]=we[j]=we[T]=we[$]=we[V]=we[ie]=we[H]=we[K]=!0,we[u]=we[c]=we[X]=we[h]=we[Y]=we[p]=we[g]=we[y]=we[w]=we[x]=we[S]=we[O]=we[I]=we[L]=we[U]=!1;var Ue=typeof yn=="object"&&yn&&yn.Object===Object&&yn,At=typeof self=="object"&&self&&self.Object===Object&&self,me=Ue||At||Function("return this")(),Vt=e&&!e.nodeType&&e,Bt=Vt&&!0&&t&&!t.nodeType&&t,bn=Bt&&Bt.exports===Vt,_r=bn&&Ue.process,Ft=function(){try{var P=Bt&&Bt.require&&Bt.require("util").types;return P||_r&&_r.binding&&_r.binding("util")}catch{}}(),xe=Ft&&Ft.isTypedArray;function Hr(P,N,W){switch(W.length){case 0:return P.call(N);case 1:return P.call(N,W[0]);case 2:return P.call(N,W[0],W[1]);case 3:return P.call(N,W[0],W[1],W[2])}return P.apply(N,W)}function Pt(P,N){for(var W=-1,fe=Array(P);++W-1}function mp(P,N){var W=this.__data__,fe=yi(W,P);return fe<0?(++this.size,W.push([P,N])):W[fe][1]=N,this}Cr.prototype.clear=tl,Cr.prototype.delete=pp,Cr.prototype.get=nl,Cr.prototype.has=gp,Cr.prototype.set=mp;function Xi(P){var N=-1,W=P==null?0:P.length;for(this.clear();++N1?W[Ie-1]:void 0,Ee=Ie>2?W[2]:void 0;for(Ye=P.length>3&&typeof Ye=="function"?(Ie--,Ye):void 0,Ee&&pc(W[0],W[1],Ee)&&(Ye=Ie<3?void 0:Ye,Ie=1),N=Object(N);++fe-1&&P%1==0&&P0){if(++N>=i)return arguments[0]}else N=0;return P.apply(void 0,arguments)}}function Sc(P){if(P!=null){try{return Dn.call(P)}catch{}try{return P+""}catch{}}return""}function Mo(P,N){return P===N||P!==P&&N!==N}var ul=il(function(){return arguments}())?il:function(P){return za(P)&&bt.call(P,"callee")&&!Js.call(P,"callee")},cl=Array.isArray;function Do(P){return P!=null&&wc(P.length)&&!fl(P)}function Dp(P){return za(P)&&Do(P)}var _c=sp||Fp;function fl(P){if(!xr(P))return!1;var N=To(P);return N==y||N==v||N==f||N==C}function wc(P){return typeof P=="number"&&P>-1&&P%1==0&&P<=s}function xr(P){var N=typeof P;return P!=null&&(N=="object"||N=="function")}function za(P){return P!=null&&typeof P=="object"}function Np(P){if(!za(P)||To(P)!=S)return!1;var N=Po(P);if(N===null)return!0;var W=bt.call(N,"constructor")&&N.constructor;return typeof W=="function"&&W instanceof W&&Dn.call(W)==Co}var bc=xe?gi(xe):ac;function Bp(P){return cc(P,Cc(P))}function Cc(P){return Do(P)?Pp(P,!0):Rp(P)}var nt=Ro(function(P,N,W,fe){oc(P,N,W,fe)});function et(P){return function(){return P}}function xc(P){return P}function Fp(){return!1}t.exports=nt})(B6,uh);const ai=uh;var F6=t=>/!(important)?$/.test(t),t2=t=>typeof t=="string"?t.replace(/!(important)?$/,"").trim():t,$6=(t,e)=>n=>{const r=String(e),i=F6(r),a=t2(r),s=t?`${t}.${a}`:a;let u=zr(n.__cssMap)&&s in n.__cssMap?n.__cssMap[s].varRef:e;return u=t2(u),i?`${u} !important`:u};function G0(t){const{scale:e,transform:n,compose:r}=t;return(a,s)=>{var u;const c=$6(e,a)(s);let f=(u=n==null?void 0:n(c,s))!=null?u:c;return r&&(f=r(f,s)),f}}var Yf=(...t)=>e=>t.reduce((n,r)=>r(n),e);function Ar(t,e){return n=>{const r={property:n,scale:t};return r.transform=G0({scale:t,transform:e}),r}}var z6=({rtl:t,ltr:e})=>n=>n.direction==="rtl"?t:e;function G6(t){const{property:e,scale:n,transform:r}=t;return{scale:n,property:z6(e),transform:n?G0({scale:n,compose:r}):r}}var $E=["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 U6(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...$E].join(" ")}function j6(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...$E].join(" ")}var H6={"--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(" ")},W6={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 V6(t){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":t,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var q6={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},fy={"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"},K6=new Set(Object.values(fy)),zE=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Y6=t=>t.trim();function X6(t,e){if(t==null||zE.has(t))return t;const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(t),i=r==null?void 0:r[1],a=r==null?void 0:r[2];if(!i||!a)return t;const s=i.includes("-gradient")?i:`${i}-gradient`,[u,...c]=a.split(",").map(Y6).filter(Boolean);if((c==null?void 0:c.length)===0)return t;const f=u in fy?fy[u]:u;c.unshift(f);const h=c.map(p=>{if(K6.has(p))return p;const g=p.indexOf(" "),[y,v]=g!==-1?[p.substr(0,g),p.substr(g+1)]:[p],w=GE(v)?v:v&&v.split(" "),x=`colors.${y}`,_=x in e.__cssMap?e.__cssMap[x].varRef:y;return w?[_,...Array.isArray(w)?w:[w]].join(" "):_});return`${s}(${h.join(", ")})`}var GE=t=>typeof t=="string"&&t.includes("(")&&t.includes(")"),Q6=(t,e)=>X6(t,e??{});function J6(t){return/^var\(--.+\)$/.test(t)}var Z6=t=>{const e=parseFloat(t.toString()),n=t.toString().replace(String(e),"");return{unitless:!n,value:e,unit:n}},Jr=t=>e=>`${t}(${e})`,Fe={filter(t){return t!=="auto"?t:H6},backdropFilter(t){return t!=="auto"?t:W6},ring(t){return V6(Fe.px(t))},bgClip(t){return t==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:t}},transform(t){return t==="auto"?U6():t==="auto-gpu"?j6():t},vh(t){return t==="$100vh"?"var(--chakra-vh)":t},px(t){if(t==null)return t;const{unitless:e}=Z6(t);return e||typeof t=="number"?`${t}px`:t},fraction(t){return typeof t!="number"||t>1?t:`${t*100}%`},float(t,e){const n={left:"right",right:"left"};return e.direction==="rtl"?n[t]:t},degree(t){if(J6(t)||t==null)return t;const e=typeof t=="string"&&!t.endsWith("deg");return typeof t=="number"||e?`${t}deg`:t},gradient:Q6,blur:Jr("blur"),opacity:Jr("opacity"),brightness:Jr("brightness"),contrast:Jr("contrast"),dropShadow:Jr("drop-shadow"),grayscale:Jr("grayscale"),hueRotate:Jr("hue-rotate"),invert:Jr("invert"),saturate:Jr("saturate"),sepia:Jr("sepia"),bgImage(t){return t==null||GE(t)||zE.has(t)?t:`url(${t})`},outline(t){const e=String(t)==="0"||String(t)==="none";return t!==null&&e?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:t}},flexDirection(t){var e;const{space:n,divide:r}=(e=q6[t])!=null?e:{},i={flexDirection:t};return n&&(i[n]=1),r&&(i[r]=1),i}},B={borderWidths:Ar("borderWidths"),borderStyles:Ar("borderStyles"),colors:Ar("colors"),borders:Ar("borders"),radii:Ar("radii",Fe.px),space:Ar("space",Yf(Fe.vh,Fe.px)),spaceT:Ar("space",Yf(Fe.vh,Fe.px)),degreeT(t){return{property:t,transform:Fe.degree}},prop(t,e,n){return{property:t,scale:e,...e&&{transform:G0({scale:e,transform:n})}}},propT(t,e){return{property:t,transform:e}},sizes:Ar("sizes",Yf(Fe.vh,Fe.px)),sizesT:Ar("sizes",Yf(Fe.vh,Fe.fraction)),shadows:Ar("shadows"),logical:G6,blur:Ar("blur",Fe.blur)},Cd={background:B.colors("background"),backgroundColor:B.colors("backgroundColor"),backgroundImage:B.propT("backgroundImage",Fe.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Fe.bgClip},bgSize:B.prop("backgroundSize"),bgPosition:B.prop("backgroundPosition"),bg:B.colors("background"),bgColor:B.colors("backgroundColor"),bgPos:B.prop("backgroundPosition"),bgRepeat:B.prop("backgroundRepeat"),bgAttachment:B.prop("backgroundAttachment"),bgGradient:B.propT("backgroundImage",Fe.gradient),bgClip:{transform:Fe.bgClip}};Object.assign(Cd,{bgImage:Cd.backgroundImage,bgImg:Cd.backgroundImage});var He={border:B.borders("border"),borderWidth:B.borderWidths("borderWidth"),borderStyle:B.borderStyles("borderStyle"),borderColor:B.colors("borderColor"),borderRadius:B.radii("borderRadius"),borderTop:B.borders("borderTop"),borderBlockStart:B.borders("borderBlockStart"),borderTopLeftRadius:B.radii("borderTopLeftRadius"),borderStartStartRadius:B.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:B.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:B.radii("borderTopRightRadius"),borderStartEndRadius:B.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:B.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:B.borders("borderRight"),borderInlineEnd:B.borders("borderInlineEnd"),borderBottom:B.borders("borderBottom"),borderBlockEnd:B.borders("borderBlockEnd"),borderBottomLeftRadius:B.radii("borderBottomLeftRadius"),borderBottomRightRadius:B.radii("borderBottomRightRadius"),borderLeft:B.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:B.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:B.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:B.borders(["borderLeft","borderRight"]),borderInline:B.borders("borderInline"),borderY:B.borders(["borderTop","borderBottom"]),borderBlock:B.borders("borderBlock"),borderTopWidth:B.borderWidths("borderTopWidth"),borderBlockStartWidth:B.borderWidths("borderBlockStartWidth"),borderTopColor:B.colors("borderTopColor"),borderBlockStartColor:B.colors("borderBlockStartColor"),borderTopStyle:B.borderStyles("borderTopStyle"),borderBlockStartStyle:B.borderStyles("borderBlockStartStyle"),borderBottomWidth:B.borderWidths("borderBottomWidth"),borderBlockEndWidth:B.borderWidths("borderBlockEndWidth"),borderBottomColor:B.colors("borderBottomColor"),borderBlockEndColor:B.colors("borderBlockEndColor"),borderBottomStyle:B.borderStyles("borderBottomStyle"),borderBlockEndStyle:B.borderStyles("borderBlockEndStyle"),borderLeftWidth:B.borderWidths("borderLeftWidth"),borderInlineStartWidth:B.borderWidths("borderInlineStartWidth"),borderLeftColor:B.colors("borderLeftColor"),borderInlineStartColor:B.colors("borderInlineStartColor"),borderLeftStyle:B.borderStyles("borderLeftStyle"),borderInlineStartStyle:B.borderStyles("borderInlineStartStyle"),borderRightWidth:B.borderWidths("borderRightWidth"),borderInlineEndWidth:B.borderWidths("borderInlineEndWidth"),borderRightColor:B.colors("borderRightColor"),borderInlineEndColor:B.colors("borderInlineEndColor"),borderRightStyle:B.borderStyles("borderRightStyle"),borderInlineEndStyle:B.borderStyles("borderInlineEndStyle"),borderTopRadius:B.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:B.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:B.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:B.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(He,{rounded:He.borderRadius,roundedTop:He.borderTopRadius,roundedTopLeft:He.borderTopLeftRadius,roundedTopRight:He.borderTopRightRadius,roundedTopStart:He.borderStartStartRadius,roundedTopEnd:He.borderStartEndRadius,roundedBottom:He.borderBottomRadius,roundedBottomLeft:He.borderBottomLeftRadius,roundedBottomRight:He.borderBottomRightRadius,roundedBottomStart:He.borderEndStartRadius,roundedBottomEnd:He.borderEndEndRadius,roundedLeft:He.borderLeftRadius,roundedRight:He.borderRightRadius,roundedStart:He.borderInlineStartRadius,roundedEnd:He.borderInlineEndRadius,borderStart:He.borderInlineStart,borderEnd:He.borderInlineEnd,borderTopStartRadius:He.borderStartStartRadius,borderTopEndRadius:He.borderStartEndRadius,borderBottomStartRadius:He.borderEndStartRadius,borderBottomEndRadius:He.borderEndEndRadius,borderStartRadius:He.borderInlineStartRadius,borderEndRadius:He.borderInlineEndRadius,borderStartWidth:He.borderInlineStartWidth,borderEndWidth:He.borderInlineEndWidth,borderStartColor:He.borderInlineStartColor,borderEndColor:He.borderInlineEndColor,borderStartStyle:He.borderInlineStartStyle,borderEndStyle:He.borderInlineEndStyle});var e8={color:B.colors("color"),textColor:B.colors("color"),fill:B.colors("fill"),stroke:B.colors("stroke")},dy={boxShadow:B.shadows("boxShadow"),mixBlendMode:!0,blendMode:B.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:B.prop("backgroundBlendMode"),opacity:!0};Object.assign(dy,{shadow:dy.boxShadow});var t8={filter:{transform:Fe.filter},blur:B.blur("--chakra-blur"),brightness:B.propT("--chakra-brightness",Fe.brightness),contrast:B.propT("--chakra-contrast",Fe.contrast),hueRotate:B.degreeT("--chakra-hue-rotate"),invert:B.propT("--chakra-invert",Fe.invert),saturate:B.propT("--chakra-saturate",Fe.saturate),dropShadow:B.propT("--chakra-drop-shadow",Fe.dropShadow),backdropFilter:{transform:Fe.backdropFilter},backdropBlur:B.blur("--chakra-backdrop-blur"),backdropBrightness:B.propT("--chakra-backdrop-brightness",Fe.brightness),backdropContrast:B.propT("--chakra-backdrop-contrast",Fe.contrast),backdropHueRotate:B.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:B.propT("--chakra-backdrop-invert",Fe.invert),backdropSaturate:B.propT("--chakra-backdrop-saturate",Fe.saturate)},ch={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Fe.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:B.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:B.space("gap"),rowGap:B.space("rowGap"),columnGap:B.space("columnGap")};Object.assign(ch,{flexDir:ch.flexDirection});var UE={gridGap:B.space("gridGap"),gridColumnGap:B.space("gridColumnGap"),gridRowGap:B.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},n8={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Fe.outline},outlineOffset:!0,outlineColor:B.colors("outlineColor")},lr={width:B.sizesT("width"),inlineSize:B.sizesT("inlineSize"),height:B.sizes("height"),blockSize:B.sizes("blockSize"),boxSize:B.sizes(["width","height"]),minWidth:B.sizes("minWidth"),minInlineSize:B.sizes("minInlineSize"),minHeight:B.sizes("minHeight"),minBlockSize:B.sizes("minBlockSize"),maxWidth:B.sizes("maxWidth"),maxInlineSize:B.sizes("maxInlineSize"),maxHeight:B.sizes("maxHeight"),maxBlockSize:B.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,hideFrom:{scale:"breakpoints",transform:(t,e)=>{var n,r,i;return{[(i=(r=(n=e.__breakpoints)==null?void 0:n.get(t))==null?void 0:r.minWQuery)!=null?i:`@media screen and (min-width: ${t})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(t,e)=>{var n,r,i;return{[(i=(r=(n=e.__breakpoints)==null?void 0:n.get(t))==null?void 0:r.maxWQuery)!=null?i:`@media screen and (max-width: ${t})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:B.propT("float",Fe.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(lr,{w:lr.width,h:lr.height,minW:lr.minWidth,maxW:lr.maxWidth,minH:lr.minHeight,maxH:lr.maxHeight,overscroll:lr.overscrollBehavior,overscrollX:lr.overscrollBehaviorX,overscrollY:lr.overscrollBehaviorY});var r8={listStyleType:!0,listStylePosition:!0,listStylePos:B.prop("listStylePosition"),listStyleImage:!0,listStyleImg:B.prop("listStyleImage")};function i8(t,e,n,r){const i=typeof e=="string"?e.split("."):[e];for(r=0;r{const e=new WeakMap;return(r,i,a,s)=>{if(typeof r>"u")return t(r,i,a);e.has(r)||e.set(r,new Map);const u=e.get(r);if(u.has(i))return u.get(i);const c=t(r,i,a,s);return u.set(i,c),c}},o8=a8(i8),s8={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},l8={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Nm=(t,e,n)=>{const r={},i=o8(t,e,{});for(const a in i)a in n&&n[a]!=null||(r[a]=i[a]);return r},u8={srOnly:{transform(t){return t===!0?s8:t==="focusable"?l8:{}}},layerStyle:{processResult:!0,transform:(t,e,n)=>Nm(e,`layerStyles.${t}`,n)},textStyle:{processResult:!0,transform:(t,e,n)=>Nm(e,`textStyles.${t}`,n)},apply:{processResult:!0,transform:(t,e,n)=>Nm(e,t,n)}},Su={position:!0,pos:B.prop("position"),zIndex:B.prop("zIndex","zIndices"),inset:B.spaceT("inset"),insetX:B.spaceT(["left","right"]),insetInline:B.spaceT("insetInline"),insetY:B.spaceT(["top","bottom"]),insetBlock:B.spaceT("insetBlock"),top:B.spaceT("top"),insetBlockStart:B.spaceT("insetBlockStart"),bottom:B.spaceT("bottom"),insetBlockEnd:B.spaceT("insetBlockEnd"),left:B.spaceT("left"),insetInlineStart:B.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:B.spaceT("right"),insetInlineEnd:B.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Su,{insetStart:Su.insetInlineStart,insetEnd:Su.insetInlineEnd});var c8={ring:{transform:Fe.ring},ringColor:B.colors("--chakra-ring-color"),ringOffset:B.prop("--chakra-ring-offset-width"),ringOffsetColor:B.colors("--chakra-ring-offset-color"),ringInset:B.prop("--chakra-ring-inset")},st={margin:B.spaceT("margin"),marginTop:B.spaceT("marginTop"),marginBlockStart:B.spaceT("marginBlockStart"),marginRight:B.spaceT("marginRight"),marginInlineEnd:B.spaceT("marginInlineEnd"),marginBottom:B.spaceT("marginBottom"),marginBlockEnd:B.spaceT("marginBlockEnd"),marginLeft:B.spaceT("marginLeft"),marginInlineStart:B.spaceT("marginInlineStart"),marginX:B.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:B.spaceT("marginInline"),marginY:B.spaceT(["marginTop","marginBottom"]),marginBlock:B.spaceT("marginBlock"),padding:B.space("padding"),paddingTop:B.space("paddingTop"),paddingBlockStart:B.space("paddingBlockStart"),paddingRight:B.space("paddingRight"),paddingBottom:B.space("paddingBottom"),paddingBlockEnd:B.space("paddingBlockEnd"),paddingLeft:B.space("paddingLeft"),paddingInlineStart:B.space("paddingInlineStart"),paddingInlineEnd:B.space("paddingInlineEnd"),paddingX:B.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:B.space("paddingInline"),paddingY:B.space(["paddingTop","paddingBottom"]),paddingBlock:B.space("paddingBlock")};Object.assign(st,{m:st.margin,mt:st.marginTop,mr:st.marginRight,me:st.marginInlineEnd,marginEnd:st.marginInlineEnd,mb:st.marginBottom,ml:st.marginLeft,ms:st.marginInlineStart,marginStart:st.marginInlineStart,mx:st.marginX,my:st.marginY,p:st.padding,pt:st.paddingTop,py:st.paddingY,px:st.paddingX,pb:st.paddingBottom,pl:st.paddingLeft,ps:st.paddingInlineStart,paddingStart:st.paddingInlineStart,pr:st.paddingRight,pe:st.paddingInlineEnd,paddingEnd:st.paddingInlineEnd});var f8={textDecorationColor:B.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:B.shadows("textShadow")},d8={clipPath:!0,transform:B.propT("transform",Fe.transform),transformOrigin:!0,translateX:B.spaceT("--chakra-translate-x"),translateY:B.spaceT("--chakra-translate-y"),skewX:B.degreeT("--chakra-skew-x"),skewY:B.degreeT("--chakra-skew-y"),scaleX:B.prop("--chakra-scale-x"),scaleY:B.prop("--chakra-scale-y"),scale:B.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:B.degreeT("--chakra-rotate")},h8={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:B.prop("transitionDuration","transition.duration"),transitionProperty:B.prop("transitionProperty","transition.property"),transitionTimingFunction:B.prop("transitionTimingFunction","transition.easing")},p8={fontFamily:B.prop("fontFamily","fonts"),fontSize:B.prop("fontSize","fontSizes",Fe.px),fontWeight:B.prop("fontWeight","fontWeights"),lineHeight:B.prop("lineHeight","lineHeights"),letterSpacing:B.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(t){if(t===!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"}},g8={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:B.spaceT("scrollMargin"),scrollMarginTop:B.spaceT("scrollMarginTop"),scrollMarginBottom:B.spaceT("scrollMarginBottom"),scrollMarginLeft:B.spaceT("scrollMarginLeft"),scrollMarginRight:B.spaceT("scrollMarginRight"),scrollMarginX:B.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:B.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:B.spaceT("scrollPadding"),scrollPaddingTop:B.spaceT("scrollPaddingTop"),scrollPaddingBottom:B.spaceT("scrollPaddingBottom"),scrollPaddingLeft:B.spaceT("scrollPaddingLeft"),scrollPaddingRight:B.spaceT("scrollPaddingRight"),scrollPaddingX:B.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:B.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function jE(t){return zr(t)&&t.reference?t.reference:String(t)}var ap=(t,...e)=>e.map(jE).join(` ${t} `).replace(/calc/g,""),n2=(...t)=>`calc(${ap("+",...t)})`,r2=(...t)=>`calc(${ap("-",...t)})`,hy=(...t)=>`calc(${ap("*",...t)})`,i2=(...t)=>`calc(${ap("/",...t)})`,a2=t=>{const e=jE(t);return e!=null&&!Number.isNaN(parseFloat(e))?String(e).startsWith("-")?String(e).slice(1):`-${e}`:hy(e,-1)},eo=Object.assign(t=>({add:(...e)=>eo(n2(t,...e)),subtract:(...e)=>eo(r2(t,...e)),multiply:(...e)=>eo(hy(t,...e)),divide:(...e)=>eo(i2(t,...e)),negate:()=>eo(a2(t)),toString:()=>t.toString()}),{add:n2,subtract:r2,multiply:hy,divide:i2,negate:a2});function m8(t,e="-"){return t.replace(/\s+/g,e)}function v8(t){const e=m8(t.toString());return S8(y8(e))}function y8(t){return t.includes("\\.")?t:!Number.isInteger(parseFloat(t.toString()))?t.replace(".","\\."):t}function S8(t){return t.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function _8(t,e=""){return[e,t].filter(Boolean).join("-")}function w8(t,e){return`var(${t}${e?`, ${e}`:""})`}function b8(t,e=""){return v8(`--${_8(t,e)}`)}function C8(t,e,n){const r=b8(t,n);return{variable:r,reference:w8(r,e)}}function x8(t){const e=t==null?0:t.length;return e?t[e-1]:void 0}function k8(t){const e=parseFloat(t.toString()),n=t.toString().replace(String(e),"");return{unitless:!n,value:e,unit:n}}function py(t){if(t==null)return t;const{unitless:e}=k8(t);return e||typeof t=="number"?`${t}px`:t}var HE=(t,e)=>parseInt(t[1],10)>parseInt(e[1],10)?1:-1,U0=t=>Object.fromEntries(Object.entries(t).sort(HE));function o2(t){const e=U0(t);return Object.assign(Object.values(e),e)}function E8(t){const e=Object.keys(U0(t));return new Set(e)}function s2(t){var e;if(!t)return t;t=(e=py(t))!=null?e:t;const n=-.02;return typeof t=="number"?`${t+n}`:t.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function au(t,e){const n=["@media screen"];return t&&n.push("and",`(min-width: ${py(t)})`),e&&n.push("and",`(max-width: ${py(e)})`),n.join(" ")}function P8(t){var e;if(!t)return null;t.base=(e=t.base)!=null?e:"0px";const n=o2(t),r=Object.entries(t).sort(HE).map(([s,u],c,f)=>{var h;let[,p]=(h=f[c+1])!=null?h:[];return p=parseFloat(p)>0?s2(p):void 0,{_minW:s2(u),breakpoint:s,minW:u,maxW:p,maxWQuery:au(null,p),minWQuery:au(u),minMaxQuery:au(u,p)}}),i=E8(t),a=Array.from(i.values());return{keys:i,normalized:n,isResponsive(s){const u=Object.keys(s);return u.length>0&&u.every(c=>i.has(c))},asObject:U0(t),asArray:o2(t),details:r,get(s){return r.find(u=>u.breakpoint===s)},media:[null,...n.map(s=>au(s)).slice(1)],toArrayValue(s){if(!zr(s))throw new Error("toArrayValue: value must be an object");const u=a.map(c=>{var f;return(f=s[c])!=null?f:null});for(;x8(u)===null;)u.pop();return u},toObjectValue(s){if(!Array.isArray(s))throw new Error("toObjectValue: value must be an array");return s.reduce((u,c,f)=>{const h=a[f];return h!=null&&c!=null&&(u[h]=c),u},{})}}}var Xt={hover:(t,e)=>`${t}:hover ${e}, ${t}[data-hover] ${e}`,focus:(t,e)=>`${t}:focus ${e}, ${t}[data-focus] ${e}`,focusVisible:(t,e)=>`${t}:focus-visible ${e}`,focusWithin:(t,e)=>`${t}:focus-within ${e}`,active:(t,e)=>`${t}:active ${e}, ${t}[data-active] ${e}`,disabled:(t,e)=>`${t}:disabled ${e}, ${t}[data-disabled] ${e}`,invalid:(t,e)=>`${t}:invalid ${e}, ${t}[data-invalid] ${e}`,checked:(t,e)=>`${t}:checked ${e}, ${t}[data-checked] ${e}`,indeterminate:(t,e)=>`${t}:indeterminate ${e}, ${t}[aria-checked=mixed] ${e}, ${t}[data-indeterminate] ${e}`,readOnly:(t,e)=>`${t}:read-only ${e}, ${t}[readonly] ${e}, ${t}[data-read-only] ${e}`,expanded:(t,e)=>`${t}:read-only ${e}, ${t}[aria-expanded=true] ${e}, ${t}[data-expanded] ${e}`,placeholderShown:(t,e)=>`${t}:placeholder-shown ${e}`},la=t=>WE(e=>t(e,"&"),"[role=group]","[data-group]",".group"),Ai=t=>WE(e=>t(e,"~ &"),"[data-peer]",".peer"),WE=(t,...e)=>e.map(t).join(", "),op={_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",_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:la(Xt.hover),_peerHover:Ai(Xt.hover),_groupFocus:la(Xt.focus),_peerFocus:Ai(Xt.focus),_groupFocusVisible:la(Xt.focusVisible),_peerFocusVisible:Ai(Xt.focusVisible),_groupActive:la(Xt.active),_peerActive:Ai(Xt.active),_groupDisabled:la(Xt.disabled),_peerDisabled:Ai(Xt.disabled),_groupInvalid:la(Xt.invalid),_peerInvalid:Ai(Xt.invalid),_groupChecked:la(Xt.checked),_peerChecked:Ai(Xt.checked),_groupFocusWithin:la(Xt.focusWithin),_peerFocusWithin:Ai(Xt.focusWithin),_peerPlaceholderShown:Ai(Xt.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]"},O8=Object.keys(op);function l2(t,e){return C8(String(t).replace(/\./g,"-"),void 0,e)}function T8(t,e){let n={};const r={};for(const[i,a]of Object.entries(t)){const{isSemantic:s,value:u}=a,{variable:c,reference:f}=l2(i,e==null?void 0:e.cssVarPrefix);if(!s){if(i.startsWith("space")){const g=i.split("."),[y,...v]=g,w=`${y}.-${v.join(".")}`,x=eo.negate(u),_=eo.negate(f);r[w]={value:x,var:c,varRef:_}}n[c]=u,r[i]={value:u,var:c,varRef:f};continue}const h=g=>{const v=[String(i).split(".")[0],g].join(".");if(!t[v])return g;const{reference:x}=l2(v,e==null?void 0:e.cssVarPrefix);return x},p=zr(u)?u:{default:u};n=ai(n,Object.entries(p).reduce((g,[y,v])=>{var w,x;const _=h(v);if(y==="default")return g[c]=_,g;const S=(x=(w=op)==null?void 0:w[y])!=null?x:y;return g[S]={[c]:_},g},{})),r[i]={value:f,var:c,varRef:f}}return{cssVars:n,cssMap:r}}function R8(t,e=[]){const n=Object.assign({},t);for(const r of e)r in n&&delete n[r];return n}function A8(t,e){const n={};for(const r of e)r in t&&(n[r]=t[r]);return n}var I8=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function L8(t){return A8(t,I8)}function M8(t){return t.semanticTokens}function D8(t){const{__cssMap:e,__cssVars:n,__breakpoints:r,...i}=t;return i}function N8({tokens:t,semanticTokens:e}){var n,r;const i=Object.entries((n=gy(t))!=null?n:{}).map(([s,u])=>[s,{isSemantic:!1,value:u}]),a=Object.entries((r=gy(e,1))!=null?r:{}).map(([s,u])=>[s,{isSemantic:!0,value:u}]);return Object.fromEntries([...i,...a])}function gy(t,e=1/0){return!zr(t)&&!Array.isArray(t)||!e?t:Object.entries(t).reduce((n,[r,i])=>(zr(i)||Array.isArray(i)?Object.entries(gy(i,e-1)).forEach(([a,s])=>{n[`${r}.${a}`]=s}):n[r]=i,n),{})}function tW(t){var e;const n=D8(t),r=L8(n),i=M8(n),a=N8({tokens:r,semanticTokens:i}),s=(e=n.config)==null?void 0:e.cssVarPrefix,{cssMap:u,cssVars:c}=T8(a,{cssVarPrefix:s});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"},...c},__cssMap:u,__breakpoints:P8(n.breakpoints)}),n}var j0=ai({},Cd,He,e8,ch,lr,t8,c8,n8,UE,u8,Su,dy,st,g8,p8,f8,d8,r8,h8),B8=Object.assign({},st,lr,ch,UE,Su),nW=Object.keys(B8),F8=[...Object.keys(j0),...O8],$8={...j0,...op},z8=t=>t in $8,G8=t=>e=>{if(!e.__breakpoints)return t;const{isResponsive:n,toArrayValue:r,media:i}=e.__breakpoints,a={};for(const s in t){let u=io(t[s],e);if(u==null)continue;if(u=zr(u)&&n(u)?r(u):u,!Array.isArray(u)){a[s]=u;continue}const c=u.slice(0,i.length).length;for(let f=0;ft.startsWith("--")&&typeof e=="string"&&!j8(e),W8=(t,e)=>{var n,r;if(e==null)return e;const i=c=>{var f,h;return(h=(f=t.__cssMap)==null?void 0:f[c])==null?void 0:h.varRef},a=c=>{var f;return(f=i(c))!=null?f:c},[s,u]=U8(e);return e=(r=(n=i(s))!=null?n:a(u))!=null?r:a(e),e};function V8(t){const{configs:e={},pseudos:n={},theme:r}=t,i=(a,s=!1)=>{var u,c,f;const h=io(a,r),p=G8(h)(r);let g={};for(let y in p){const v=p[y];let w=io(v,r);y in n&&(y=n[y]),H8(y,w)&&(w=W8(r,w));let x=e[y];if(x===!0&&(x={property:y}),zr(w)){g[y]=(u=g[y])!=null?u:{},g[y]=ai({},g[y],i(w,!0));continue}let _=(f=(c=x==null?void 0:x.transform)==null?void 0:c.call(x,w,r,h))!=null?f:w;_=x!=null&&x.processResult?i(_,!0):_;const S=io(x==null?void 0:x.property,r);if(!s&&(x!=null&&x.static)){const C=io(x.static,r);g=ai({},g,C)}if(S&&Array.isArray(S)){for(const C of S)g[C]=_;continue}if(S){S==="&"&&zr(_)?g=ai({},g,_):g[S]=_;continue}if(zr(_)){g=ai({},g,_);continue}g[y]=_}return g};return i}var q8=t=>e=>V8({theme:e,pseudos:op,configs:j0})(t);function rW(t){return t}function iW(t){return t}function aW(t){return{definePartsStyle(e){return e},defineMultiStyleConfig(e){return{parts:t,...e}}}}function K8(t,e){if(Array.isArray(t))return t;if(zr(t))return e(t);if(t!=null)return[t]}function Y8(t,e){for(let n=e+1;n{ai(f,{[C]:g?S[C]:{[_]:S[C]}})});continue}if(!y){g?ai(f,S):f[_]=S;continue}f[_]=S}}return f}}function Q8(t){return e=>{var n;const{variant:r,size:i,theme:a}=e,s=X8(a);return ai({},io((n=t.baseStyle)!=null?n:{},e),s(t,"sizes",i,e),s(t,"variants",r,e))}}function oW(t,e,n){var r,i,a;return(a=(i=(r=t.__cssMap)==null?void 0:r[`${e}.${n}`])==null?void 0:i.varRef)!=null?a:n}function VE(t){return R8(t,["styleConfig","size","variant","colorScheme"])}function J8(t,e){const n={};return Object.keys(t).forEach(r=>{e.includes(r)||(n[r]=t[r])}),n}function Z8(t,e,n,r){const i=typeof e=="string"?e.split("."):[e];for(r=0;r{const e=new WeakMap;return(r,i,a,s)=>{if(typeof r>"u")return t(r,i,a);e.has(r)||e.set(r,new Map);const u=e.get(r);if(u.has(i))return u.get(i);const c=t(r,i,a,s);return u.set(i,c),c}},tG=eG(Z8);function qE(t,e){const n={};return Object.keys(t).forEach(r=>{const i=t[r];e(i,r,t)&&(n[r]=i)}),n}var KE=t=>qE(t,e=>e!=null);function nG(t){return typeof t=="function"}function rG(t,...e){return nG(t)?t(...e):t}function sW(...t){return function(n){t.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var iG=typeof Element<"u",aG=typeof Map=="function",oG=typeof Set=="function",sG=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function xd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!xd(t[r],e[r]))return!1;return!0}var a;if(aG&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(a=t.entries();!(r=a.next()).done;)if(!e.has(r.value[0]))return!1;for(a=t.entries();!(r=a.next()).done;)if(!xd(r.value[1],e.get(r.value[0])))return!1;return!0}if(oG&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(a=t.entries();!(r=a.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(sG&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(iG&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&t.$$typeof)&&!xd(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}var lG=function(e,n){try{return xd(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function YE(t,e={}){var n;const{styleConfig:r,...i}=e,{theme:a,colorMode:s}=M6(),u=t?tG(a,`components.${t}`):void 0,c=r||u,f=ai({theme:a,colorMode:s},(n=c==null?void 0:c.defaultProps)!=null?n:{},KE(J8(i,["children"]))),h=be.useRef({});if(c){const g=Q8(c)(f);lG(h.current,g)||(h.current=g)}return h.current}function XE(t,e={}){return YE(t,e)}function lW(t,e={}){return YE(t,e)}var uG=new Set([...F8,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),cG=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function fG(t){return cG.has(t)||!uG.has(t)}function dG(t){const e=Object.assign({},t);for(let n in e)e[n]===void 0&&delete e[n];return e}function hG(t,...e){if(t==null)throw new TypeError("Cannot convert undefined or null to object");const n={...t};for(const r of e)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}var pG=/^((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)-.*))$/,gG=OE(function(t){return pG.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),mG=gG,vG=function(e){return e!=="theme"},u2=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?mG:vG},c2=function(e,n,r){var i;if(n){var a=n.shouldForwardProp;i=e.__emotion_forwardProp&&a?function(s){return e.__emotion_forwardProp(s)&&a(s)}:a}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},yG=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return RE(n,r,i),O6(function(){return AE(n,r,i)}),null},SG=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,a,s;n!==void 0&&(a=n.label,s=n.target);var u=c2(e,n,r),c=u||u2(i),f=!c("as");return function(){var h=arguments,p=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(a!==void 0&&p.push("label:"+a+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var g=h.length,y=1;ye=>{const{theme:n,css:r,__css:i,sx:a,...s}=e,u=qE(s,(p,g)=>z8(g)),c=rG(t,e),f=hG({},i,c,KE(u),a),h=q8(f)(e.theme);return r?[h,r]:h};function Bm(t,e){const{baseStyle:n,...r}=e??{};r.shouldForwardProp||(r.shouldForwardProp=fG);const i=bG({baseStyle:n}),a=wG(t,r)(i);return As.forwardRef(function(c,f){const{colorMode:h,forced:p}=BE();return As.createElement(a,{ref:f,"data-theme":p?h:void 0,...c})})}function CG(){const t=new Map;return new Proxy(Bm,{apply(e,n,r){return Bm(...r)},get(e,n){return t.has(n)||t.set(n,Bm(n)),t.get(n)}})}var dh=CG();function H0(t){return be.forwardRef(t)}var xG=I6({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),QE=H0((t,e)=>{const n=XE("Spinner",t),{label:r="Loading...",thickness:i="2px",speed:a="0.45s",emptyColor:s="transparent",className:u,...c}=VE(t),f=FE("chakra-spinner",u),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:s,borderLeftColor:s,animation:`${xG} ${a} linear infinite`,...n};return Zt.jsx(dh.div,{ref:e,__css:h,className:f,...c,children:r&&Zt.jsx(dh.span,{srOnly:!0,children:r})})});QE.displayName="Spinner";var JE=H0(function(e,n){const r=XE("Text",e),{className:i,align:a,decoration:s,casing:u,...c}=VE(e),f=dG({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return Zt.jsx(dh.p,{ref:n,className:FE("chakra-text",e.className),...f,...c,__css:r})});JE.displayName="Text";var ZE=H0(function(e,n){const{direction:r,align:i,justify:a,wrap:s,basis:u,grow:c,shrink:f,...h}=e,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:a,flexWrap:s,flexBasis:u,flexGrow:c,flexShrink:f};return Zt.jsx(dh.div,{ref:n,__css:p,...h})});ZE.displayName="Flex";const d2=t=>{const{t:e}=sB(),{showText:n=!1,text:r=e("common.loadingInvokeAI")}=t;return Zt.jsxs(ZE,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",bg:"#121212",flexDirection:"column",rowGap:4,children:[Zt.jsx(QE,{color:"grey",w:"5rem",h:"5rem"}),n&&Zt.jsx(JE,{color:"grey",fontWeight:"semibold",fontFamily:"'Inter', sans-serif",children:r})]})},kG=be.lazy(()=>p2(()=>import("./App-1d2bdf6d.js"),["./App-1d2bdf6d.js","./scrollbar-2bd1868c.js","./App-06f6cac1.css"],import.meta.url)),EG=be.lazy(()=>p2(()=>import("./ThemeLocaleProvider-659796d3.js"),["./ThemeLocaleProvider-659796d3.js","./scrollbar-2bd1868c.js"],import.meta.url));Fm.createRoot(document.getElementById("root")).render(Zt.jsx(As.StrictMode,{children:Zt.jsx(K3,{store:wE,children:Zt.jsx(Ix,{loading:Zt.jsx(d2,{}),persistor:Wz,children:Zt.jsx(As.Suspense,{fallback:Zt.jsx(d2,{showText:!0}),children:Zt.jsx(EG,{children:Zt.jsx(kG,{})})})})})}));export{dj as $,qf as A,Tf as B,pU as C,M5 as D,sB as E,ZE as F,TH as G,Hj as H,jj as I,Uj as J,Qj as K,Jj as L,Xj as M,Pw as N,FH as O,nH as P,hd as Q,As as R,QE as S,JE as T,OH as U,P5 as V,_j as W,wj as X,sj as Y,hH as Z,Xd as _,FE as a,mH as a$,Oj as a0,NH as a1,BH as a2,SH as a3,hU as a4,_u as a5,PG as a6,nU as a7,fj as a8,YU as a9,$H as aA,dH as aB,fH as aC,T5 as aD,lj as aE,DH as aF,yH as aG,I5 as aH,Yj as aI,$j as aJ,zj as aK,Fj as aL,Ij as aM,xz as aN,cF as aO,uF as aP,Kj as aQ,Aj as aR,Nj as aS,PH as aT,vj as aU,kH as aV,xH as aW,EH as aX,rH as aY,qj as aZ,gH as a_,ZU as aa,nj as ab,aj as ac,ej as ad,ij as ae,tj as af,rj as ag,oj as ah,JU as ai,Wb as aj,QU as ak,XU as al,Mj as am,Sj as an,bj as ao,Lj as ap,pj as aq,Ow as ar,Tj as as,xj as at,Wj as au,Bj as av,gj as aw,D5 as ax,mj as ay,Rj as az,ZH as b,ZG as b$,vH as b0,Vj as b1,$m as b2,g2 as b3,pe as b4,Lb as b5,wU as b6,GU as b7,zU as b8,eU as b9,FU as bA,VH as bB,qG as bC,iU as bD,aU as bE,Of as bF,va as bG,bU as bH,_U as bI,vU as bJ,IG as bK,LG as bL,IH as bM,LH as bN,cU as bO,rU as bP,JG as bQ,VU as bR,uH as bS,If as bT,ei as bU,zl as bV,Ae as bW,kU as bX,ns as bY,MG as bZ,CU as b_,AU as ba,jU as bb,MH as bc,HG as bd,mU as be,Vl as bf,fU as bg,WG as bh,bz as bi,gU as bj,GG as bk,dU as bl,UG as bm,YG as bn,TG as bo,RG as bp,AG as bq,UU as br,Jx as bs,NG as bt,BG as bu,FG as bv,$U as bw,QG as bx,XG as by,VG as bz,dh as c,tU as c0,zG as c1,$G as c2,qH as c3,jG as c4,BU as c5,EU as c6,PU as c7,MU as c8,uU as c9,UH as cA,HH as cB,RH as cC,Zj as cD,iH as cE,_H as cF,bH as cG,sH as cH,Wz as cI,oH as cJ,pH as cK,lH as cL,YH as cM,NE as cN,rW as cO,aW as cP,C8 as cQ,iW as cR,ai as cS,tW as cT,KH as cU,BE as cV,tG as cW,q8 as cX,Yd as cY,O3 as cZ,OG as c_,lU as ca,xU as cb,KU as cc,RU as cd,OU as ce,NU as cf,DG as cg,L5 as ch,Dj as ci,qU as cj,sU as ck,Cj as cl,kj as cm,Ej as cn,Pj as co,eH as cp,aH as cq,jH as cr,GH as cs,zH as ct,wH as cu,mB as cv,vB as cw,CH as cx,WH as cy,cH as cz,lW as d,XE as e,H0 as f,QH as g,JH as h,eW as i,Zt as j,I6 as k,jv as l,Ur as m,rG as n,VE as o,sW as p,zr as q,be as r,L6 as s,io as t,M6 as u,nW as v,XH as w,oW as x,bk as y,_t as z}; diff --git a/invokeai/frontend/web/dist/assets/inter-all-100-normal-2596a8cd.woff b/invokeai/frontend/web/dist/assets/inter-all-100-normal-2596a8cd.woff new file mode 100644 index 0000000000..0306d1d735 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-100-normal-2596a8cd.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-200-normal-34e907e6.woff b/invokeai/frontend/web/dist/assets/inter-all-200-normal-34e907e6.woff new file mode 100644 index 0000000000..9245b8f077 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-200-normal-34e907e6.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-300-normal-e375e256.woff b/invokeai/frontend/web/dist/assets/inter-all-300-normal-e375e256.woff new file mode 100644 index 0000000000..8b700d7c88 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-300-normal-e375e256.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-400-normal-f824029b.woff b/invokeai/frontend/web/dist/assets/inter-all-400-normal-f824029b.woff new file mode 100644 index 0000000000..db0f8d1c3e Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-400-normal-f824029b.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-500-normal-94e08ad8.woff b/invokeai/frontend/web/dist/assets/inter-all-500-normal-94e08ad8.woff new file mode 100644 index 0000000000..ec2c08d3a3 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-500-normal-94e08ad8.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-600-normal-ba29c057.woff b/invokeai/frontend/web/dist/assets/inter-all-600-normal-ba29c057.woff new file mode 100644 index 0000000000..8c99dc81ac Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-600-normal-ba29c057.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-700-normal-9d318ccb.woff b/invokeai/frontend/web/dist/assets/inter-all-700-normal-9d318ccb.woff new file mode 100644 index 0000000000..7248f274da Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-700-normal-9d318ccb.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-800-normal-ab496fbe.woff b/invokeai/frontend/web/dist/assets/inter-all-800-normal-ab496fbe.woff new file mode 100644 index 0000000000..241bb64d8f Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-800-normal-ab496fbe.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-900-normal-50daf4f1.woff b/invokeai/frontend/web/dist/assets/inter-all-900-normal-50daf4f1.woff new file mode 100644 index 0000000000..cc3405d57f Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-all-900-normal-50daf4f1.woff differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-100-normal-9747741a.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-100-normal-9747741a.woff2 new file mode 100644 index 0000000000..519ef27e60 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-100-normal-9747741a.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-200-normal-87d2e1ba.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-200-normal-87d2e1ba.woff2 new file mode 100644 index 0000000000..d94f792fb6 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-200-normal-87d2e1ba.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-300-normal-cff08766.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-300-normal-cff08766.woff2 new file mode 100644 index 0000000000..f98e5b2309 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-300-normal-cff08766.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-400-normal-e9493683.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-400-normal-e9493683.woff2 new file mode 100644 index 0000000000..c1c57683d4 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-400-normal-e9493683.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-500-normal-f6bd191e.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-500-normal-f6bd191e.woff2 new file mode 100644 index 0000000000..d1518426fa Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-500-normal-f6bd191e.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-600-normal-9bc492f5.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-600-normal-9bc492f5.woff2 new file mode 100644 index 0000000000..b0f0af58b5 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-600-normal-9bc492f5.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-700-normal-f6c6dcaf.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-700-normal-f6c6dcaf.woff2 new file mode 100644 index 0000000000..22a09b0bb7 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-700-normal-f6c6dcaf.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-800-normal-82994ee8.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-800-normal-82994ee8.woff2 new file mode 100644 index 0000000000..cad49b6327 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-800-normal-82994ee8.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-900-normal-768011c3.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-900-normal-768011c3.woff2 new file mode 100644 index 0000000000..d1133f54c2 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-900-normal-768011c3.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-100-normal-a1f4d02d.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-100-normal-a1f4d02d.woff2 new file mode 100644 index 0000000000..878765a5f1 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-100-normal-a1f4d02d.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-200-normal-82562199.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-200-normal-82562199.woff2 new file mode 100644 index 0000000000..eb02003206 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-200-normal-82562199.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-300-normal-66b2369e.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-300-normal-66b2369e.woff2 new file mode 100644 index 0000000000..294c7ff844 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-300-normal-66b2369e.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-400-normal-f7666a51.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-400-normal-f7666a51.woff2 new file mode 100644 index 0000000000..da834bb837 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-400-normal-f7666a51.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-500-normal-8b5f6999.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-500-normal-8b5f6999.woff2 new file mode 100644 index 0000000000..5a1646bce5 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-500-normal-8b5f6999.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-600-normal-2ea11f8c.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-600-normal-2ea11f8c.woff2 new file mode 100644 index 0000000000..3b4d7f4bc4 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-600-normal-2ea11f8c.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-700-normal-b7bb121f.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-700-normal-b7bb121f.woff2 new file mode 100644 index 0000000000..7e52d98cd9 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-700-normal-b7bb121f.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-800-normal-f15d8f83.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-800-normal-f15d8f83.woff2 new file mode 100644 index 0000000000..f9a1a8cd52 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-800-normal-f15d8f83.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-900-normal-b1c13874.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-900-normal-b1c13874.woff2 new file mode 100644 index 0000000000..160f0fff85 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-900-normal-b1c13874.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-100-normal-a44b9fc9.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-100-normal-a44b9fc9.woff2 new file mode 100644 index 0000000000..bbff286cb1 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-100-normal-a44b9fc9.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-200-normal-9575e0f8.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-200-normal-9575e0f8.woff2 new file mode 100644 index 0000000000..8041bcbff9 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-200-normal-9575e0f8.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-300-normal-d0749e19.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-300-normal-d0749e19.woff2 new file mode 100644 index 0000000000..e96490ff2f Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-300-normal-d0749e19.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-400-normal-2f2d421a.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-400-normal-2f2d421a.woff2 new file mode 100644 index 0000000000..143a941b81 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-400-normal-2f2d421a.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-500-normal-ddbf6a70.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-500-normal-ddbf6a70.woff2 new file mode 100644 index 0000000000..5c9863829c Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-500-normal-ddbf6a70.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-600-normal-4591e350.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-600-normal-4591e350.woff2 new file mode 100644 index 0000000000..f4f0a5eb8c Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-600-normal-4591e350.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-700-normal-9e078f49.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-700-normal-9e078f49.woff2 new file mode 100644 index 0000000000..140147ef94 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-700-normal-9e078f49.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-800-normal-fb5de277.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-800-normal-fb5de277.woff2 new file mode 100644 index 0000000000..544d583571 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-800-normal-fb5de277.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-900-normal-ffa82654.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-900-normal-ffa82654.woff2 new file mode 100644 index 0000000000..ab3f1c08dd Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-900-normal-ffa82654.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-100-normal-71976b96.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-100-normal-71976b96.woff2 new file mode 100644 index 0000000000..4f023ac30e Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-100-normal-71976b96.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-200-normal-45dafb12.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-200-normal-45dafb12.woff2 new file mode 100644 index 0000000000..8fa4e47281 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-200-normal-45dafb12.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-300-normal-09d21325.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-300-normal-09d21325.woff2 new file mode 100644 index 0000000000..97e45aae32 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-300-normal-09d21325.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-400-normal-d3e30cde.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-400-normal-d3e30cde.woff2 new file mode 100644 index 0000000000..5f4ae9236e Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-400-normal-d3e30cde.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-500-normal-528b79aa.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-500-normal-528b79aa.woff2 new file mode 100644 index 0000000000..aec20f619f Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-500-normal-528b79aa.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-600-normal-c37a11b3.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-600-normal-c37a11b3.woff2 new file mode 100644 index 0000000000..0fee707f37 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-600-normal-c37a11b3.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-700-normal-22174f43.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-700-normal-22174f43.woff2 new file mode 100644 index 0000000000..3a44ec3683 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-700-normal-22174f43.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-800-normal-bddb6f8e.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-800-normal-bddb6f8e.woff2 new file mode 100644 index 0000000000..3d281d004b Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-800-normal-bddb6f8e.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-900-normal-bebcb6fc.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-900-normal-bebcb6fc.woff2 new file mode 100644 index 0000000000..c23b86f1d3 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-greek-ext-900-normal-bebcb6fc.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-100-normal-61cac109.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-100-normal-61cac109.woff2 new file mode 100644 index 0000000000..1ef2357365 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-100-normal-61cac109.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-200-normal-74885a0c.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-200-normal-74885a0c.woff2 new file mode 100644 index 0000000000..ca591ae703 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-200-normal-74885a0c.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-300-normal-6b2cee46.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-300-normal-6b2cee46.woff2 new file mode 100644 index 0000000000..e085aa82c6 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-300-normal-6b2cee46.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-400-normal-0364d368.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-400-normal-0364d368.woff2 new file mode 100644 index 0000000000..c659f5e4a1 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-400-normal-0364d368.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-500-normal-d5333670.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-500-normal-d5333670.woff2 new file mode 100644 index 0000000000..6fc94ad0cc Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-500-normal-d5333670.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-600-normal-048d136d.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-600-normal-048d136d.woff2 new file mode 100644 index 0000000000..bc76d107f6 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-600-normal-048d136d.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-700-normal-ced2d8e0.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-700-normal-ced2d8e0.woff2 new file mode 100644 index 0000000000..8fcc4321c7 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-700-normal-ced2d8e0.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-800-normal-a51ac27d.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-800-normal-a51ac27d.woff2 new file mode 100644 index 0000000000..27db0546cd Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-800-normal-a51ac27d.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-900-normal-f2db7f82.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-900-normal-f2db7f82.woff2 new file mode 100644 index 0000000000..b1c208a14c Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-900-normal-f2db7f82.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-100-normal-d3be20b3.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-100-normal-d3be20b3.woff2 new file mode 100644 index 0000000000..9982f5f6e3 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-100-normal-d3be20b3.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-200-normal-4336e69d.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-200-normal-4336e69d.woff2 new file mode 100644 index 0000000000..a822063f13 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-200-normal-4336e69d.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-300-normal-34623012.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-300-normal-34623012.woff2 new file mode 100644 index 0000000000..25be677ce2 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-300-normal-34623012.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-400-normal-64a98f58.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-400-normal-64a98f58.woff2 new file mode 100644 index 0000000000..b0d08940ce Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-400-normal-64a98f58.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-500-normal-4fba9ae6.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-500-normal-4fba9ae6.woff2 new file mode 100644 index 0000000000..e78729184b Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-500-normal-4fba9ae6.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-600-normal-cc23fe6f.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-600-normal-cc23fe6f.woff2 new file mode 100644 index 0000000000..8ff1de2f40 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-600-normal-cc23fe6f.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-700-normal-1cc47d25.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-700-normal-1cc47d25.woff2 new file mode 100644 index 0000000000..d8c5665e3c Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-700-normal-1cc47d25.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-800-normal-b6167428.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-800-normal-b6167428.woff2 new file mode 100644 index 0000000000..1a2cf49605 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-800-normal-b6167428.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-900-normal-3cff82a5.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-900-normal-3cff82a5.woff2 new file mode 100644 index 0000000000..2d12b58373 Binary files /dev/null and b/invokeai/frontend/web/dist/assets/inter-latin-ext-900-normal-3cff82a5.woff2 differ diff --git a/invokeai/frontend/web/dist/assets/scrollbar-2bd1868c.js b/invokeai/frontend/web/dist/assets/scrollbar-2bd1868c.js new file mode 100644 index 0000000000..892e232319 --- /dev/null +++ b/invokeai/frontend/web/dist/assets/scrollbar-2bd1868c.js @@ -0,0 +1,9 @@ +import{cY as zt,cZ as no,r as m,j as C,a5 as Vs,R as ws,c as K,t as Ae,f as Mt,a as Rt,e as Ms,S as so,o as Rs,d as io,c_ as oo}from"./index-bcc89564.js";function Es(t=zt){const e=t===zt?no:()=>m.useContext(t);return function(){const{store:s}=e();return s}}const ro=Es();function ao(t=zt){const e=t===zt?ro:Es(t);return function(){return e().dispatch}}const co=ao();function lo(t,e){return`${t} returned \`undefined\`. Seems you forgot to wrap component within ${e}`}function Et(t={}){const{name:e,strict:n=!0,hookName:s="useContext",providerName:i="Provider",errorMessage:r}=t,o=m.createContext(void 0);o.displayName=e;function a(){var c;const l=m.useContext(o);if(!l&&n){const u=new Error(r??lo(s,i));throw u.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,u,a),u}return l}return[o.Provider,a,o]}var[uo,fo]=Et({strict:!1,name:"PortalManagerContext"});function ho(t){const{children:e,zIndex:n}=t;return C.jsx(uo,{value:{zIndex:n},children:e})}ho.displayName="PortalManager";var Ve=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:m.useEffect,[Ls,po]=Et({strict:!1,name:"PortalContext"}),He="chakra-portal",mo=".chakra-portal",go=t=>C.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:t.zIndex,top:0,left:0,right:0},children:t.children}),yo=t=>{const{appendToParentPortal:e,children:n}=t,[s,i]=m.useState(null),r=m.useRef(null),[,o]=m.useState({});m.useEffect(()=>o({}),[]);const a=po(),c=fo();Ve(()=>{if(!s)return;const u=s.ownerDocument,f=e?a??u.body:u.body;if(!f)return;r.current=u.createElement("div"),r.current.className=He,f.appendChild(r.current),o({});const h=r.current;return()=>{f.contains(h)&&f.removeChild(h)}},[s]);const l=c!=null&&c.zIndex?C.jsx(go,{zIndex:c==null?void 0:c.zIndex,children:n}):n;return r.current?Vs.createPortal(C.jsx(Ls,{value:r.current,children:l}),r.current):C.jsx("span",{ref:u=>{u&&i(u)}})},vo=t=>{const{children:e,containerRef:n,appendToParentPortal:s}=t,i=n.current,r=i??(typeof window<"u"?document.body:void 0),o=m.useMemo(()=>{const c=i==null?void 0:i.ownerDocument.createElement("div");return c&&(c.className=He),c},[i]),[,a]=m.useState({});return Ve(()=>a({}),[]),Ve(()=>{if(!(!o||!r))return r.appendChild(o),()=>{r.removeChild(o)}},[o,r]),r&&o?Vs.createPortal(C.jsx(Ls,{value:s?o:null,children:e}),o):null};function te(t){const e={appendToParentPortal:!0,...t},{containerRef:n,...s}=e;return n?C.jsx(vo,{containerRef:n,...s}):C.jsx(yo,{...s})}te.className=He;te.selector=mo;te.displayName="Portal";var xo=(t,e)=>t.find(n=>n.id===e);function vn(t,e){const n=Ds(t,e),s=n?t[n].findIndex(i=>i.id===e):-1;return{position:n,index:s}}function Ds(t,e){for(const[n,s]of Object.entries(t))if(xo(s,e))return n}function bo(t){const e=t.includes("right"),n=t.includes("left");let s="center";return e&&(s="flex-end"),n&&(s="flex-start"),{display:"flex",flexDirection:"column",alignItems:s}}function Po(t){const n=t==="top"||t==="bottom"?"0 auto":void 0,s=t.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=t.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,r=t.includes("left")?void 0:"env(safe-area-inset-right, 0px)",o=t.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:s,bottom:i,right:r,left:o}}function To(t,e=[]){const n=m.useRef(t);return m.useEffect(()=>{n.current=t}),m.useCallback((...s)=>{var i;return(i=n.current)==null?void 0:i.call(n,...s)},e)}function Co(t,e){const n=To(t);m.useEffect(()=>{if(e==null)return;let s=null;return s=window.setTimeout(()=>{n()},e),()=>{s&&window.clearTimeout(s)}},[e,n])}function xn(t,e){const n=m.useRef(!1),s=m.useRef(!1);m.useEffect(()=>{if(n.current&&s.current)return t();s.current=!0},e),m.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const ks=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ee=m.createContext({});function So(){return m.useContext(ee).visualElement}const Lt=m.createContext(null),ne=typeof document<"u",Ht=ne?m.useLayoutEffect:m.useEffect,Bs=m.createContext({strict:!1});function Ao(t,e,n,s){const i=So(),r=m.useContext(Bs),o=m.useContext(Lt),a=m.useContext(ks).reducedMotion,c=m.useRef();s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return m.useInsertionEffect(()=>{l&&l.update(n,o)}),Ht(()=>{l&&l.render()}),m.useEffect(()=>{l&&l.updateFeatures()}),(window.HandoffAppearAnimations?Ht:m.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function lt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Vo(t,e,n){return m.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function St(t){return typeof t=="string"||Array.isArray(t)}function se(t){return typeof t=="object"&&typeof t.start=="function"}const wo=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function ie(t){return se(t.animate)||wo.some(e=>St(t[e]))}function Fs(t){return Boolean(ie(t)||t.variants)}function Mo(t,e){if(ie(t)){const{initial:n,animate:s}=t;return{initial:n===!1||St(n)?n:void 0,animate:St(s)?s:void 0}}return t.inherit!==!1?e:{}}function Ro(t){const{initial:e,animate:n}=Mo(t,m.useContext(ee));return m.useMemo(()=>({initial:e,animate:n}),[bn(e),bn(n)])}function bn(t){return Array.isArray(t)?t.join(" "):t}const Pn={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],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"]},At={};for(const t in Pn)At[t]={isEnabled:e=>Pn[t].some(n=>!!e[n])};function Eo(t){for(const e in t)At[e]={...At[e],...t[e]}}function We(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const vt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Lo=1;function Do(){return We(()=>{if(vt.hasEverUpdated)return Lo++})}const Ge=m.createContext({}),Is=m.createContext({}),ko=Symbol.for("motionComponentSymbol");function Bo({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Eo(t);function r(a,c){let l;const u={...m.useContext(ks),...a,layoutId:Fo(a)},{isStatic:f}=u,h=Ro(a),d=f?void 0:Do(),p=s(a,f);if(!f&&ne){h.visualElement=Ao(i,p,u,e);const g=m.useContext(Is),T=m.useContext(Bs).strict;h.visualElement&&(l=h.visualElement.loadFeatures(u,T,t,d,g))}return m.createElement(ee.Provider,{value:h},l&&h.visualElement?m.createElement(l,{visualElement:h.visualElement,...u}):null,n(i,a,d,Vo(p,h.visualElement,c),p,f,h.visualElement))}const o=m.forwardRef(r);return o[ko]=i,o}function Fo({layoutId:t}){const e=m.useContext(Ge).id;return e&&t!==void 0?e+"-"+t:t}function Io(t){function e(s,i={}){return Bo(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const jo=["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 Ke(t){return typeof t!="string"||t.includes("-")?!1:!!(jo.indexOf(t)>-1||/[A-Z]/.test(t))}const Wt={};function Oo(t){Object.assign(Wt,t)}const oe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pt=new Set(oe);function js(t,{layout:e,layoutId:n}){return pt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Wt[t]||t==="opacity")}const B=t=>Boolean(t&&t.getVelocity),No={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uo=oe.length;function _o(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let r="";for(let o=0;oe&&typeof t=="number"?e.transform(t):t,ht=(t,e,n)=>Math.min(Math.max(n,t),e),rt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},xt={...rt,transform:t=>ht(0,1,t)},jt={...rt,default:1},bt=t=>Math.round(t*1e5)/1e5,Vt=/(-)?([\d]*\.?[\d])+/g,we=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,zo=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dt(t){return typeof t=="string"}const kt=t=>({test:e=>Dt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),X=kt("deg"),$=kt("%"),P=kt("px"),Ho=kt("vh"),Wo=kt("vw"),Tn={...$,parse:t=>$.parse(t)/100,transform:t=>$.transform(t*100)},Cn={...rt,transform:Math.round},Ns={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,size:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,rotate:X,rotateX:X,rotateY:X,rotateZ:X,scale:jt,scaleX:jt,scaleY:jt,scaleZ:jt,skew:X,skewX:X,skewY:X,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:xt,originX:Tn,originY:Tn,originZ:P,zIndex:Cn,fillOpacity:xt,strokeOpacity:xt,numOctaves:Cn};function Ze(t,e,n,s){const{style:i,vars:r,transform:o,transformOrigin:a}=t;let c=!1,l=!1,u=!0;for(const f in e){const h=e[f];if(Os(f)){r[f]=h;continue}const d=Ns[f],p=$o(h,d);if(pt.has(f)){if(c=!0,o[f]=p,!u)continue;h!==(d.default||0)&&(u=!1)}else f.startsWith("origin")?(l=!0,a[f]=p):i[f]=p}if(e.transform||(c||s?i.transform=_o(t.transform,n,u,s):i.transform&&(i.transform="none")),l){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${f} ${h} ${d}`}}const Ye=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Us(t,e,n){for(const s in e)!B(e[s])&&!js(s,n)&&(t[s]=e[s])}function Go({transformTemplate:t},e,n){return m.useMemo(()=>{const s=Ye();return Ze(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function Ko(t,e,n){const s=t.style||{},i={};return Us(i,s,t),Object.assign(i,Go(t,e,n)),t.transformValues?t.transformValues(i):i}function Zo(t,e,n){const s={},i=Ko(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const Yo=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 Gt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||Yo.has(t)}let _s=t=>!Gt(t);function Xo(t){t&&(_s=e=>e.startsWith("on")?!Gt(e):t(e))}try{Xo(require("@emotion/is-prop-valid").default)}catch{}function qo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(_s(i)||n===!0&&Gt(i)||!e&&!Gt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Sn(t,e,n){return typeof t=="string"?t:P.transform(e+n*t)}function Jo(t,e,n){const s=Sn(e,t.x,t.width),i=Sn(n,t.y,t.height);return`${s} ${i}`}const Qo={offset:"stroke-dashoffset",array:"stroke-dasharray"},tr={offset:"strokeDashoffset",array:"strokeDasharray"};function er(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Qo:tr;t[r.offset]=P.transform(-s);const o=P.transform(e),a=P.transform(n);t[r.array]=`${o} ${a}`}function Xe(t,{attrX:e,attrY:n,originX:s,originY:i,pathLength:r,pathSpacing:o=1,pathOffset:a=0,...c},l,u,f){if(Ze(t,c,l,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d,dimensions:p}=t;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(s!==void 0||i!==void 0||d.transform)&&(d.transformOrigin=Jo(p,s!==void 0?s:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&er(h,r,o,a,!1)}const $s=()=>({...Ye(),attrs:{}}),qe=t=>typeof t=="string"&&t.toLowerCase()==="svg";function nr(t,e,n,s){const i=m.useMemo(()=>{const r=$s();return Xe(r,e,{enableHardwareAcceleration:!1},qe(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Us(r,t.style,t),i.style={...r,...i.style}}return i}function sr(t=!1){return(n,s,i,r,{latestValues:o},a)=>{const l=(Ke(n)?nr:Zo)(s,o,a,n),f={...qo(s,typeof n=="string",t),...l,ref:r},{children:h}=s,d=m.useMemo(()=>B(h)?h.get():h,[h]);return i&&(f["data-projection-id"]=i),m.createElement(n,{...f,children:d})}}const Je=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function zs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const Hs=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 Ws(t,e,n,s){zs(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Hs.has(i)?i:Je(i),e.attrs[i])}function Qe(t,e){const{style:n}=t,s={};for(const i in n)(B(n[i])||e.style&&B(e.style[i])||js(i,t))&&(s[i]=n[i]);return s}function Gs(t,e){const n=Qe(t,e);for(const s in t)if(B(t[s])||B(e[s])){const i=s==="x"||s==="y"?"attr"+s.toUpperCase():s;n[i]=t[s]}return n}function tn(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}const Kt=t=>Array.isArray(t),ir=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),or=t=>Kt(t)?t[t.length-1]||0:t;function _t(t){const e=B(t)?t.get():t;return ir(e)?e.toValue():e}function rr({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,r){const o={latestValues:ar(s,i,r,t),renderState:e()};return n&&(o.mount=a=>n(s,a,o)),o}const Ks=t=>(e,n)=>{const s=m.useContext(ee),i=m.useContext(Lt),r=()=>rr(t,e,s,i);return n?r():We(r)};function ar(t,e,n,s){const i={},r=s(t,{});for(const h in r)i[h]=_t(r[h]);let{initial:o,animate:a}=t;const c=ie(t),l=Fs(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!se(f)&&(Array.isArray(f)?f:[f]).forEach(d=>{const p=tn(t,d);if(!p)return;const{transitionEnd:g,transition:T,...b}=p;for(const x in b){let v=b[x];if(Array.isArray(v)){const y=u?v.length-1:0;v=v[y]}v!==null&&(i[x]=v)}for(const x in g)i[x]=g[x]}),i}const cr={useVisualState:Ks({scrapeMotionValuesFromProps:Gs,createRenderState:$s,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Xe(n,s,{enableHardwareAcceleration:!1},qe(e.tagName),t.transformTemplate),Ws(e,n)}})},lr={useVisualState:Ks({scrapeMotionValuesFromProps:Qe,createRenderState:Ye})};function ur(t,{forwardMotionProps:e=!1},n,s){return{...Ke(t)?cr:lr,preloadedFeatures:n,useRender:sr(e),createVisualElement:s,Component:t}}function H(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Zs=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function re(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const fr=t=>e=>Zs(e)&&t(e,re(e));function W(t,e,n,s){return H(t,e,fr(n),s)}var A;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(A||(A={}));const hr=(t,e)=>n=>e(t(n)),J=(...t)=>t.reduce(hr);function Ys(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const An=Ys("dragHorizontal"),Vn=Ys("dragVertical");function Xs(t){let e=!1;if(t==="y")e=Vn();else if(t==="x")e=An();else{const n=An(),s=Vn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function qs(){const t=Xs(!0);return t?(t(),!1):!0}class et{constructor(e){this.isMounted=!1,this.node=e}update(){}}function wn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(r,o)=>{if(r.type==="touch"||qs())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive(A.Hover,e),a[s]&&a[s](r,o)};return W(t.current,n,i,{passive:!t.getProps()[s]})}class dr extends et{mount(){this.unmount=J(wn(this.node,!0),wn(this.node,!1))}unmount(){}}class pr extends et{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(A.Focus,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(A.Focus,!1),this.isActive=!1)}mount(){this.unmount=J(H(this.node.current,"focus",()=>this.onFocus()),H(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Js=(t,e)=>e?t===e?!0:Js(t,e.parentElement):!1,z=t=>t;function fe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,re(n))}class mr extends et{constructor(){super(...arguments),this.removeStartListeners=z,this.removeEndListeners=z,this.removeAccessibleListeners=z,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const s=this.node.getProps(),r=W(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u}=this.node.getProps();Js(this.node.current,a.target)?l&&l(a,c):u&&u(a,c)},{passive:!(s.onTap||s.onPointerUp)}),o=W(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=J(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||fe("up",this.node.getProps().onTap)};this.removeEndListeners(),this.removeEndListeners=H(this.node.current,"keyup",o),fe("down",(a,c)=>{this.startPress(a,c)})},n=H(this.node.current,"keydown",e),s=()=>{this.isPressing&&fe("cancel",(r,o)=>this.cancelPress(r,o))},i=H(this.node.current,"blur",s);this.removeAccessibleListeners=J(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive(A.Tap,!0),s&&s(e,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive(A.Tap,!1),!qs()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&s(e,n)}mount(){const e=this.node.getProps(),n=W(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=H(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=J(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Me=new WeakMap,he=new WeakMap,gr=t=>{const e=Me.get(t.target);e&&e(t)},yr=t=>{t.forEach(gr)};function vr({root:t,...e}){const n=t||document;he.has(n)||he.set(n,{});const s=he.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(yr,{root:t,...e})),s[i]}function xr(t,e,n){const s=vr(e);return Me.set(t,n),s.observe(t),()=>{Me.delete(t),s.unobserve(t)}}const br={some:0,all:1};class Pr extends et{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:e}=this.node.getProps();e&&e(null),this.node.animationState&&this.node.animationState.setActive(A.InView,!0)})}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r,fallback:o=!0}=e;if(typeof IntersectionObserver>"u"){o&&this.viewportFallback();return}const a={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:br[i]},c=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(A.InView,u);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),d=u?f:h;d&&d(l)};return xr(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Tr(e,n))&&this.startObserver()}unmount(){}}function Tr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Cr={inView:{Feature:Pr},tap:{Feature:mr},focus:{Feature:pr},hover:{Feature:dr}};function Qs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s/^\-?\d*\.?\d+$/.test(t),Ar=t=>/^0[^.\s]+$/.test(t),G={delta:0,timestamp:0},ti=1/60*1e3,Vr=typeof performance<"u"?()=>performance.now():()=>Date.now(),ei=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Vr()),ti);function wr(t){let e=[],n=[],s=0,i=!1,r=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&i,h=f?e:n;return l&&o.add(c),h.indexOf(c)===-1&&(h.push(c),f&&i&&(s=e.length)),c},cancel:c=>{const l=n.indexOf(c);l!==-1&&n.splice(l,1),o.delete(c)},process:c=>{if(i){r=!0;return}if(i=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let l=0;l(t[e]=wr(()=>wt=!0),t),{}),L=Bt.reduce((t,e)=>{const n=ae[e];return t[e]=(s,i=!1,r=!1)=>(wt||Er(),n.schedule(s,i,r)),t},{}),Q=Bt.reduce((t,e)=>(t[e]=ae[e].cancel,t),{}),de=Bt.reduce((t,e)=>(t[e]=()=>ae[e].process(G),t),{}),Rr=t=>ae[t].process(G),ni=t=>{wt=!1,G.delta=Re?ti:Math.max(Math.min(t-G.timestamp,Mr),1),G.timestamp=t,Ee=!0,Bt.forEach(Rr),Ee=!1,wt&&(Re=!1,ei(ni))},Er=()=>{wt=!0,Re=!0,Ee||ei(ni)};function en(t,e){t.indexOf(e)===-1&&t.push(e)}function nn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class sn{constructor(){this.subscriptions=[]}add(e){return en(this.subscriptions,e),()=>nn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r!isNaN(parseFloat(t));class Dr{constructor(e,n={}){this.version="9.0.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:r,timestamp:o}=G;this.lastUpdated!==o&&(this.timeDelta=r,this.lastUpdated=o,L.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=()=>L.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Lr(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new sn);const s=this.events[e].add(n);return e==="change"?()=>{s(),L.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?on(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n)||null,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(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dt(t,e){return new Dr(t,e)}const rn=(t,e)=>n=>Boolean(Dt(n)&&zo.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),si=(t,e,n)=>s=>{if(!Dt(s))return s;const[i,r,o,a]=s.match(Vt);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},kr=t=>ht(0,255,t),pe={...rt,transform:t=>Math.round(kr(t))},ot={test:rn("rgb","red"),parse:si("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+pe.transform(t)+", "+pe.transform(e)+", "+pe.transform(n)+", "+bt(xt.transform(s))+")"};function Br(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Le={test:rn("#"),parse:Br,transform:ot.transform},ut={test:rn("hsl","hue"),parse:si("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+$.transform(bt(e))+", "+$.transform(bt(n))+", "+bt(xt.transform(s))+")"},D={test:t=>ot.test(t)||Le.test(t)||ut.test(t),parse:t=>ot.test(t)?ot.parse(t):ut.test(t)?ut.parse(t):Le.parse(t),transform:t=>Dt(t)?t:t.hasOwnProperty("red")?ot.transform(t):ut.transform(t)},ii="${c}",oi="${n}";function Fr(t){var e,n;return isNaN(t)&&Dt(t)&&(((e=t.match(Vt))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(we))===null||n===void 0?void 0:n.length)||0)>0}function Zt(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0,s=0;const i=t.match(we);i&&(n=i.length,t=t.replace(we,ii),e.push(...i.map(D.parse)));const r=t.match(Vt);return r&&(s=r.length,t=t.replace(Vt,oi),e.push(...r.map(rt.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}function ri(t){return Zt(t).values}function ai(t){const{values:e,numColors:n,tokenised:s}=Zt(t),i=e.length;return r=>{let o=s;for(let a=0;atypeof t=="number"?0:t;function jr(t){const e=ri(t);return ai(t)(e.map(Ir))}const tt={test:Fr,parse:ri,createTransformer:ai,getAnimatableNone:jr},Or=new Set(["brightness","contrast","saturate","opacity"]);function Nr(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Vt)||[];if(!s)return t;const i=n.replace(s,"");let r=Or.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ur=/([a-z-]*)\(.*?\)/g,De={...tt,getAnimatableNone:t=>{const e=t.match(Ur);return e?e.map(Nr).join(" "):t}},_r={...Ns,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:De,WebkitFilter:De},an=t=>_r[t];function cn(t,e){let n=an(t);return n!==De&&(n=tt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ci=t=>e=>e.test(t),$r={test:t=>t==="auto",parse:t=>t},li=[rt,P,$,X,Wo,Ho,$r],mt=t=>li.find(ci(t)),zr=[...li,D,tt],Hr=t=>zr.find(ci(t));function Wr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function Gr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function ce(t,e,n){const s=t.getProps();return tn(s,e,n!==void 0?n:s.custom,Wr(t),Gr(t))}function Kr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,dt(n))}function Zr(t,e){const n=ce(t,e);let{transitionEnd:s={},transition:i={},...r}=n?t.makeTargetAnimatable(n,!1):{};r={...r,...s};for(const o in r){const a=or(r[o]);Kr(t,o,a)}}function Yr(t,e,n){var s,i;const r=Object.keys(e).filter(a=>!t.hasValue(a)),o=r.length;if(o)for(let a=0;at*1e3,ea={current:!1},ln=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,un=t=>e=>1-t(1-e),fn=t=>t*t,na=un(fn),hn=ln(fn),V=(t,e,n)=>-n*t+n*e+t;function me(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function sa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=me(c,a,t+1/3),r=me(c,a,t),o=me(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}const ge=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},ia=[Le,ot,ut],oa=t=>ia.find(e=>e.test(t));function Mn(t){const e=oa(t);let n=e.parse(t);return e===ut&&(n=sa(n)),n}const ui=(t,e)=>{const n=Mn(t),s=Mn(e),i={...n};return r=>(i.red=ge(n.red,s.red,r),i.green=ge(n.green,s.green,r),i.blue=ge(n.blue,s.blue,r),i.alpha=V(n.alpha,s.alpha,r),ot.transform(i))};function fi(t,e){return typeof t=="number"?n=>V(t,e,n):D.test(t)?ui(t,e):di(t,e)}const hi=(t,e)=>{const n=[...t],s=n.length,i=t.map((r,o)=>fi(r,e[o]));return r=>{for(let o=0;o{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=fi(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}},di=(t,e)=>{const n=tt.createTransformer(e),s=Zt(t),i=Zt(e);return s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?J(hi(s.values,i.values),n):o=>`${o>0?e:t}`},qt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Rn=(t,e)=>n=>V(t,e,n);function aa(t){return typeof t=="number"?Rn:typeof t=="string"?D.test(t)?ui:di:Array.isArray(t)?hi:typeof t=="object"?ra:Rn}function ca(t,e,n){const s=[],i=n||aa(t[0]),r=t.length-1;for(let o=0;ot[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=ca(e,s,i),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(ht(t[0],t[r-1],l)):c}const mi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,la=1e-7,ua=12;function fa(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=mi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>la&&++afa(r,0,1,t,n);return r=>r===0||r===1?r:mi(i(r),e,s)}const yi=t=>1-Math.sin(Math.acos(t)),dn=un(yi),ha=ln(dn),vi=gi(.33,1.53,.69,.99),pn=un(vi),da=ln(pn),pa=t=>(t*=2)<1?.5*pn(t):.5*(2-Math.pow(2,-10*(t-1))),ma={linear:z,easeIn:fn,easeInOut:hn,easeOut:na,circIn:yi,circInOut:ha,circOut:dn,backIn:pn,backInOut:da,backOut:vi,anticipate:pa},En=t=>{if(Array.isArray(t)){Xt(t.length===4);const[e,n,s,i]=t;return gi(e,n,s,i)}else if(typeof t=="string")return ma[t];return t},ga=t=>Array.isArray(t)&&typeof t[0]!="number";function ya(t,e){return t.map(()=>e||hn).splice(0,t.length-1)}function va(t){const e=t.length;return t.map((n,s)=>s!==0?s/(e-1):0)}function xa(t,e){return t.map(n=>n*e)}function ke({keyframes:t,ease:e=hn,times:n,duration:s=300}){t=[...t];const i=ga(e)?e.map(En):En(e),r={done:!1,value:t[0]},o=xa(n&&n.length===t.length?n:va(t),s);function a(){return pi(o,t,{ease:Array.isArray(i)?i:ya(t,i)})}let c=a();return{next:l=>(r.value=c(l),r.done=l>=s,r),flipTarget:()=>{t.reverse(),c=a()}}}const ye=.001,ba=.01,Ln=10,Pa=.05,Ta=1;function Ca({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r;ta(t<=Ln*1e3);let o=1-e;o=ht(Pa,Ta,o),t=ht(ba,Ln,t/1e3),o<1?(i=l=>{const u=l*o,f=u*t,h=u-n,d=Be(l,o),p=Math.exp(-f);return ye-h/d*p},r=l=>{const f=l*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),g=Be(Math.pow(l,2),o);return(-i(l)+ye>0?-1:1)*((h-d)*p)/g}):(i=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-ye+u*f},r=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=Aa(i,r,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:t}}}const Sa=12;function Aa(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function Ma(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Dn(t,wa)&&Dn(t,Va)){const n=Ca(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Ra=5;function xi({keyframes:t,restDelta:e,restSpeed:n,...s}){let i=t[0],r=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:c,mass:l,velocity:u,duration:f,isResolvedFromDuration:h}=Ma(s);let d=Ea,p=u?-(u/1e3):0;const g=c/(2*Math.sqrt(a*l));function T(){const b=r-i,x=Math.sqrt(a/l)/1e3,v=Math.abs(b)<5;if(n||(n=v?.01:2),e||(e=v?.005:.5),g<1){const y=Be(x,g);d=S=>{const M=Math.exp(-g*x*S);return r-M*((p+g*x*b)/y*Math.sin(y*S)+b*Math.cos(y*S))}}else if(g===1)d=y=>r-Math.exp(-x*y)*(b+(p+x*b)*y);else{const y=x*Math.sqrt(g*g-1);d=S=>{const M=Math.exp(-g*x*S),E=Math.min(y*S,300);return r-M*((p+g*x*b)*Math.sinh(E)+y*b*Math.cosh(E))/y}}}return T(),{next:b=>{const x=d(b);if(h)o.done=b>=f;else{let v=p;if(b!==0)if(g<1){const M=Math.max(0,b-Ra);v=on(x-d(M),b-M)}else v=0;const y=Math.abs(v)<=n,S=Math.abs(r-x)<=e;o.done=y&&S}return o.value=o.done?r:x,o},flipTarget:()=>{p=-p,[i,r]=[r,i],T()}}}xi.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Ea=t=>0;function La({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:i=.5,modifyTarget:r}){const o=t[0],a={done:!1,value:o};let c=n*e;const l=o+c,u=r===void 0?l:r(l);return u!==l&&(c=u-o),{next:f=>{const h=-c*Math.exp(-f/s);return a.done=!(h>i||h<-i),a.value=a.done?u:u+h,a},flipTarget:()=>{}}}const Da={decay:La,keyframes:ke,tween:ke,spring:xi};function bi(t,e,n=0){return t-e-n}function ka(t,e=0,n=0,s=!0){return s?bi(e+-t,e,n):e-(t-e)+n}function Ba(t,e,n,s){return s?t>=e+n:t<=-n}const Fa=t=>{const e=({delta:n})=>t(n);return{start:()=>L.update(e,!0),stop:()=>Q.update(e)}};function Jt({duration:t,driver:e=Fa,elapsed:n=0,repeat:s=0,repeatType:i="loop",repeatDelay:r=0,keyframes:o,autoplay:a=!0,onPlay:c,onStop:l,onComplete:u,onRepeat:f,onUpdate:h,type:d="keyframes",...p}){const g=n;let T,b=0,x=t,v=!1,y=!0,S;const M=Da[o.length>2?"keyframes":d]||ke,E=o[0],N=o[o.length-1];let I={done:!1,value:E};const{needsInterpolation:j}=M;j&&j(E,N)&&(S=pi([0,100],[E,N],{clamp:!1}),o=[0,100]);const Z=M({...p,duration:t,keyframes:o});function It(){b++,i==="reverse"?(y=b%2===0,n=ka(n,x,r,y)):(n=bi(n,x,r),i==="mirror"&&Z.flipTarget()),v=!1,f&&f()}function le(){T&&T.stop(),u&&u()}function Y(k){y||(k=-k),n+=k,v||(I=Z.next(Math.max(0,n)),S&&(I.value=S(I.value)),v=y?I.done:n<=0),h&&h(I.value),v&&(b===0&&(x=x!==void 0?x:n),b{l&&l(),T&&T.stop()},set currentTime(k){n=g,Y(k)},sample:k=>{n=g;const at=t&&typeof t=="number"?Math.max(t*.5,50):50;let ue=0;for(Y(0);ue<=k;){const eo=k-ue;Y(Math.min(eo,at)),ue+=at}return I}}}function Ia(t){return!t||Array.isArray(t)||typeof t=="string"&&Pi[t]}const yt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Pi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function ja(t){if(t)return Array.isArray(t)?yt(t):Pi[t]}function Oa(t,e,n,{delay:s=0,duration:i,repeat:r=0,repeatType:o="loop",ease:a,times:c}={}){return t.animate({[e]:n,offset:c},{delay:s,duration:i,easing:ja(a),fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}const kn={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},ve={},Ti={};for(const t in kn)Ti[t]=()=>(ve[t]===void 0&&(ve[t]=kn[t]()),ve[t]);function Na(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const Ua=new Set(["opacity"]),Ot=10;function _a(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Ti.waapi()&&Ua.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:c=0,ease:l}=i;if(i.type==="spring"||!Ia(i.ease)){if(i.repeat===1/0)return;const f=Jt({...i,elapsed:0});let h={done:!1,value:o[0]};const d=[];let p=0;for(;!h.done&&p<2e4;)h=f.sample(p),d.push(h.value),p+=Ot;o=d,a=p-Ot,l="linear"}const u=Oa(t.owner.current,e,o,{...i,delay:-c,duration:a,ease:l});return u.onfinish=()=>{t.set(Na(o,i)),L.update(()=>u.cancel()),s&&s()},{get currentTime(){return u.currentTime||0},set currentTime(f){u.currentTime=f},stop:()=>{const{currentTime:f}=u;if(f){const h=Jt({...i,autoplay:!1});t.setWithVelocity(h.sample(f-Ot).value,h.sample(f).value,Ot)}L.update(()=>u.cancel())}}}function Ci(t,e){const n=performance.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Q.read(s),t(r-e))};return L.read(s,!0),()=>Q.read(s)}function $a({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const i=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:Ci(i,-e)}:i()}function za({keyframes:t,velocity:e=0,min:n,max:s,power:i=.8,timeConstant:r=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:f,onComplete:h,onStop:d}){const p=t[0];let g;function T(y){return n!==void 0&&ys}function b(y){return n===void 0?s:s===void 0||Math.abs(n-y){f&&f(S),y.onUpdate&&y.onUpdate(S)},onComplete:h,onStop:d})}function v(y){x({type:"spring",stiffness:o,damping:a,restDelta:c,...y})}if(T(p))v({velocity:e,keyframes:[p,b(p)]});else{let y=i*e+p;typeof l<"u"&&(y=l(y));const S=b(y),M=S===n?-1:1;let E,N;const I=j=>{E=N,N=j,e=on(j-E,G.delta),(M===1&&j>S||M===-1&&jg&&g.stop()}}const nt=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Nt=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),xe=()=>({type:"keyframes",ease:"linear",duration:.3}),Ha={type:"keyframes",duration:.8},Bn={x:nt,y:nt,z:nt,rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scaleX:Nt,scaleY:Nt,scale:Nt,opacity:xe,backgroundColor:xe,color:xe,default:Nt},Wa=(t,{keyframes:e})=>e.length>2?Ha:(Bn[t]||Bn.default)(e[1]),Fe=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&tt.test(e)&&!e.startsWith("url("));function Ga({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function Fn(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function In(t){return typeof t=="number"?0:cn("",t)}function Si(t,e){return t[e]||t.default||t}function Ka(t,e,n,s){const i=Fe(e,n);let r=s.from!==void 0?s.from:t.get();return r==="none"&&i&&typeof n=="string"?r=cn(e,n):Fn(r)&&typeof n=="string"?r=In(n):!Array.isArray(n)&&Fn(n)&&typeof r=="string"&&(n=In(r)),Array.isArray(n)?(n[0]===null&&(n[0]=r),n):[r,n]}const mn=(t,e,n,s={})=>i=>{const r=Si(s,t)||{},o=r.delay||s.delay||0;let{elapsed:a=0}=s;a=a-$t(o);const c=Ka(e,t,n,r),l=c[0],u=c[c.length-1],f=Fe(t,l),h=Fe(t,u);let d={keyframes:c,velocity:e.getVelocity(),...r,elapsed:a,onUpdate:p=>{e.set(p),r.onUpdate&&r.onUpdate(p)},onComplete:()=>{i(),r.onComplete&&r.onComplete()}};if(!f||!h||ea.current||r.type===!1)return $a(d);if(r.type==="inertia")return za(d);if(Ga(r)||(d={...d,...Wa(t,d)}),d.duration&&(d.duration=$t(d.duration)),d.repeatDelay&&(d.repeatDelay=$t(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=_a(e,t,d);if(p)return p}return Jt(d)};function Za(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ie(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ie(t,e,n);else{const i=typeof e=="function"?ce(t,e,n.custom):e;s=Ai(t,i,n)}return s.then(()=>t.notify("AnimationComplete",e))}function Ie(t,e,n={}){const s=ce(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Ai(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=i;return Ya(t,e,l+c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[r,o]:[o,r];return c().then(l)}else return Promise.all([r(),o(n.delay)])}function Ai(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const h=t.getValue(f),d=a[f];if(!h||d===void 0||u&&qa(u,f))continue;const p={delay:n,elapsed:0,...r};if(window.HandoffAppearAnimations&&!h.hasAnimated){const T=t.getProps()[Qr];T&&(p.elapsed=window.HandoffAppearAnimations(T,f,h,L))}let g=h.start(mn(f,h,d,t.shouldReduceMotion&&pt.has(f)?{type:!1}:p));Yt(c)&&(c.add(f),g=g.then(()=>c.remove(f))),l.push(g)}return Promise.all(l).then(()=>{o&&Zr(t,o)})}function Ya(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,c=i===1?(l=0)=>l*s:(l=0)=>a-l*s;return Array.from(t.variantChildren).sort(Xa).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(Ie(l,e,{...r,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function Xa(t,e){return t.sortNodePosition(e)}function qa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}const gn=[A.Animate,A.InView,A.Focus,A.Hover,A.Tap,A.Drag,A.Exit],Ja=[...gn].reverse(),Qa=gn.length;function tc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Za(t,n,s)))}function ec(t){let e=tc(t);const n=sc();let s=!0;const i=(c,l)=>{const u=ce(t,l);if(u){const{transition:f,transitionEnd:h,...d}=u;c={...c,...d,...h}}return c};function r(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},h=[],d=new Set;let p={},g=1/0;for(let b=0;bg&&S;const j=Array.isArray(y)?y:[y];let Z=j.reduce(i,{});M===!1&&(Z={});const{prevResolvedValues:It={}}=v,le={...It,...Z},Y=R=>{I=!0,d.delete(R),v.needsAnimating[R]=!0};for(const R in le){const k=Z[R],at=It[R];p.hasOwnProperty(R)||(k!==at?Kt(k)&&Kt(at)?!Qs(k,at)||N?Y(R):v.protectedKeys[R]=!0:k!==void 0?Y(R):d.add(R):k!==void 0&&d.has(R)?Y(R):v.protectedKeys[R]=!0)}v.prevProp=y,v.prevResolvedValues=Z,v.isActive&&(p={...p,...Z}),s&&t.blockInitialAnimation&&(I=!1),I&&!E&&h.push(...j.map(R=>({animation:R,options:{type:x,...c}})))}if(d.size){const b={};d.forEach(x=>{const v=t.getBaseTarget(x);v!==void 0&&(b[x]=v)}),h.push({animation:b})}let T=Boolean(h.length);return s&&u.initial===!1&&!t.manuallyAnimateOnMount&&(T=!1),s=!1,T?e(h):Promise.resolve()}function a(c,l,u){if(n[c].isActive===l)return Promise.resolve();t.variantChildren&&t.variantChildren.forEach(h=>{h.animationState&&h.animationState.setActive(c,l)}),n[c].isActive=l;const f=o(u,c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n}}function nc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Qs(e,t):!1}function st(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sc(){return{[A.Animate]:st(!0),[A.InView]:st(),[A.Hover]:st(),[A.Tap]:st(),[A.Drag]:st(),[A.Focus]:st(),[A.Exit]:st()}}class ic extends et{constructor(e){super(e),e.animationState||(e.animationState=ec(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),se(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let oc=0;class rc extends et{constructor(){super(...arguments),this.id=oc++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive(A.Exit,!e,{custom:s??this.node.getProps().custom});n&&!e&&r.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const ac={animation:{Feature:ic},exit:{Feature:rc}},jn=(t,e)=>Math.abs(t-e);function cc(t,e){const n=jn(t.x,e.x),s=jn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Vi{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=Pe(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=cc(l.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:h}=l,{timestamp:d}=G;this.history.push({...h,timestamp:d});const{onStart:p,onMove:g}=this.handlers;u||(p&&p(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,l)},this.handlePointerMove=(l,u)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=be(u,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(l,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:h}=this.handlers,d=Pe(l.type==="pointercancel"?this.lastMoveEventInfo:be(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,d),h&&h(l,d)},!Zs(e))return;this.handlers=n,this.transformPagePoint=s;const i=re(e),r=be(i,this.transformPagePoint),{point:o}=r,{timestamp:a}=G;this.history=[{...o,timestamp:a}];const{onSessionStart:c}=n;c&&c(e,Pe(r,this.history)),this.removeListeners=J(W(window,"pointermove",this.handlePointerMove),W(window,"pointerup",this.handlePointerUp),W(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Q.update(this.updatePoint)}}function be(t,e){return e?{point:e(t.point)}:t}function On(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pe({point:t},e){return{point:t,delta:On(t,wi(e)),offset:On(t,lc(e)),velocity:uc(e,.1)}}function lc(t){return t[0]}function wi(t){return t[t.length-1]}function uc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=wi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>$t(e)));)n--;if(!s)return{x:0,y:0};const r=(i.timestamp-s.timestamp)/1e3;if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function F(t){return t.max-t.min}function je(t,e=0,n=.01){return Math.abs(t-e)<=n}function Nn(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=F(n)/F(e),(je(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(je(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Pt(t,e,n,s){Nn(t.x,e.x,n.x,s?s.originX:void 0),Nn(t.y,e.y,n.y,s?s.originY:void 0)}function Un(t,e,n){t.min=n.min+e.min,t.max=t.min+F(e)}function fc(t,e,n){Un(t.x,e.x,n.x),Un(t.y,e.y,n.y)}function _n(t,e,n){t.min=e.min-n.min,t.max=t.min+F(e)}function Tt(t,e,n){_n(t.x,e.x,n.x),_n(t.y,e.y,n.y)}function hc(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function $n(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function dc(t,{top:e,left:n,bottom:s,right:i}){return{x:$n(t.x,n,i),y:$n(t.y,e,s)}}function zn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=qt(e.min,e.max-s,t.min):s>i&&(n=qt(t.min,t.max-i,e.min)),ht(0,1,n)}function gc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Oe=.35;function yc(t=Oe){return t===!1?t=0:t===!0&&(t=Oe),{x:Hn(t,"left","right"),y:Hn(t,"top","bottom")}}function Hn(t,e,n){return{min:Wn(t,e),max:Wn(t,n)}}function Wn(t,e){return typeof t=="number"?t:t[e]||0}const Gn=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ct=()=>({x:Gn(),y:Gn()}),Kn=()=>({min:0,max:0}),w=()=>({x:Kn(),y:Kn()});function U(t){return[t("x"),t("y")]}function Mi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function vc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function xc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Te(t){return t===void 0||t===1}function Ne({scale:t,scaleX:e,scaleY:n}){return!Te(t)||!Te(e)||!Te(n)}function it(t){return Ne(t)||Ri(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Ri(t){return Zn(t.x)||Zn(t.y)}function Zn(t){return t&&t!=="0%"}function Qt(t,e,n){const s=t-n,i=e*s;return n+i}function Yn(t,e,n,s,i){return i!==void 0&&(t=Qt(t,i,s)),Qt(t,n,s)+e}function Ue(t,e=0,n=1,s,i){t.min=Yn(t.min,e,n,s,i),t.max=Yn(t.max,e,n,s,i)}function Ei(t,{x:e,y:n}){Ue(t.x,e.translate,e.scale,e.originPoint),Ue(t.y,n.translate,n.scale,n.originPoint)}function bc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function q(t,e){t.min=t.min+e,t.max=t.max+e}function qn(t,e,[n,s,i]){const r=e[i]!==void 0?e[i]:.5,o=V(t.min,t.max,r);Ue(t,e[n],e[s],o,e.scale)}const Pc=["x","scaleX","originX"],Tc=["y","scaleY","originY"];function ft(t,e){qn(t.x,e,Pc),qn(t.y,e,Tc)}function Li(t,e){return Mi(xc(t.getBoundingClientRect(),e))}function Cc(t,e,n){const s=Li(t,n),{scroll:i}=e;return i&&(q(s.x,i.offset.x),q(s.y,i.offset.y)),s}const Sc=new WeakMap;class Ac{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=w(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(re(c,"page").point)},r=(c,l)=>{const{drag:u,dragPropagation:f,onDragStart:h}=this.getProps();if(u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Xs(u),!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),U(p=>{let g=this.getAxisMotionValue(p).get()||0;if($.test(g)){const{projection:T}=this.visualElement;if(T&&T.layout){const b=T.layout.layoutBox[p];b&&(g=F(b)*(parseFloat(g)/100))}}this.originPoint[p]=g}),h&&h(c,l);const{animationState:d}=this.visualElement;d&&d.setActive(A.Drag,!0)},o=(c,l)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:h,onDrag:d}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=l;if(f&&this.currentDirection===null){this.currentDirection=Vc(p),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",l.point,p),this.updateAxis("y",l.point,p),this.visualElement.render(),d&&d(c,l)},a=(c,l)=>this.stop(c,l);this.panSession=new Vi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&r(e,n)}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive(A.Drag,!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ut(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=hc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&<(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=dc(s.layoutBox,e):this.constraints=!1,this.elastic=yc(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&U(r=>{this.getAxisMotionValue(r)&&(this.constraints[r]=gc(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Cc(s,i.root,this.visualElement.getTransformPagePoint());let o=pc(i.layout.layoutBox,r);if(n){const a=n(vc(o));this.hasMutatedConstraints=!!a,a&&(o=Mi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=U(u=>{if(!Ut(u,n,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(mn(e,s,0,n))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!Ut(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-V(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};U(o=>{const a=this.getAxisMotionValue(o);if(a){const c=a.get();i[o]=mc({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),U(o=>{if(!Ut(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(V(c,l,i[o]))})}addListeners(){if(!this.visualElement.current)return;Sc.set(this.visualElement,this);const e=this.visualElement.current,n=W(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();lt(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const o=H(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(U(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Oe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Ut(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Vc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class wc extends et{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new Ac(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}unmount(){this.removeGroupControls(),this.removeListeners()}}class Mc extends et{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new Vi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:e,onStart:n,onMove:s,onEnd:(r,o)=>{delete this.session,i&&i(r,o)}}}mount(){this.removePointerDownListener=W(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Rc(){const t=m.useContext(Lt);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=m.useId();return m.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}function Ec(){return Lc(m.useContext(Lt))}function Lc(t){return t===null?!0:t.isPresent}function Jn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=Jn(t,e.target.x),s=Jn(t,e.target.y);return`${n}% ${s}%`}};function _e(t){return typeof t=="string"&&t.startsWith("var(--")}const Di=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Dc(t){const e=Di.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}function $e(t,e,n=1){const[s,i]=Dc(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);return r?r.trim():_e(i)?$e(i,e,n+1):i}function kc(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const r=i.get();if(!_e(r))return;const o=$e(r,s);o&&i.set(o)});for(const i in e){const r=e[i];if(!_e(r))continue;const o=$e(r,s);o&&(e[i]=o,n&&n[i]===void 0&&(n[i]=r))}return{target:e,transitionEnd:n}}const Qn="_$css",Bc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=t.includes("var("),r=[];i&&(t=t.replace(Di,d=>(r.push(d),Qn)));const o=tt.parse(t);if(o.length>5)return s;const a=tt.createTransformer(t),c=typeof o[0]!="number"?1:0,l=n.x.scale*e.x,u=n.y.scale*e.y;o[0+c]/=l,o[1+c]/=u;const f=V(l,u,.5);typeof o[2+c]=="number"&&(o[2+c]/=f),typeof o[3+c]=="number"&&(o[3+c]/=f);let h=a(o);if(i){let d=0;h=h.replace(Qn,()=>{const p=r[d];return d++,p})}return h}};class Fc extends ws.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Oo(Ic),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),vt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||L.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ki(t){const[e,n]=Rc(),s=m.useContext(Ge);return ws.createElement(Fc,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(Is),isPresent:e,safeToRemove:n})}const Ic={borderRadius:{...gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomLeftRadius:gt,borderBottomRightRadius:gt,boxShadow:Bc};function jc(t,e,n={}){const s=B(t)?t:dt(t);return s.start(mn("",s,e,n)),{stop:()=>s.stop(),isAnimating:()=>s.isAnimating()}}const Bi=["TopLeft","TopRight","BottomLeft","BottomRight"],Oc=Bi.length,ts=t=>typeof t=="string"?parseFloat(t):t,es=t=>typeof t=="number"||P.test(t);function Nc(t,e,n,s,i,r){i?(t.opacity=V(0,n.opacity!==void 0?n.opacity:1,Uc(s)),t.opacityExit=V(e.opacity!==void 0?e.opacity:1,0,_c(s))):r&&(t.opacity=V(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;ose?1:n(qt(t,e,s))}function ss(t,e){t.min=e.min,t.max=e.max}function O(t,e){ss(t.x,e.x),ss(t.y,e.y)}function is(t,e,n,s,i){return t-=e,t=Qt(t,1/n,s),i!==void 0&&(t=Qt(t,1/i,s)),t}function $c(t,e=0,n=1,s=.5,i,r=t,o=t){if($.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,s);t===r&&(a-=e),t.min=is(t.min,e,n,a,i),t.max=is(t.max,e,n,a,i)}function os(t,e,[n,s,i],r,o){$c(t,e[n],e[s],e[i],e.scale,r,o)}const zc=["x","scaleX","originX"],Hc=["y","scaleY","originY"];function rs(t,e,n,s){os(t.x,e,zc,n?n.x:void 0,s?s.x:void 0),os(t.y,e,Hc,n?n.y:void 0,s?s.y:void 0)}function as(t){return t.translate===0&&t.scale===1}function Ii(t){return as(t.x)&&as(t.y)}function ji(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function cs(t){return F(t.x)/F(t.y)}class Wc{constructor(){this.members=[]}add(e){en(this.members,e),e.scheduleRender()}remove(e){if(nn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ls(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y;if((i||r)&&(s=`translate3d(${i}px, ${r}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:l,rotateY:u}=n;c&&(s+=`rotate(${c}deg) `),l&&(s+=`rotateX(${l}deg) `),u&&(s+=`rotateY(${u}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(s+=`scale(${o}, ${a})`),s||"none"}const Gc=(t,e)=>t.depth-e.depth;class Kc{constructor(){this.children=[],this.isDirty=!1}add(e){en(this.children,e),this.isDirty=!0}remove(e){nn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Gc),this.isDirty=!1,this.children.forEach(e)}}const us=["","X","Y","Z"],fs=1e3;let Zc=0;function Oi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o,a={},c=e==null?void 0:e()){this.id=Zc++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(qc),this.nodes.forEach(tl),this.nodes.forEach(el)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Ci(h,250),vt.hasAnimatedSinceResize&&(vt.hasAnimatedSinceResize=!1,this.nodes.forEach(ds))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||rl,{onLayoutAnimationStart:T,onLayoutAnimationComplete:b}=u.getProps(),x=!this.targetLayout||!ji(this.targetLayout,p)||d,v=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const y={...Si(g,"layout"),onPlay:T,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y)}else!h&&this.animationProgress===0&&ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Q.preRender(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(nl),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(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 u=0;u{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 c=0;c{const y=v/1e3;ps(f.x,o.x,y),ps(f.y,o.y,y),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),il(this.relativeTarget,this.relativeTargetOrigin,h,y)),g&&(this.animationValues=u,Nc(u,l,this.latestValues,y,x,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Q.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{vt.hasAnimatedSinceResize=!0,this.currentAnimation=jc(0,fs,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&Ni(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||w();const f=F(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=F(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}O(a,c),ft(a,u),Pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Wc),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(hs),this.root.sharedNodes.clear()}}}function Yc(t){t.updateLayout()}function Xc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?U(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],d=F(h);h.min=s[f].min,h.max=h.min+d}):Ni(r,n.layoutBox,s)&&U(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],d=F(s[f]);h.max=h.min+d});const a=Ct();Pt(a,s,n.layoutBox);const c=Ct();o?Pt(c,t.applyTransform(i,!0),n.measuredBox):Pt(c,s,n.layoutBox);const l=!Ii(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=w();Tt(p,n.layoutBox,h.layoutBox);const g=w();Tt(g,s,d.layoutBox),ji(p,g)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function qc(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function Jc(t){t.clearSnapshot()}function hs(t){t.clearMeasurements()}function Qc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ds(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function tl(t){t.resolveTargetDelta()}function el(t){t.calcProjection()}function nl(t){t.resetRotation()}function sl(t){t.removeLeadSnapshot()}function ps(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ms(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function il(t,e,n,s){ms(t.x,e.x,n.x,s),ms(t.y,e.y,n.y,s)}function ol(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const rl={duration:.45,ease:[.4,0,.1,1]};function al(t,e){let n=t.root;for(let r=t.path.length-1;r>=0;r--)if(Boolean(t.path[r].instance)){n=t.path[r];break}const i=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function gs(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function cl(t){gs(t.x),gs(t.y)}function Ni(t,e,n){return t==="position"||t==="preserve-aspect"&&!je(cs(e),cs(n),.2)}const ll=Oi({attachResizeListener:(t,e)=>H(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ce={current:void 0},Ui=Oi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ce.current){const t=new ll(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Ce.current=t}return Ce.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),ul={pan:{Feature:Mc},drag:{Feature:wc,ProjectionNode:Ui,MeasureLayout:ki}},fl=new Set(["width","height","top","left","right","bottom","x","y"]),_i=t=>fl.has(t),hl=t=>Object.keys(t).some(_i),ys=t=>t===rt||t===P;var vs;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(vs||(vs={}));const xs=(t,e)=>parseFloat(t.split(", ")[e]),bs=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return xs(i[1],e);{const r=s.match(/^matrix\((.+)\)$/);return r?xs(r[1],t):0}},dl=new Set(["x","y","z"]),pl=oe.filter(t=>!dl.has(t));function ml(t){const e=[];return pl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const Ps={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:bs(4,13),y:bs(5,14)},gl=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,r=getComputedStyle(i),{display:o}=r,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(l=>{a[l]=Ps[l](s,r)}),e.render();const c=e.measureViewportBox();return n.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=Ps[l](c,r)}),t},yl=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(_i);let r=[],o=!1;const a=[];if(i.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=n[c],f=mt(u);const h=e[c];let d;if(Kt(h)){const p=h.length,g=h[0]===null?1:0;u=h[g],f=mt(u);for(let T=g;T=0?window.pageYOffset:null,l=gl(e,t,a);return r.length&&r.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),ne&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:s}}else return{target:e,transitionEnd:s}};function vl(t,e,n,s){return hl(e)?yl(t,e,n,s):{target:e,transitionEnd:s}}const xl=(t,e,n,s)=>{const i=kc(t,e,s);return e=i.target,s=i.transitionEnd,vl(t,e,n,s)},ze={current:null},$i={current:!1};function bl(){if($i.current=!0,!!ne)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ze.current=t.matches;t.addListener(e),e()}else ze.current=!1}function Pl(t,e,n){const{willChange:s}=e;for(const i in e){const r=e[i],o=n[i];if(B(r))t.addValue(i,r),Yt(s)&&s.add(i);else if(B(o))t.addValue(i,dt(r,{owner:t})),Yt(s)&&s.remove(i);else if(o!==r)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(r)}else{const a=t.getStaticValue(i);t.addValue(i,dt(a!==void 0?a:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const zi=Object.keys(At),Tl=zi.length,Ts=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Cl{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:r},o={}){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=()=>L.render(this.render,!1,!0);const{latestValues:a,renderState:c}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=ie(n),this.isVariantNode=Fs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n,{});for(const f in u){const h=u[f];a[f]!==void 0&&B(h)&&(h.set(a[f],!1),Yt(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),$i.current||bl(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ze.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Q.update(this.notifyUpdate),Q.render(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=pt.has(e),i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&L.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,r,o){let a,c;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:p})}return c}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update(this.props,this.prevProps):(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):w()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=dt(n,{owner:this}),this.addValue(e,s)),s}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=tn(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!B(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new sn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}const Hi=["initial",...gn],Sl=Hi.length;class Wi extends Cl{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},r){let o=qr(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),o&&(o=i(o))),r){Yr(this,s,o);const a=xl(this,s,o,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function Al(t){return window.getComputedStyle(t)}class Vl extends Wi{readValueFromInstance(e,n){if(pt.has(n)){const s=an(n);return s&&s.default||0}else{const s=Al(e),i=(Os(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Li(e,n)}build(e,n,s,i){Ze(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return Qe(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){zs(e,n,s,i)}}class wl extends Wi{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(pt.has(n)){const s=an(n);return s&&s.default||0}return n=Hs.has(n)?n:Je(n),e.getAttribute(n)}measureInstanceViewportBox(){return w()}scrapeMotionValuesFromProps(e,n){return Gs(e,n)}build(e,n,s,i){Xe(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ws(e,n,s,i)}mount(e){this.isSVGTag=qe(e.tagName),super.mount(e)}}const Ml=(t,e)=>Ke(t)?new wl(e,{enableHardwareAcceleration:!1}):new Vl(e,{enableHardwareAcceleration:!0}),Rl={layout:{ProjectionNode:Ui,MeasureLayout:ki}},El={...ac,...Cr,...ul,...Rl},Ll=Io((t,e)=>ur(t,e,El,Ml));function Gi(){const t=m.useRef(!1);return Ht(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Dl(){const t=Gi(),[e,n]=m.useState(0),s=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>L.postRender(s),[s]),e]}class kl extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Bl({children:t,isPresent:e}){const n=m.useId(),s=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:r,height:o,top:a,left:c}=i.current;if(e||!s.current||!r||!o)return;s.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${r}px !important; + height: ${o}px !important; + top: ${a}px !important; + left: ${c}px !important; + } + `),()=>{document.head.removeChild(l)}},[e]),m.createElement(kl,{isPresent:e,childRef:s,sizeRef:i},m.cloneElement(t,{ref:s}))}const Se=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o})=>{const a=We(Fl),c=m.useId(),l=m.useMemo(()=>({id:c,initial:e,isPresent:n,custom:i,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;s&&s()},register:u=>(a.set(u,!1),()=>a.delete(u))}),r?void 0:[n]);return m.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),m.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),o==="popLayout"&&(t=m.createElement(Bl,{isPresent:n},t)),m.createElement(Lt.Provider,{value:l},t)};function Fl(){return new Map}function Il(t){return m.useEffect(()=>()=>t(),[])}const ct=t=>t.key||"";function jl(t,e){t.forEach(n=>{const s=ct(n);e.set(s,n)})}function Ol(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const Nl=({children:t,custom:e,initial:n=!0,onExitComplete:s,exitBeforeEnter:i,presenceAffectsLayout:r=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=Dl();const c=m.useContext(Ge).forceRender;c&&(a=c);const l=Gi(),u=Ol(t);let f=u;const h=new Set,d=m.useRef(f),p=m.useRef(new Map).current,g=m.useRef(!0);if(Ht(()=>{g.current=!1,jl(u,p),d.current=f}),Il(()=>{g.current=!0,p.clear(),h.clear()}),g.current)return m.createElement(m.Fragment,null,f.map(v=>m.createElement(Se,{key:ct(v),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:r,mode:o},v)));f=[...f];const T=d.current.map(ct),b=u.map(ct),x=T.length;for(let v=0;v{if(b.indexOf(v)!==-1)return;const y=p.get(v);if(!y)return;const S=T.indexOf(v),M=()=>{p.delete(v),h.delete(v);const E=d.current.findIndex(N=>N.key===v);if(d.current.splice(E,1),!h.size){if(d.current=u,l.current===!1)return;a(),s&&s()}};f.splice(S,0,m.createElement(Se,{key:ct(y),isPresent:!1,onExitComplete:M,custom:e,presenceAffectsLayout:r,mode:o},y))}),f=f.map(v=>{const y=v.key;return h.has(y)?v:m.createElement(Se,{key:ct(v),isPresent:!0,presenceAffectsLayout:r,mode:o},v)}),m.createElement(m.Fragment,null,h.size?f:f.map(v=>m.cloneElement(v)))};var Ul={initial:t=>{const{position:e}=t,n=["top","bottom"].includes(e)?"y":"x";let s=["top-right","bottom-right"].includes(e)?1:-1;return e==="bottom"&&(s=1),{opacity:0,[n]:s*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]}}},Ki=m.memo(t=>{const{id:e,message:n,onCloseComplete:s,onRequestRemove:i,requestClose:r=!1,position:o="bottom",duration:a=5e3,containerStyle:c,motionVariants:l=Ul,toastSpacing:u="0.5rem"}=t,[f,h]=m.useState(a),d=Ec();xn(()=>{d||s==null||s()},[d]),xn(()=>{h(a)},[a]);const p=()=>h(null),g=()=>h(a),T=()=>{d&&i()};m.useEffect(()=>{d&&r&&i()},[d,r,i]),Co(T,f);const b=m.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:u,...c}),[c,u]),x=m.useMemo(()=>bo(o),[o]);return C.jsx(Ll.li,{layout:!0,className:"chakra-toast",variants:l,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:g,custom:{position:o},style:x,children:C.jsx(K.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:b,children:Ae(n,{id:e,onClose:T})})})});Ki.displayName="ToastComponent";function _l(t,e){var n;const s=t??"bottom",r={"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"}}[s];return(n=r==null?void 0:r[e])!=null?n:s}var Cs={path:C.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[C.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"}),C.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"}),C.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Ft=Mt((t,e)=>{const{as:n,viewBox:s,color:i="currentColor",focusable:r=!1,children:o,className:a,__css:c,...l}=t,u=Rt("chakra-icon",a),f=Ms("Icon",t),h={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...c,...f},d={ref:e,focusable:r,className:u,__css:h},p=s??Cs.viewBox;if(n&&typeof n!="string")return C.jsx(K.svg,{as:n,...d,...l});const g=o??Cs.path;return C.jsx(K.svg,{verticalAlign:"middle",viewBox:p,...d,...l,children:g})});Ft.displayName="Icon";function $l(t){return C.jsx(Ft,{viewBox:"0 0 24 24",...t,children:C.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 zl(t){return C.jsx(Ft,{viewBox:"0 0 24 24",...t,children:C.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 Ss(t){return C.jsx(Ft,{viewBox:"0 0 24 24",...t,children:C.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[Hl,Wl]=Et({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Gl,yn]=Et({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Zi={info:{icon:zl,colorScheme:"blue"},warning:{icon:Ss,colorScheme:"orange"},success:{icon:$l,colorScheme:"green"},error:{icon:Ss,colorScheme:"red"},loading:{icon:so,colorScheme:"blue"}};function Kl(t){return Zi[t].colorScheme}function Zl(t){return Zi[t].icon}var Yi=Mt(function(e,n){const i={display:"inline",...yn().description};return C.jsx(K.div,{ref:n,...e,className:Rt("chakra-alert__desc",e.className),__css:i})});Yi.displayName="AlertDescription";function Xi(t){const{status:e}=Wl(),n=Zl(e),s=yn(),i=e==="loading"?s.spinner:s.icon;return C.jsx(K.span,{display:"inherit",...t,className:Rt("chakra-alert__icon",t.className),__css:i,children:t.children||C.jsx(n,{h:"100%",w:"100%"})})}Xi.displayName="AlertIcon";var qi=Mt(function(e,n){const s=yn();return C.jsx(K.div,{ref:n,...e,className:Rt("chakra-alert__title",e.className),__css:s.title})});qi.displayName="AlertTitle";var Ji=Mt(function(e,n){var s;const{status:i="info",addRole:r=!0,...o}=Rs(e),a=(s=e.colorScheme)!=null?s:Kl(i),c=io("Alert",{...e,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...c.container};return C.jsx(Hl,{value:{status:i},children:C.jsx(Gl,{value:c,children:C.jsx(K.div,{role:r?"alert":void 0,ref:n,...o,className:Rt("chakra-alert",e.className),__css:l})})})});Ji.displayName="Alert";function Yl(t){return C.jsx(Ft,{focusable:"false","aria-hidden":!0,...t,children:C.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 Qi=Mt(function(e,n){const s=Ms("CloseButton",e),{children:i,isDisabled:r,__css:o,...a}=Rs(e),c={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return C.jsx(K.button,{type:"button","aria-label":"Close",ref:n,disabled:r,__css:{...c,...s,...o},...a,children:i||C.jsx(Yl,{width:"1em",height:"1em"})})});Qi.displayName="CloseButton";var Xl={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},_=ql(Xl);function ql(t){let e=t;const n=new Set,s=i=>{e=i(e),n.forEach(r=>r())};return{getState:()=>e,subscribe:i=>(n.add(i),()=>{s(()=>t),n.delete(i)}),removeToast:(i,r)=>{s(o=>({...o,[r]:o[r].filter(a=>a.id!=i)}))},notify:(i,r)=>{const o=Jl(i,r),{position:a,id:c}=o;return s(l=>{var u,f;const d=a.includes("top")?[o,...(u=l[a])!=null?u:[]]:[...(f=l[a])!=null?f:[],o];return{...l,[a]:d}}),c},update:(i,r)=>{i&&s(o=>{const a={...o},{position:c,index:l}=vn(a,i);return c&&l!==-1&&(a[c][l]={...a[c][l],...r,message:to(r)}),a})},closeAll:({positions:i}={})=>{s(r=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((c,l)=>(c[l]=r[l].map(u=>({...u,requestClose:!0})),c),{...r}))},close:i=>{s(r=>{const o=Ds(r,i);return o?{...r,[o]:r[o].map(a=>a.id==i?{...a,requestClose:!0}:a)}:r})},isActive:i=>Boolean(vn(_.getState(),i).position)}}var As=0;function Jl(t,e={}){var n,s;As+=1;const i=(n=e.id)!=null?n:As,r=(s=e.position)!=null?s:"bottom";return{id:i,message:t,position:r,duration:e.duration,onCloseComplete:e.onCloseComplete,onRequestRemove:()=>_.removeToast(String(i),r),status:e.status,requestClose:!1,containerStyle:e.containerStyle}}var Ql=t=>{const{status:e,variant:n="solid",id:s,title:i,isClosable:r,onClose:o,description:a,icon:c}=t,l=s?{root:`toast-${s}`,title:`toast-${s}-title`,description:`toast-${s}-description`}:void 0;return C.jsxs(Ji,{addRole:!1,status:e,variant:n,id:l==null?void 0:l.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",children:[C.jsx(Xi,{children:c}),C.jsxs(K.div,{flex:"1",maxWidth:"100%",children:[i&&C.jsx(qi,{id:l==null?void 0:l.title,children:i}),a&&C.jsx(Yi,{id:l==null?void 0:l.description,display:"block",children:a})]}),r&&C.jsx(Qi,{size:"sm",onClick:o,position:"absolute",insetEnd:1,top:1})]})};function to(t={}){const{render:e,toastComponent:n=Ql}=t;return i=>typeof e=="function"?e({...i,...t}):C.jsx(n,{...i,...t})}function nu(t,e){const n=i=>{var r;return{...e,...i,position:_l((r=i==null?void 0:i.position)!=null?r:e==null?void 0:e.position,t)}},s=i=>{const r=n(i),o=to(r);return _.notify(o,r)};return s.update=(i,r)=>{_.update(i,n(r))},s.promise=(i,r)=>{const o=s({...r.loading,status:"loading",duration:null});i.then(a=>s.update(o,{status:"success",duration:5e3,...Ae(r.success,a)})).catch(a=>s.update(o,{status:"error",duration:5e3,...Ae(r.error,a)}))},s.closeAll=_.closeAll,s.close=_.close,s.isActive=_.isActive,s}var[su,iu]=Et({name:"ToastOptionsContext",strict:!1}),ou=t=>{const e=m.useSyncExternalStore(_.subscribe,_.getState,_.getState),{motionVariants:n,component:s=Ki,portalProps:i}=t,o=Object.keys(e).map(a=>{const c=e[a];return C.jsx("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${a}`,style:Po(a),children:C.jsx(Nl,{initial:!1,children:c.map(l=>C.jsx(s,{motionVariants:n,...l},l.id))})},a)});return C.jsx(te,{...i,children:o})};const ru=co,au=oo,cu={"::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"},lu={scrollbarColor:"accent.600 transparent",scrollbarWidth:"thick","::-webkit-scrollbar":{width:"6px",height:"6px"},"::-webkit-scrollbar-track":{background:"transparent"},"::-webkit-scrollbar-thumb":{background:"accent.600",borderRadius:"8px",borderWidth:"4px",borderColor:"accent.600"},"::-webkit-scrollbar-thumb:hover":{background:"accent.500",borderColor:"accent.500"},"::-webkit-scrollbar-button":{background:"transaprent"}};export{Nl as A,Qi as C,Ft as I,te as P,su as T,Et as a,To as b,nu as c,Ve as d,xn as e,Rc as f,au as g,ru as h,ho as i,ou as j,Ll as m,cu as n,lu as s,iu as u}; diff --git a/invokeai/frontend/web/dist/index.html b/invokeai/frontend/web/dist/index.html index d37f30450b..ea7dcdf97c 100644 --- a/invokeai/frontend/web/dist/index.html +++ b/invokeai/frontend/web/dist/index.html @@ -5,11 +5,18 @@ InvokeAI - A Stable Diffusion Toolkit - - + + + - +
diff --git a/invokeai/frontend/web/dist/locales/en.json b/invokeai/frontend/web/dist/locales/en.json index c9a3f48c47..00e1202f12 100644 --- a/invokeai/frontend/web/dist/locales/en.json +++ b/invokeai/frontend/web/dist/locales/en.json @@ -10,14 +10,18 @@ "darkTheme": "Dark", "lightTheme": "Light", "greenTheme": "Green", + "oceanTheme": "Ocean", "langArabic": "العربية", "langEnglish": "English", "langDutch": "Nederlands", "langFrench": "Français", "langGerman": "Deutsch", + "langHebrew": "עברית", "langItalian": "Italiano", "langJapanese": "日本語", + "langKorean": "한국어", "langPolish": "Polski", + "langPortuguese": "Português", "langBrPortuguese": "Português do Brasil", "langRussian": "Русский", "langSimplifiedChinese": "简体中文", @@ -63,7 +67,10 @@ "statusConvertingModel": "Converting Model", "statusModelConverted": "Model Converted", "statusMergingModels": "Merging Models", - "statusMergedModels": "Models Merged" + "statusMergedModels": "Models Merged", + "pinOptionsPanel": "Pin Options Panel", + "loading": "Loading", + "loadingInvokeAI": "Loading Invoke AI" }, "gallery": { "generations": "Generations", @@ -82,7 +89,7 @@ "noImagesInGallery": "No Images In Gallery" }, "hotkeys": { - "keyboardShortcuts": "Keyboard Shorcuts", + "keyboardShortcuts": "Keyboard Shortcuts", "appHotkeys": "App Hotkeys", "generalHotkeys": "General Hotkeys", "galleryHotkeys": "Gallery Hotkeys", @@ -387,13 +394,16 @@ "mergedModelCustomSaveLocation": "Custom Path", "invokeAIFolder": "Invoke AI Folder", "ignoreMismatch": "Ignore Mismatches Between Selected Models", - "modelMergeHeaderHelp1": "You can merge upto three different models to create a blend that suits your needs.", + "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.", "modelMergeAlphaHelp": "Alpha controls blend strength for the models. Lower alpha values lead to lower influence of the second model.", "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.", "inverseSigmoid": "Inverse Sigmoid", "sigmoid": "Sigmoid", - "weightedSum": "Weighted Sum" + "weightedSum": "Weighted Sum", + "none": "none", + "addDifference": "Add Difference", + "pickModelType": "Pick Model Type" }, "parameters": { "general": "General", diff --git a/invokeai/frontend/web/dist/locales/es.json b/invokeai/frontend/web/dist/locales/es.json index 2eff2e1e01..5081ab0799 100644 --- a/invokeai/frontend/web/dist/locales/es.json +++ b/invokeai/frontend/web/dist/locales/es.json @@ -15,7 +15,7 @@ "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", + "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", @@ -44,7 +44,26 @@ "statusUpscaling": "Aumentando Tamaño", "statusUpscalingESRGAN": "Restaurando Rostros(ESRGAN)", "statusLoadingModel": "Cargando Modelo", - "statusModelChanged": "Modelo cambiado" + "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" }, "gallery": { "generations": "Generaciones", @@ -284,16 +303,16 @@ "nameValidationMsg": "Introduce un nombre para tu modelo", "description": "Descripción", "descriptionValidationMsg": "Introduce una descripción para tu modelo", - "config": "Config", - "configValidationMsg": "Ruta del archivo de configuración del modelo", + "config": "Configurar", + "configValidationMsg": "Ruta del archivo de configuración del modelo.", "modelLocation": "Ubicación del Modelo", - "modelLocationValidationMsg": "Ruta del archivo de modelo", + "modelLocationValidationMsg": "Ruta del archivo de modelo.", "vaeLocation": "Ubicación VAE", - "vaeLocationValidationMsg": "Ruta del archivo VAE", + "vaeLocationValidationMsg": "Ruta del archivo VAE.", "width": "Ancho", - "widthValidationMsg": "Ancho predeterminado de tu modelo", + "widthValidationMsg": "Ancho predeterminado de tu modelo.", "height": "Alto", - "heightValidationMsg": "Alto predeterminado de tu modelo", + "heightValidationMsg": "Alto predeterminado de tu modelo.", "addModel": "Añadir Modelo", "updateModel": "Actualizar Modelo", "availableModels": "Modelos disponibles", @@ -320,7 +339,61 @@ "deleteModel": "Eliminar Modelo", "deleteConfig": "Eliminar Configuración", "deleteMsg1": "¿Estás seguro de querer eliminar esta entrada de modelo de InvokeAI?", - "deleteMsg2": "El checkpoint del modelo no se eliminará de tu disco. Puedes volver a añadirlo si lo deseas." + "deleteMsg2": "El checkpoint del modelo no se eliminará de tu disco. Puedes volver a añadirlo si lo deseas.", + "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": "Su archivo de puntos de control en el disco NO será borrado ni modificado de ninguna manera. Puede volver a añadir su punto de control al Gestor de Modelos si lo desea.", + "convertToDiffusersHelpText5": "Asegúrese de que dispone de suficiente espacio en disco. Los modelos suelen variar entre 4 GB y 7 GB de tamaño.", + "convertToDiffusersHelpText6": "¿Desea transformar este modelo?", + "convertToDiffusersSaveLocation": "Guardar ubicación", + "v1": "v1", + "v2": "v2", + "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 combinar hasta tres modelos diferentes para crear una mezcla 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" }, "parameters": { "images": "Imágenes", @@ -380,7 +453,22 @@ "info": "Información", "deleteImage": "Eliminar Imagen", "initialImage": "Imagen Inicial", - "showOptionsPanel": "Mostrar panel de opciones" + "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", + "negativePrompts": "Preguntas negativas", + "imageToImage": "Imagen a imagen", + "denoisingStrength": "Intensidad de la eliminación del ruido", + "hiresStrength": "Alta resistencia" }, "settings": { "models": "Modelos", @@ -393,7 +481,8 @@ "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": "La interfaz web se ha restablecido. Actualice la página para recargarla." + "resetComplete": "La interfaz web se ha restablecido. Actualice la página para recargarla.", + "useSlidersForAll": "Utilice controles deslizantes para todas las opciones" }, "toast": { "tempFoldersEmptied": "Directorio temporal vaciado", @@ -431,12 +520,12 @@ "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. El modo sin costuras funciona para generar patrones repetitivos en la salida. La optimización de alta resolución realiza un ciclo de generación de dos pasos y debe usarse en resoluciones más altas cuando desee una imagen/composición más coherente.", + "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.", + "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)." diff --git a/invokeai/frontend/web/dist/locales/pt_BR.json b/invokeai/frontend/web/dist/locales/pt_BR.json index 2380f92932..fdfe2270bf 100644 --- a/invokeai/frontend/web/dist/locales/pt_BR.json +++ b/invokeai/frontend/web/dist/locales/pt_BR.json @@ -44,7 +44,26 @@ "statusUpscaling": "Redimensinando", "statusUpscalingESRGAN": "Redimensinando (ESRGAN)", "statusLoadingModel": "Carregando Modelo", - "statusModelChanged": "Modelo Alterado" + "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" }, "gallery": { "generations": "Gerações", @@ -237,7 +256,7 @@ "desc": "Salva a tela atual na galeria" }, "copyToClipboard": { - "title": "Copiar Para a Área de Transferência ", + "title": "Copiar para a Área de Transferência", "desc": "Copia a tela atual para a área de transferência" }, "downloadImage": { @@ -284,7 +303,7 @@ "nameValidationMsg": "Insira um nome para o seu modelo", "description": "Descrição", "descriptionValidationMsg": "Adicione uma descrição para o seu modelo", - "config": "Config", + "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.", @@ -317,7 +336,52 @@ "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." + "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", + "v2": "v2", + "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." }, "parameters": { "images": "Imagems", @@ -442,14 +506,14 @@ "move": "Mover", "resetView": "Resetar Visualização", "mergeVisible": "Fundir Visível", - "saveToGallery": "Save To Gallery", + "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": "Show Intermediates", + "showIntermediates": "Mostrar Intermediários", "showGrid": "Mostrar Grade", "snapToGrid": "Encaixar na Grade", "darkenOutsideSelection": "Escurecer Seleção Externa", diff --git a/invokeai/frontend/web/dist/locales/ro.json b/invokeai/frontend/web/dist/locales/ro.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/invokeai/frontend/web/dist/locales/ro.json @@ -0,0 +1 @@ +{} diff --git a/invokeai/frontend/web/index.html b/invokeai/frontend/web/index.html index 8314e22a7d..04d81e5490 100644 --- a/invokeai/frontend/web/index.html +++ b/invokeai/frontend/web/index.html @@ -5,9 +5,16 @@ InvokeAI - A Stable Diffusion Toolkit + - +
diff --git a/invokeai/frontend/web/package.json b/invokeai/frontend/web/package.json index c907a83cd9..c47042ef95 100644 --- a/invokeai/frontend/web/package.json +++ b/invokeai/frontend/web/package.json @@ -5,28 +5,44 @@ "scripts": { "prepare": "cd ../../../ && husky install invokeai/frontend/web/.husky", "dev": "vite dev", - "build": "tsc && vite build", + "build": "npm run lint && vite build", "preview": "vite preview", - "madge": "madge --circular src/main.tsx", - "lint": "eslint --fix .", + "lint:madge": "madge --circular src/main.tsx", + "lint:eslint": "eslint --max-warnings=0", + "lint:prettier": "prettier --check .", + "lint:tsc": "tsc --noEmit", + "lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:tsc && npm run lint:madge", + "fix": "eslint --fix . && prettier --loglevel warn --write . && tsc --noEmit", "lint-staged": "lint-staged", - "prettier": "prettier *.{json,js,ts,html} public/locales/*.json src/**/*.{ts,tsx,scss} --write --loglevel warn .", - "fmt": "npm run prettier -- --write", - "postinstall": "patch-package" + "postinstall": "patch-package && yarn run theme", + "theme": "chakra-cli tokens src/theme/theme.ts", + "theme:watch": "chakra-cli tokens src/theme/theme.ts --watch" + }, + "madge": { + "detectiveOptions": { + "ts": { + "skipTypeImports": true + }, + "tsx": { + "skipTypeImports": true + } + } + }, + "lint-staged": { + "**/*.{js,jsx,ts,tsx,cjs,json,html,scss}": [ + "prettier --write", + "eslint --fix" + ] }, "dependencies": { + "@chakra-ui/anatomy": "^2.1.1", "@chakra-ui/icons": "^2.0.17", "@chakra-ui/react": "^2.5.1", - "@emotion/cache": "^11.10.5", + "@chakra-ui/theme-tools": "^2.0.16", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", - "@radix-ui/react-context-menu": "^2.1.1", - "@radix-ui/react-slider": "^1.1.0", - "@radix-ui/react-tooltip": "^1.0.3", "@reduxjs/toolkit": "^1.9.2", - "@types/uuid": "^9.0.0", - "@vitejs/plugin-react-swc": "^3.2.0", - "add": "^2.0.6", + "chakra-ui-contextmenu": "^1.0.5", "dateformat": "^5.0.3", "formik": "^2.2.9", "framer-motion": "^9.0.4", @@ -50,19 +66,21 @@ "react-zoom-pan-pinch": "^2.6.1", "redux-deep-persist": "^1.0.7", "redux-persist": "^6.0.0", - "socket.io": "^4.6.0", "socket.io-client": "^4.6.0", "use-image": "^1.1.0", - "uuid": "^9.0.0", - "yarn": "^1.22.19" + "uuid": "^9.0.0" }, "devDependencies": { + "@chakra-ui/cli": "^2.3.0", + "@fontsource/inter": "^4.5.15", "@types/dateformat": "^5.0.0", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@types/react-transition-group": "^4.4.5", + "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/parser": "^5.52.0", + "@vitejs/plugin-react-swc": "^3.2.0", "babel-plugin-transform-imports": "^2.0.0", "eslint": "^8.34.0", "eslint-config-prettier": "^8.6.0", @@ -76,26 +94,10 @@ "postinstall-postinstall": "^2.1.0", "prettier": "^2.8.4", "rollup-plugin-visualizer": "^5.9.0", - "sass": "^1.58.3", "terser": "^5.16.4", "vite": "^4.1.2", "vite-plugin-eslint": "^1.8.1", - "vite-tsconfig-paths": "^4.0.5" - }, - "madge": { - "detectiveOptions": { - "ts": { - "skipTypeImports": true - }, - "tsx": { - "skipTypeImports": true - } - } - }, - "lint-staged": { - "**/*.{js,jsx,ts,tsx,cjs,json,html,scss}": [ - "npm run prettier", - "npm run lint" - ] + "vite-tsconfig-paths": "^4.0.5", + "yarn": "^1.22.19" } } diff --git a/invokeai/frontend/web/patches/@chakra-ui+cli+2.3.0.patch b/invokeai/frontend/web/patches/@chakra-ui+cli+2.3.0.patch new file mode 100644 index 0000000000..03db6e8238 --- /dev/null +++ b/invokeai/frontend/web/patches/@chakra-ui+cli+2.3.0.patch @@ -0,0 +1,14 @@ +diff --git a/node_modules/@chakra-ui/cli/dist/scripts/read-theme-file.worker.js b/node_modules/@chakra-ui/cli/dist/scripts/read-theme-file.worker.js +index 937cf0d..7dcc0c0 100644 +--- a/node_modules/@chakra-ui/cli/dist/scripts/read-theme-file.worker.js ++++ b/node_modules/@chakra-ui/cli/dist/scripts/read-theme-file.worker.js +@@ -50,7 +50,8 @@ async function readTheme(themeFilePath) { + project: tsConfig.configFileAbsolutePath, + compilerOptions: { + module: "CommonJS", +- esModuleInterop: true ++ esModuleInterop: true, ++ jsx: 'react' + }, + transpileOnly: true, + swc: true diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index c9a3f48c47..00e1202f12 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -10,14 +10,18 @@ "darkTheme": "Dark", "lightTheme": "Light", "greenTheme": "Green", + "oceanTheme": "Ocean", "langArabic": "العربية", "langEnglish": "English", "langDutch": "Nederlands", "langFrench": "Français", "langGerman": "Deutsch", + "langHebrew": "עברית", "langItalian": "Italiano", "langJapanese": "日本語", + "langKorean": "한국어", "langPolish": "Polski", + "langPortuguese": "Português", "langBrPortuguese": "Português do Brasil", "langRussian": "Русский", "langSimplifiedChinese": "简体中文", @@ -63,7 +67,10 @@ "statusConvertingModel": "Converting Model", "statusModelConverted": "Model Converted", "statusMergingModels": "Merging Models", - "statusMergedModels": "Models Merged" + "statusMergedModels": "Models Merged", + "pinOptionsPanel": "Pin Options Panel", + "loading": "Loading", + "loadingInvokeAI": "Loading Invoke AI" }, "gallery": { "generations": "Generations", @@ -82,7 +89,7 @@ "noImagesInGallery": "No Images In Gallery" }, "hotkeys": { - "keyboardShortcuts": "Keyboard Shorcuts", + "keyboardShortcuts": "Keyboard Shortcuts", "appHotkeys": "App Hotkeys", "generalHotkeys": "General Hotkeys", "galleryHotkeys": "Gallery Hotkeys", @@ -387,13 +394,16 @@ "mergedModelCustomSaveLocation": "Custom Path", "invokeAIFolder": "Invoke AI Folder", "ignoreMismatch": "Ignore Mismatches Between Selected Models", - "modelMergeHeaderHelp1": "You can merge upto three different models to create a blend that suits your needs.", + "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.", "modelMergeAlphaHelp": "Alpha controls blend strength for the models. Lower alpha values lead to lower influence of the second model.", "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.", "inverseSigmoid": "Inverse Sigmoid", "sigmoid": "Sigmoid", - "weightedSum": "Weighted Sum" + "weightedSum": "Weighted Sum", + "none": "none", + "addDifference": "Add Difference", + "pickModelType": "Pick Model Type" }, "parameters": { "general": "General", diff --git a/invokeai/frontend/web/public/locales/he.json b/invokeai/frontend/web/public/locales/he.json new file mode 100644 index 0000000000..0950fb51de --- /dev/null +++ b/invokeai/frontend/web/public/locales/he.json @@ -0,0 +1,593 @@ +{ + "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", + "v2": "v2", + "invokeRoot": "תיקיית InvokeAI", + "customConfig": "תצורה מותאמת אישית", + "pathToCustomConfig": "נתיב לתצורה מותאמת אישית", + "interpolationType": "סוג אינטרפולציה", + "invokeAIFolder": "תיקיית InvokeAI", + "sigmoid": "סיגמואיד", + "weightedSum": "סכום משוקלל", + "modelMergeHeaderHelp2": "רק מפזרים זמינים למיזוג. אם ברצונך למזג מודל של נקודת ביקורת, המר אותו תחילה למפזרים.", + "inverseSigmoid": "הפוך סיגמואיד", + "convertToDiffusersHelpText3": "קובץ נקודת הביקורת שלך בדיסק לא יימחק או ישונה בכל מקרה. אתה יכול להוסיף את נקודת הביקורת שלך למנהל המודלים שוב אם תרצה בכך.", + "convertToDiffusersHelpText4": "זהו תהליך חד פעמי בלבד. התהליך עשוי לקחת בסביבות 30-60 שניות, תלוי במפרט המחשב שלך.", + "modelMergeInterpAddDifferenceHelp": "במצב זה, מודל 3 מופחת תחילה ממודל 2. הגרסה המתקבלת משולבת עם מודל 1 עם קצב האלפא שנקבע לעיל." + }, + "common": { + "nodesDesc": "מערכת מבוססת צמתים עבור יצירת תמונות עדיין תחת פיתוח. השארו קשובים לעדכונים עבור הפיצ׳ר המדהים הזה.", + "themeLabel": "ערכת נושא", + "languagePickerLabel": "בחירת שפה", + "githubLabel": "גיטהאב", + "discordLabel": "דיסקורד", + "settingsLabel": "הגדרות", + "darkTheme": "חשוך", + "lightTheme": "מואר", + "langEnglish": "אנגלית", + "langDutch": "הולנדית", + "langArabic": "ערבית", + "langFrench": "צרפתית", + "langGerman": "גרמנית", + "langJapanese": "יפנית", + "langBrPortuguese": "פורטוגזית", + "langRussian": "רוסית", + "langSimplifiedChinese": "סינית", + "langUkranian": "אוקראינית", + "langSpanish": "ספרדית", + "text2img": "טקסט לתמונה", + "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": "דווח באג", + "greenTheme": "ירוק", + "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": "תצוגת עמודה אחת", + "pinGallery": "הצמד גלריה", + "allImagesLoaded": "כל התמונות נטענו", + "loadMore": "טען עוד", + "noImagesInGallery": "אין תמונות בגלריה", + "galleryImageResetSize": "איפוס גודל", + "generations": "דורות", + "showGenerations": "הצג דורות", + "showUploads": "הצג העלאות" + }, + "parameters": { + "images": "תמונות", + "steps": "צעדים", + "cfgScale": "סולם CFG", + "width": "רוחב", + "height": "גובה", + "sampler": "דוגם", + "seed": "זרע", + "imageToImage": "תמונה לתמונה", + "randomizeSeed": "זרע אקראי", + "variationAmount": "כמות וריאציה", + "seedWeights": "משקלי זרע", + "faceRestoration": "שחזור פנים", + "restoreFaces": "שחזר פנים", + "type": "סוג", + "strength": "חוזק", + "upscale": "הגדלת קנה מידה", + "upscaleImage": "הגדלת קנה מידת התמונה", + "denoisingStrength": "חוזק מנטרל הרעש", + "otherOptions": "אפשרויות אחרות", + "hiresOptim": "אופטימיזצית רזולוציה גבוהה", + "hiresStrength": "חוזק רזולוציה גבוהה", + "codeformerFidelity": "דבקות", + "seamSize": "גודל תפר", + "seamBlur": "טשטוש תפר", + "seamStrength": "חוזק תפר", + "seamSteps": "שלבי תפר", + "scaleBeforeProcessing": "שנה קנה מידה לפני עיבוד", + "scaledWidth": "קנה מידה לאחר שינוי W", + "scaledHeight": "קנה מידה לאחר שינוי H", + "infillMethod": "שיטת מילוי", + "tileSize": "גודל אריח", + "boundingBoxHeader": "תיבה תוחמת", + "seamCorrectionHeader": "תיקון תפר", + "infillScalingHeader": "מילוי וקנה מידה", + "toggleLoopback": "הפעל לולאה חוזרת", + "symmetry": "סימטריה", + "vSymmetryStep": "צעד סימטריה V", + "hSymmetryStep": "צעד סימטריה H", + "invoke": "הפעלה", + "cancel": { + "schedule": "ביטול לאחר האיטרציה הנוכחית", + "isScheduled": "מבטל", + "immediate": "ביטול מיידי", + "setType": "הגדר סוג ביטול" + }, + "negativePrompts": "בקשות שליליות", + "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": "העתקת תמונה לקישור", + "deleteImage": "מחיקת תמונה", + "promptPlaceholder": "הקלד בקשה כאן. [אסימונים שליליים], (העלאת משקל)++ , (הורדת משקל)--, החלפה ומיזוג זמינים (ראה מסמכים)" + }, + "settings": { + "models": "מודלים", + "displayInProgress": "הצגת תמונות בתהליך", + "confirmOnDelete": "אישור בעת המחיקה", + "useCanvasBeta": "שימוש בגרסת ביתא של תצוגת הקנבס", + "useSlidersForAll": "שימוש במחוונים לכל האפשרויות", + "resetWebUI": "איפוס ממשק משתמש", + "resetWebUIDesc1": "איפוס ממשק המשתמש האינטרנטי מאפס רק את המטמון המקומי של הדפדפן של התמונות וההגדרות שנשמרו. זה לא מוחק תמונות מהדיסק.", + "resetComplete": "ממשק המשתמש אופס. יש לבצע רענון דף בכדי לטעון אותו מחדש.", + "enableImageDebugging": "הפעלת איתור באגים בתמונה", + "displayHelpIcons": "הצג סמלי עזרה", + "saveSteps": "שמירת תמונות כל n צעדים", + "resetWebUIDesc2": "אם תמונות לא מופיעות בגלריה או שמשהו אחר לא עובד, נא לנסות איפוס /או אתחול לפני שליחת תקלה ב-GitHub." + }, + "toast": { + "uploadFailed": "העלאה נכשלה", + "uploadFailedMultipleImagesDesc": "תמונות מרובות הודבקו, ניתן להעלות תמונה אחת בלבד בכל פעם", + "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/public/locales/ko.json b/invokeai/frontend/web/public/locales/ko.json new file mode 100644 index 0000000000..888cdc9925 --- /dev/null +++ b/invokeai/frontend/web/public/locales/ko.json @@ -0,0 +1,81 @@ +{ + "common": { + "themeLabel": "테마 설정", + "languagePickerLabel": "언어 설정", + "reportBugLabel": "버그 리포트", + "githubLabel": "Github", + "settingsLabel": "설정", + "darkTheme": "다크 모드", + "lightTheme": "라이트 모드", + "greenTheme": "그린 모드", + "langArabic": "العربية", + "langEnglish": "English", + "langDutch": "Nederlands", + "text2img": "텍스트->이미지", + "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/public/locales/nl.json b/invokeai/frontend/web/public/locales/nl.json index 46baf83ff9..4116914132 100644 --- a/invokeai/frontend/web/public/locales/nl.json +++ b/invokeai/frontend/web/public/locales/nl.json @@ -43,7 +43,27 @@ "statusUpscaling": "Opschaling", "statusUpscalingESRGAN": "Opschaling (ESRGAN)", "statusLoadingModel": "Laden van model", - "statusModelChanged": "Model gewijzigd" + "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" }, "gallery": { "generations": "Gegenereerde afbeeldingen", @@ -282,7 +302,7 @@ "name": "Naam", "nameValidationMsg": "Geef een naam voor je model", "description": "Beschrijving", - "descriptionValidationMsg": "Voeg een beschrijving toe voor je model.", + "descriptionValidationMsg": "Voeg een beschrijving toe voor je model", "config": "Configuratie", "configValidationMsg": "Pad naar het configuratiebestand van je model.", "modelLocation": "Locatie model", @@ -319,7 +339,61 @@ "deleteModel": "Verwijder model", "deleteConfig": "Verwijder configuratie", "deleteMsg1": "Weet je zeker dat je deze modelregel wilt verwijderen uit InvokeAI?", - "deleteMsg2": "Hiermee wordt het checkpointbestand niet van je schijf verwijderd. Je kunt deze opnieuw toevoegen als je dat wilt." + "deleteMsg2": "Hiermee wordt het checkpointbestand niet van je schijf verwijderd. Je kunt deze opnieuw toevoegen als je dat wilt.", + "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 schijf zal NIET worden verwijderd of gewijzigd. Je kunt je Checkpoint opnieuw toevoegen aan Modelonderhoud als je dat wilt.", + "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 4 - 7 GB ruimte in beslag.", + "convertToDiffusersSaveLocation": "Bewaarlocatie", + "v1": "v1", + "v2": "v2", + "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" }, "parameters": { "images": "Afbeeldingen", @@ -379,7 +453,22 @@ "info": "Info", "deleteImage": "Verwijder afbeelding", "initialImage": "Initiële afbeelding", - "showOptionsPanel": "Toon deelscherm Opties" + "showOptionsPanel": "Toon deelscherm Opties", + "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" + }, + "negativePrompts": "Negatieve invoer", + "general": "Algemeen", + "copyImage": "Kopieer afbeelding", + "imageToImage": "Afbeelding naar afbeelding", + "denoisingStrength": "Sterkte ontruisen", + "hiresStrength": "Sterkte hogere resolutie" }, "settings": { "models": "Modellen", @@ -392,7 +481,8 @@ "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": "Webgebruikersinterface is hersteld. Vernieuw de pasgina om opnieuw te laden." + "resetComplete": "Webgebruikersinterface is hersteld. Vernieuw de pasgina om opnieuw te laden.", + "useSlidersForAll": "Gebruik schuifbalken voor alle opties" }, "toast": { "tempFoldersEmptied": "Tijdelijke map geleegd", diff --git a/invokeai/frontend/web/public/locales/pt.json b/invokeai/frontend/web/public/locales/pt.json new file mode 100644 index 0000000000..39d383e37f --- /dev/null +++ b/invokeai/frontend/web/public/locales/pt.json @@ -0,0 +1,68 @@ +{ + "common": { + "greenTheme": "Verde", + "langArabic": "العربية", + "themeLabel": "Tema", + "reportBugLabel": "Reportar Bug", + "settingsLabel": "Configurações", + "lightTheme": "Claro", + "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": "Украї́нська", + "text2img": "Texto para Imagem", + "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", + "darkTheme": "Escuro", + "training": "Treinando", + "statusGeneratingOutpainting": "Geração de Ampliação", + "statusGenerationComplete": "Geração Completa", + "statusMergingModels": "Mesclando Modelos", + "statusMergedModels": "Modelos Mesclados" + } +} diff --git a/invokeai/frontend/web/public/locales/zh_Hant.json b/invokeai/frontend/web/public/locales/zh_Hant.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/invokeai/frontend/web/public/locales/zh_Hant.json @@ -0,0 +1 @@ +{} diff --git a/invokeai/frontend/web/src/Loading.tsx b/invokeai/frontend/web/src/Loading.tsx index 066315ecd1..671c2cd640 100644 --- a/invokeai/frontend/web/src/Loading.tsx +++ b/invokeai/frontend/web/src/Loading.tsx @@ -1,20 +1,37 @@ -import { Flex, Spinner } from '@chakra-ui/react'; +import { Flex, Spinner, Text } from '@chakra-ui/react'; +import { useTranslation } from 'react-i18next'; + +interface LoaderProps { + showText?: boolean; + text?: string; +} + +// This component loads before the theme so we cannot use theme tokens here + +const Loading = (props: LoaderProps) => { + const { t } = useTranslation(); + const { showText = false, text = t('common.loadingInvokeAI') } = props; -const Loading = () => { return ( - + + {showText && ( + + {text} + + )} ); }; diff --git a/invokeai/frontend/web/src/app/App.scss b/invokeai/frontend/web/src/app/App.scss deleted file mode 100644 index 16655f84d4..0000000000 --- a/invokeai/frontend/web/src/app/App.scss +++ /dev/null @@ -1,21 +0,0 @@ -@use '../styles/Mixins/' as *; - -svg { - fill: var(--svg-color); -} - -.App { - display: grid; - width: 100vw; - height: 100vh; - background-color: var(--background-color); -} - -.app-content { - display: grid; - row-gap: 1rem; - padding: $app-padding; - grid-auto-rows: min-content auto; - width: $app-width; - height: $app-height; -} diff --git a/invokeai/frontend/web/src/app/App.tsx b/invokeai/frontend/web/src/app/App.tsx index d0ed2ab016..3599577ca1 100644 --- a/invokeai/frontend/web/src/app/App.tsx +++ b/invokeai/frontend/web/src/app/App.tsx @@ -9,6 +9,8 @@ import useToastWatcher from 'features/system/hooks/useToastWatcher'; import FloatingGalleryButton from 'features/ui/components/FloatingGalleryButton'; import FloatingParametersPanelButtons from 'features/ui/components/FloatingParametersPanelButtons'; +import { Box, Grid } from '@chakra-ui/react'; +import { APP_HEIGHT, APP_PADDING, APP_WIDTH } from 'theme/util/constants'; keepGUIAlive(); @@ -16,20 +18,26 @@ const App = () => { useToastWatcher(); return ( -
+ -
+ -
-
+ + -
+
-
+ ); }; diff --git a/invokeai/frontend/web/src/app/ThemeLocaleProvider.tsx b/invokeai/frontend/web/src/app/ThemeLocaleProvider.tsx new file mode 100644 index 0000000000..51fad5a431 --- /dev/null +++ b/invokeai/frontend/web/src/app/ThemeLocaleProvider.tsx @@ -0,0 +1,46 @@ +import { ChakraProvider, extendTheme } from '@chakra-ui/react'; +import { ReactNode, useEffect } from 'react'; +import { useTranslation } from 'react-i18next'; +import { theme as invokeAITheme } from 'theme/theme'; +import { RootState } from './store'; +import { useAppSelector } from './storeHooks'; + +import { greenTeaThemeColors } from 'theme/colors/greenTea'; +import { invokeAIThemeColors } from 'theme/colors/invokeAI'; +import { lightThemeColors } from 'theme/colors/lightTheme'; +import { oceanBlueColors } from 'theme/colors/oceanBlue'; + +type ThemeLocaleProviderProps = { + children: ReactNode; +}; + +const THEMES = { + dark: invokeAIThemeColors, + light: lightThemeColors, + green: greenTeaThemeColors, + ocean: oceanBlueColors, +}; + +function ThemeLocaleProvider({ children }: ThemeLocaleProviderProps) { + const { i18n } = useTranslation(); + + const currentTheme = useAppSelector( + (state: RootState) => state.ui.currentTheme + ); + + const direction = i18n.dir(); + + const theme = extendTheme({ + ...invokeAITheme, + colors: THEMES[currentTheme as keyof typeof THEMES], + direction, + }); + + useEffect(() => { + document.body.dir = direction; + }, [direction]); + + return {children}; +} + +export default ThemeLocaleProvider; diff --git a/invokeai/frontend/web/src/app/socketio/listeners.ts b/invokeai/frontend/web/src/app/socketio/listeners.ts index 6442564e48..08de671260 100644 --- a/invokeai/frontend/web/src/app/socketio/listeners.ts +++ b/invokeai/frontend/web/src/app/socketio/listeners.ts @@ -392,7 +392,7 @@ const makeSocketIOListeners = ( addLogEntry({ timestamp: dateFormat(new Date(), 'isoDateTime'), message: `${i18n.t( - 'modelmanager:modelAdded' + 'modelManager.modelAdded' )}: ${deleted_model_name}`, level: 'info', }) @@ -400,7 +400,7 @@ const makeSocketIOListeners = ( dispatch( addToast({ title: `${i18n.t( - 'modelmanager:modelEntryDeleted' + 'modelManager.modelEntryDeleted' )}: ${deleted_model_name}`, status: 'success', duration: 2500, @@ -424,7 +424,7 @@ const makeSocketIOListeners = ( dispatch( addToast({ title: `${i18n.t( - 'modelmanager:modelConverted' + 'modelManager.modelConverted' )}: ${converted_model_name}`, status: 'success', duration: 2500, diff --git a/invokeai/frontend/web/src/app/theme.ts b/invokeai/frontend/web/src/app/theme.ts deleted file mode 100644 index 06b28a66ac..0000000000 --- a/invokeai/frontend/web/src/app/theme.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { extendTheme } from '@chakra-ui/react'; -import type { StyleFunctionProps } from '@chakra-ui/styled-system'; - -export const theme = extendTheme({ - config: { - initialColorMode: 'dark', - useSystemColorMode: false, - }, - components: { - Tooltip: { - baseStyle: (props: StyleFunctionProps) => ({ - textColor: props.colorMode === 'dark' ? 'gray.800' : 'gray.100', - }), - }, - Accordion: { - baseStyle: (props: StyleFunctionProps) => ({ - button: { - fontWeight: 'bold', - _hover: { - bgColor: - props.colorMode === 'dark' - ? 'rgba(255,255,255,0.05)' - : 'rgba(0,0,0,0.05)', - }, - }, - panel: { - paddingBottom: 2, - }, - }), - }, - FormLabel: { - baseStyle: { - fontWeight: 'light', - }, - }, - Button: { - variants: { - imageHoverIconButton: (props: StyleFunctionProps) => ({ - bg: props.colorMode === 'dark' ? 'blackAlpha.700' : 'whiteAlpha.800', - color: - props.colorMode === 'dark' ? 'whiteAlpha.700' : 'blackAlpha.700', - _hover: { - bg: - props.colorMode === 'dark' ? 'blackAlpha.800' : 'whiteAlpha.800', - color: - props.colorMode === 'dark' ? 'whiteAlpha.900' : 'blackAlpha.900', - }, - }), - }, - }, - }, -}); diff --git a/invokeai/frontend/web/src/assets/fonts/Inter/Inter-Bold.ttf b/invokeai/frontend/web/src/assets/fonts/Inter/Inter-Bold.ttf deleted file mode 100644 index 8e82c70d10..0000000000 Binary files a/invokeai/frontend/web/src/assets/fonts/Inter/Inter-Bold.ttf and /dev/null differ diff --git a/invokeai/frontend/web/src/assets/fonts/Inter/Inter.ttf b/invokeai/frontend/web/src/assets/fonts/Inter/Inter.ttf deleted file mode 100644 index ec3164efa8..0000000000 Binary files a/invokeai/frontend/web/src/assets/fonts/Inter/Inter.ttf and /dev/null differ diff --git a/invokeai/frontend/web/src/common/components/GuidePopover.scss b/invokeai/frontend/web/src/common/components/GuidePopover.scss deleted file mode 100644 index 58434270b2..0000000000 --- a/invokeai/frontend/web/src/common/components/GuidePopover.scss +++ /dev/null @@ -1,20 +0,0 @@ -.guide-popover-arrow { - background-color: var(--tab-panel-bg); - box-shadow: none; -} - -.guide-popover-content { - background-color: var(--background-color-secondary); - border: none; -} - -.guide-popover-guide-content { - background: var(--tab-panel-bg); - border: 2px solid var(--tab-hover-color); - border-radius: 0.4rem; - padding: 0.75rem 1rem 0.75rem 1rem; - display: grid; - grid-template-rows: repeat(auto-fill, 1fr); - grid-row-gap: 0.5rem; - justify-content: space-between; -} diff --git a/invokeai/frontend/web/src/common/components/GuidePopover.tsx b/invokeai/frontend/web/src/common/components/GuidePopover.tsx index ca45343588..ee376901e0 100644 --- a/invokeai/frontend/web/src/common/components/GuidePopover.tsx +++ b/invokeai/frontend/web/src/common/components/GuidePopover.tsx @@ -2,6 +2,7 @@ import { Box, Popover, PopoverArrow, + PopoverBody, PopoverContent, PopoverTrigger, } from '@chakra-ui/react'; @@ -34,13 +35,12 @@ const GuidePopover = ({ children, feature }: GuideProps) => { {children} e.preventDefault()} cursor="initial" > - -
{text}
+ + {text}
); diff --git a/invokeai/frontend/web/src/common/components/IAIAlertDialog.tsx b/invokeai/frontend/web/src/common/components/IAIAlertDialog.tsx index 1ea35f5881..b1ddaf45d2 100644 --- a/invokeai/frontend/web/src/common/components/IAIAlertDialog.tsx +++ b/invokeai/frontend/web/src/common/components/IAIAlertDialog.tsx @@ -5,11 +5,11 @@ import { AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, - Button, forwardRef, useDisclosure, } from '@chakra-ui/react'; import { cloneElement, ReactElement, ReactNode, useRef } from 'react'; +import IAIButton from './IAIButton'; type Props = { acceptButtonText?: string; @@ -58,7 +58,7 @@ const IAIAlertDialog = forwardRef((props: Props, ref) => { onClose={onClose} > - + {title} @@ -66,16 +66,12 @@ const IAIAlertDialog = forwardRef((props: Props, ref) => { {children} - - + diff --git a/invokeai/frontend/web/src/common/components/IAIButton.scss b/invokeai/frontend/web/src/common/components/IAIButton.scss deleted file mode 100644 index 90489a3bda..0000000000 --- a/invokeai/frontend/web/src/common/components/IAIButton.scss +++ /dev/null @@ -1,8 +0,0 @@ -.invokeai__button { - background-color: var(--btn-base-color); - place-content: center; - - &:hover { - background-color: var(--btn-base-color-hover); - } -} diff --git a/invokeai/frontend/web/src/common/components/IAIButton.tsx b/invokeai/frontend/web/src/common/components/IAIButton.tsx index d25e9decae..ca06e51bf0 100644 --- a/invokeai/frontend/web/src/common/components/IAIButton.tsx +++ b/invokeai/frontend/web/src/common/components/IAIButton.tsx @@ -10,19 +10,15 @@ import { ReactNode } from 'react'; export interface IAIButtonProps extends ButtonProps { tooltip?: string; tooltipProps?: Omit; - styleClass?: string; + isChecked?: boolean; children: ReactNode; } const IAIButton = forwardRef((props: IAIButtonProps, forwardedRef) => { - const { children, tooltip = '', tooltipProps, styleClass, ...rest } = props; + const { children, tooltip = '', tooltipProps, isChecked, ...rest } = props; return ( - diff --git a/invokeai/frontend/web/src/common/components/IAICheckbox.scss b/invokeai/frontend/web/src/common/components/IAICheckbox.scss deleted file mode 100644 index 3b79c8f4db..0000000000 --- a/invokeai/frontend/web/src/common/components/IAICheckbox.scss +++ /dev/null @@ -1,26 +0,0 @@ -.invokeai__checkbox { - .chakra-checkbox__label { - margin-top: 1px; - color: var(--text-color-secondary); - font-size: 0.9rem; - } - - .chakra-checkbox__control { - width: 1rem; - height: 1rem; - border: none; - border-radius: 0.2rem; - background-color: var(--input-checkbox-bg); - - svg { - width: 0.6rem; - height: 0.6rem; - stroke-width: 3px; - } - - &[data-checked] { - color: var(--text-color); - background-color: var(--input-checkbox-checked-bg); - } - } -} diff --git a/invokeai/frontend/web/src/common/components/IAICheckbox.tsx b/invokeai/frontend/web/src/common/components/IAICheckbox.tsx index b9c526cf7e..c04a383767 100644 --- a/invokeai/frontend/web/src/common/components/IAICheckbox.tsx +++ b/invokeai/frontend/web/src/common/components/IAICheckbox.tsx @@ -3,13 +3,12 @@ import type { ReactNode } from 'react'; type IAICheckboxProps = CheckboxProps & { label: string | ReactNode; - styleClass?: string; }; const IAICheckbox = (props: IAICheckboxProps) => { - const { label, styleClass, ...rest } = props; + const { label, ...rest } = props; return ( - + {label} ); diff --git a/invokeai/frontend/web/src/common/components/IAIColorPicker.scss b/invokeai/frontend/web/src/common/components/IAIColorPicker.scss deleted file mode 100644 index 4b6e29483b..0000000000 --- a/invokeai/frontend/web/src/common/components/IAIColorPicker.scss +++ /dev/null @@ -1,8 +0,0 @@ -.invokeai__color-picker { - .react-colorful__hue-pointer, - .react-colorful__saturation-pointer { - width: 1.5rem; - height: 1.5rem; - border-color: var(--white); - } -} diff --git a/invokeai/frontend/web/src/common/components/IAIColorPicker.tsx b/invokeai/frontend/web/src/common/components/IAIColorPicker.tsx index 619c5758e6..406966bf88 100644 --- a/invokeai/frontend/web/src/common/components/IAIColorPicker.tsx +++ b/invokeai/frontend/web/src/common/components/IAIColorPicker.tsx @@ -1,16 +1,35 @@ +import { chakra, ChakraProps } from '@chakra-ui/react'; import { RgbaColorPicker } from 'react-colorful'; import { ColorPickerBaseProps, RgbaColor } from 'react-colorful/dist/types'; -type IAIColorPickerProps = ColorPickerBaseProps & { - styleClass?: string; +type IAIColorPickerProps = Omit, 'color'> & + ChakraProps & { + pickerColor: RgbaColor; + styleClass?: string; + }; + +const ChakraRgbaColorPicker = chakra(RgbaColorPicker, { + baseStyle: { paddingInline: 4 }, + shouldForwardProp: (prop) => !['pickerColor'].includes(prop), +}); + +const colorPickerStyles: NonNullable = { + width: 6, + height: 6, + borderColor: 'base.100', }; const IAIColorPicker = (props: IAIColorPickerProps) => { - const { styleClass, ...rest } = props; + const { styleClass = '', ...rest } = props; return ( - ); diff --git a/invokeai/frontend/web/src/common/components/IAIIconButton.scss b/invokeai/frontend/web/src/common/components/IAIIconButton.scss deleted file mode 100644 index d55e5de4c5..0000000000 --- a/invokeai/frontend/web/src/common/components/IAIIconButton.scss +++ /dev/null @@ -1,82 +0,0 @@ -@use '../../styles/Mixins/' as *; - -.invokeai__icon-button { - background: var(--btn-base-color); - cursor: pointer; - - &:hover { - background-color: var(--btn-base-color-hover); - } - - &[data-selected='true'] { - background-color: var(--accent-color); - &:hover { - background-color: var(--accent-color-hover); - } - } - - &[disabled] { - cursor: not-allowed; - } - - &[data-variant='link'] { - background: none; - &:hover { - background: none; - } - } - - // Check Box Style - &[data-as-checkbox='true'] { - background-color: var(--btn-base-color); - border: 3px solid var(--btn-base-color); - - svg { - fill: var(--text-color); - } - - &:hover { - background-color: var(--btn-base-color); - border-color: var(--btn-checkbox-border-hover); - svg { - fill: var(--text-color); - } - } - - &[data-selected='true'] { - border-color: var(--accent-color); - svg { - fill: var(--accent-color-hover); - } - &:hover { - svg { - fill: var(--accent-color-hover); - } - } - } - } - - &[data-alert='true'] { - animation-name: pulseColor; - animation-duration: 1s; - animation-timing-function: ease-in-out; - animation-iteration-count: infinite; - - &:hover { - animation: none; - background-color: var(--accent-color-hover); - } - } -} - -@keyframes pulseColor { - 0% { - background-color: var(--accent-color); - } - 50% { - background-color: var(--accent-color-dim); - } - 100% { - background-color: var(--accent-color); - } -} diff --git a/invokeai/frontend/web/src/common/components/IAIIconButton.tsx b/invokeai/frontend/web/src/common/components/IAIIconButton.tsx index 3eedae8e14..4e6e3d7643 100644 --- a/invokeai/frontend/web/src/common/components/IAIIconButton.tsx +++ b/invokeai/frontend/web/src/common/components/IAIIconButton.tsx @@ -7,22 +7,13 @@ import { } from '@chakra-ui/react'; export type IAIIconButtonProps = IconButtonProps & { - styleClass?: string; tooltip?: string; tooltipProps?: Omit; - asCheckbox?: boolean; isChecked?: boolean; }; const IAIIconButton = forwardRef((props: IAIIconButtonProps, forwardedRef) => { - const { - tooltip = '', - styleClass, - tooltipProps, - asCheckbox, - isChecked, - ...rest - } = props; + const { tooltip = '', tooltipProps, isChecked, ...rest } = props; return ( { > diff --git a/invokeai/frontend/web/src/common/components/IAIInput.scss b/invokeai/frontend/web/src/common/components/IAIInput.scss deleted file mode 100644 index ac073fd578..0000000000 --- a/invokeai/frontend/web/src/common/components/IAIInput.scss +++ /dev/null @@ -1,33 +0,0 @@ -.input { - display: grid; - grid-template-columns: max-content auto; - column-gap: 1rem; - align-items: center; - - .input-label { - color: var(--text-color-secondary); - } - - .input-entry { - background-color: var(--background-color-secondary); - border: 2px solid var(--border-color); - border-radius: 0.2rem; - font-weight: bold; - - &:focus { - outline: none; - border: 2px solid var(--input-border-color); - box-shadow: 0 0 10px 0 var(--input-box-shadow-color); - } - - &:disabled { - opacity: 0.2; - } - - &[aria-invalid='true'] { - outline: none; - border: 2px solid var(--border-color-invalid); - box-shadow: 0 0 10px 0 var(--box-shadow-color-invalid); - } - } -} diff --git a/invokeai/frontend/web/src/common/components/IAIInput.tsx b/invokeai/frontend/web/src/common/components/IAIInput.tsx index 50f78f30f1..e0d0536c03 100644 --- a/invokeai/frontend/web/src/common/components/IAIInput.tsx +++ b/invokeai/frontend/web/src/common/components/IAIInput.tsx @@ -1,47 +1,37 @@ -import { FormControl, FormLabel, Input, InputProps } from '@chakra-ui/react'; +import { + FormControl, + FormControlProps, + FormLabel, + Input, + InputProps, +} from '@chakra-ui/react'; import { ChangeEvent } from 'react'; interface IAIInputProps extends InputProps { - styleClass?: string; label?: string; - width?: string | number; value?: string; size?: string; onChange?: (e: ChangeEvent) => void; + formControlProps?: Omit; } export default function IAIInput(props: IAIInputProps) { const { label = '', - styleClass, isDisabled = false, - fontSize = 'sm', - width, - size = 'sm', isInvalid, + formControlProps, ...rest } = props; return ( - {label !== '' && ( - - {label} - - )} - + {label !== '' && {label}} + ); } diff --git a/invokeai/frontend/web/src/common/components/IAINumberInput.scss b/invokeai/frontend/web/src/common/components/IAINumberInput.scss deleted file mode 100644 index aab88f1021..0000000000 --- a/invokeai/frontend/web/src/common/components/IAINumberInput.scss +++ /dev/null @@ -1,66 +0,0 @@ -.invokeai__number-input-form-control { - display: flex; - align-items: center; - column-gap: 1rem; - - .invokeai__number-input-form-label { - color: var(--text-color-secondary); - - &[data-focus] + .invokeai__number-input-root { - outline: none; - border: 2px solid var(--input-border-color); - box-shadow: 0 0 10px 0 var(--input-box-shadow-color); - } - - &[aria-invalid='true'] + .invokeai__number-input-root { - outline: none; - border: 2px solid var(--border-color-invalid); - box-shadow: 0 0 10px 0 var(--box-shadow-color-invalid); - } - } - - .invokeai__number-input-root { - height: 2rem; - display: grid; - grid-template-columns: auto max-content; - column-gap: 0.5rem; - align-items: center; - background-color: var(--background-color-secondary); - border: 2px solid var(--border-color); - border-radius: 0.3rem; - } - - .invokeai__number-input-field { - border: none; - font-weight: bold; - width: 100%; - height: auto; - font-size: 0.9rem; - padding: 0 0.5rem; - - &:focus { - outline: none; - box-shadow: none; - } - - &:disabled { - opacity: 0.2; - } - } - .invokeai__number-input-stepper { - display: grid; - padding-right: 0.5rem; - - .invokeai__number-input-stepper-button { - border: none; - // expand arrow hitbox - padding: 0 0.5rem; - margin: 0 -0.5rem; - - svg { - width: 10px; - height: 10px; - } - } - } -} diff --git a/invokeai/frontend/web/src/common/components/IAINumberInput.tsx b/invokeai/frontend/web/src/common/components/IAINumberInput.tsx index a88c246c2a..cfe06aa727 100644 --- a/invokeai/frontend/web/src/common/components/IAINumberInput.tsx +++ b/invokeai/frontend/web/src/common/components/IAINumberInput.tsx @@ -9,6 +9,7 @@ import { NumberInputField, NumberInputFieldProps, NumberInputProps, + NumberInputStepper, NumberInputStepperProps, Tooltip, TooltipProps, @@ -20,10 +21,7 @@ import { FocusEvent, useEffect, useState } from 'react'; const numberStringRegex = /^-?(0\.)?\.?$/; interface Props extends Omit { - styleClass?: string; label?: string; - labelFontSize?: string | number; - width?: string | number; showStepper?: boolean; value?: number; onChange: (v: number) => void; @@ -45,12 +43,8 @@ interface Props extends Omit { const IAINumberInput = (props: Props) => { const { label, - labelFontSize = 'sm', - styleClass, isDisabled = false, showStepper = true, - width, - textAlign, isInvalid, value, onChange, @@ -119,29 +113,10 @@ const IAINumberInput = (props: Props) => { - {label && ( - - {label} - - )} + {label && {label}} { clampValueOnBlur={false} onChange={handleOnChange} onBlur={handleBlur} - width={width} {...rest} > - + {showStepper && ( -
- - -
+ + + + )}
diff --git a/invokeai/frontend/web/src/common/components/IAIPopover.scss b/invokeai/frontend/web/src/common/components/IAIPopover.scss deleted file mode 100644 index ab2ac26b3a..0000000000 --- a/invokeai/frontend/web/src/common/components/IAIPopover.scss +++ /dev/null @@ -1,12 +0,0 @@ -.invokeai__popover-content { - min-width: unset; - width: unset; - padding: 1rem; - border-radius: 0.5rem; - background-color: var(--background-color); - border: 2px solid var(--border-color); - - .invokeai__popover-arrow { - background-color: var(--background-color) !important; - } -} diff --git a/invokeai/frontend/web/src/common/components/IAIPopover.tsx b/invokeai/frontend/web/src/common/components/IAIPopover.tsx index 38a2a24303..c58accebe4 100644 --- a/invokeai/frontend/web/src/common/components/IAIPopover.tsx +++ b/invokeai/frontend/web/src/common/components/IAIPopover.tsx @@ -12,7 +12,6 @@ type IAIPopoverProps = PopoverProps & { triggerComponent: ReactNode; triggerContainerProps?: BoxProps; children: ReactNode; - styleClass?: string; hasArrow?: boolean; }; @@ -20,16 +19,16 @@ const IAIPopover = (props: IAIPopoverProps) => { const { triggerComponent, children, - styleClass, hasArrow = true, + isLazy = true, ...rest } = props; return ( - + {triggerComponent} - - {hasArrow && } + + {hasArrow && } {children} diff --git a/invokeai/frontend/web/src/common/components/IAISelect.scss b/invokeai/frontend/web/src/common/components/IAISelect.scss deleted file mode 100644 index 8891b3b11e..0000000000 --- a/invokeai/frontend/web/src/common/components/IAISelect.scss +++ /dev/null @@ -1,31 +0,0 @@ -@use '../../styles/Mixins/' as *; - -.invokeai__select { - display: flex; - column-gap: 1rem; - align-items: center; - - .invokeai__select-label { - color: var(--text-color-secondary); - } - - .invokeai__select-picker { - border: 2px solid var(--border-color); - background-color: var(--background-color-secondary); - font-weight: bold; - font-size: 0.9rem; - height: 2rem; - border-radius: 0.2rem; - - &:focus { - outline: none; - border: 2px solid var(--input-border-color); - box-shadow: 0 0 10px 0 var(--input-box-shadow-color); - } - } - - .invokeai__select-option { - background-color: var(--background-color-secondary); - color: var(--text-color-secondary); - } -} diff --git a/invokeai/frontend/web/src/common/components/IAISelect.tsx b/invokeai/frontend/web/src/common/components/IAISelect.tsx index fa25b8f17f..caff77ed17 100644 --- a/invokeai/frontend/web/src/common/components/IAISelect.tsx +++ b/invokeai/frontend/web/src/common/components/IAISelect.tsx @@ -10,7 +10,6 @@ import { MouseEvent } from 'react'; type IAISelectProps = SelectProps & { label?: string; - styleClass?: string; tooltip?: string; tooltipProps?: Omit; validValues: @@ -21,21 +20,11 @@ type IAISelectProps = SelectProps & { * Customized Chakra FormControl + Select multi-part component. */ const IAISelect = (props: IAISelectProps) => { - const { - label, - isDisabled, - validValues, - tooltip, - tooltipProps, - size = 'sm', - fontSize = 'sm', - styleClass, - ...rest - } = props; + const { label, isDisabled, validValues, tooltip, tooltipProps, ...rest } = + props; return ( ) => { e.stopPropagation(); e.nativeEvent.stopImmediatePropagation(); @@ -43,36 +32,16 @@ const IAISelect = (props: IAISelectProps) => { e.nativeEvent.cancelBubble = true; }} > - {label && ( - - {label} - - )} + {label && {label}} - {validValues.map((opt) => { return typeof opt === 'string' || typeof opt === 'number' ? ( - ) : ( - ); diff --git a/invokeai/frontend/web/src/common/components/IAISimpleMenu.tsx b/invokeai/frontend/web/src/common/components/IAISimpleMenu.tsx index c9eb07d2d3..7e1d2654e3 100644 --- a/invokeai/frontend/web/src/common/components/IAISimpleMenu.tsx +++ b/invokeai/frontend/web/src/common/components/IAISimpleMenu.tsx @@ -4,14 +4,15 @@ import { MenuItem, MenuList, MenuProps, - MenuButtonProps, MenuListProps, MenuItemProps, + IconButton, + Button, + IconButtonProps, + ButtonProps, } from '@chakra-ui/react'; import { MouseEventHandler, ReactNode } from 'react'; import { MdArrowDropDown, MdArrowDropUp } from 'react-icons/md'; -import IAIButton from './IAIButton'; -import IAIIconButton from './IAIIconButton'; interface IAIMenuItem { item: ReactNode | string; @@ -22,9 +23,10 @@ interface IAIMenuProps { menuType?: 'icon' | 'regular'; buttonText?: string; iconTooltip?: string; + isLazy?: boolean; menuItems: IAIMenuItem[]; menuProps?: MenuProps; - menuButtonProps?: MenuButtonProps; + menuButtonProps?: IconButtonProps | ButtonProps; menuListProps?: MenuListProps; menuItemProps?: MenuItemProps; } @@ -34,6 +36,7 @@ export default function IAISimpleMenu(props: IAIMenuProps) { menuType = 'icon', iconTooltip, buttonText, + isLazy = true, menuItems, menuProps, menuButtonProps, @@ -48,13 +51,7 @@ export default function IAISimpleMenu(props: IAIMenuProps) { {menuItem.item} @@ -65,34 +62,20 @@ export default function IAISimpleMenu(props: IAIMenuProps) { }; return ( - + {({ isOpen }) => ( <> : } - padding={menuType === 'regular' ? '0 0.5rem' : 0} - backgroundColor="var(--btn-base-color)" - _hover={{ - backgroundColor: 'var(--btn-base-color-hover)', - }} - minWidth="1rem" - minHeight="1rem" - fontSize="1.5rem" + paddingX={0} + paddingY={menuType === 'regular' ? 2 : 0} {...menuButtonProps} > {menuType === 'regular' && buttonText} - + {renderMenuItems()} diff --git a/invokeai/frontend/web/src/common/components/IAISlider.scss b/invokeai/frontend/web/src/common/components/IAISlider.scss deleted file mode 100644 index 21d62d4b07..0000000000 --- a/invokeai/frontend/web/src/common/components/IAISlider.scss +++ /dev/null @@ -1,60 +0,0 @@ -.invokeai__slider-component { - padding-bottom: 0.5rem; - border-radius: 0.5rem; - - .invokeai__slider-component-label { - min-width: max-content; - margin: 0; - font-weight: bold; - color: var(--text-color-secondary); - } - - .invokeai__slider_track { - background-color: var(--tab-color); - } - - .invokeai__slider_track-filled { - background-color: var(--slider-color); - } - - .invokeai__slider-thumb { - width: 4px; - } - - .invokeai__slider-mark { - font-size: 0.75rem; - font-weight: bold; - color: var(--slider-mark-color); - margin-top: 0.3rem; - } - - .invokeai__slider-number-input { - border: none; - font-size: 0.9rem; - font-weight: bold; - height: 2rem; - background-color: var(--background-color-secondary); - border: 2px solid var(--border-color); - - &:focus { - outline: none; - box-shadow: none; - border: 2px solid var(--input-border-color); - box-shadow: 0 0 10px 0 var(--input-box-shadow-color); - } - - &:disabled { - opacity: 0.2; - } - } - - .invokeai__slider-number-stepper { - border: none; - } - - &[data-markers='true'] { - .invokeai__slider_container { - margin-top: -1rem; - } - } -} diff --git a/invokeai/frontend/web/src/common/components/IAISlider.tsx b/invokeai/frontend/web/src/common/components/IAISlider.tsx index 81e0943c4b..1acc64db23 100644 --- a/invokeai/frontend/web/src/common/components/IAISlider.tsx +++ b/invokeai/frontend/web/src/common/components/IAISlider.tsx @@ -37,11 +37,8 @@ export type IAIFullSliderProps = { step?: number; onChange: (v: number) => void; withSliderMarks?: boolean; - sliderMarkLeftOffset?: number; - sliderMarkRightOffset?: number; withInput?: boolean; isInteger?: boolean; - width?: string | number; inputWidth?: string | number; inputReadOnly?: boolean; withReset?: boolean; @@ -52,7 +49,6 @@ export type IAIFullSliderProps = { tooltipSuffix?: string; hideTooltip?: boolean; isCompact?: boolean; - styleClass?: string; sliderFormControlProps?: FormControlProps; sliderFormLabelProps?: FormLabelProps; sliderMarkProps?: Omit; @@ -74,14 +70,11 @@ export default function IAISlider(props: IAIFullSliderProps) { max = 100, step = 1, onChange, - width = '100%', tooltipSuffix = '', withSliderMarks = false, - sliderMarkLeftOffset = 0, - sliderMarkRightOffset = -1, withInput = false, isInteger = false, - inputWidth = '5.5rem', + inputWidth = 16, inputReadOnly = false, withReset = false, hideTooltip = false, @@ -90,7 +83,6 @@ export default function IAISlider(props: IAIFullSliderProps) { isResetDisabled, isSliderDisabled, isInputDisabled, - styleClass, sliderFormControlProps, sliderFormLabelProps, sliderMarkProps, @@ -142,19 +134,13 @@ export default function IAISlider(props: IAIFullSliderProps) { return ( - + {label} @@ -182,23 +164,23 @@ export default function IAISlider(props: IAIFullSliderProps) { onMouseLeave={() => setShowTooltip(false)} focusThumbOnChange={false} isDisabled={isSliderDisabled} - width={width} + // width={width} {...rest} > {withSliderMarks && ( <> {min} {max} @@ -206,23 +188,19 @@ export default function IAISlider(props: IAIFullSliderProps) { )} - - + + @@ -234,13 +212,10 @@ export default function IAISlider(props: IAIFullSliderProps) { value={localInputValue} onChange={handleInputChange} onBlur={handleInputBlur} - className="invokeai__slider-number-field" isDisabled={isInputDisabled} {...sliderNumberInputProps} > onChange(Number(localInputValue))} - className="invokeai__slider-number-stepper" /> onChange(Number(localInputValue))} - className="invokeai__slider-number-stepper" /> diff --git a/invokeai/frontend/web/src/common/components/IAISwitch.scss b/invokeai/frontend/web/src/common/components/IAISwitch.scss deleted file mode 100644 index 168b741520..0000000000 --- a/invokeai/frontend/web/src/common/components/IAISwitch.scss +++ /dev/null @@ -1,24 +0,0 @@ -.invokeai__switch-form-control { - .invokeai__switch-form-label { - color: var(--text-color-secondary); - } - - .invokeai__switch-root { - span { - background-color: var(--switch-bg-color); - span { - background-color: var(--white); - } - } - - &[data-checked] { - span { - background: var(--switch-bg-active-color); - - span { - background-color: var(--white); - } - } - } - } -} diff --git a/invokeai/frontend/web/src/common/components/IAISwitch.tsx b/invokeai/frontend/web/src/common/components/IAISwitch.tsx index 9d3b4f4415..5ef568f28a 100644 --- a/invokeai/frontend/web/src/common/components/IAISwitch.tsx +++ b/invokeai/frontend/web/src/common/components/IAISwitch.tsx @@ -10,7 +10,6 @@ import { interface Props extends SwitchProps { label?: string; width?: string | number; - styleClass?: string; formControlProps?: FormControlProps; formLabelProps?: FormLabelProps; } @@ -25,34 +24,22 @@ const IAISwitch = (props: Props) => { width = 'auto', formControlProps, formLabelProps, - styleClass, ...rest } = props; return ( - + {label} - + ); }; diff --git a/invokeai/frontend/web/src/common/components/ImageUploadOverlay.tsx b/invokeai/frontend/web/src/common/components/ImageUploadOverlay.tsx index 39e6578cc8..28d9d32a71 100644 --- a/invokeai/frontend/web/src/common/components/ImageUploadOverlay.tsx +++ b/invokeai/frontend/web/src/common/components/ImageUploadOverlay.tsx @@ -1,4 +1,4 @@ -import { Heading } from '@chakra-ui/react'; +import { Box, Flex, Heading } from '@chakra-ui/react'; import { useHotkeys } from 'react-hotkeys-hook'; type ImageUploadOverlayProps = { @@ -11,7 +11,7 @@ type ImageUploadOverlayProps = { const ImageUploadOverlay = (props: ImageUploadOverlayProps) => { const { isDragAccept, - isDragReject, + isDragReject: _isDragAccept, overlaySecondaryText, setIsHandlingUpload, } = props; @@ -21,19 +21,42 @@ const ImageUploadOverlay = (props: ImageUploadOverlayProps) => { }); return ( -
- {isDragAccept && ( -
+ + + {isDragAccept ? ( Upload Image{overlaySecondaryText} -
- )} - {isDragReject && ( -
- Invalid Upload - Must be single JPEG or PNG image -
- )} -
+ ) : ( + <> + Invalid Upload + Must be single JPEG or PNG image + + )} + + ); }; export default ImageUploadOverlay; diff --git a/invokeai/frontend/web/src/common/components/ImageUploader.scss b/invokeai/frontend/web/src/common/components/ImageUploader.scss deleted file mode 100644 index ee4b31ace7..0000000000 --- a/invokeai/frontend/web/src/common/components/ImageUploader.scss +++ /dev/null @@ -1,74 +0,0 @@ -.dropzone-container { - position: absolute; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - z-index: 999; - backdrop-filter: blur(20px); - - .dropzone-overlay { - opacity: 0.5; - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - row-gap: 1rem; - align-items: center; - justify-content: center; - background-color: var(--background-color); - - &.is-drag-accept { - box-shadow: inset 0 0 20rem 1rem var(--accent-color); - } - - &.is-drag-reject { - box-shadow: inset 0 0 20rem 1rem var(--status-bad-color); - } - - &.is-handling-upload { - box-shadow: inset 0 0 20rem 1rem var(--status-working-color); - } - } -} - -.image-uploader-button-outer { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - border-radius: 0.5rem; - color: var(--tab-list-text-inactive); - background-color: var(--background-color); - - &:hover { - background-color: var(--background-color-light); - } -} - -.image-upload-button-inner { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; -} - -.image-upload-button { - display: flex; - flex-direction: column; - row-gap: 2rem; - align-items: center; - justify-content: center; - text-align: center; - - svg { - width: 4rem; - height: 4rem; - } - h2 { - font-size: 1.2rem; - } -} diff --git a/invokeai/frontend/web/src/common/components/ImageUploader.tsx b/invokeai/frontend/web/src/common/components/ImageUploader.tsx index 40e31c3947..5397de6ea6 100644 --- a/invokeai/frontend/web/src/common/components/ImageUploader.tsx +++ b/invokeai/frontend/web/src/common/components/ImageUploader.tsx @@ -1,4 +1,4 @@ -import { useToast } from '@chakra-ui/react'; +import { Box, useToast } from '@chakra-ui/react'; import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import useImageUploader from 'common/hooks/useImageUploader'; @@ -139,7 +139,7 @@ const ImageUploader = (props: ImageUploaderProps) => { return ( -
{ // Bail out if user hits spacebar - do not open the uploader @@ -156,7 +156,7 @@ const ImageUploader = (props: ImageUploaderProps) => { setIsHandlingUpload={setIsHandlingUpload} /> )} -
+
); }; diff --git a/invokeai/frontend/web/src/common/components/ImageUploaderButton.tsx b/invokeai/frontend/web/src/common/components/ImageUploaderButton.tsx index 1a989b8c8e..6179efe5e6 100644 --- a/invokeai/frontend/web/src/common/components/ImageUploaderButton.tsx +++ b/invokeai/frontend/web/src/common/components/ImageUploaderButton.tsx @@ -1,4 +1,4 @@ -import { Heading } from '@chakra-ui/react'; +import { Flex, Heading, Icon } from '@chakra-ui/react'; import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext'; import { useContext } from 'react'; import { FaUpload } from 'react-icons/fa'; @@ -16,15 +16,38 @@ const ImageUploaderButton = (props: ImageUploaderButtonProps) => { }; return ( -
-
- - Click or Drag and Drop -
-
+ + + Click or Drag and Drop + + ); }; diff --git a/invokeai/frontend/web/src/common/components/SubItemHook.tsx b/invokeai/frontend/web/src/common/components/SubItemHook.tsx deleted file mode 100644 index cca79a12ef..0000000000 --- a/invokeai/frontend/web/src/common/components/SubItemHook.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { Box } from '@chakra-ui/react'; - -interface SubItemHookProps { - active?: boolean; - width?: string | number; - height?: string | number; - side?: 'left' | 'right'; -} - -export default function SubItemHook(props: SubItemHookProps) { - const { - active = true, - width = '1rem', - height = '1.3rem', - side = 'right', - } = props; - return ( - <> - {side === 'right' && ( - - )} - {side === 'left' && ( - - )} - - ); -} diff --git a/invokeai/frontend/web/src/common/components/WorkInProgress/NodesWIP.tsx b/invokeai/frontend/web/src/common/components/WorkInProgress/NodesWIP.tsx index 65dc277ed7..c86aa767dd 100644 --- a/invokeai/frontend/web/src/common/components/WorkInProgress/NodesWIP.tsx +++ b/invokeai/frontend/web/src/common/components/WorkInProgress/NodesWIP.tsx @@ -1,11 +1,27 @@ +import { Flex, Heading, Text, VStack } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; +import WorkInProgress from './WorkInProgress'; export default function NodesWIP() { const { t } = useTranslation(); return ( -
-

{t('common.nodes')}

-

{t('common.nodesDesc')}

-
+ + + {t('common.nodes')} + + {t('common.nodesDesc')} + + + ); } diff --git a/invokeai/frontend/web/src/common/components/WorkInProgress/PostProcessingWIP.tsx b/invokeai/frontend/web/src/common/components/WorkInProgress/PostProcessingWIP.tsx index fbdfb4b8a5..c98fa5a82b 100644 --- a/invokeai/frontend/web/src/common/components/WorkInProgress/PostProcessingWIP.tsx +++ b/invokeai/frontend/web/src/common/components/WorkInProgress/PostProcessingWIP.tsx @@ -1,13 +1,29 @@ +import { Flex, Heading, Text, VStack } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; +import WorkInProgress from './WorkInProgress'; export const PostProcessingWIP = () => { const { t } = useTranslation(); return ( -
-

{t('common.postProcessing')}

-

{t('common.postProcessDesc1')}

-

{t('common.postProcessDesc2')}

-

{t('common.postProcessDesc3')}

-
+ + + {t('common.postProcessing')} + + {t('common.postProcessDesc1')} + {t('common.postProcessDesc2')} + {t('common.postProcessDesc3')} + + + ); }; diff --git a/invokeai/frontend/web/src/common/components/WorkInProgress/Training.tsx b/invokeai/frontend/web/src/common/components/WorkInProgress/Training.tsx index ff564234a5..23c3209932 100644 --- a/invokeai/frontend/web/src/common/components/WorkInProgress/Training.tsx +++ b/invokeai/frontend/web/src/common/components/WorkInProgress/Training.tsx @@ -1,16 +1,28 @@ +import { Flex, Heading, Text, VStack } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; +import WorkInProgress from './WorkInProgress'; export default function TrainingWIP() { const { t } = useTranslation(); return ( -
-

{t('common.training')}

-

- {t('common.trainingDesc1')} -
-
- {t('common.trainingDesc2')} -

-
+ + + {t('common.training')} + + {t('common.trainingDesc1')} + {t('common.trainingDesc2')} + + + ); } diff --git a/invokeai/frontend/web/src/common/components/WorkInProgress/WorkInProgress.scss b/invokeai/frontend/web/src/common/components/WorkInProgress/WorkInProgress.scss deleted file mode 100644 index 2a17c7bd0a..0000000000 --- a/invokeai/frontend/web/src/common/components/WorkInProgress/WorkInProgress.scss +++ /dev/null @@ -1,24 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.work-in-progress { - display: grid; - width: 100%; - height: $app-content-height; - grid-auto-rows: max-content; - background-color: var(--background-color-secondary); - border-radius: 0.4rem; - place-content: center; - place-items: center; - row-gap: 1rem; - - h1 { - font-size: 2rem; - font-weight: bold; - } - - p { - text-align: center; - max-width: 50rem; - color: var(--subtext-color-bright); - } -} diff --git a/invokeai/frontend/web/src/common/components/WorkInProgress/WorkInProgress.tsx b/invokeai/frontend/web/src/common/components/WorkInProgress/WorkInProgress.tsx new file mode 100644 index 0000000000..deb9110d56 --- /dev/null +++ b/invokeai/frontend/web/src/common/components/WorkInProgress/WorkInProgress.tsx @@ -0,0 +1,24 @@ +import { Flex } from '@chakra-ui/react'; +import { ReactNode } from 'react'; + +type WorkInProgressProps = { + children: ReactNode; +}; + +const WorkInProgress = (props: WorkInProgressProps) => { + const { children } = props; + + return ( + + {children} + + ); +}; + +export default WorkInProgress; diff --git a/invokeai/frontend/web/src/common/components/radix-ui/IAISlider.scss b/invokeai/frontend/web/src/common/components/radix-ui/IAISlider.scss deleted file mode 100644 index 4a1418392e..0000000000 --- a/invokeai/frontend/web/src/common/components/radix-ui/IAISlider.scss +++ /dev/null @@ -1,62 +0,0 @@ -.invokeai__slider-root { - position: relative; - display: flex; - align-items: center; - user-select: none; - touch-action: none; - width: 200px; - - &[data-orientation='horizontal'] { - height: 20px; - } - - &[data-orientation='vertical'] { - width: 20px; - height: 200px; - } - - .invokeai__slider-track { - background-color: black; - position: relative; - flex-grow: 1; - border-radius: 9999px; - - &[data-orientation='horizontal'] { - height: 0.25rem; - } - - &[data-orientation='vertical'] { - width: 0.25rem; - } - - .invokeai__slider-range { - position: absolute; - background-color: white; - border-radius: 9999px; - height: 100%; - } - } - - .invokeai__slider-thumb { - display: flex; - align-items: center; - - .invokeai__slider-thumb-div { - all: unset; - display: block; - width: 1rem; - height: 1rem; - background-color: white; - box-shadow: 0 2px 10px rgba(0, 2, 10, 0.3); - border-radius: 100%; - - &:hover { - background-color: violet; - } - - &:focus { - box-shadow: 0 0 0 5px rgba(0, 2, 10, 0.3); - } - } - } -} diff --git a/invokeai/frontend/web/src/common/components/radix-ui/IAISlider.tsx b/invokeai/frontend/web/src/common/components/radix-ui/IAISlider.tsx deleted file mode 100644 index 52faeb18d3..0000000000 --- a/invokeai/frontend/web/src/common/components/radix-ui/IAISlider.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { Tooltip } from '@chakra-ui/react'; -import * as Slider from '@radix-ui/react-slider'; - -type IAISliderProps = Slider.SliderProps & { - value: number[]; - tooltipLabel?: string; - orientation?: 'horizontal' | 'vertial'; - trackProps?: Slider.SliderTrackProps; - rangeProps?: Slider.SliderRangeProps; - thumbProps?: Slider.SliderThumbProps; -}; - -const _IAISlider = (props: IAISliderProps) => { - const { - value, - tooltipLabel, - orientation, - trackProps, - rangeProps, - thumbProps, - ...rest - } = props; - return ( - - - - - - -
- {/*}> - {value && value[0]} - */} - - - - ); -}; - -export default _IAISlider; diff --git a/invokeai/frontend/web/src/common/components/radix-ui/IAITooltip.scss b/invokeai/frontend/web/src/common/components/radix-ui/IAITooltip.scss deleted file mode 100644 index 7d0ca8455c..0000000000 --- a/invokeai/frontend/web/src/common/components/radix-ui/IAITooltip.scss +++ /dev/null @@ -1,8 +0,0 @@ -.invokeai__tooltip-content { - padding: 0.5rem; - background-color: grey; - border-radius: 0.25rem; - .invokeai__tooltip-arrow { - background-color: grey; - } -} diff --git a/invokeai/frontend/web/src/common/components/radix-ui/IAITooltip.tsx b/invokeai/frontend/web/src/common/components/radix-ui/IAITooltip.tsx deleted file mode 100644 index 539751a8ca..0000000000 --- a/invokeai/frontend/web/src/common/components/radix-ui/IAITooltip.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import * as Tooltip from '@radix-ui/react-tooltip'; -import { ReactNode } from 'react'; - -type IAITooltipProps = Tooltip.TooltipProps & { - trigger: ReactNode; - children: ReactNode; - triggerProps?: Tooltip.TooltipTriggerProps; - contentProps?: Tooltip.TooltipContentProps; - arrowProps?: Tooltip.TooltipArrowProps; -}; - -const IAITooltip = (props: IAITooltipProps) => { - const { trigger, children, triggerProps, contentProps, arrowProps, ...rest } = - props; - - return ( - - - {trigger} - - { - e.preventDefault(); - }} - className="invokeai__tooltip-content" - > - - {children} - - - - - ); -}; - -export default IAITooltip; diff --git a/invokeai/frontend/web/src/common/icons/ImageToImageIcon.tsx b/invokeai/frontend/web/src/common/icons/ImageToImageIcon.tsx index 711d23366a..4898eee899 100644 --- a/invokeai/frontend/web/src/common/icons/ImageToImageIcon.tsx +++ b/invokeai/frontend/web/src/common/icons/ImageToImageIcon.tsx @@ -13,5 +13,8 @@ const ImageToImageIcon = createIcon({ /> ), + defaultProps: { + boxSize: '24px', + }, }); export default ImageToImageIcon; diff --git a/invokeai/frontend/web/src/common/icons/NodesIcon.tsx b/invokeai/frontend/web/src/common/icons/NodesIcon.tsx index 273deaa8cd..539c33f998 100644 --- a/invokeai/frontend/web/src/common/icons/NodesIcon.tsx +++ b/invokeai/frontend/web/src/common/icons/NodesIcon.tsx @@ -11,6 +11,9 @@ const NodesIcon = createIcon({ d="M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z" /> ), + defaultProps: { + boxSize: '24px', + }, }); export default NodesIcon; diff --git a/invokeai/frontend/web/src/common/icons/PostprocessingIcon.tsx b/invokeai/frontend/web/src/common/icons/PostprocessingIcon.tsx index 29f474b079..b4000568b2 100644 --- a/invokeai/frontend/web/src/common/icons/PostprocessingIcon.tsx +++ b/invokeai/frontend/web/src/common/icons/PostprocessingIcon.tsx @@ -11,6 +11,9 @@ const PostprocessingIcon = createIcon({ d="M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z" /> ), + defaultProps: { + boxSize: '24px', + }, }); export default PostprocessingIcon; diff --git a/invokeai/frontend/web/src/common/icons/TextToImageIcon.tsx b/invokeai/frontend/web/src/common/icons/TextToImageIcon.tsx index f6148ea49c..325ea54dda 100644 --- a/invokeai/frontend/web/src/common/icons/TextToImageIcon.tsx +++ b/invokeai/frontend/web/src/common/icons/TextToImageIcon.tsx @@ -13,6 +13,9 @@ const TextToImageIcon = createIcon({ ), + defaultProps: { + boxSize: '24px', + }, }); export default TextToImageIcon; diff --git a/invokeai/frontend/web/src/common/icons/TrainingIcon.tsx b/invokeai/frontend/web/src/common/icons/TrainingIcon.tsx index a6bf178aab..f925013138 100644 --- a/invokeai/frontend/web/src/common/icons/TrainingIcon.tsx +++ b/invokeai/frontend/web/src/common/icons/TrainingIcon.tsx @@ -11,6 +11,9 @@ const TrainingIcon = createIcon({ d="M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z" /> ), + defaultProps: { + boxSize: '24px', + }, }); export default TrainingIcon; diff --git a/invokeai/frontend/web/src/common/icons/UnifiedCanvasIcon.tsx b/invokeai/frontend/web/src/common/icons/UnifiedCanvasIcon.tsx index daa8ecf8a9..3cedec04a4 100644 --- a/invokeai/frontend/web/src/common/icons/UnifiedCanvasIcon.tsx +++ b/invokeai/frontend/web/src/common/icons/UnifiedCanvasIcon.tsx @@ -11,6 +11,9 @@ const UnifiedCanvasIcon = createIcon({ d="M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z" /> ), + defaultProps: { + boxSize: '24px', + }, }); export default UnifiedCanvasIcon; diff --git a/invokeai/frontend/web/src/common/util/parameterTranslation.ts b/invokeai/frontend/web/src/common/util/parameterTranslation.ts index f703a96f4a..07b8ac8ea1 100644 --- a/invokeai/frontend/web/src/common/util/parameterTranslation.ts +++ b/invokeai/frontend/web/src/common/util/parameterTranslation.ts @@ -144,8 +144,8 @@ export const frontendToBackendParameters = ( variationAmount, width, shouldUseSymmetry, - horizontalSymmetryTimePercentage, - verticalSymmetryTimePercentage, + horizontalSymmetrySteps, + verticalSymmetrySteps, } = generationState; const { @@ -185,17 +185,17 @@ export const frontendToBackendParameters = ( // Symmetry Settings if (shouldUseSymmetry) { - if (horizontalSymmetryTimePercentage > 0) { + if (horizontalSymmetrySteps > 0) { generationParameters.h_symmetry_time_pct = Math.max( 0, - Math.min(1, horizontalSymmetryTimePercentage / steps) + Math.min(1, horizontalSymmetrySteps / steps) ); } - if (horizontalSymmetryTimePercentage > 0) { + if (verticalSymmetrySteps > 0) { generationParameters.v_symmetry_time_pct = Math.max( 0, - Math.min(1, verticalSymmetryTimePercentage / steps) + Math.min(1, verticalSymmetrySteps / steps) ); } } diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvas.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvas.tsx index b57bc1cc16..657f407b5d 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvas.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvas.tsx @@ -1,3 +1,4 @@ +import { Box, chakra, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/storeHooks'; import { @@ -88,6 +89,10 @@ const selector = createSelector( } ); +const ChakraStage = chakra(Stage, { + shouldForwardProp: (prop) => !['sx'].includes(prop), +}); + const IAICanvas = () => { const { isMaskEnabled, @@ -135,14 +140,26 @@ const IAICanvas = () => { useCanvasDragMove(); return ( -
-
- + + { visible={shouldShowBoundingBox && !isStaging} /> - + -
-
+ + ); }; diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasGrid.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasGrid.tsx index 9ffed8d70a..e38debae83 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasGrid.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasGrid.tsx @@ -1,7 +1,7 @@ // Grid drawing adapted from https://longviewcoder.com/2021/12/08/konva-a-better-grid/ -import { useColorMode } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; +import { RootState } from 'app/store'; import { useAppSelector } from 'app/storeHooks'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { isEqual, range } from 'lodash'; @@ -26,10 +26,13 @@ const gridLinesColor = { dark: 'rgba(255, 255, 255, 0.2)', green: 'rgba(255, 255, 255, 0.2)', light: 'rgba(0, 0, 0, 0.2)', + ocean: 'rgba(136, 148, 184, 0.2)', }; const IAICanvasGrid = () => { - const { colorMode } = useColorMode(); + const currentTheme = useAppSelector( + (state: RootState) => state.ui.currentTheme + ); const { stageScale, stageCoordinates, stageDimensions } = useAppSelector(selector); const [gridLines, setGridLines] = useState([]); @@ -42,7 +45,8 @@ const IAICanvasGrid = () => { ); useLayoutEffect(() => { - const gridLineColor = gridLinesColor[colorMode]; + const gridLineColor = + gridLinesColor[currentTheme as keyof typeof gridLinesColor]; const { width, height } = stageDimensions; const { x, y } = stageCoordinates; @@ -108,7 +112,7 @@ const IAICanvasGrid = () => { )); setGridLines(xLines.concat(yLines)); - }, [stageScale, stageCoordinates, stageDimensions, colorMode, unscale]); + }, [stageScale, stageCoordinates, stageDimensions, currentTheme, unscale]); return {gridLines}; }; diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasResizer.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasResizer.tsx index 9e07dce992..3062abae91 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasResizer.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasResizer.tsx @@ -1,4 +1,4 @@ -import { Spinner } from '@chakra-ui/react'; +import { Flex, Spinner } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import { @@ -70,9 +70,19 @@ const IAICanvasResizer = () => { ]); return ( -
+ -
+ ); }; diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx index 60af853289..74d6382308 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasStagingAreaToolbar.tsx @@ -115,7 +115,7 @@ const IAICanvasStagingAreaToolbar = () => { return ( { aria-label={`${t('unifiedCanvas.previous')} (Left)`} icon={} onClick={handlePrevImage} - data-selected={true} + colorScheme="accent" isDisabled={isOnFirstImage} /> { aria-label={`${t('unifiedCanvas.next')} (Right)`} icon={} onClick={handleNextImage} - data-selected={true} + colorScheme="accent" isDisabled={isOnLastImage} /> { aria-label={`${t('unifiedCanvas.accept')} (Enter)`} icon={} onClick={handleAccept} - data-selected={true} + colorScheme="accent" /> { onClick={() => dispatch(setShouldShowStagingImage(!shouldShowStagingImage)) } - data-selected={true} + colorScheme="accent" /> { saveStagingAreaImageToGallery(currentStagingAreaImage.image.url) ) } - data-selected={true} + colorScheme="accent" /> } onClick={() => dispatch(discardStagedImages())} - data-selected={true} - style={{ backgroundColor: 'var(--btn-delete-image)' }} + colorScheme="error" fontSize={20} /> diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasStatusText.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasStatusText.tsx index 83ee94520a..e886a3ad5d 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasStatusText.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasStatusText.tsx @@ -1,3 +1,4 @@ +import { Box, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/storeHooks'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; @@ -7,6 +8,8 @@ import { useTranslation } from 'react-i18next'; import roundToHundreth from '../util/roundToHundreth'; import IAICanvasStatusTextCursorPos from './IAICanvasStatusText/IAICanvasStatusTextCursorPos'; +const warningColor = 'var(--invokeai-colors-warning-500)'; + const selector = createSelector( [canvasSelector], (canvas) => { @@ -34,11 +37,10 @@ const selector = createSelector( (boundingBoxScaleMethod === 'manual' && scaledBoxWidth * scaledBoxHeight < 512 * 512) ) { - boundingBoxColor = 'var(--status-working-color)'; + boundingBoxColor = warningColor; } - const activeLayerColor = - layer === 'mask' ? 'var(--status-working-color)' : 'inherit'; + const activeLayerColor = layer === 'mask' ? warningColor : 'inherit'; return { activeLayerColor, @@ -87,55 +89,72 @@ const IAICanvasStatusText = () => { const { t } = useTranslation(); return ( -
-
+ {`${t('unifiedCanvas.activeLayer')}: ${activeLayerString}`}
-
{`${t('unifiedCanvas.canvasScale')}: ${canvasScaleString}%`}
+ >{`${t('unifiedCanvas.activeLayer')}: ${activeLayerString}`} + {`${t('unifiedCanvas.canvasScale')}: ${canvasScaleString}%`} {shouldPreserveMaskedArea && ( -
Preserve Masked Area: On -
+ )} {shouldShowBoundingBox && ( -
{`${t( - 'unifiedcanvas:boundingBox' - )}: ${boundingBoxDimensionsString}`}
+ 'unifiedCanvas.boundingBox' + )}: ${boundingBoxDimensionsString}`} )} {shouldShowScaledBoundingBox && ( -
{`${t( - 'unifiedcanvas:scaledBoundingBox' - )}: ${scaledBoundingBoxDimensionsString}`}
+ 'unifiedCanvas.scaledBoundingBox' + )}: ${scaledBoundingBoxDimensionsString}`} )} {shouldShowCanvasDebugInfo && ( <> -
{`${t( - 'unifiedcanvas:boundingBoxPosition' - )}: ${boundingBoxCoordinatesString}`}
-
{`${t( - 'unifiedcanvas:canvasDimensions' - )}: ${canvasDimensionsString}`}
-
{`${t( - 'unifiedcanvas:canvasPosition' - )}: ${canvasCoordinatesString}`}
+ {`${t( + 'unifiedCanvas.boundingBoxPosition' + )}: ${boundingBoxCoordinatesString}`} + {`${t( + 'unifiedCanvas.canvasDimensions' + )}: ${canvasDimensionsString}`} + {`${t( + 'unifiedCanvas.canvasPosition' + )}: ${canvasCoordinatesString}`} )} -
+
); }; diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx index c77d0cae65..2570290393 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasStatusText/IAICanvasStatusTextCursorPos.tsx @@ -1,3 +1,4 @@ +import { Box } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/storeHooks'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; @@ -33,8 +34,8 @@ export default function IAICanvasStatusTextCursorPos() { const { t } = useTranslation(); return ( -
{`${t( - 'unifiedcanvas:cursorPosition' - )}: ${cursorCoordinatesString}`}
+ {`${t( + 'unifiedCanvas.cursorPosition' + )}: ${cursorCoordinatesString}`} ); } diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx index bca6728b87..9326f52d2d 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasMaskOptions.tsx @@ -111,17 +111,13 @@ const IAICanvasMaskOptions = () => { aria-label={t('unifiedCanvas.maskingOptions')} tooltip={t('unifiedCanvas.maskingOptions')} icon={} - style={ - layer === 'mask' - ? { backgroundColor: 'var(--accent-color)' } - : { backgroundColor: 'var(--btn-base-color)' } - } + isChecked={layer === 'mask'} isDisabled={isStaging} /> } > - + { } /> dispatch(setMaskColor(newColor))} /> } onClick={handleClearMask}> diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx index 72af7f8261..0457d8844c 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasSettingsButtonPopover.tsx @@ -97,7 +97,7 @@ const IAICanvasSettingsButtonPopover = () => { /> } > - + { aria-label={`${t('unifiedCanvas.brush')} (B)`} tooltip={`${t('unifiedCanvas.brush')} (B)`} icon={} - data-selected={tool === 'brush' && !isStaging} + isChecked={tool === 'brush' && !isStaging} onClick={handleSelectBrushTool} isDisabled={isStaging} /> @@ -192,7 +192,7 @@ const IAICanvasToolChooserOptions = () => { aria-label={`${t('unifiedCanvas.eraser')} (E)`} tooltip={`${t('unifiedCanvas.eraser')} (E)`} icon={} - data-selected={tool === 'eraser' && !isStaging} + isChecked={tool === 'eraser' && !isStaging} isDisabled={isStaging} onClick={handleSelectEraserTool} /> @@ -214,7 +214,7 @@ const IAICanvasToolChooserOptions = () => { aria-label={`${t('unifiedCanvas.colorPicker')} (C)`} tooltip={`${t('unifiedCanvas.colorPicker')} (C)`} icon={} - data-selected={tool === 'colorPicker' && !isStaging} + isChecked={tool === 'colorPicker' && !isStaging} isDisabled={isStaging} onClick={handleSelectColorPickerTool} /> @@ -228,8 +228,8 @@ const IAICanvasToolChooserOptions = () => { /> } > - - + + { /> dispatch(setBrushColor(newColor))} /> diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx index 29fdc40975..4e53039e38 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasToolbar.tsx @@ -1,4 +1,4 @@ -import { ButtonGroup } from '@chakra-ui/react'; +import { ButtonGroup, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -68,7 +68,7 @@ export const selector = createSelector( } ); -const IAICanvasOutpaintingControls = () => { +const IAICanvasToolbar = () => { const dispatch = useAppDispatch(); const { isProcessing, @@ -230,7 +230,12 @@ const IAICanvasOutpaintingControls = () => { }; return ( -
+ { aria-label={`${t('unifiedCanvas.move')} (V)`} tooltip={`${t('unifiedCanvas.move')} (V)`} icon={} - data-selected={tool === 'move' || isStaging} + isChecked={tool === 'move' || isStaging} onClick={handleSelectMoveTool} /> { tooltip={`${t('unifiedCanvas.clearCanvas')}`} icon={} onClick={handleResetCanvas} - style={{ backgroundColor: 'var(--btn-delete-image)' }} + colorScheme="error" isDisabled={isStaging} /> -
+
); }; -export default IAICanvasOutpaintingControls; +export default IAICanvasToolbar; diff --git a/invokeai/frontend/web/src/features/gallery/components/CurrentImageButtons.scss b/invokeai/frontend/web/src/features/gallery/components/CurrentImageButtons.scss deleted file mode 100644 index a48454bb8c..0000000000 --- a/invokeai/frontend/web/src/features/gallery/components/CurrentImageButtons.scss +++ /dev/null @@ -1,32 +0,0 @@ -.current-image-options { - width: 100%; - display: flex; - justify-content: center; - align-items: center; - column-gap: 0.5em; - - .current-image-send-to-popover, - .current-image-postprocessing-popover { - display: flex; - flex-direction: column; - row-gap: 0.5rem; - max-width: 25rem; - } - - .current-image-send-to-popover { - .invokeai__button { - place-content: start; - } - } - - .chakra-popover__popper { - z-index: 11; - } - - .delete-image-btn { - background-color: var(--btn-base-color); - svg { - fill: var(--btn-delete-image); - } - } -} diff --git a/invokeai/frontend/web/src/features/gallery/components/CurrentImageButtons.tsx b/invokeai/frontend/web/src/features/gallery/components/CurrentImageButtons.tsx index 92d6aa6d06..be59962556 100644 --- a/invokeai/frontend/web/src/features/gallery/components/CurrentImageButtons.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/CurrentImageButtons.tsx @@ -1,7 +1,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { isEqual } from 'lodash'; -import { ButtonGroup, Link, useToast } from '@chakra-ui/react'; +import { ButtonGroup, Flex, FlexProps, Link, useToast } from '@chakra-ui/react'; import { runESRGAN, runFacetool } from 'app/socketio/actions'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAIButton from 'common/components/IAIButton'; @@ -102,11 +102,13 @@ const currentImageButtonsSelector = createSelector( } ); +type CurrentImageButtonsProps = FlexProps; + /** * Row of buttons for common actions: * Use as init image, use all params, use seed, upscale, fix faces, details, delete. */ -const CurrentImageButtons = () => { +const CurrentImageButtons = (props: CurrentImageButtonsProps) => { const dispatch = useAppDispatch(); const { isProcessing, @@ -395,7 +397,14 @@ const CurrentImageButtons = () => { }; return ( -
+ { /> } > -
+ { {t('parameters.downloadImage')} -
+
} @@ -456,7 +471,7 @@ const CurrentImageButtons = () => { ? `${t('parameters.openInViewer')} (Z)` : `${t('parameters.closeViewer')} (Z)` } - data-selected={isLightboxOpen} + isChecked={isLightboxOpen} onClick={handleLightBox} /> @@ -501,7 +516,12 @@ const CurrentImageButtons = () => { /> } > -
+ { > {t('parameters.restoreFaces')} -
+ { /> } > -
+ { > {t('parameters.upscaleImage')} -
+
@@ -548,7 +573,7 @@ const CurrentImageButtons = () => { icon={} tooltip={`${t('parameters.info')} (I)`} aria-label={`${t('parameters.info')} (I)`} - data-selected={shouldShowImageDetails} + isChecked={shouldShowImageDetails} onClick={handleClickShowImageDetails} /> @@ -559,10 +584,10 @@ const CurrentImageButtons = () => { tooltip={`${t('parameters.deleteImage')} (Del)`} aria-label={`${t('parameters.deleteImage')} (Del)`} isDisabled={!currentImage || !isConnected || isProcessing} - style={{ backgroundColor: 'var(--btn-delete-image)' }} + colorScheme="error" /> -
+
); }; diff --git a/invokeai/frontend/web/src/features/gallery/components/CurrentImageDisplay.scss b/invokeai/frontend/web/src/features/gallery/components/CurrentImageDisplay.scss deleted file mode 100644 index 498da35ea6..0000000000 --- a/invokeai/frontend/web/src/features/gallery/components/CurrentImageDisplay.scss +++ /dev/null @@ -1,83 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.current-image-area { - display: flex; - flex-direction: column; - height: 100%; - row-gap: 1rem; - background-color: var(--background-color-secondary); - border-radius: 0.5rem; -} - -.current-image-preview { - position: relative; - justify-content: center; - align-items: center; - display: flex; - width: 100%; - height: 100%; - - img { - border-radius: 0.5rem; - object-fit: contain; - max-width: 100%; - max-height: 100%; - height: auto; - position: absolute; - } -} - -.current-image-metadata { - grid-area: current-image-preview; -} - -.current-image-next-prev-buttons { - grid-area: current-image-content; - display: flex; - justify-content: space-between; - z-index: 1; - height: 100%; - width: 100%; - pointer-events: none; -} - -.next-prev-button-trigger-area { - width: 7rem; - height: 100%; - width: 15%; - display: grid; - align-items: center; - pointer-events: auto; - - &.prev-button-trigger-area { - justify-content: flex-start; - } - - &.next-button-trigger-area { - justify-content: flex-end; - } -} - -.next-prev-button { - font-size: 4rem; - fill: var(--white); - filter: drop-shadow(0 0 1rem var(--text-color-secondary)); - opacity: 70%; -} - -.current-image-display-placeholder { - background-color: var(--background-color-secondary); - display: grid; - display: flex; - align-items: center; - justify-content: center; - width: 100%; - height: 100%; - border-radius: 0.5rem; - - svg { - width: 10rem; - height: 10rem; - color: var(--svg-color); - } -} diff --git a/invokeai/frontend/web/src/features/gallery/components/CurrentImageDisplay.tsx b/invokeai/frontend/web/src/features/gallery/components/CurrentImageDisplay.tsx index a5e9683afd..6c46e14391 100644 --- a/invokeai/frontend/web/src/features/gallery/components/CurrentImageDisplay.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/CurrentImageDisplay.tsx @@ -1,10 +1,6 @@ +import { Flex, Icon } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/storeHooks'; -import { GalleryState } from 'features/gallery/store/gallerySlice'; -import { - activeTabNameSelector, - uiSelector, -} from 'features/ui/store/uiSelectors'; import { isEqual } from 'lodash'; import { MdPhoto } from 'react-icons/md'; @@ -13,14 +9,11 @@ import CurrentImageButtons from './CurrentImageButtons'; import CurrentImagePreview from './CurrentImagePreview'; export const currentImageDisplaySelector = createSelector( - [gallerySelector, uiSelector, activeTabNameSelector], - (gallery: GalleryState, ui, activeTabName) => { + [gallerySelector], + (gallery) => { const { currentImage, intermediateImage } = gallery; - const { shouldShowImageDetails } = ui; return { - activeTabName, - shouldShowImageDetails, hasAnImageToDisplay: currentImage || intermediateImage, }; }, @@ -35,23 +28,42 @@ export const currentImageDisplaySelector = createSelector( * Displays the current image if there is one, plus associated actions. */ const CurrentImageDisplay = () => { - const { hasAnImageToDisplay, activeTabName } = useAppSelector( - currentImageDisplaySelector - ); + const { hasAnImageToDisplay } = useAppSelector(currentImageDisplaySelector); return ( -
+ {hasAnImageToDisplay ? ( <> ) : ( -
- -
+ + + )} -
+
); }; diff --git a/invokeai/frontend/web/src/features/gallery/components/CurrentImagePreview.tsx b/invokeai/frontend/web/src/features/gallery/components/CurrentImagePreview.tsx index 720df07f4a..0f9ffad325 100644 --- a/invokeai/frontend/web/src/features/gallery/components/CurrentImagePreview.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/CurrentImagePreview.tsx @@ -1,47 +1,24 @@ -import { IconButton, Image } from '@chakra-ui/react'; +import { Flex, Image } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; -import { useAppDispatch, useAppSelector } from 'app/storeHooks'; -import { - GalleryCategory, - GalleryState, - selectNextImage, - selectPrevImage, -} from 'features/gallery/store/gallerySlice'; +import { useAppSelector } from 'app/storeHooks'; +import { GalleryState } from 'features/gallery/store/gallerySlice'; import { uiSelector } from 'features/ui/store/uiSelectors'; import { isEqual } from 'lodash'; -import { useState } from 'react'; -import { FaAngleLeft, FaAngleRight } from 'react-icons/fa'; import { gallerySelector } from '../store/gallerySelectors'; import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer'; +import NextPrevImageButtons from './NextPrevImageButtons'; export const imagesSelector = createSelector( [gallerySelector, uiSelector], (gallery: GalleryState, ui) => { - const { currentCategory, currentImage, intermediateImage } = gallery; + const { currentImage, intermediateImage } = gallery; const { shouldShowImageDetails } = ui; - const tempImages = - gallery.categories[ - currentImage ? (currentImage.category as GalleryCategory) : 'result' - ].images; - const currentImageIndex = tempImages.findIndex( - (i) => i.uuid === gallery?.currentImage?.uuid - ); - const imagesLength = tempImages.length; - return { imageToDisplay: intermediateImage ? intermediateImage : currentImage, isIntermediate: Boolean(intermediateImage), - viewerImageToDisplay: currentImage, - currentCategory, - isOnFirstImage: currentImageIndex === 0, - isOnLastImage: - !isNaN(currentImageIndex) && currentImageIndex === imagesLength - 1, shouldShowImageDetails, - shouldShowPrevImageButton: currentImageIndex === 0, - shouldShowNextImageButton: - !isNaN(currentImageIndex) && currentImageIndex === imagesLength - 1, }; }, { @@ -52,85 +29,44 @@ export const imagesSelector = createSelector( ); export default function CurrentImagePreview() { - const dispatch = useAppDispatch(); - - const { - isOnFirstImage, - isOnLastImage, - shouldShowImageDetails, - imageToDisplay, - isIntermediate, - } = useAppSelector(imagesSelector); - - const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] = - useState(false); - - const handleCurrentImagePreviewMouseOver = () => { - setShouldShowNextPrevButtons(true); - }; - - const handleCurrentImagePreviewMouseOut = () => { - setShouldShowNextPrevButtons(false); - }; - - const handleClickPrevButton = () => { - dispatch(selectPrevImage()); - }; - - const handleClickNextButton = () => { - dispatch(selectNextImage()); - }; + const { shouldShowImageDetails, imageToDisplay, isIntermediate } = + useAppSelector(imagesSelector); return ( -
+ {imageToDisplay && ( )} - {!shouldShowImageDetails && ( -
-
- {shouldShowNextPrevButtons && !isOnFirstImage && ( - } - variant="unstyled" - onClick={handleClickPrevButton} - /> - )} -
-
- {shouldShowNextPrevButtons && !isOnLastImage && ( - } - variant="unstyled" - onClick={handleClickNextButton} - /> - )} -
-
- )} + {!shouldShowImageDetails && } {shouldShowImageDetails && imageToDisplay && ( )} -
+
); } diff --git a/invokeai/frontend/web/src/features/gallery/components/DeleteImageModal.tsx b/invokeai/frontend/web/src/features/gallery/components/DeleteImageModal.tsx index 8b759d9301..734dc3b682 100644 --- a/invokeai/frontend/web/src/features/gallery/components/DeleteImageModal.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/DeleteImageModal.tsx @@ -5,11 +5,8 @@ import { AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, - Button, + forwardRef, Flex, - FormControl, - FormLabel, - Switch, Text, useDisclosure, } from '@chakra-ui/react'; @@ -17,6 +14,8 @@ import { createSelector } from '@reduxjs/toolkit'; import * as InvokeAI from 'app/invokeai'; import { deleteImage } from 'app/socketio/actions'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; +import IAIButton from 'common/components/IAIButton'; +import IAISwitch from 'common/components/IAISwitch'; import { systemSelector } from 'features/system/store/systemSelectors'; import { setShouldConfirmOnDelete, @@ -27,7 +26,6 @@ import { isEqual } from 'lodash'; import { ChangeEvent, cloneElement, - forwardRef, ReactElement, SyntheticEvent, useRef, @@ -110,7 +108,7 @@ const DeleteImageModal = forwardRef( onClose={onClose} > - + Delete image @@ -121,28 +119,20 @@ const DeleteImageModal = forwardRef( Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to. - - - Don't ask me again - - - +
- - + diff --git a/invokeai/frontend/web/src/features/gallery/components/HoverableImage.scss b/invokeai/frontend/web/src/features/gallery/components/HoverableImage.scss deleted file mode 100644 index b6563f4d7b..0000000000 --- a/invokeai/frontend/web/src/features/gallery/components/HoverableImage.scss +++ /dev/null @@ -1,100 +0,0 @@ -.hoverable-image { - display: flex; - justify-content: center; - transition: transform 0.2s ease-out; - - &:hover { - cursor: pointer; - border-radius: 0.5rem; - z-index: 2; - } - - .hoverable-image-image { - width: 100%; - height: 100%; - max-width: 100%; - max-height: 100%; - } - - .hoverable-image-delete-button { - position: absolute; - top: 0.25rem; - right: 0.25rem; - } - - .hoverable-image-content { - display: flex; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - align-items: center; - justify-content: center; - - .hoverable-image-check { - fill: var(--status-good-color); - } - } - - .hoverable-image-icons { - position: absolute; - bottom: -2rem; - display: grid; - width: min-content; - grid-template-columns: repeat(2, max-content); - border-radius: 0.4rem; - background-color: var(--background-color-secondary); - padding: 0.2rem; - gap: 0.2rem; - grid-auto-rows: max-content; - - button { - width: 12px; - height: 12px; - border-radius: 0.2rem; - padding: 10px 0; - flex-shrink: 2; - svg { - width: 12px; - height: 12px; - } - } - } -} - -.hoverable-image-context-menu { - z-index: 15; - padding: 0.4rem; - border-radius: 0.25rem; - background-color: var(--context-menu-bg-color); - box-shadow: var(--context-menu-box-shadow); - - [role='menuitem'] { - font-size: 0.8rem; - line-height: 1rem; - border-radius: 3px; - display: flex; - align-items: center; - height: 1.75rem; - padding: 0 0.5rem; - position: relative; - user-select: none; - cursor: pointer; - outline: none; - - &[data-disabled] { - color: grey; - pointer-events: none; - cursor: not-allowed; - } - - &[data-warning] { - color: var(--status-bad-color); - } - - &[data-highlighted] { - background-color: var(--context-menu-bg-color-hover); - } - } -} diff --git a/invokeai/frontend/web/src/features/gallery/components/HoverableImage.tsx b/invokeai/frontend/web/src/features/gallery/components/HoverableImage.tsx index e3e136ea5b..0d034ed976 100644 --- a/invokeai/frontend/web/src/features/gallery/components/HoverableImage.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/HoverableImage.tsx @@ -1,9 +1,15 @@ -import { Box, Icon, IconButton, Image, useToast } from '@chakra-ui/react'; -import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import { - setCurrentImage, - setShouldHoldGalleryOpen, -} from 'features/gallery/store/gallerySlice'; + Box, + Flex, + Icon, + Image, + MenuItem, + MenuList, + useTheme, + useToast, +} from '@chakra-ui/react'; +import { useAppDispatch, useAppSelector } from 'app/storeHooks'; +import { setCurrentImage } from 'features/gallery/store/gallerySlice'; import { setAllImageToImageParameters, setAllParameters, @@ -13,8 +19,7 @@ import { import { DragEvent, memo, useState } from 'react'; import { FaCheck, FaTrashAlt } from 'react-icons/fa'; import DeleteImageModal from './DeleteImageModal'; - -import * as ContextMenu from '@radix-ui/react-context-menu'; +import { ContextMenu } from 'chakra-ui-contextmenu'; import * as InvokeAI from 'app/invokeai'; import { resizeAndScaleCanvas, @@ -24,6 +29,8 @@ import { hoverableImageSelector } from 'features/gallery/store/gallerySelectors' import { setActiveTab } from 'features/ui/store/uiSlice'; import { useTranslation } from 'react-i18next'; import useSetBothPrompts from 'features/parameters/hooks/usePrompt'; +import { setIsLightboxOpen } from 'features/lightbox/store/lightboxSlice'; +import IAIIconButton from 'common/components/IAIIconButton'; interface HoverableImageProps { image: InvokeAI.Image; @@ -53,6 +60,7 @@ const HoverableImage = memo((props: HoverableImageProps) => { const [isHovered, setIsHovered] = useState(false); const toast = useToast(); + const { direction } = useTheme(); const { t } = useTranslation(); const setBothPrompts = useSetBothPrompts(); @@ -156,110 +164,146 @@ const HoverableImage = memo((props: HoverableImageProps) => { const handleLightBox = () => { dispatch(setCurrentImage(image)); + dispatch(setIsLightboxOpen(true)); }; return ( - { - dispatch(setShouldHoldGalleryOpen(open)); - }} + + menuProps={{ size: 'sm', isLazy: true }} + renderMenu={() => ( + + + {t('parameters.openInViewer')} + + + {t('parameters.usePrompt')} + + + + {t('parameters.useSeed')} + + + {t('parameters.useAll')} + + + {t('parameters.useInitImg')} + + + {t('parameters.sendToImg2Img')} + + + {t('parameters.sendToUnifiedCanvas')} + + + +

{t('parameters.deleteImage')}

+
+
+
+ )} > - + {(ref) => ( -
+ {isSelected && ( )} -
+
{isHovered && galleryImageMinimumWidth >= 64 && ( -
+ - } size="xs" - variant="imageHoverIconButton" fontSize={14} isDisabled={!mayDeleteImage} /> -
+ )} - - { - e.detail.originalEvent.preventDefault(); - }} - > - - {t('parameters.openInViewer')} - - - {t('parameters.usePrompt')} - - - - {t('parameters.useSeed')} - - - {t('parameters.useAll')} - - - {t('parameters.useInitImg')} - - - {t('parameters.sendToImg2Img')} - - - {t('parameters.sendToUnifiedCanvas')} - - - -

{t('parameters.deleteImage')}

-
-
-
- + )} + ); }, memoEqualityCheck); diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageGallery.css b/invokeai/frontend/web/src/features/gallery/components/ImageGallery.css new file mode 100644 index 0000000000..559248dd0f --- /dev/null +++ b/invokeai/frontend/web/src/features/gallery/components/ImageGallery.css @@ -0,0 +1,35 @@ +.ltr-image-gallery-css-transition-enter { + transform: translateX(150%); +} + +.ltr-image-gallery-css-transition-enter-active { + transform: translateX(0); + transition: all 120ms ease-out; +} + +.ltr-image-gallery-css-transition-exit { + transform: translateX(0); +} + +.ltr-image-gallery-css-transition-exit-active { + transform: translateX(150%); + transition: all 120ms ease-out; +} + +.rtl-image-gallery-css-transition-enter { + transform: translateX(-150%); +} + +.rtl-image-gallery-css-transition-enter-active { + transform: translateX(0); + transition: all 120ms ease-out; +} + +.rtl-image-gallery-css-transition-exit { + transform: translateX(0); +} + +.rtl-image-gallery-css-transition-exit-active { + transform: translateX(-150%); + transition: all 120ms ease-out; +} diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageGallery.scss b/invokeai/frontend/web/src/features/gallery/components/ImageGallery.scss deleted file mode 100644 index f12fcd418a..0000000000 --- a/invokeai/frontend/web/src/features/gallery/components/ImageGallery.scss +++ /dev/null @@ -1,187 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.image-gallery-wrapper-enter { - transform: translateX(150%); -} - -.image-gallery-wrapper-enter-active { - transform: translateX(0); - transition: all 120ms ease-out; -} - -.image-gallery-wrapper-exit { - transform: translateX(0); -} - -.image-gallery-wrapper-exit-active { - transform: translateX(150%); - transition: all 120ms ease-out; -} - -.image-gallery-wrapper { - &[data-pinned='false'] { - position: fixed; - height: 100vh; - top: 0; - right: 0; - - .image-gallery-popup { - border-radius: 0; - box-shadow: 0 0 1rem var(--text-color-a3); - .image-gallery-container { - max-height: calc($app-height + 5rem); - } - } - } - - .image-gallery-popup { - background-color: var(--background-color-secondary); - padding: 1rem; - display: flex; - flex-direction: column; - row-gap: 1rem; - border-radius: 0.5rem; - border-left-width: 0.3rem; - - border-color: var(--tab-list-text-inactive); - - &[data-resize-alert='true'] { - border-color: var(--status-bad-color); - } - - .image-gallery-header { - display: flex; - align-items: center; - column-gap: 0.5rem; - justify-content: space-between; - - .image-gallery-header-right-icons { - display: flex; - flex-direction: row; - column-gap: 0.5rem; - } - - .image-gallery-icon-btn { - background-color: var(--btn-load-more); - &:hover { - background-color: var(--btn-load-more-hover); - } - } - - .image-gallery-settings-popover { - display: flex; - flex-direction: column; - row-gap: 0.5rem; - - div { - display: flex; - column-gap: 0.5rem; - align-items: center; - justify-content: space-between; - } - } - - h1 { - font-weight: bold; - } - } - - .image-gallery-container { - display: flex; - flex-direction: column; - max-height: $app-gallery-popover-height; - overflow-y: scroll; - @include HideScrollbar; - - .image-gallery-container-placeholder { - display: flex; - flex-direction: column; - row-gap: 0.5rem; - background-color: var(--background-color); - border-radius: 0.5rem; - place-items: center; - padding: 2rem; - text-align: center; - - p { - color: var(--subtext-color-bright); - font-family: Inter; - } - - svg { - width: 4rem; - height: 4rem; - color: var(--svg-color); - } - } - - .image-gallery-load-more-btn { - background-color: var(--btn-load-more); - font-size: 0.85rem; - padding: 0.5rem; - margin-top: 1rem; - - &:disabled { - &:hover { - background-color: var(--btn-load-more); - } - } - - &:hover { - background-color: var(--btn-load-more-hover); - } - } - } - } -} - -.image-gallery-category-btn-group { - width: max-content; - column-gap: 0; - justify-content: stretch; - - button { - background-color: var(--btn-base-color); - &:hover { - background-color: var(--btn-base-color-hover); - } - flex-grow: 1; - &[data-selected='true'] { - background-color: var(--accent-color); - &:hover { - background-color: var(--accent-color-hover); - } - } - } -} - -// from https://css-tricks.com/a-grid-of-logos-in-squares/ -.image-gallery { - display: grid; - grid-gap: 0.5rem; - .hoverable-image { - padding: 0.5rem; - position: relative; - &::before { - // for apsect ratio - content: ''; - display: block; - padding-bottom: 100%; - } - .hoverable-image-image { - position: absolute; - max-width: 100%; - - // Alternate Version - // top: 0; - // bottom: 0; - // right: 0; - // left: 0; - // margin: auto; - - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - } -} diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageGallery.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageGallery.tsx index 40de29dd36..1b14d9ff67 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageGallery.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageGallery.tsx @@ -1,7 +1,14 @@ -import { Button } from '@chakra-ui/button'; import { NumberSize, Resizable } from 're-resizable'; -import { ButtonGroup } from '@chakra-ui/react'; +import { + Box, + ButtonGroup, + Flex, + Grid, + Icon, + chakra, + useTheme, +} from '@chakra-ui/react'; import { requestImages } from 'app/socketio/actions'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAIButton from 'common/components/IAIButton'; @@ -17,7 +24,6 @@ import { setCurrentCategory, setGalleryImageMinimumWidth, setGalleryImageObjectFit, - setGalleryScrollPosition, setGalleryWidth, setShouldAutoSwitchToNewImages, setShouldHoldGalleryOpen, @@ -38,12 +44,19 @@ import React, { } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; -import { BiReset } from 'react-icons/bi'; import { BsPinAngle, BsPinAngleFill } from 'react-icons/bs'; import { FaImage, FaUser, FaWrench } from 'react-icons/fa'; import { MdPhotoLibrary } from 'react-icons/md'; import { CSSTransition } from 'react-transition-group'; import HoverableImage from './HoverableImage'; +import { APP_GALLERY_HEIGHT_PINNED } from 'theme/util/constants'; + +import './ImageGallery.css'; +import { no_scrollbar } from 'theme/components/scrollbar'; + +const ChakraResizeable = chakra(Resizable, { + shouldForwardProp: (prop) => !['sx'].includes(prop), +}); const GALLERY_SHOW_BUTTONS_MIN_WIDTH = 320; const GALLERY_IMAGE_WIDTH_OFFSET = 40; @@ -64,6 +77,7 @@ const LIGHTBOX_GALLERY_WIDTH = 400; export default function ImageGallery() { const dispatch = useAppDispatch(); + const { direction } = useTheme(); const { t } = useTranslation(); @@ -73,7 +87,6 @@ export default function ImageGallery() { currentImageUuid, shouldPinGallery, shouldShowGallery, - galleryScrollPosition, galleryImageMinimumWidth, galleryGridTemplateColumns, activeTabName, @@ -107,12 +120,11 @@ export default function ImageGallery() { const timeoutIdRef = useRef(null); useEffect(() => { - if (galleryWidth >= GALLERY_SHOW_BUTTONS_MIN_WIDTH) { - setShouldShowButtons(false); - } + setShouldShowButtons(galleryWidth >= GALLERY_SHOW_BUTTONS_MIN_WIDTH); }, [galleryWidth]); const handleSetShouldPinGallery = () => { + !shouldPinGallery && dispatch(setShouldShowGallery(true)); dispatch(setShouldPinGallery(!shouldPinGallery)); dispatch(setDoesCanvasNeedScaling(true)); }; @@ -129,11 +141,6 @@ export default function ImageGallery() { const handleCloseGallery = useCallback(() => { dispatch(setShouldShowGallery(false)); dispatch(setShouldHoldGalleryOpen(false)); - dispatch( - setGalleryScrollPosition( - galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0 - ) - ); setTimeout( () => shouldPinGallery && dispatch(setDoesCanvasNeedScaling(true)), 400 @@ -239,12 +246,6 @@ export default function ImageGallery() { [galleryImageMinimumWidth] ); - // set gallery scroll position - useEffect(() => { - if (!galleryContainerRef.current) return; - galleryContainerRef.current.scrollTop = galleryScrollPosition; - }, [galleryScrollPosition, shouldShowGallery]); - useEffect(() => { function handleClickOutside(e: MouseEvent) { if ( @@ -267,29 +268,63 @@ export default function ImageGallery() { in={shouldShowGallery || shouldHoldGalleryOpen} unmountOnExit timeout={200} - classNames="image-gallery-wrapper" + classNames={`${direction}-image-gallery-css-transition`} > -
- -
+ {shouldShowButtons ? ( <> dispatch(setCurrentCategory('result'))} + flexGrow={1} > {t('gallery.generations')} dispatch(setCurrentCategory('user'))} + flexGrow={1} > {t('gallery.uploads')} @@ -414,14 +452,14 @@ export default function ImageGallery() { } onClick={() => dispatch(setCurrentCategory('result'))} /> } onClick={() => dispatch(setCurrentCategory('user'))} /> @@ -429,96 +467,85 @@ export default function ImageGallery() { )} -
+ } - className="image-gallery-icon-btn" - cursor="pointer" /> } > -
-
- - dispatch(setGalleryImageMinimumWidth(64))} - icon={} - data-selected={shouldPinGallery} - styleClass="image-gallery-icon-btn" - /> -
-
- - dispatch( - setGalleryImageObjectFit( - galleryImageObjectFit === 'contain' - ? 'cover' - : 'contain' - ) + + + dispatch(setGalleryImageMinimumWidth(64)) + } + /> + + dispatch( + setGalleryImageObjectFit( + galleryImageObjectFit === 'contain' + ? 'cover' + : 'contain' ) - } - /> -
-
- ) => - dispatch( - setShouldAutoSwitchToNewImages(e.target.checked) - ) - } - /> -
-
- ) => - dispatch( - setShouldUseSingleGalleryColumn(e.target.checked) - ) - } - /> -
-
+ ) + } + /> + ) => + dispatch(setShouldAutoSwitchToNewImages(e.target.checked)) + } + /> + ) => + dispatch( + setShouldUseSingleGalleryColumn(e.target.checked) + ) + } + /> +
: } /> -
-
-
+ + + {images.length || areMoreImagesAvailable ? ( <> -
{images.map((image) => { @@ -532,34 +559,51 @@ export default function ImageGallery() { /> ); })} -
- + ) : ( -
- + +

{t('gallery.noImagesInGallery')}

-
+
)} -
-
+ + {isResizing && ( -
)} -
+ ); } diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.scss b/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.scss deleted file mode 100644 index 8b59a33579..0000000000 --- a/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.scss +++ /dev/null @@ -1,23 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.image-metadata-viewer { - position: absolute; - top: 0; - width: 100%; - border-radius: 0.5rem; - padding: 1rem; - background-color: var(--metadata-bg-color); - overflow: scroll; - max-height: $app-metadata-height; - height: 100%; - z-index: 10; -} - -.image-json-viewer { - border-radius: 0.5rem; - margin: 0 0.5rem 1rem 0.5rem; - padding: 1rem; - overflow-x: scroll; - word-break: break-all; - background-color: var(--metadata-json-bg-color); -} diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx index a06ebc0bc1..192b832454 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx @@ -1,5 +1,6 @@ import { ExternalLinkIcon } from '@chakra-ui/icons'; import { + Box, Center, Flex, Heading, @@ -43,6 +44,7 @@ import { memo } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { FaCopy } from 'react-icons/fa'; import { IoArrowUndoCircleOutline } from 'react-icons/io5'; +import { APP_METADATA_HEIGHT } from 'theme/util/constants'; type MetadataItemProps = { isLink?: boolean; @@ -163,7 +165,22 @@ const ImageMetadataViewer = memo( const metadataJSON = JSON.stringify(image.metadata, null, 2); return ( -
+ File: @@ -316,7 +333,7 @@ const ImageMetadataViewer = memo( if (postprocess.type === 'esrgan') { const { scale, strength, denoise_str } = postprocess; return ( - + {`${ i + 1 }: Upscale (ESRGAN)`} @@ -346,7 +363,7 @@ const ImageMetadataViewer = memo( } else if (postprocess.type === 'gfpgan') { const { strength } = postprocess; return ( - + {`${ i + 1 }: Face restoration (GFPGAN)`} @@ -364,7 +381,7 @@ const ImageMetadataViewer = memo( } else if (postprocess.type === 'codeformer') { const { strength, fidelity } = postprocess; return ( - + {`${ i + 1 }: Face restoration (Codeformer)`} @@ -417,9 +434,21 @@ const ImageMetadataViewer = memo( Metadata JSON: -
+
{metadataJSON}
-
+
) : ( @@ -430,7 +459,7 @@ const ImageMetadataViewer = memo( )} -
+ ); }, memoEqualityCheck diff --git a/invokeai/frontend/web/src/features/gallery/components/NextPrevImageButtons.tsx b/invokeai/frontend/web/src/features/gallery/components/NextPrevImageButtons.tsx new file mode 100644 index 0000000000..0cf41cb057 --- /dev/null +++ b/invokeai/frontend/web/src/features/gallery/components/NextPrevImageButtons.tsx @@ -0,0 +1,130 @@ +import { ChakraProps, Flex, Grid, IconButton } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; +import { useAppDispatch, useAppSelector } from 'app/storeHooks'; +import { isEqual } from 'lodash'; +import { useState } from 'react'; +import { FaAngleLeft, FaAngleRight } from 'react-icons/fa'; +import { gallerySelector } from '../store/gallerySelectors'; +import { + GalleryCategory, + selectNextImage, + selectPrevImage, +} from '../store/gallerySlice'; + +const nextPrevButtonTriggerAreaStyles: ChakraProps['sx'] = { + height: '100%', + width: '15%', + alignItems: 'center', + pointerEvents: 'auto', +}; +const nextPrevButtonStyles: ChakraProps['sx'] = { + color: 'base.100', +}; + +export const nextPrevImageButtonsSelector = createSelector( + gallerySelector, + (gallery) => { + const { currentImage } = gallery; + + const tempImages = + gallery.categories[ + currentImage ? (currentImage.category as GalleryCategory) : 'result' + ].images; + + const currentImageIndex = tempImages.findIndex( + (i) => i.uuid === gallery?.currentImage?.uuid + ); + const imagesLength = tempImages.length; + + return { + isOnFirstImage: currentImageIndex === 0, + isOnLastImage: + !isNaN(currentImageIndex) && currentImageIndex === imagesLength - 1, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: isEqual, + }, + } +); + +const NextPrevImageButtons = () => { + const dispatch = useAppDispatch(); + + const { isOnFirstImage, isOnLastImage } = useAppSelector( + nextPrevImageButtonsSelector + ); + + const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] = + useState(false); + + const handleCurrentImagePreviewMouseOver = () => { + setShouldShowNextPrevButtons(true); + }; + + const handleCurrentImagePreviewMouseOut = () => { + setShouldShowNextPrevButtons(false); + }; + + const handleClickPrevButton = () => { + dispatch(selectPrevImage()); + }; + + const handleClickNextButton = () => { + dispatch(selectNextImage()); + }; + + return ( + + + {shouldShowNextPrevButtons && !isOnFirstImage && ( + } + variant="unstyled" + onClick={handleClickPrevButton} + boxSize={16} + sx={nextPrevButtonStyles} + /> + )} + + + {shouldShowNextPrevButtons && !isOnLastImage && ( + } + variant="unstyled" + onClick={handleClickNextButton} + boxSize={16} + sx={nextPrevButtonStyles} + /> + )} + + + ); +}; + +export default NextPrevImageButtons; diff --git a/invokeai/frontend/web/src/features/gallery/store/gallerySelectors.ts b/invokeai/frontend/web/src/features/gallery/store/gallerySelectors.ts index fc1cb5d996..751eee14d7 100644 --- a/invokeai/frontend/web/src/features/gallery/store/gallerySelectors.ts +++ b/invokeai/frontend/web/src/features/gallery/store/gallerySelectors.ts @@ -19,7 +19,6 @@ export const imageGallerySelector = createSelector( currentImageUuid, shouldPinGallery, shouldShowGallery, - galleryScrollPosition, galleryImageMinimumWidth, galleryImageObjectFit, shouldHoldGalleryOpen, @@ -34,7 +33,6 @@ export const imageGallerySelector = createSelector( currentImageUuid, shouldPinGallery, shouldShowGallery, - galleryScrollPosition, galleryImageMinimumWidth, galleryImageObjectFit, galleryGridTemplateColumns: shouldUseSingleGalleryColumn diff --git a/invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts b/invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts index 52f8c54dc8..c96a3c9aac 100644 --- a/invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts +++ b/invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts @@ -31,7 +31,6 @@ export interface GalleryState { }; shouldPinGallery: boolean; shouldShowGallery: boolean; - galleryScrollPosition: number; galleryImageMinimumWidth: number; galleryImageObjectFit: GalleryImageObjectFitType; shouldHoldGalleryOpen: boolean; @@ -49,7 +48,6 @@ const initialState: GalleryState = { currentImageUuid: '', shouldPinGallery: true, shouldShowGallery: true, - galleryScrollPosition: 0, galleryImageMinimumWidth: 64, galleryImageObjectFit: 'cover', shouldHoldGalleryOpen: false, @@ -242,9 +240,6 @@ export const gallerySlice = createSlice({ state.shouldShowGallery = action.payload; }, - setGalleryScrollPosition: (state, action: PayloadAction) => { - state.galleryScrollPosition = action.payload; - }, setGalleryImageMinimumWidth: (state, action: PayloadAction) => { state.galleryImageMinimumWidth = action.payload; }, @@ -286,7 +281,6 @@ export const { selectPrevImage, setShouldPinGallery, setShouldShowGallery, - setGalleryScrollPosition, setGalleryImageMinimumWidth, setGalleryImageObjectFit, setShouldHoldGalleryOpen, diff --git a/invokeai/frontend/web/src/features/lightbox/components/Lightbox.scss b/invokeai/frontend/web/src/features/lightbox/components/Lightbox.scss deleted file mode 100644 index 99df6b0756..0000000000 --- a/invokeai/frontend/web/src/features/lightbox/components/Lightbox.scss +++ /dev/null @@ -1,89 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.lightbox-container { - width: 100%; - height: 100%; - color: var(--text-color); - overflow: hidden; - position: absolute; - left: 0; - top: 0; - background-color: var(--background-color-secondary); - z-index: 30; - animation: popIn 0.3s ease-in; - - .image-gallery-wrapper { - max-height: 100% !important; - - .image-gallery-container { - max-height: calc(100vh - 5rem); - } - } - - .current-image-options { - z-index: 2; - position: absolute; - top: 1rem; - } - - .image-metadata-viewer { - left: 0; - max-height: 100%; - } -} - -.lightbox-close-btn { - z-index: 3; - position: absolute; - left: 1rem; - top: 1rem; - @include BaseButton; -} - -.lightbox-display-container { - display: flex; - flex-direction: row; -} - -.lightbox-preview-wrapper { - overflow: hidden; - background-color: var(--background-color-secondary); - display: grid; - grid-template-columns: auto max-content; - place-items: center; - width: 100vw; - height: 100vh; - - .current-image-next-prev-buttons { - position: absolute; - } - - .lightbox-image { - grid-area: lightbox-content; - border-radius: 0.5rem; - } - - .lightbox-image-options { - position: absolute; - z-index: 2; - left: 1rem; - top: 4.5rem; - user-select: none; - border-radius: 0.5rem; - - display: flex; - flex-direction: column; - row-gap: 0.5rem; - } -} - -@keyframes popIn { - from { - opacity: 0; - filter: blur(100); - } - to { - opacity: 1; - filter: blur(0); - } -} diff --git a/invokeai/frontend/web/src/features/lightbox/components/Lightbox.tsx b/invokeai/frontend/web/src/features/lightbox/components/Lightbox.tsx index d712b8d97e..79b2655583 100644 --- a/invokeai/frontend/web/src/features/lightbox/components/Lightbox.tsx +++ b/invokeai/frontend/web/src/features/lightbox/components/Lightbox.tsx @@ -1,21 +1,40 @@ -import { IconButton } from '@chakra-ui/react'; +import { Box, Flex, Grid } from '@chakra-ui/react'; +import { createSelector } from '@reduxjs/toolkit'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAIIconButton from 'common/components/IAIIconButton'; import CurrentImageButtons from 'features/gallery/components/CurrentImageButtons'; -import { imagesSelector } from 'features/gallery/components/CurrentImagePreview'; import ImageGallery from 'features/gallery/components/ImageGallery'; import ImageMetadataViewer from 'features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer'; -import { - selectNextImage, - selectPrevImage, -} from 'features/gallery/store/gallerySlice'; +import NextPrevImageButtons from 'features/gallery/components/NextPrevImageButtons'; +import { gallerySelector } from 'features/gallery/store/gallerySelectors'; import { setIsLightboxOpen } from 'features/lightbox/store/lightboxSlice'; -import { useState } from 'react'; +import { uiSelector } from 'features/ui/store/uiSelectors'; +import { isEqual } from 'lodash'; import { useHotkeys } from 'react-hotkeys-hook'; import { BiExit } from 'react-icons/bi'; -import { FaAngleLeft, FaAngleRight } from 'react-icons/fa'; -import ReactPanZoom from './ReactPanZoom'; +import { TransformWrapper } from 'react-zoom-pan-pinch'; +import useImageTransform from '../hooks/useImageTransform'; +import ReactPanZoomButtons from './ReactPanZoomButtons'; +import ReactPanZoomImage from './ReactPanZoomImage'; + +export const lightboxSelector = createSelector( + [gallerySelector, uiSelector], + (gallery, ui) => { + const { currentImage } = gallery; + const { shouldShowImageDetails } = ui; + + return { + viewerImageToDisplay: currentImage, + shouldShowImageDetails, + }; + }, + { + memoizeOptions: { + resultEqualityCheck: isEqual, + }, + } +); export default function Lightbox() { const dispatch = useAppDispatch(); @@ -24,30 +43,18 @@ export default function Lightbox() { ); const { - viewerImageToDisplay, - shouldShowImageDetails, - isOnFirstImage, - isOnLastImage, - } = useAppSelector(imagesSelector); + rotation, + scaleX, + scaleY, + flipHorizontally, + flipVertically, + rotateCounterClockwise, + rotateClockwise, + reset, + } = useImageTransform(); - const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] = - useState(false); - - const handleCurrentImagePreviewMouseOver = () => { - setShouldShowNextPrevButtons(true); - }; - - const handleCurrentImagePreviewMouseOut = () => { - setShouldShowNextPrevButtons(false); - }; - - const handleClickPrevButton = () => { - dispatch(selectPrevImage()); - }; - - const handleClickNextButton = () => { - dispatch(selectNextImage()); - }; + const { viewerImageToDisplay, shouldShowImageDetails } = + useAppSelector(lightboxSelector); useHotkeys( 'Esc', @@ -58,66 +65,106 @@ export default function Lightbox() { ); return ( -
- } - aria-label="Exit Viewer" - className="lightbox-close-btn" - onClick={() => { - dispatch(setIsLightboxOpen(false)); + + + > + + } + aria-label="Exit Viewer" + onClick={() => { + dispatch(setIsLightboxOpen(false)); + }} + fontSize={20} + /> + + -
-
- - {!shouldShowImageDetails && ( -
-
- {shouldShowNextPrevButtons && !isOnFirstImage && ( - } - variant="unstyled" - onClick={handleClickPrevButton} - /> + + + {viewerImageToDisplay && ( + <> + + {shouldShowImageDetails && ( + )} -
-
+ )} + + {!shouldShowImageDetails && ( + - {shouldShowNextPrevButtons && !isOnLastImage && ( - } - variant="unstyled" - onClick={handleClickNextButton} - /> - )} -
-
- )} - {viewerImageToDisplay && ( - <> - - {shouldShowImageDetails && ( - - )} - - )} -
- -
-
+ + + )} + + + + + + + + + ); } diff --git a/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoom.tsx b/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoom.tsx deleted file mode 100644 index 9401a97874..0000000000 --- a/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoom.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import IAIIconButton from 'common/components/IAIIconButton'; -import * as React from 'react'; -import { - BiReset, - BiRotateLeft, - BiRotateRight, - BiZoomIn, - BiZoomOut, -} from 'react-icons/bi'; -import { MdFlip } from 'react-icons/md'; -import { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch'; - -type ReactPanZoomProps = { - image: string; - styleClass?: string; - alt?: string; - ref?: React.Ref; -}; - -export default function ReactPanZoom({ - image, - alt, - ref, - styleClass, -}: ReactPanZoomProps) { - const [rotation, setRotation] = React.useState(0); - const [flip, setFlip] = React.useState(false); - - const rotateLeft = () => { - if (rotation === -3) { - setRotation(0); - } else { - setRotation(rotation - 1); - } - }; - - const rotateRight = () => { - if (rotation === 3) { - setRotation(0); - } else { - setRotation(rotation + 1); - } - }; - - const flipImage = () => { - setFlip(!flip); - }; - - return ( - - {({ zoomIn, zoomOut, resetTransform, centerView }) => ( - <> -
- } - aria-label="Zoom In" - tooltip="Zoom In" - onClick={() => zoomIn()} - fontSize={20} - /> - - } - aria-label="Zoom Out" - tooltip="Zoom Out" - onClick={() => zoomOut()} - fontSize={20} - /> - - } - aria-label="Rotate Left" - tooltip="Rotate Left" - onClick={rotateLeft} - fontSize={20} - /> - - } - aria-label="Rotate Right" - tooltip="Rotate Right" - onClick={rotateRight} - fontSize={20} - /> - - } - aria-label="Flip Image" - tooltip="Flip Image" - onClick={flipImage} - fontSize={20} - /> - - } - aria-label="Reset" - tooltip="Reset" - onClick={() => { - resetTransform(); - setRotation(0); - setFlip(false); - }} - fontSize={20} - /> -
- - {alt} centerView(1, 0, 'easeOut')} - /> - - - )} -
- ); -} diff --git a/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomButtons.tsx b/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomButtons.tsx new file mode 100644 index 0000000000..fffe609ab7 --- /dev/null +++ b/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomButtons.tsx @@ -0,0 +1,94 @@ +import { ButtonGroup } from '@chakra-ui/react'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { + BiReset, + BiRotateLeft, + BiRotateRight, + BiZoomIn, + BiZoomOut, +} from 'react-icons/bi'; +import { MdFlip } from 'react-icons/md'; +import { useTransformContext } from 'react-zoom-pan-pinch'; + +type ReactPanZoomButtonsProps = { + flipHorizontally: () => void; + flipVertically: () => void; + rotateCounterClockwise: () => void; + rotateClockwise: () => void; + reset: () => void; +}; + +const ReactPanZoomButtons = ({ + flipHorizontally, + flipVertically, + rotateCounterClockwise, + rotateClockwise, + reset, +}: ReactPanZoomButtonsProps) => { + const { zoomIn, zoomOut, resetTransform } = useTransformContext(); + + return ( + + } + aria-label="Zoom In" + tooltip="Zoom In" + onClick={() => zoomIn()} + fontSize={20} + /> + + } + aria-label="Zoom Out" + tooltip="Zoom Out" + onClick={() => zoomOut()} + fontSize={20} + /> + + } + aria-label="Rotate Counter-Clockwise" + tooltip="Rotate Counter-Clockwise" + onClick={rotateCounterClockwise} + fontSize={20} + /> + + } + aria-label="Rotate Clockwise" + tooltip="Rotate Clockwise" + onClick={rotateClockwise} + fontSize={20} + /> + + } + aria-label="Flip Horizontally" + tooltip="Flip Horizontally" + onClick={flipHorizontally} + fontSize={20} + /> + + } + aria-label="Flip Vertically" + tooltip="Flip Vertically" + onClick={flipVertically} + fontSize={20} + /> + + } + aria-label="Reset" + tooltip="Reset" + onClick={() => { + resetTransform(); + reset(); + }} + fontSize={20} + /> + + ); +}; + +export default ReactPanZoomButtons; diff --git a/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomImage.tsx b/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomImage.tsx new file mode 100644 index 0000000000..db6a02ae71 --- /dev/null +++ b/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomImage.tsx @@ -0,0 +1,45 @@ +import * as React from 'react'; +import { TransformComponent, useTransformContext } from 'react-zoom-pan-pinch'; + +type ReactPanZoomProps = { + image: string; + styleClass?: string; + alt?: string; + ref?: React.Ref; + rotation: number; + scaleX: number; + scaleY: number; +}; + +export default function ReactPanZoomImage({ + image, + alt, + ref, + styleClass, + rotation, + scaleX, + scaleY, +}: ReactPanZoomProps) { + const { centerView } = useTransformContext(); + + return ( + + {alt} centerView(1, 0, 'easeOut')} + /> + + ); +} diff --git a/invokeai/frontend/web/src/features/lightbox/hooks/useImageTransform.ts b/invokeai/frontend/web/src/features/lightbox/hooks/useImageTransform.ts new file mode 100644 index 0000000000..c191d7d1d7 --- /dev/null +++ b/invokeai/frontend/web/src/features/lightbox/hooks/useImageTransform.ts @@ -0,0 +1,50 @@ +import { useState } from 'react'; + +const useImageTransform = () => { + const [rotation, setRotation] = useState(0); + const [scaleX, setScaleX] = useState(1); + const [scaleY, setScaleY] = useState(1); + + const rotateCounterClockwise = () => { + if (rotation === -270) { + setRotation(0); + } else { + setRotation(rotation - 90); + } + }; + + const rotateClockwise = () => { + if (rotation === 270) { + setRotation(0); + } else { + setRotation(rotation + 90); + } + }; + + const flipHorizontally = () => { + setScaleX(scaleX * -1); + }; + + const flipVertically = () => { + setScaleY(scaleY * -1); + }; + + const reset = () => { + setRotation(0); + setScaleX(1); + setScaleY(1); + }; + + return { + rotation, + scaleX, + scaleY, + flipHorizontally, + flipVertically, + rotateCounterClockwise, + rotateClockwise, + reset, + }; +}; + +export default useImageTransform; diff --git a/invokeai/frontend/web/src/features/parameters/components/AccordionItems/AdvancedSettings.scss b/invokeai/frontend/web/src/features/parameters/components/AccordionItems/AdvancedSettings.scss deleted file mode 100644 index dcf1b23538..0000000000 --- a/invokeai/frontend/web/src/features/parameters/components/AccordionItems/AdvancedSettings.scss +++ /dev/null @@ -1,54 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.advanced-parameters { - padding-top: 0.5rem; - display: grid; - row-gap: 0.5rem; -} - -.advanced-parameters-item { - display: grid; - max-width: $options-bar-max-width; - border: none; - border-top: 0px; - border-radius: 0.4rem; - background-color: var(--tab-panel-bg); - - &[aria-expanded='true'] { - background-color: var(--tab-hover-color); - border-radius: 0 0 0.4rem 0.4rem; - } -} - -.advanced-parameters-panel { - background-color: var(--tab-panel-bg); - border-radius: 0 0 0.4rem 0.4rem; - padding: 1rem; - - button { - background-color: var(--btn-base-color); - &:hover { - background-color: var(--btn-base-color-hover); - } - - &:disabled { - &:hover { - background-color: var(--btn-base-color); - } - } - } -} - -.advanced-parameters-header { - border-radius: 0.4rem; - font-weight: bold; - - &[aria-expanded='true'] { - background-color: var(--tab-hover-color); - border-radius: 0.4rem 0.4rem 0 0; - } - - &:hover { - background-color: var(--tab-hover-color); - } -} diff --git a/invokeai/frontend/web/src/features/parameters/components/AccordionItems/InvokeAccordionItem.tsx b/invokeai/frontend/web/src/features/parameters/components/AccordionItems/InvokeAccordionItem.tsx index af93704c82..b742f5a37e 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AccordionItems/InvokeAccordionItem.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AccordionItems/InvokeAccordionItem.tsx @@ -21,10 +21,10 @@ export default function InvokeAccordionItem(props: InvokeAccordionItemProps) { const { header, feature, content, additionalHeaderComponents } = props; return ( - - - - + + + + {header} {additionalHeaderComponents} @@ -32,9 +32,7 @@ export default function InvokeAccordionItem(props: InvokeAccordionItemProps) { - - {content} - + {content} ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/BoundingBox/BoundingBoxSettings.scss b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/BoundingBox/BoundingBoxSettings.scss deleted file mode 100644 index b7df91c843..0000000000 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/BoundingBox/BoundingBoxSettings.scss +++ /dev/null @@ -1,53 +0,0 @@ -.inpainting-bounding-box-settings { - display: flex; - flex-direction: column; - border-radius: 0.4rem; - border: 2px solid var(--tab-color); -} - -.inpainting-bounding-box-header { - background-color: var(--tab-color); - display: flex; - flex-direction: row; - justify-content: space-between; - padding: 0.5rem 1rem; - border-radius: 0.3rem 0.3rem 0 0; - align-items: center; - - button { - width: 0.5rem; - height: 1.2rem; - background: none; - &:hover { - background: none; - } - } - - p { - // font-weight: bold; - } -} - -.inpainting-bounding-box-settings-items { - padding: 1rem; - display: flex; - flex-direction: column; - row-gap: 1rem; - - .inpainting-bounding-box-reset-icon-btn { - background-color: var(--btn-base-color); - &:hover { - background-color: var(--btn-base-color-hover); - } - } -} - -.inpainting-bounding-box-dimensions-slider-numberinput { - display: grid; - grid-template-columns: repeat(3, auto); - column-gap: 1rem; -} - -.inpainting-bounding-box-darken { - width: max-content; -} diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/BoundingBox/BoundingBoxSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/BoundingBox/BoundingBoxSettings.tsx index b7fd7d4c67..67740cbc02 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/BoundingBox/BoundingBoxSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/BoundingBox/BoundingBoxSettings.tsx @@ -1,4 +1,4 @@ -import { Box, Flex } from '@chakra-ui/react'; +import { Box, VStack } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAISlider from 'common/components/IAISlider'; @@ -68,7 +68,7 @@ const BoundingBoxSettings = () => { }; return ( - + { inputReadOnly withReset handleReset={handleResetWidth} - sliderMarkRightOffset={-7} /> { inputReadOnly withReset handleReset={handleResetHeight} - sliderMarkRightOffset={-7} /> - + ); }; @@ -108,7 +106,7 @@ export default BoundingBoxSettings; export const BoundingBoxSettingsHeader = () => { const { t } = useTranslation(); return ( - + {t('parameters.boundingBoxHeader')} ); diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/InfillAndScalingSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/InfillAndScalingSettings.tsx index a1f3759837..187b23cdff 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/InfillAndScalingSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/InfillAndScalingSettings.tsx @@ -1,4 +1,4 @@ -import { Flex } from '@chakra-ui/react'; +import { VStack } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAISelect from 'common/components/IAISelect'; @@ -107,7 +107,7 @@ const InfillAndScalingSettings = () => { }; return ( - + { inputReadOnly withReset handleReset={handleResetScaledWidth} - sliderMarkRightOffset={-7} /> { inputReadOnly withReset handleReset={handleResetScaledHeight} - sliderMarkRightOffset={-7} /> { isInputDisabled={infillMethod !== 'tile'} isResetDisabled={infillMethod !== 'tile'} isSliderDisabled={infillMethod !== 'tile'} - sliderMarkRightOffset={-4} label={t('parameters.tileSize')} min={16} max={64} @@ -176,7 +173,7 @@ const InfillAndScalingSettings = () => { dispatch(setTileSize(32)); }} /> - + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/SeamCorrection/SeamBlur.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/SeamCorrection/SeamBlur.tsx index e3107e1d72..1f5237615a 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/SeamCorrection/SeamBlur.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/SeamCorrection/SeamBlur.tsx @@ -13,7 +13,6 @@ export default function SeamBlur() { return ( { return ( - + - + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/SeamCorrection/SeamSize.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/SeamCorrection/SeamSize.tsx index dccbd89b72..25d14e5eac 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/SeamCorrection/SeamSize.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Canvas/SeamCorrection/SeamSize.tsx @@ -14,7 +14,6 @@ export default function SeamSize() { return ( { ); return ( - + {facetoolType === 'codeformer' && } - + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/ImageToImage/ImageToImageStrength.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/ImageToImage/ImageToImageStrength.tsx index 908aa7548b..e4d5a9174d 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/ImageToImage/ImageToImageStrength.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/ImageToImage/ImageToImageStrength.tsx @@ -6,12 +6,11 @@ import { useTranslation } from 'react-i18next'; interface ImageToImageStrengthProps { label?: string; - styleClass?: string; } export default function ImageToImageStrength(props: ImageToImageStrengthProps) { const { t } = useTranslation(); - const { label = `${t('parameters.strength')}`, styleClass } = props; + const { label = `${t('parameters.strength')}` } = props; const img2imgStrength = useAppSelector( (state: RootState) => state.generation.img2imgStrength ); @@ -33,10 +32,9 @@ export default function ImageToImageStrength(props: ImageToImageStrengthProps) { onChange={handleChangeStrength} value={img2imgStrength} isInteger={false} - styleClass={styleClass} withInput withSliderMarks - inputWidth="5.5rem" + inputWidth={22} withReset handleReset={handleImg2ImgStrengthReset} /> diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/HiresSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/HiresSettings.tsx index 5f99f10b5c..97705da9cc 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/HiresSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/HiresSettings.tsx @@ -1,10 +1,8 @@ -import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import type { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAISlider from 'common/components/IAISlider'; import IAISwitch from 'common/components/IAISwitch'; -import SubItemHook from 'common/components/SubItemHook'; import { postprocessingSelector } from 'features/parameters/store/postprocessingSelectors'; import { setHiresFix, @@ -24,7 +22,7 @@ const hiresStrengthSelector = createSelector( } ); -const HiresStrength = () => { +export const HiresStrength = () => { const { hiresFix, hiresStrength } = useAppSelector(hiresStrengthSelector); const dispatch = useAppDispatch(); @@ -40,34 +38,30 @@ const HiresStrength = () => { }; return ( - - - - + ); }; /** * Hires Fix Toggle */ -const HiresSettings = () => { +export const HiresToggle = () => { const dispatch = useAppDispatch(); const hiresFix = useAppSelector( @@ -80,16 +74,11 @@ const HiresSettings = () => { dispatch(setHiresFix(e.target.checked)); return ( - - - - + ); }; - -export default HiresSettings; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/ImageToImageOutputSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/ImageToImageOutputSettings.tsx index f037e79523..c2dea1cbf8 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/ImageToImageOutputSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/ImageToImageOutputSettings.tsx @@ -1,11 +1,11 @@ -import { Flex } from '@chakra-ui/react'; +import { VStack } from '@chakra-ui/react'; import SeamlessSettings from './SeamlessSettings'; const ImageToImageOutputSettings = () => { return ( - + - + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/OutputSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/OutputSettings.tsx index 1eaba1eaae..93ba63d065 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/OutputSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/OutputSettings.tsx @@ -1,13 +1,14 @@ -import { Flex } from '@chakra-ui/react'; -import HiresSettings from './HiresSettings'; +import { VStack } from '@chakra-ui/react'; +import { HiresStrength, HiresToggle } from './HiresSettings'; import SeamlessSettings from './SeamlessSettings'; const OutputSettings = () => { return ( - + - - + + + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/SeamlessSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/SeamlessSettings.tsx index fc649e0400..ddd6a4b24b 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/SeamlessSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/SeamlessSettings.tsx @@ -1,4 +1,3 @@ -import { Flex } from '@chakra-ui/react'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAISwitch from 'common/components/IAISwitch'; @@ -22,14 +21,12 @@ const SeamlessSettings = () => { const { t } = useTranslation(); return ( - - - + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/SymmetrySettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/SymmetrySettings.tsx index 37bb7bdbda..e23385d0bc 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/SymmetrySettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Output/SymmetrySettings.tsx @@ -1,19 +1,20 @@ +import { VStack } from '@chakra-ui/react'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAISlider from 'common/components/IAISlider'; import { - setHorizontalSymmetryTimePercentage, - setVerticalSymmetryTimePercentage, + setHorizontalSymmetrySteps, + setVerticalSymmetrySteps, } from 'features/parameters/store/generationSlice'; import { useTranslation } from 'react-i18next'; export default function SymmetrySettings() { - const horizontalSymmetryTimePercentage = useAppSelector( - (state: RootState) => state.generation.horizontalSymmetryTimePercentage + const horizontalSymmetrySteps = useAppSelector( + (state: RootState) => state.generation.horizontalSymmetrySteps ); - const verticalSymmetryTimePercentage = useAppSelector( - (state: RootState) => state.generation.verticalSymmetryTimePercentage + const verticalSymmetrySteps = useAppSelector( + (state: RootState) => state.generation.verticalSymmetrySteps ); const steps = useAppSelector((state: RootState) => state.generation.steps); @@ -23,33 +24,31 @@ export default function SymmetrySettings() { const { t } = useTranslation(); return ( - <> + dispatch(setHorizontalSymmetryTimePercentage(v))} + value={horizontalSymmetrySteps} + onChange={(v) => dispatch(setHorizontalSymmetrySteps(v))} min={0} max={steps} step={1} withInput withSliderMarks withReset - handleReset={() => dispatch(setHorizontalSymmetryTimePercentage(0))} - sliderMarkRightOffset={-6} - > + handleReset={() => dispatch(setHorizontalSymmetrySteps(0))} + /> dispatch(setVerticalSymmetryTimePercentage(v))} + value={verticalSymmetrySteps} + onChange={(v) => dispatch(setVerticalSymmetrySteps(v))} min={0} max={steps} step={1} withInput withSliderMarks withReset - handleReset={() => dispatch(setVerticalSymmetryTimePercentage(0))} - sliderMarkRightOffset={-6} - > - + handleReset={() => dispatch(setVerticalSymmetrySteps(0))} + /> + ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/Seed.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/Seed.tsx index 5d9d388098..7aac200b26 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/Seed.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/Seed.tsx @@ -1,9 +1,11 @@ +import { HStack } from '@chakra-ui/react'; import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAINumberInput from 'common/components/IAINumberInput'; import { setSeed } from 'features/parameters/store/generationSlice'; import { useTranslation } from 'react-i18next'; +import ShuffleSeed from './ShuffleSeed'; export default function Seed() { const seed = useAppSelector((state: RootState) => state.generation.seed); @@ -21,18 +23,25 @@ export default function Seed() { const handleChangeSeed = (v: number) => dispatch(setSeed(v)); return ( - + + + + ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/SeedSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/SeedSettings.tsx index d524ace666..891b528acd 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/SeedSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/SeedSettings.tsx @@ -1,8 +1,7 @@ -import { Flex } from '@chakra-ui/react'; +import { VStack } from '@chakra-ui/react'; import Perlin from './Perlin'; import RandomizeSeed from './RandomizeSeed'; import Seed from './Seed'; -import ShuffleSeed from './ShuffleSeed'; import Threshold from './Threshold'; /** @@ -10,19 +9,12 @@ import Threshold from './Threshold'; */ const SeedSettings = () => { return ( - + - - - - - - - - - - - + + + + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/Threshold.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/Threshold.tsx index ea1721fc61..dbcf201d04 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/Threshold.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Seed/Threshold.tsx @@ -23,7 +23,6 @@ export default function Threshold() { withInput withReset withSliderMarks - sliderMarkRightOffset={-4} /> ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Upscale/UpscaleSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Upscale/UpscaleSettings.tsx index de8fb16a9e..291b8f9dc2 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Upscale/UpscaleSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Upscale/UpscaleSettings.tsx @@ -1,4 +1,4 @@ -import { Flex } from '@chakra-ui/react'; +import { VStack } from '@chakra-ui/react'; import UpscaleDenoisingStrength from './UpscaleDenoisingStrength'; import UpscaleStrength from './UpscaleStrength'; import UpscaleScale from './UpscaleScale'; @@ -8,11 +8,11 @@ import UpscaleScale from './UpscaleScale'; */ const UpscaleSettings = () => { return ( - + - + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Variations/VariationsSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Variations/VariationsSettings.tsx index 82950231a2..d3bc43f7ae 100644 --- a/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Variations/VariationsSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/AdvancedParameters/Variations/VariationsSettings.tsx @@ -1,4 +1,4 @@ -import { Flex } from '@chakra-ui/react'; +import { VStack } from '@chakra-ui/react'; import SeedWeights from './SeedWeights'; import VariationAmount from './VariationAmount'; @@ -7,10 +7,10 @@ import VariationAmount from './VariationAmount'; */ const VariationsSettings = () => { return ( - + - + ); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainCFGScale.tsx b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainCFGScale.tsx index bb418fa9c0..6c4cecfe17 100644 --- a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainCFGScale.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainCFGScale.tsx @@ -26,7 +26,6 @@ export default function MainCFGScale() { onChange={handleChangeCfgScale} handleReset={() => dispatch(setCfgScale(7.5))} value={cfgScale} - sliderMarkRightOffset={-5} sliderNumberInputProps={{ max: 200 }} withInput withReset @@ -40,10 +39,8 @@ export default function MainCFGScale() { max={200} onChange={handleChangeCfgScale} value={cfgScale} - width="auto" - styleClass="main-settings-block" - textAlign="center" isInteger={false} + numberInputFieldProps={{ textAlign: 'center' }} /> ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainHeight.tsx b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainHeight.tsx index e659cd29d3..0068568402 100644 --- a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainHeight.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainHeight.tsx @@ -32,8 +32,6 @@ export default function MainHeight() { withInput withReset withSliderMarks - sliderMarkRightOffset={-8} - inputWidth="6.2rem" sliderNumberInputProps={{ max: 15360 }} /> ) : ( @@ -44,8 +42,6 @@ export default function MainHeight() { flexGrow={1} onChange={(e) => dispatch(setHeight(Number(e.target.value)))} validValues={HEIGHTS} - styleClass="main-settings-block" - width="5.5rem" /> ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainIterations.tsx b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainIterations.tsx index 0100c8999c..f9e31c71da 100644 --- a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainIterations.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainIterations.tsx @@ -32,7 +32,6 @@ export default function MainIterations() { withInput withReset withSliderMarks - sliderMarkRightOffset={-5} sliderNumberInputProps={{ max: 9999 }} /> ) : ( @@ -43,10 +42,7 @@ export default function MainIterations() { max={9999} onChange={handleChangeIterations} value={iterations} - width="auto" - labelFontSize={0.5} - styleClass="main-settings-block" - textAlign="center" + numberInputFieldProps={{ textAlign: 'center' }} /> ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainParameters.scss b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainParameters.scss deleted file mode 100644 index 962bfac1b2..0000000000 --- a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainParameters.scss +++ /dev/null @@ -1,35 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.main-settings { - display: grid; - row-gap: 1rem; -} - -.main-settings-list { - display: grid; - row-gap: 1rem; -} - -.main-settings-row { - display: grid; - grid-template-columns: repeat(3, auto); - column-gap: 0.5rem; - max-width: $options-bar-max-width; -} - -.main-settings-block { - border-radius: 0.5rem; - display: grid !important; - grid-template-columns: auto !important; - row-gap: 0.5rem; - - .invokeai__number-input-form-label, - .invokeai__select-label { - font-weight: bold; - font-size: 0.9rem !important; - } - - .invokeai__select-label { - margin: 0; - } -} diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainParameters.tsx b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainParameters.tsx deleted file mode 100644 index e11e16d4df..0000000000 --- a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainParameters.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { Flex } from '@chakra-ui/react'; -import { RootState } from 'app/store'; -import { useAppSelector } from 'app/storeHooks'; -import { useTranslation } from 'react-i18next'; -import ParametersAccordion from '../ParametersAccordion'; -import MainCFGScale from './MainCFGScale'; -import MainHeight from './MainHeight'; -import MainIterations from './MainIterations'; -import MainSampler from './MainSampler'; -import MainSteps from './MainSteps'; -import MainWidth from './MainWidth'; - -export const inputWidth = 'auto'; - -export default function MainSettings() { - const { t } = useTranslation(); - - const shouldUseSliders = useAppSelector( - (state: RootState) => state.ui.shouldUseSliders - ); - - const accordionItems = { - main: { - header: `${t('parameters.general')}`, - feature: undefined, - content: shouldUseSliders ? ( - - - - - - - - - ) : ( - - - - - - - - - - - - - ), - }, - }; - return ; -} diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSampler.tsx b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSampler.tsx index 9c3fd09ac3..0f55cca12a 100644 --- a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSampler.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSampler.tsx @@ -26,8 +26,7 @@ export default function MainSampler() { validValues={ activeModel.format === 'diffusers' ? DIFFUSERS_SAMPLERS : SAMPLERS } - styleClass="main-settings-block" - minWidth="9rem" + minWidth={36} /> ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSettings.tsx new file mode 100644 index 0000000000..cad30e58e6 --- /dev/null +++ b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSettings.tsx @@ -0,0 +1,39 @@ +import { Flex, VStack } from '@chakra-ui/react'; +import { RootState } from 'app/store'; +import { useAppSelector } from 'app/storeHooks'; +import MainCFGScale from './MainCFGScale'; +import MainHeight from './MainHeight'; +import MainIterations from './MainIterations'; +import MainSampler from './MainSampler'; +import MainSteps from './MainSteps'; +import MainWidth from './MainWidth'; + +export default function MainSettings() { + const shouldUseSliders = useAppSelector( + (state: RootState) => state.ui.shouldUseSliders + ); + + return shouldUseSliders ? ( + + + + + + + + + ) : ( + + + + + + + + + + + + + ); +} diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSteps.tsx b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSteps.tsx index 3be575f7bf..58553bca86 100644 --- a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSteps.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainSteps.tsx @@ -3,7 +3,10 @@ import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAINumberInput from 'common/components/IAINumberInput'; import IAISlider from 'common/components/IAISlider'; -import { setSteps } from 'features/parameters/store/generationSlice'; +import { + clampSymmetrySteps, + setSteps, +} from 'features/parameters/store/generationSlice'; import { useTranslation } from 'react-i18next'; export default function MainSteps() { @@ -14,7 +17,13 @@ export default function MainSteps() { ); const { t } = useTranslation(); - const handleChangeSteps = (v: number) => dispatch(setSteps(v)); + const handleChangeSteps = (v: number) => { + dispatch(setSteps(v)); + }; + + const handleBlur = () => { + dispatch(clampSymmetrySteps()); + }; return shouldUseSliders ? ( ) : ( @@ -38,9 +46,8 @@ export default function MainSteps() { step={1} onChange={handleChangeSteps} value={steps} - width="auto" - styleClass="main-settings-block" - textAlign="center" + numberInputFieldProps={{ textAlign: 'center' }} + onBlur={handleBlur} /> ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainWidth.tsx b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainWidth.tsx index 7abffcf657..c133f804e7 100644 --- a/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainWidth.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/MainParameters/MainWidth.tsx @@ -32,8 +32,6 @@ export default function MainWidth() { withInput withReset withSliderMarks - sliderMarkRightOffset={-8} - inputWidth="6.2rem" inputReadOnly sliderNumberInputProps={{ max: 15360 }} /> @@ -45,8 +43,6 @@ export default function MainWidth() { flexGrow={1} onChange={(e) => dispatch(setWidth(Number(e.target.value)))} validValues={WIDTHS} - styleClass="main-settings-block" - width="5.5rem" /> ); } diff --git a/invokeai/frontend/web/src/features/parameters/components/ParametersAccordion.tsx b/invokeai/frontend/web/src/features/parameters/components/ParametersAccordion.tsx index 9738b0d30a..019fb02f90 100644 --- a/invokeai/frontend/web/src/features/parameters/components/ParametersAccordion.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/ParametersAccordion.tsx @@ -1,4 +1,4 @@ -import { Accordion, ExpandedIndex } from '@chakra-ui/react'; +import { Accordion } from '@chakra-ui/react'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import { setOpenAccordions } from 'features/system/store/systemSlice'; @@ -30,7 +30,7 @@ const ParametersAccordion = (props: ParametersAccordionsType) => { /** * Stores accordion state in redux so preferred UI setup is retained. */ - const handleChangeAccordionState = (openAccordions: ExpandedIndex) => + const handleChangeAccordionState = (openAccordions: number | number[]) => dispatch(setOpenAccordions(openAccordions)); const renderAccordions = () => { @@ -59,7 +59,6 @@ const ParametersAccordion = (props: ParametersAccordionsType) => { allowMultiple reduceMotion onChange={handleChangeAccordionState} - className="advanced-parameters" > {renderAccordions()} diff --git a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/CancelButton.tsx b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/CancelButton.tsx index 88eb203fc9..9363bcdfd3 100644 --- a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/CancelButton.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/CancelButton.tsx @@ -95,12 +95,7 @@ export default function CancelButton( ]; return ( - + {cancelType === 'immediate' ? ( } @@ -108,17 +103,13 @@ export default function CancelButton( aria-label={t('parameters.cancel.immediate')} isDisabled={!isConnected || !isProcessing || !isCancelable} onClick={handleClickCancel} - className="cancel-btn" + colorScheme="error" {...rest} /> ) : ( - ) : ( - - ) + isCancelScheduled ? : } tooltip={ isCancelScheduled @@ -141,7 +132,7 @@ export default function CancelButton( if (isCancelScheduled) dispatch(setCancelAfter(null)); else dispatch(setCancelAfter(currentIteration)); }} - className="cancel-btn" + colorScheme="error" {...rest} /> )} @@ -149,13 +140,8 @@ export default function CancelButton( menuItems={cancelMenuItems} iconTooltip={t('parameters.cancel.setType')} menuButtonProps={{ - backgroundColor: 'var(--destructive-color)', - color: 'var(--text-color)', - minWidth: '1.5rem', - minHeight: '1.5rem', - _hover: { - backgroundColor: 'var(--destructive-color-hover)', - }, + colorScheme: 'error', + minWidth: 5, }} /> diff --git a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/InvokeButton.tsx b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/InvokeButton.tsx index 504714d329..b68f245044 100644 --- a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/InvokeButton.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/InvokeButton.tsx @@ -1,3 +1,4 @@ +import { Box } from '@chakra-ui/react'; import { readinessSelector } from 'app/selectors/readinessSelector'; import { generateImage } from 'app/socketio/actions'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; @@ -5,6 +6,7 @@ import IAIButton, { IAIButtonProps } from 'common/components/IAIButton'; import IAIIconButton, { IAIIconButtonProps, } from 'common/components/IAIIconButton'; +import { clampSymmetrySteps } from 'features/parameters/store/generationSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; @@ -30,6 +32,7 @@ export default function InvokeButton(props: InvokeButton) { useHotkeys( ['ctrl+enter', 'meta+enter'], () => { + dispatch(clampSymmetrySteps()); dispatch(generateImage(activeTabName)); }, { @@ -41,7 +44,7 @@ export default function InvokeButton(props: InvokeButton) { ); return ( -
+ {iconButton ? ( } isDisabled={!isReady} onClick={handleClickGenerate} - className="invoke-btn" + flexGrow={1} + w="100%" tooltip={t('parameters.invoke')} tooltipProps={{ placement: 'bottom' }} + colorScheme="accent" {...rest} /> ) : ( @@ -60,12 +65,15 @@ export default function InvokeButton(props: InvokeButton) { type="submit" isDisabled={!isReady} onClick={handleClickGenerate} - className="invoke-btn" + flexGrow={1} + w="100%" + colorScheme="accent" + fontWeight={700} {...rest} > Invoke )} -
+
); } diff --git a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/Loopback.tsx b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/Loopback.tsx index 9c0ba478d4..09cc991653 100644 --- a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/Loopback.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/Loopback.tsx @@ -21,8 +21,6 @@ const LoopbackButton = () => { } onClick={() => { diff --git a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/ProcessButtons.scss b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/ProcessButtons.scss deleted file mode 100644 index 658ee08177..0000000000 --- a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/ProcessButtons.scss +++ /dev/null @@ -1,56 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.process-buttons { - display: flex; - column-gap: 0.5rem; -} - -.invoke-btn { - flex-grow: 1; - width: 100%; - - @include Button( - $btn-color: var(--accent-color), - $btn-color-hover: var(--accent-color-hover), - $icon-size: 16px - ); -} - -.cancel-btn { - @include Button( - $btn-color: var(--destructive-color), - $btn-color-hover: var(--destructive-color-hover), - $btn-width: 3rem - ); -} - -.loopback-btn { - &[data-as-checkbox='true'] { - background-color: var(--btn-btn-base-color); - border: 3px solid var(--btn-btn-base-color); - svg { - fill: var(--text-color); - } - &:hover { - background-color: var(--btn-btn-base-color); - border-color: var(--btn-checkbox-border-hover); - svg { - fill: var(--text-color); - } - } - &[data-selected='true'] { - border-color: var(--accent-color); - background-color: var(--btn-btn-base-color); - svg { - fill: var(--text-color); - } - &:hover { - border-color: var(--accent-color); - background-color: var(--btn-btn-base-color); - svg { - fill: var(--text-color); - } - } - } - } -} diff --git a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/ProcessButtons.tsx b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/ProcessButtons.tsx index 0f48fbce8a..e4b3798548 100644 --- a/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/ProcessButtons.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/ProcessButtons/ProcessButtons.tsx @@ -1,3 +1,4 @@ +import { Flex } from '@chakra-ui/react'; import { useAppSelector } from 'app/storeHooks'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import CancelButton from './CancelButton'; @@ -11,11 +12,11 @@ const ProcessButtons = () => { const activeTabName = useAppSelector(activeTabNameSelector); return ( -
+ {activeTabName === 'img2img' && } -
+
); }; diff --git a/invokeai/frontend/web/src/features/parameters/components/PromptInput/NegativePromptInput.tsx b/invokeai/frontend/web/src/features/parameters/components/PromptInput/NegativePromptInput.tsx index a8b1961091..da22fa5594 100644 --- a/invokeai/frontend/web/src/features/parameters/components/PromptInput/NegativePromptInput.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/PromptInput/NegativePromptInput.tsx @@ -19,19 +19,11 @@ const NegativePromptInput = () => { name="negativePrompt" value={negativePrompt} onChange={(e) => dispatch(setNegativePrompt(e.target.value))} - background="var(--prompt-bg-color)" placeholder={t('parameters.negativePrompts')} - _placeholder={{ fontSize: '0.8rem' }} - borderColor="var(--border-color)" - _hover={{ - borderColor: 'var(--border-color-light)', - }} _focusVisible={{ - borderColor: 'var(--border-color-invalid)', - boxShadow: '0 0 10px var(--box-shadow-color-invalid)', + borderColor: 'error.600', }} - fontSize="0.9rem" - color="var(--text-color-secondary)" + fontSize="sm" /> ); diff --git a/invokeai/frontend/web/src/features/parameters/components/PromptInput/PromptInput.scss b/invokeai/frontend/web/src/features/parameters/components/PromptInput/PromptInput.scss deleted file mode 100644 index e7baf2f5f9..0000000000 --- a/invokeai/frontend/web/src/features/parameters/components/PromptInput/PromptInput.scss +++ /dev/null @@ -1,34 +0,0 @@ -.prompt-bar { - display: grid; - row-gap: 1rem; - - input, - textarea { - background-color: var(--prompt-bg-color); - font-size: 1rem; - border: 2px solid var(--border-color); - - &:hover { - border: 2px solid var(--border-color-light); - } - - &:focus-visible { - border: 2px solid var(--input-border-color); - box-shadow: 0 0 10px 0 var(--input-box-shadow-color); - } - - &[aria-invalid='true'] { - border: 2px solid var(--border-color-invalid); - box-shadow: 0 0 10px 0 var(--box-shadow-color-invalid); - } - - &:disabled { - border: 2px solid var(--border-color); - box-shadow: none; - } - } - - textarea { - min-height: 10rem; - } -} diff --git a/invokeai/frontend/web/src/features/parameters/components/PromptInput/PromptInput.tsx b/invokeai/frontend/web/src/features/parameters/components/PromptInput/PromptInput.tsx index 43221f0a8d..3d5c38ddc5 100644 --- a/invokeai/frontend/web/src/features/parameters/components/PromptInput/PromptInput.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/PromptInput/PromptInput.tsx @@ -1,4 +1,4 @@ -import { FormControl, Textarea } from '@chakra-ui/react'; +import { Box, FormControl, Textarea } from '@chakra-ui/react'; import { generateImage } from 'app/socketio/actions'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; @@ -63,7 +63,7 @@ const PromptInput = () => { }; return ( -
+ @@ -71,19 +71,15 @@ const PromptInput = () => { id="prompt" name="prompt" placeholder={t('parameters.promptPlaceholder')} - size="lg" value={prompt} onChange={handleChangePrompt} onKeyDown={handleKeyDown} resize="vertical" - height={30} ref={promptRef} - _placeholder={{ - color: 'var(--text-color-secondary)', - }} + minH={40} /> -
+ ); }; diff --git a/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts b/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts index e05c49f3f7..1cb3a98204 100644 --- a/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts +++ b/invokeai/frontend/web/src/features/parameters/store/generationSlice.ts @@ -4,6 +4,7 @@ import * as InvokeAI from 'app/invokeai'; import { getPromptAndNegative } from 'common/util/getPromptAndNegative'; import promptToString from 'common/util/promptToString'; import { seedWeightsToString } from 'common/util/seedWeightPairs'; +import { clamp } from 'lodash'; export interface GenerationState { cfgScale: number; @@ -33,8 +34,8 @@ export interface GenerationState { variationAmount: number; width: number; shouldUseSymmetry: boolean; - horizontalSymmetryTimePercentage: number; - verticalSymmetryTimePercentage: number; + horizontalSymmetrySteps: number; + verticalSymmetrySteps: number; } const initialGenerationState: GenerationState = { @@ -64,8 +65,8 @@ const initialGenerationState: GenerationState = { variationAmount: 0.1, width: 512, shouldUseSymmetry: false, - horizontalSymmetryTimePercentage: 0, - verticalSymmetryTimePercentage: 0, + horizontalSymmetrySteps: 0, + verticalSymmetrySteps: 0, }; const initialState: GenerationState = initialGenerationState; @@ -99,6 +100,18 @@ export const generationSlice = createSlice({ setSteps: (state, action: PayloadAction) => { state.steps = action.payload; }, + clampSymmetrySteps: (state) => { + state.horizontalSymmetrySteps = clamp( + state.horizontalSymmetrySteps, + 0, + state.steps + ); + state.verticalSymmetrySteps = clamp( + state.verticalSymmetrySteps, + 0, + state.steps + ); + }, setCfgScale: (state, action: PayloadAction) => { state.cfgScale = action.payload; }, @@ -174,7 +187,7 @@ export const generationSlice = createSlice({ threshold, perlin, seamless, - hires_fix, + _hires_fix, width, height, } = action.payload.image; @@ -237,7 +250,7 @@ export const generationSlice = createSlice({ threshold, perlin, seamless, - hires_fix, + _hires_fix, width, height, strength, @@ -334,22 +347,17 @@ export const generationSlice = createSlice({ setShouldUseSymmetry: (state, action: PayloadAction) => { state.shouldUseSymmetry = action.payload; }, - setHorizontalSymmetryTimePercentage: ( - state, - action: PayloadAction - ) => { - state.horizontalSymmetryTimePercentage = action.payload; + setHorizontalSymmetrySteps: (state, action: PayloadAction) => { + state.horizontalSymmetrySteps = action.payload; }, - setVerticalSymmetryTimePercentage: ( - state, - action: PayloadAction - ) => { - state.verticalSymmetryTimePercentage = action.payload; + setVerticalSymmetrySteps: (state, action: PayloadAction) => { + state.verticalSymmetrySteps = action.payload; }, }, }); export const { + clampSymmetrySteps, clearInitialImage, resetParametersState, resetSeed, @@ -384,8 +392,8 @@ export const { setVariationAmount, setWidth, setShouldUseSymmetry, - setHorizontalSymmetryTimePercentage, - setVerticalSymmetryTimePercentage, + setHorizontalSymmetrySteps, + setVerticalSymmetrySteps, } = generationSlice.actions; export default generationSlice.reducer; diff --git a/invokeai/frontend/web/src/features/system/components/Console.scss b/invokeai/frontend/web/src/features/system/components/Console.scss deleted file mode 100644 index e043d58d51..0000000000 --- a/invokeai/frontend/web/src/features/system/components/Console.scss +++ /dev/null @@ -1,75 +0,0 @@ -.console { - width: 100vw; - display: flex; - flex-direction: column; - background: var(--console-bg-color); - overflow: auto; - direction: column; - font-family: monospace; - padding: 0 1rem 1rem 3rem; - border-top-width: 0.3rem; - border-color: var(--resizeable-handle-border-color); - - .console-info-color { - color: var(--error-level-info); - } - - .console-warning-color { - color: var(--error-level-warning); - } - - .console-error-color { - color: var(--status-bad-color); - } - - .console-entry { - display: flex; - column-gap: 0.5rem; - - .console-timestamp { - font-weight: semibold; - } - - .console-message { - word-break: break-all; - } - } -} - -.console-toggle-icon-button { - background: var(--console-icon-button-bg-color); - position: fixed; - left: 0.5rem; - bottom: 0.5rem; - z-index: 10000; - - &:hover { - background: var(--console-icon-button-bg-color-hover); - } - - &[data-error-seen='true'] { - background: var(--status-bad-color); - &:hover { - background: var(--status-bad-color); - } - } -} - -.console-autoscroll-icon-button { - background: var(--console-icon-button-bg-color); - position: fixed; - left: 0.5rem; - bottom: 3rem; - z-index: 10000; - - &:hover { - background: var(--console-icon-button-bg-color-hover); - } - - &[data-autoscroll-enabled='true'] { - background: var(--accent-color); - &:hover { - background: var(--accent-color-hover); - } - } -} diff --git a/invokeai/frontend/web/src/features/system/components/Console.tsx b/invokeai/frontend/web/src/features/system/components/Console.tsx index 5ed8025730..562b339c59 100644 --- a/invokeai/frontend/web/src/features/system/components/Console.tsx +++ b/invokeai/frontend/web/src/features/system/components/Console.tsx @@ -1,6 +1,7 @@ -import { IconButton, Tooltip } from '@chakra-ui/react'; +import { Flex, Text, Tooltip } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; +import IAIIconButton from 'common/components/IAIIconButton'; import { errorSeen, setShouldShowLogViewer, @@ -105,23 +106,47 @@ const Console = () => { style={{ display: 'flex', position: 'fixed', - left: 0, + insetInlineStart: 0, bottom: 0, zIndex: 9999, }} maxHeight="90vh" > -
+ {log.map((entry, i) => { const { timestamp, message, level } = entry; + const colorScheme = level === 'info' ? 'base' : level; return ( -
-

{timestamp}:

-

{message}

-
+ + {timestamp}: + {message} + ); })} -
+ )} {shouldShowLogViewer && ( @@ -129,14 +154,18 @@ const Console = () => { hasArrow label={shouldAutoscroll ? 'Autoscroll On' : 'Autoscroll Off'} > - } onClick={() => setShouldAutoscroll(!shouldAutoscroll)} + isChecked={shouldAutoscroll} + sx={{ + position: 'fixed', + insetInlineStart: 2, + bottom: 12, + zIndex: '10000', + }} /> )} @@ -144,15 +173,18 @@ const Console = () => { hasArrow label={shouldShowLogViewer ? 'Hide Console' : 'Show Console'} > - : } onClick={handleClickLogViewerToggle} + sx={{ + position: 'fixed', + insetInlineStart: 2, + bottom: 2, + zIndex: '10000', + }} + colorScheme={hasError || !wasErrorSeen ? 'error' : 'base'} /> diff --git a/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.scss b/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.scss deleted file mode 100644 index afb2b1c61e..0000000000 --- a/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.scss +++ /dev/null @@ -1,87 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.hotkeys-modal { - width: 36rem; - max-width: 36rem; - display: grid; - padding: 1rem; - row-gap: 1rem; - font-family: Inter; - - h1 { - font-size: 1.2rem; - font-weight: bold; - } - - h2 { - font-weight: bold; - } -} - -.hotkeys-modal-button { - display: flex; - align-items: center; - justify-content: space-between; -} - -.hotkeys-modal-items { - max-height: 36rem; - overflow-y: scroll; - @include HideScrollbar; - - .chakra-accordion { - display: grid; - row-gap: 0.5rem; - } - - .chakra-accordion__item { - border: none; - border-radius: 0.3rem; - background-color: var(--tab-hover-color); - } - - button { - border-radius: 0.3rem; - - &[aria-expanded='true'] { - background-color: var(--tab-hover-color); - border-radius: 0.3rem; - } - } -} - -.hotkey-modal-category { - display: grid; - row-gap: 0.5rem; -} - -.hotkey-modal-item { - display: grid; - grid-template-columns: auto max-content; - justify-content: space-between; - align-items: center; - background-color: var(--background-color); - padding: 0.5rem 1rem; - border-radius: 0.3rem; - - .hotkey-info { - display: grid; - - .hotkey-title { - font-weight: bold; - } - - .hotkey-description { - font-size: 0.9rem; - color: var(--text-color-secondary); - } - } - - .hotkey-key { - font-size: 0.8rem; - font-weight: bold; - background-color: var(--background-color-light); - padding: 0.2rem 0.5rem; - border-radius: 0.3rem; - } -} diff --git a/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.tsx b/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.tsx index 57eb512d79..62b7985a6c 100644 --- a/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.tsx +++ b/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.tsx @@ -4,9 +4,14 @@ import { AccordionIcon, AccordionItem, AccordionPanel, + Divider, + Flex, Modal, + ModalBody, ModalCloseButton, ModalContent, + ModalFooter, + ModalHeader, ModalOverlay, useDisclosure, } from '@chakra-ui/react'; @@ -297,24 +302,20 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { }, ]; - const renderHotkeyModalItems = (hotkeys: HotkeyList[]) => { - const hotkeyModalItemsToRender: ReactElement[] = []; - - hotkeys.forEach((hotkey, i) => { - hotkeyModalItemsToRender.push( - - ); - }); - - return ( -
{hotkeyModalItemsToRender}
- ); - }; + const renderHotkeyModalItems = (hotkeys: HotkeyList[]) => ( + + {hotkeys.map((hotkey, i) => ( + + + {i < hotkeys.length - 1 && } + + ))} + + ); return ( <> @@ -323,16 +324,21 @@ export default function HotkeysModal({ children }: HotkeysModalProps) { })} - - - -

Keyboard Shorcuts

-
+ + {t('hotkeys.keyboardShortcuts')} + + - -

{t('hotkeys.appHotkeys')}

- + + +

{t('hotkeys.appHotkeys')}

+ +
{renderHotkeyModalItems(appHotkeys)} @@ -340,9 +346,15 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
- -

{t('hotkeys.generalHotkeys')}

- + + +

{t('hotkeys.generalHotkeys')}

+ +
{renderHotkeyModalItems(generalHotkeys)} @@ -350,9 +362,15 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
- -

{t('hotkeys.galleryHotkeys')}

- + + +

{t('hotkeys.galleryHotkeys')}

+ +
{renderHotkeyModalItems(galleryHotkeys)} @@ -360,16 +378,23 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
- -

{t('hotkeys.unifiedCanvasHotkeys')}

- + + +

{t('hotkeys.unifiedCanvasHotkeys')}

+ +
{renderHotkeyModalItems(unifiedCanvasHotkeys)}
-
+ +
diff --git a/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModalItem.tsx b/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModalItem.tsx index 384192d3fe..b0163169fe 100644 --- a/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModalItem.tsx +++ b/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModalItem.tsx @@ -1,3 +1,5 @@ +import { Box, Grid, Text } from '@chakra-ui/react'; + interface HotkeysModalProps { hotkey: string; title: string; @@ -7,12 +9,36 @@ interface HotkeysModalProps { export default function HotkeysModalItem(props: HotkeysModalProps) { const { title, hotkey, description } = props; return ( -
-
-

{title}

- {description &&

{description}

} -
-
{hotkey}
-
+ + + {title} + {description && ( + + {description} + + )} + + + {hotkey} + + ); } diff --git a/invokeai/frontend/web/src/features/system/components/InvokeAILogoComponent.tsx b/invokeai/frontend/web/src/features/system/components/InvokeAILogoComponent.tsx new file mode 100644 index 0000000000..ac7dc39a78 --- /dev/null +++ b/invokeai/frontend/web/src/features/system/components/InvokeAILogoComponent.tsx @@ -0,0 +1,30 @@ +import { Flex, Text, Image } from '@chakra-ui/react'; +import { RootState } from 'app/store'; +import { useAppSelector } from 'app/storeHooks'; +import InvokeAILogoImage from 'assets/images/logo.png'; + +const InvokeAILogoComponent = () => { + const appVersion = useAppSelector( + (state: RootState) => state.system.app_version + ); + + return ( + + invoke-ai-logo + + invoke ai + + + {appVersion} + + + ); +}; + +export default InvokeAILogoComponent; diff --git a/invokeai/frontend/web/src/features/system/components/LanguagePicker.tsx b/invokeai/frontend/web/src/features/system/components/LanguagePicker.tsx index 9da9c45bde..7f284ee1f6 100644 --- a/invokeai/frontend/web/src/features/system/components/LanguagePicker.tsx +++ b/invokeai/frontend/web/src/features/system/components/LanguagePicker.tsx @@ -5,7 +5,7 @@ import IAIButton from 'common/components/IAIButton'; import IAIIconButton from 'common/components/IAIIconButton'; import IAIPopover from 'common/components/IAIPopover'; import { useTranslation } from 'react-i18next'; -import { FaLanguage } from 'react-icons/fa'; +import { FaCheck, FaLanguage } from 'react-icons/fa'; export default function LanguagePicker() { const { t, i18n } = useTranslation(); @@ -15,12 +15,15 @@ export default function LanguagePicker() { en: t('common.langEnglish', { lng: 'en' }), fr: t('common.langFrench', { lng: 'fr' }), de: t('common.langGerman', { lng: 'de' }), + he: t('common.langHebrew', { lng: 'he' }), it: t('common.langItalian', { lng: 'it' }), ja: t('common.langJapanese', { lng: 'ja' }), + ko: t('common.langKorean', { lng: 'ko' }), pl: t('common.langPolish', { lng: 'pl' }), - pt_Br: t('common.langBrPortuguese', { lng: 'pt_Br' }), + pt_BR: t('common.langBrPortuguese', { lng: 'pt_BR' }), + pt: t('common.langPortuguese', { lng: 'pt' }), ru: t('common.langRussian', { lng: 'ru' }), - zh_Cn: t('common.langSimplifiedChinese', { lng: 'zh_Cn' }), + zh_CN: t('common.langSimplifiedChinese', { lng: 'zh_CN' }), es: t('common.langSpanish', { lng: 'es' }), uk: t('common.langUkranian', { lng: 'ua' }), }; @@ -31,9 +34,13 @@ export default function LanguagePicker() { languagesToRender.push( + ) : undefined + } onClick={() => i18n.changeLanguage(lang)} - className="modal-close-btn lang-select-btn" aria-label={LANGUAGES[lang as keyof typeof LANGUAGES]} size="sm" minWidth="200px" diff --git a/invokeai/frontend/web/src/features/system/components/Modal.scss b/invokeai/frontend/web/src/features/system/components/Modal.scss deleted file mode 100644 index 7c97221c6b..0000000000 --- a/invokeai/frontend/web/src/features/system/components/Modal.scss +++ /dev/null @@ -1,11 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.modal { - background-color: var(--background-color-secondary); - color: var(--text-color); - font-family: Inter; -} - -.modal-close-btn { - @include BaseButton; -} diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/AddCheckpointModel.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/AddCheckpointModel.tsx index 933b3d925e..8e0cfb2802 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/AddCheckpointModel.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/AddCheckpointModel.tsx @@ -71,7 +71,7 @@ export default function AddCheckpointModel() { const [addManually, setAddmanually] = React.useState(false); return ( - <> + } /> @@ -99,7 +99,7 @@ export default function AddCheckpointModel() { > {({ handleSubmit, errors, touched }) => (
- + {t('modelManager.manual')} @@ -323,6 +323,6 @@ export default function AddCheckpointModel() { )} )} - + ); } diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/AddDiffusersModel.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/AddDiffusersModel.tsx index a0ba19a075..5f8a2bc33b 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/AddDiffusersModel.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/AddDiffusersModel.tsx @@ -28,12 +28,14 @@ function FormItemWrapper({ }) { return ( {children} @@ -95,7 +97,7 @@ export default function AddDiffusersModel() { position="absolute" zIndex={1} size="sm" - right={12} + insetInlineEnd={12} top={3} icon={} /> @@ -105,7 +107,7 @@ export default function AddDiffusersModel() { > {({ handleSubmit, errors, touched }) => ( - + {/* Name */} {t('modelManager.formMessageDiffusersModelLocationDesc')} @@ -230,9 +234,11 @@ export default function AddDiffusersModel() { {t('modelManager.formMessageDiffusersVAELocation')} {t('modelManager.formMessageDiffusersVAELocationDesc')} @@ -286,11 +292,7 @@ export default function AddDiffusersModel() { - + {t('modelManager.addModel')} diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/AddModel.scss b/invokeai/frontend/web/src/features/system/components/ModelManager/AddModel.scss deleted file mode 100644 index f8144cd4f8..0000000000 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/AddModel.scss +++ /dev/null @@ -1,16 +0,0 @@ -.add-model-modal { - display: flex; -} - -.add-model-modal-body { - display: flex; - flex-direction: column; - row-gap: 1rem; - padding-bottom: 2rem; -} - -.add-model-form { - display: flex; - flex-direction: column; - row-gap: 0.5rem; -} diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/AddModel.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/AddModel.tsx index 269577227f..ad8437e845 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/AddModel.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/AddModel.tsx @@ -1,9 +1,11 @@ import { + Button, Flex, Modal, ModalBody, ModalCloseButton, ModalContent, + ModalFooter, ModalHeader, ModalOverlay, Text, @@ -33,16 +35,11 @@ function AddModelBox({ {text} @@ -71,10 +68,9 @@ export default function AddModel() { aria-label={t('modelManager.addNewModel')} tooltip={t('modelManager.addNewModel')} onClick={onOpen} - className="modal-close-btn" size="sm" > - + {t('modelManager.addNew')} @@ -87,16 +83,12 @@ export default function AddModel() { closeOnOverlayClick={false} > - + {t('modelManager.addNewModel')} - - + + {addNewModelUIOption == null && ( - + dispatch(setAddNewModelUIOption('ckpt'))} @@ -110,6 +102,7 @@ export default function AddModel() { {addNewModelUIOption == 'ckpt' && } {addNewModelUIOption == 'diffusers' && } + diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/CheckpointModelEdit.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/CheckpointModelEdit.tsx index 5f58583ff0..b7573f7b56 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/CheckpointModelEdit.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/CheckpointModelEdit.tsx @@ -101,7 +101,7 @@ export default function CheckpointModelEdit() { }; return openModel ? ( - + {openModel} @@ -112,7 +112,7 @@ export default function CheckpointModelEdit() { flexDirection="column" maxHeight={window.innerHeight - 270} overflowY="scroll" - paddingRight="2rem" + paddingInlineEnd={8} > {({ handleSubmit, errors, touched }) => ( - + {/* Description */} {!!errors.description && touched.description ? ( {errors.description} @@ -162,7 +162,7 @@ export default function CheckpointModelEdit() { id="config" name="config" type="text" - width="lg" + width="full" /> {!!errors.config && touched.config ? ( {errors.config} @@ -188,7 +188,7 @@ export default function CheckpointModelEdit() { id="weights" name="weights" type="text" - width="lg" + width="full" /> {!!errors.weights && touched.weights ? ( {errors.weights} @@ -211,7 +211,7 @@ export default function CheckpointModelEdit() { id="vae" name="vae" type="text" - width="lg" + width="full" /> {!!errors.vae && touched.vae ? ( {errors.vae} @@ -316,15 +316,15 @@ export default function CheckpointModelEdit() { ) : ( - - Pick A Model To Edit - + Pick A Model To Edit ); } diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/DiffusersModelEdit.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/DiffusersModelEdit.tsx index 59fe68a3f9..a21aee672c 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/DiffusersModelEdit.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/DiffusersModelEdit.tsx @@ -109,18 +109,13 @@ export default function DiffusersModelEdit() { }; return openModel ? ( - + {openModel} - + {({ handleSubmit, errors, touched }) => ( - + {/* Description */} {!!errors.description && touched.description ? ( {errors.description} @@ -169,7 +164,7 @@ export default function DiffusersModelEdit() { id="path" name="path" type="text" - width="lg" + width="full" /> {!!errors.path && touched.path ? ( {errors.path} @@ -192,7 +187,7 @@ export default function DiffusersModelEdit() { id="repo_id" name="repo_id" type="text" - width="lg" + width="full" /> {!!errors.repo_id && touched.repo_id ? ( {errors.repo_id} @@ -217,7 +212,7 @@ export default function DiffusersModelEdit() { id="vae.path" name="vae.path" type="text" - width="lg" + width="full" /> {!!errors.vae?.path && touched.vae?.path ? ( {errors.vae?.path} @@ -242,7 +237,7 @@ export default function DiffusersModelEdit() { id="vae.repo_id" name="vae.repo_id" type="text" - width="lg" + width="full" /> {!!errors.vae?.repo_id && touched.vae?.repo_id ? ( {errors.vae?.repo_id} @@ -269,15 +264,15 @@ export default function DiffusersModelEdit() { ) : ( - - Pick A Model To Edit - + Pick A Model To Edit ); } diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/MergeModels.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/MergeModels.tsx index cd10a43856..3b1905979c 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/MergeModels.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/MergeModels.tsx @@ -1,8 +1,10 @@ import { Flex, Modal, + ModalBody, ModalCloseButton, ModalContent, + ModalFooter, ModalHeader, ModalOverlay, Radio, @@ -57,19 +59,19 @@ export default function MergeModels() { const [modelMergeForce, setModelMergeForce] = useState(false); - const modelOneList = Object.keys(diffusersModels).filter((model) => { - if (model !== modelTwo && model !== modelThree) return model; - }); + const modelOneList = Object.keys(diffusersModels).filter( + (model) => model !== modelTwo && model !== modelThree + ); - const modelTwoList = Object.keys(diffusersModels).filter((model) => { - if (model !== modelOne && model !== modelThree) return model; - }); + const modelTwoList = Object.keys(diffusersModels).filter( + (model) => model !== modelOne && model !== modelThree + ); const modelThreeList = [ - 'none', - ...Object.keys(diffusersModels).filter((model) => { - if (model !== modelOne && model !== modelTwo) return model; - }), + { key: t('modelManager.none'), value: 'none' }, + ...Object.keys(diffusersModels) + .filter((model) => model !== modelOne && model !== modelTwo) + .map((model) => ({ key: model, value: model })), ]; const isProcessing = useAppSelector( @@ -96,8 +98,8 @@ export default function MergeModels() { return ( <> - - + + {t('modelManager.mergeModels')} @@ -109,183 +111,201 @@ export default function MergeModels() { closeOnOverlayClick={false} > - + {t('modelManager.mergeModels')} - - - {t('modelManager.modelMergeHeaderHelp1')} - - {t('modelManager.modelMergeHeaderHelp2')} - - - - setModelOne(e.target.value)} - /> - setModelTwo(e.target.value)} - /> - { - if (e.target.value !== 'none') { - setModelThree(e.target.value); - setModelMergeInterp('add_difference'); - } else { - setModelThree('none'); - setModelMergeInterp('weighted_sum'); - } + + + - - - setMergedModelName(e.target.value)} - /> - - - setModelMergeAlpha(v)} - withInput - withReset - handleReset={() => setModelMergeAlpha(0.5)} - withSliderMarks - sliderMarkRightOffset={-7} - /> - - {t('modelManager.modelMergeAlphaHelp')} - - - - - - {t('modelManager.interpolationType')} - - setModelMergeInterp(v)} - > - - {modelThree === 'none' ? ( - <> - weighted_sum - sigmoid - inv_sigmoid - - ) : ( - - - add_difference - - - )} - - - - - + {t('modelManager.modelMergeHeaderHelp1')} + + {t('modelManager.modelMergeHeaderHelp2')} + + - - {t('modelManager.mergedModelSaveLocation')} + setModelOne(e.target.value)} + /> + setModelTwo(e.target.value)} + /> + { + if (e.target.value !== 'none') { + setModelThree(e.target.value); + setModelMergeInterp('add_difference'); + } else { + setModelThree('none'); + setModelMergeInterp('weighted_sum'); + } + }} + /> + + + setMergedModelName(e.target.value)} + /> + + + setModelMergeAlpha(v)} + withInput + withReset + handleReset={() => setModelMergeAlpha(0.5)} + withSliderMarks + /> + + {t('modelManager.modelMergeAlphaHelp')} + + + + + + {t('modelManager.interpolationType')} - setModelMergeSaveLocType(v) - } + value={modelMergeInterp} + onChange={( + v: + | 'weighted_sum' + | 'sigmoid' + | 'inv_sigmoid' + | 'add_difference' + ) => setModelMergeInterp(v)} > - - {t('modelManager.invokeAIFolder')} - - {t('modelManager.custom')} + {modelThree === 'none' ? ( + <> + + + {t('modelManager.weightedSum')} + + + + {t('modelManager.sigmoid')} + + + + {t('modelManager.inverseSigmoid')} + + + + ) : ( + + + + {t('modelManager.addDifference')} + + + + )} - {modelMergeSaveLocType === 'custom' && ( - setModelMergeCustomSaveLoc(e.target.value)} - /> - )} + + + + {t('modelManager.mergedModelSaveLocation')} + + + setModelMergeSaveLocType(v) + } + > + + + + {t('modelManager.invokeAIFolder')} + + + + + {t('modelManager.custom')} + + + + + + {modelMergeSaveLocType === 'custom' && ( + setModelMergeCustomSaveLoc(e.target.value)} + /> + )} + + + setModelMergeForce(e.target.checked)} + fontWeight="500" + /> + + + {t('modelManager.merge')} + - - setModelMergeForce(e.target.checked)} - fontWeight="bold" - /> - - - {t('modelManager.merge')} - - + + diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelConvert.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelConvert.tsx index 792ce03b4e..5896e634ea 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelConvert.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelConvert.tsx @@ -77,7 +77,7 @@ export default function ModelConvert(props: ModelConvertProps) { retrievedModel.status === 'active' || isProcessing || !isConnected } className=" modal-close-btn" - marginRight="2rem" + marginInlineEnd={8} > 🧨 {t('modelManager.convertToDiffusers')} @@ -96,8 +96,8 @@ export default function ModelConvert(props: ModelConvertProps) { - - + + {t('modelManager.convertToDiffusersSaveLocation')} setSaveLocation(v)}> @@ -125,11 +125,7 @@ export default function ModelConvert(props: ModelConvertProps) { {saveLocation === 'custom' && ( - + {t('modelManager.customSaveLocation')} )} diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelList.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelList.tsx index 0eb07850c3..ad5b9b9072 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelList.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelList.tsx @@ -1,4 +1,4 @@ -import { Box, Flex, Spinner, Text } from '@chakra-ui/react'; +import { Box, Flex, Heading, Spacer, Spinner, Text } from '@chakra-ui/react'; import IAIInput from 'common/components/IAIInput'; import IAIButton from 'common/components/IAIButton'; @@ -45,9 +45,10 @@ function ModelFilterButton({ @@ -133,23 +134,27 @@ const ModelList = () => { return searchText !== '' ? ( isSelectedFilter === 'all' ? ( - {filteredModelListItemsToRender} + {filteredModelListItemsToRender} ) : ( - {localFilteredModelListItemsToRender} + {localFilteredModelListItemsToRender} ) ) : ( - + {isSelectedFilter === 'all' && ( <> {t('modelManager.checkpointModels')} @@ -157,13 +162,16 @@ const ModelList = () => { {t('modelManager.diffusersModels')} @@ -173,13 +181,13 @@ const ModelList = () => { )} {isSelectedFilter === 'ckpt' && ( - + {ckptModelListItemsToRender} )} {isSelectedFilter === 'diffusers' && ( - + {diffusersModelListItemsToRender} )} @@ -188,15 +196,12 @@ const ModelList = () => { }, [models, searchText, t, isSelectedFilter]); return ( - - - - {t('modelManager.availableModels')} - - - - - + + + {t('modelManager.availableModels')} + + + { - + setIsSelectedFilter('all')} @@ -234,7 +239,7 @@ const ModelList = () => { ) : ( diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelListItem.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelListItem.tsx index 5f90df0c37..9b2b6d29f4 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelListItem.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelListItem.tsx @@ -46,30 +46,37 @@ export default function ModelListItem(props: ModelListItemProps) { const statusTextColor = () => { switch (status) { case 'active': - return 'var(--status-good-color)'; + return 'ok.500'; case 'cached': - return 'var(--status-working-color)'; + return 'warning.500'; case 'not loaded': - return 'var(--text-color-secondary)'; + return 'inherit'; } }; return ( - {name} + {name} @@ -79,7 +86,6 @@ export default function ModelListItem(props: ModelListItemProps) { size="sm" onClick={handleChangeModel} isDisabled={status === 'active' || isProcessing || !isConnected} - className="modal-close-btn" > {t('modelManager.load')} @@ -90,7 +96,6 @@ export default function ModelListItem(props: ModelListItemProps) { onClick={openModelHandler} aria-label="Modify Config" isDisabled={status === 'active' || isProcessing || !isConnected} - className=" modal-close-btn" /> } > - +

{t('modelManager.deleteMsg1')}

-

- {t('modelManager.deleteMsg2')} -

+

{t('modelManager.deleteMsg2')}

diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelManagerModal.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelManagerModal.tsx index def4afe6b6..5de4faa80b 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelManagerModal.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelManagerModal.tsx @@ -1,8 +1,10 @@ import { Flex, Modal, + ModalBody, ModalCloseButton, ModalContent, + ModalFooter, ModalHeader, ModalOverlay, useDisclosure, @@ -50,22 +52,23 @@ export default function ModelManagerModal({ - - - - {t('modelManager.modelManager')} - - - - {openModel && model_list[openModel]['format'] === 'diffusers' ? ( - - ) : ( - - )} - + + + {t('modelManager.modelManager')} + + + + {openModel && model_list[openModel]['format'] === 'diffusers' ? ( + + ) : ( + + )} + + + diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/SearchModels.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/SearchModels.tsx index 08834eb91b..4798382537 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelManager/SearchModels.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelManager/SearchModels.tsx @@ -4,12 +4,13 @@ import IAIIconButton from 'common/components/IAIIconButton'; import React from 'react'; import { - Box, + Badge, Flex, FormControl, HStack, Radio, RadioGroup, + Spacer, Text, VStack, } from '@chakra-ui/react'; @@ -18,8 +19,7 @@ import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import { systemSelector } from 'features/system/store/systemSelectors'; import { useTranslation } from 'react-i18next'; -import { FaPlus } from 'react-icons/fa'; -import { MdFindInPage } from 'react-icons/md'; +import { FaPlus, FaSearch } from 'react-icons/fa'; import { addNewModel, searchForModels } from 'app/socketio/actions'; import { @@ -48,26 +48,6 @@ const existingModelsSelector = createSelector([systemSelector], (system) => { return existingModels; }); -function ModelExistsTag() { - const { t } = useTranslation(); - return ( - - {t('modelManager.modelExists')} - - ); -} - interface SearchModelEntry { model: FoundModel; modelsToAdd: string[]; @@ -79,6 +59,7 @@ function SearchModelEntry({ modelsToAdd, setModelsToAdd, }: SearchModelEntry) { + const { t } = useTranslation(); const existingModels = useAppSelector(existingModelsSelector); const foundModelsChangeHandler = (e: ChangeEvent) => { @@ -90,33 +71,34 @@ function SearchModelEntry({ }; return ( - - {existingModels.includes(model.location) ? : null} - - -

{model.name}

-

{model.location}

-
- + +
-
+ paddingX={4} + paddingY={2} + borderRadius={4} + > + + {model.name}
} + isChecked={modelsToAdd.includes(model.name)} + isDisabled={existingModels.includes(model.location)} + onChange={foundModelsChangeHandler} + > + {existingModels.includes(model.location) && ( + {t('modelManager.modelExists')} + )} +
+ + {model.location} + +
+
); } @@ -243,36 +225,38 @@ export default function SearchModels() { <> {searchFolder ? ( -

- {t('modelManager.checkpointFolder')} -

-

- {searchFolder} -

+ + {t('modelManager.checkpointFolder')} + + {searchFolder} +
+ } - position="absolute" - right={16} fontSize={18} disabled={isProcessing} onClick={() => dispatch(searchForModels(searchFolder))} @@ -280,8 +264,6 @@ export default function SearchModels() { } - position="absolute" - right={5} onClick={resetSearchModelHandler} /> @@ -294,32 +276,34 @@ export default function SearchModels() { > {({ handleSubmit }) => ( - - + + - } + } aria-label={t('modelManager.findModels')} tooltip={t('modelManager.findModels')} type="submit" disabled={isProcessing} - /> + paddingX={10} + > + {t('modelManager.findModels')} + )} )} {foundModels && ( - +

{t('modelManager.modelsFound')}: {foundModels.length} @@ -328,8 +312,8 @@ export default function SearchModels() { {t('modelManager.selected')}: {modelsToAdd.length}

- - + + 0 ? 'var(--accent-color) !important' : '' - } + colorScheme="accent" > {t('modelManager.addSelected')} - - Pick Model Type: + + {t('modelManager.pickModelType')} - {t('modelManager.v1')} - {t('modelManager.v2')} - - {t('modelManager.inpainting')} + + {t('modelManager.v1')} + + + {t('modelManager.v2')} + + + {t('modelManager.inpainting')} + + + {t('modelManager.customConfig')} - {t('modelManager.customConfig')} {modelType === 'custom' && ( - + {t('modelManager.pathToCustomConfig')} { if (e.target.value !== '') setPathToConfig(e.target.value); }} - width="42.5rem" + width="full" /> )} {foundModels.length > 0 ? ( - modelsToAdd.length === 0 && ( - - {t('modelManager.selectAndAdd')} - - ) + renderFoundModels() ) : ( {t('modelManager.noModelsFound')} )} - - {renderFoundModels()} )} diff --git a/invokeai/frontend/web/src/features/system/components/ModelSelect.tsx b/invokeai/frontend/web/src/features/system/components/ModelSelect.tsx index 7c06604382..ab37213a00 100644 --- a/invokeai/frontend/web/src/features/system/components/ModelSelect.tsx +++ b/invokeai/frontend/web/src/features/system/components/ModelSelect.tsx @@ -33,11 +33,11 @@ const ModelSelect = () => { return ( { ); }; diff --git a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.scss b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.scss deleted file mode 100644 index 53b4766c95..0000000000 --- a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.scss +++ /dev/null @@ -1,43 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.settings-modal { - max-height: 36rem; - font-family: Inter; - - .settings-modal-content { - display: grid; - row-gap: 2rem; - overflow-y: scroll; - } - - .settings-modal-header { - font-weight: bold; - } - - .settings-modal-items { - display: grid; - row-gap: 0.5rem; - - .settings-modal-item { - display: grid; - grid-auto-flow: column; - background-color: var(--background-color); - padding: 0.4rem 1rem; - border-radius: 0.5rem; - align-items: center; - width: 100%; - } - } - - .settings-modal-reset { - display: grid; - row-gap: 1rem; - - button { - @include Button( - $btn-color: var(--destructive-color), - $btn-color-hover: var(--destructive-color-hover) - ); - } - } -} diff --git a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx index 3112fd6995..c203edfc37 100644 --- a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -1,6 +1,7 @@ import { - Button, + ChakraProps, Flex, + Grid, Heading, Modal, ModalBody, @@ -16,6 +17,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { IN_PROGRESS_IMAGE_TYPES } from 'app/constants'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; +import IAIButton from 'common/components/IAIButton'; import IAINumberInput from 'common/components/IAINumberInput'; import IAISelect from 'common/components/IAISelect'; import IAISwitch from 'common/components/IAISwitch'; @@ -70,6 +72,13 @@ const selector = createSelector( } ); +const modalSectionStyles: ChakraProps['sx'] = { + flexDirection: 'column', + gap: 2, + p: 4, + bg: 'base.900', +}; + type SettingsModalProps = { /* The button to open the Settings Modal */ children: ReactElement; @@ -135,20 +144,15 @@ const SettingsModal = ({ children }: SettingsModalProps) => { - - - {t('common.settingsLabel')} - - - -
-
+ + {t('common.settingsLabel')} + + + + { textAlign="center" /> )} -
- ) => - dispatch(setShouldConfirmOnDelete(e.target.checked)) - } - /> - ) => - dispatch(setShouldDisplayGuides(e.target.checked)) - } - /> - ) => - dispatch(setShouldUseCanvasBetaLayout(e.target.checked)) - } - /> - ) => - dispatch(setShouldUseSliders(e.target.checked)) - } - /> -
+ ) => + dispatch(setShouldConfirmOnDelete(e.target.checked)) + } + /> + ) => + dispatch(setShouldDisplayGuides(e.target.checked)) + } + /> + ) => + dispatch(setShouldUseCanvasBetaLayout(e.target.checked)) + } + /> + ) => + dispatch(setShouldUseSliders(e.target.checked)) + } + /> +
-
-

Developer

- ) => - dispatch(setEnableImageDebugging(e.target.checked)) - } - /> -
+ + + Developer + + ) => + dispatch(setEnableImageDebugging(e.target.checked)) + } + /> + -
- {t('settings.resetWebUI')} - - {t('settings.resetWebUIDesc1')} - {t('settings.resetWebUIDesc2')} -
+ + {t('settings.resetWebUI')} + + {t('settings.resetWebUI')} + + {t('settings.resetWebUIDesc1')} + {t('settings.resetWebUIDesc2')} + + - +
@@ -244,15 +245,17 @@ const SettingsModal = ({ children }: SettingsModalProps) => { onClose={onRefreshModalClose} isCentered > - + - + + {t('settings.resetComplete')} + diff --git a/invokeai/frontend/web/src/features/system/components/SiteHeader.scss b/invokeai/frontend/web/src/features/system/components/SiteHeader.scss deleted file mode 100644 index 59edc9a403..0000000000 --- a/invokeai/frontend/web/src/features/system/components/SiteHeader.scss +++ /dev/null @@ -1,31 +0,0 @@ -.site-header { - display: grid; - grid-template-columns: auto max-content; -} - -.site-header-left-side { - display: flex; - align-items: center; - column-gap: 0.7rem; - padding-left: 0.5rem; - - img { - width: 32px; - height: 32px; - } -} - -.site-header-right-side { - display: flex; - align-items: center; - column-gap: 0.5rem; - - .lang-select-btn { - &[data-selected='true'] { - background-color: var(--accent-color); - &:hover { - background-color: var(--accent-color); - } - } - } -} diff --git a/invokeai/frontend/web/src/features/system/components/SiteHeader.tsx b/invokeai/frontend/web/src/features/system/components/SiteHeader.tsx index ccbc425590..6aaa989c89 100644 --- a/invokeai/frontend/web/src/features/system/components/SiteHeader.tsx +++ b/invokeai/frontend/web/src/features/system/components/SiteHeader.tsx @@ -1,8 +1,7 @@ -import { Flex, Link, Text } from '@chakra-ui/react'; +import { Flex, Grid, Link } from '@chakra-ui/react'; import { FaBug, FaCube, FaDiscord, FaGithub, FaKeyboard } from 'react-icons/fa'; -import InvokeAILogo from 'assets/images/logo.png'; import IAIIconButton from 'common/components/IAIIconButton'; import HotkeysModal from './HotkeysModal/HotkeysModal'; @@ -15,39 +14,21 @@ import ThemeChanger from './ThemeChanger'; import LanguagePicker from './LanguagePicker'; -import type { RootState } from 'app/store'; -import { useAppSelector } from 'app/storeHooks'; import { useTranslation } from 'react-i18next'; import { MdSettings } from 'react-icons/md'; +import InvokeAILogoComponent from './InvokeAILogoComponent'; /** * Header, includes color mode toggle, settings button, status message. */ const SiteHeader = () => { const { t } = useTranslation(); - const appVersion = useAppSelector( - (state: RootState) => state.system.app_version - ); return ( -
-
- invoke-ai-logo - - - invoke ai - - - {appVersion} - - -
+ + -
+ @@ -133,8 +114,8 @@ const SiteHeader = () => { icon={} /> -
-
+ + ); }; diff --git a/invokeai/frontend/web/src/features/system/components/StatusIndicator.scss b/invokeai/frontend/web/src/features/system/components/StatusIndicator.scss deleted file mode 100644 index 341d2fcb46..0000000000 --- a/invokeai/frontend/web/src/features/system/components/StatusIndicator.scss +++ /dev/null @@ -1,19 +0,0 @@ -.status { - font-size: 0.8rem; - font-weight: bold; -} - -.status-good { - color: var(--status-good-color); - text-shadow: 0 0 10px var(--status-good-glow); -} - -.status-bad { - color: var(--status-bad-color); - text-shadow: 0 0 10px var(--status-bad-glow); -} - -.status-working { - color: var(--status-working-color); - text-shadow: 0 0 10px var(--status-working-glow); -} diff --git a/invokeai/frontend/web/src/features/system/components/StatusIndicator.tsx b/invokeai/frontend/web/src/features/system/components/StatusIndicator.tsx index bacc199015..f47730d221 100644 --- a/invokeai/frontend/web/src/features/system/components/StatusIndicator.tsx +++ b/invokeai/frontend/web/src/features/system/components/StatusIndicator.tsx @@ -37,25 +37,18 @@ const StatusIndicator = () => { const dispatch = useAppDispatch(); const { t } = useTranslation(); - let statusStyle; + let statusIdentifier; + if (isConnected && !hasError) { - statusStyle = 'status-good'; + statusIdentifier = 'ok'; } else { - statusStyle = 'status-bad'; + statusIdentifier = 'error'; } let statusMessage = currentStatus; - const intermediateStatuses = [ - t('common.statusGenerating'), - t('common.statusPreparing'), - t('common.statusSavingImage'), - t('common.statusRestoringFaces'), - t('common.statusUpscaling'), - ]; - - if (intermediateStatuses.includes(statusMessage)) { - statusStyle = 'status-working'; + if (isProcessing) { + statusIdentifier = 'working'; } if (statusMessage) @@ -86,7 +79,11 @@ const StatusIndicator = () => { {t(statusMessage as keyof typeof t)} diff --git a/invokeai/frontend/web/src/features/system/components/ThemeChanger.tsx b/invokeai/frontend/web/src/features/system/components/ThemeChanger.tsx index f1597315b8..9114a9d9e1 100644 --- a/invokeai/frontend/web/src/features/system/components/ThemeChanger.tsx +++ b/invokeai/frontend/web/src/features/system/components/ThemeChanger.tsx @@ -1,4 +1,4 @@ -import { useColorMode, VStack } from '@chakra-ui/react'; +import { VStack } from '@chakra-ui/react'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAIButton from 'common/components/IAIButton'; @@ -6,13 +6,12 @@ import IAIIconButton from 'common/components/IAIIconButton'; import IAIPopover from 'common/components/IAIPopover'; import { setCurrentTheme } from 'features/ui/store/uiSlice'; import type { ReactNode } from 'react'; -import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { FaCheck, FaPalette } from 'react-icons/fa'; export default function ThemeChanger() { const { t } = useTranslation(); - const { setColorMode, colorMode } = useColorMode(); + const dispatch = useAppDispatch(); const currentTheme = useAppSelector( (state: RootState) => state.ui.currentTheme @@ -22,16 +21,9 @@ export default function ThemeChanger() { dark: t('common.darkTheme'), light: t('common.lightTheme'), green: t('common.greenTheme'), + ocean: t('common.oceanTheme'), }; - useEffect(() => { - // syncs the redux store theme to the chakra's theme on startup and when - // setCurrentTheme is dispatched - if (colorMode !== currentTheme) { - setColorMode(currentTheme); - } - }, [setColorMode, colorMode, currentTheme]); - const handleChangeTheme = (theme: string) => { dispatch(setCurrentTheme(theme)); }; @@ -42,9 +34,10 @@ export default function ThemeChanger() { Object.keys(THEMES).forEach((theme) => { themesToRender.push( : undefined} size="sm" onClick={() => handleChangeTheme(theme)} diff --git a/invokeai/frontend/web/src/features/ui/components/FloatingButton.scss b/invokeai/frontend/web/src/features/ui/components/FloatingButton.scss deleted file mode 100644 index 0208f30a7f..0000000000 --- a/invokeai/frontend/web/src/features/ui/components/FloatingButton.scss +++ /dev/null @@ -1,55 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.floating-show-hide-button { - position: absolute; - top: 50%; - transform: translate(0, -50%); - z-index: 20; - padding: 0; - background-color: red !important; - - &.left { - left: 0; - border-radius: 0 0.5rem 0.5rem 0; - } - - &.right { - right: 0; - border-radius: 0.5rem 0 0 0.5rem; - } - - @include Button( - $btn-width: 2rem, - $btn-height: 12rem, - $icon-size: 20px, - $btn-color: var(--btn-btn-base-color), - $btn-color-hover: var(--btn-btn-base-color-hover) - ); -} - -.show-hide-button-options { - position: absolute; - transform: translate(0, -50%); - z-index: 20; - min-width: 2rem; - - top: 50%; - left: calc(42px + 2rem); - - border-radius: 0 0.5rem 0.5rem 0; - - display: flex; - flex-direction: column; - row-gap: 0.5rem; - - button { - border-radius: 0 0.3rem 0.3rem 0; - } -} - -.show-hide-button-gallery { - padding-left: 0.75rem; - padding-right: 0.75rem; - background-color: var(--background-color) !important; - // filter: drop-shadow(0.5rem 0px 1rem var(--floating-button-drop-shadow-color)); -} diff --git a/invokeai/frontend/web/src/features/ui/components/FloatingGalleryButton.tsx b/invokeai/frontend/web/src/features/ui/components/FloatingGalleryButton.tsx index 928e87f0b1..71b18a60a4 100644 --- a/invokeai/frontend/web/src/features/ui/components/FloatingGalleryButton.tsx +++ b/invokeai/frontend/web/src/features/ui/components/FloatingGalleryButton.tsx @@ -22,8 +22,20 @@ const FloatingGalleryButton = () => { tooltip="Show Gallery (G)" tooltipProps={{ placement: 'top' }} aria-label="Show Gallery" - styleClass="floating-show-hide-button right show-hide-button-gallery" onClick={handleShowGallery} + sx={{ + pos: 'absolute', + top: '50%', + transform: 'translate(0, -50%)', + zIndex: 31, + p: 0, + insetInlineEnd: 0, + px: 3, + h: 48, + w: 8, + borderStartEndRadius: 0, + borderEndEndRadius: 0, + }} > diff --git a/invokeai/frontend/web/src/features/ui/components/FloatingParametersPanelButtons.tsx b/invokeai/frontend/web/src/features/ui/components/FloatingParametersPanelButtons.tsx index d9e1722f39..24928db923 100644 --- a/invokeai/frontend/web/src/features/ui/components/FloatingParametersPanelButtons.tsx +++ b/invokeai/frontend/web/src/features/ui/components/FloatingParametersPanelButtons.tsx @@ -1,3 +1,4 @@ +import { ChakraProps, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAIIconButton from 'common/components/IAIIconButton'; @@ -15,6 +16,11 @@ import { isEqual } from 'lodash'; import { FaSlidersH } from 'react-icons/fa'; +const floatingButtonStyles: ChakraProps['sx'] = { + borderStartStartRadius: 0, + borderEndStartRadius: 0, +}; + export const floatingSelector = createSelector( [gallerySelector, uiSelector, activeTabNameSelector], (gallery: GalleryState, ui, activeTabName) => { @@ -76,22 +82,32 @@ const FloatingParametersPanelButtons = () => { }; return shouldShowParametersPanelButton ? ( -
+ {shouldShowProcessButtons && ( <> - - + + )} -
+ ) : null; }; diff --git a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImage.scss b/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImage.scss deleted file mode 100644 index edb307941b..0000000000 --- a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImage.scss +++ /dev/null @@ -1,50 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.image-to-image-area { - display: flex; - flex-direction: column; - row-gap: 1rem; - width: 100%; - height: 100%; -} - -.image-to-image-strength-main-option { - display: flex; - row-gap: 0.5rem !important; - - .invokeai__slider-component-label { - color: var(--text-color-secondary); - font-size: 0.9rem !important; - } -} - -.init-image-preview-header { - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; - - h2 { - font-weight: bold; - font-size: 0.9rem; - } -} - -.init-image-preview { - position: relative; - height: 100%; - width: 100%; - display: flex; - align-items: center; - justify-content: center; - - img { - border-radius: 0.5rem; - object-fit: contain; - position: absolute; - } -} - -.image-to-image-current-image-display { - position: relative; -} diff --git a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageDisplay.tsx b/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageDisplay.tsx index a3c1ca824d..173985697f 100644 --- a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageDisplay.tsx +++ b/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageDisplay.tsx @@ -1,33 +1,49 @@ +import { ChakraProps, Flex, Grid } from '@chakra-ui/react'; import { RootState } from 'app/store'; import { useAppSelector } from 'app/storeHooks'; import ImageUploadButton from 'common/components/ImageUploaderButton'; import CurrentImageDisplay from 'features/gallery/components/CurrentImageDisplay'; import InitImagePreview from './InitImagePreview'; +const workareaSplitViewStyle: ChakraProps['sx'] = { + flexDirection: 'column', + height: '100%', + width: '100%', + gap: 4, + + padding: 4, +}; + const ImageToImageDisplay = () => { const initialImage = useAppSelector( (state: RootState) => state.generation.initialImage ); - const { currentImage } = useAppSelector((state: RootState) => state.gallery); - const imageToImageComponent = initialImage ? ( -
+ -
+ ) : ( ); return ( -
-
{imageToImageComponent}
- {currentImage && ( -
- -
- )} -
+ + + {imageToImageComponent} + + + + + ); }; diff --git a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageOptions.tsx b/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageOptions.tsx deleted file mode 100644 index 98a6bb8ae6..0000000000 --- a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageOptions.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { Flex } from '@chakra-ui/react'; -import ImageFit from 'features/parameters/components/AdvancedParameters/ImageToImage/ImageFit'; -import ImageToImageStrength from 'features/parameters/components/AdvancedParameters/ImageToImage/ImageToImageStrength'; -import ParametersAccordion from 'features/parameters/components/ParametersAccordion'; - -import { useTranslation } from 'react-i18next'; - -export default function ImageToImageOptions() { - const { t } = useTranslation(); - const imageToImageAccordionItems = { - imageToImage: { - header: `${t('parameters.imageToImage')}`, - feature: undefined, - content: ( - - - - - ), - }, - }; - return ; -} diff --git a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImagePanel.tsx b/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImagePanel.tsx index 531e95f161..d5f2268cb8 100644 --- a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImagePanel.tsx +++ b/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImagePanel.tsx @@ -10,19 +10,29 @@ import UpscaleSettings from 'features/parameters/components/AdvancedParameters/U import UpscaleToggle from 'features/parameters/components/AdvancedParameters/Upscale/UpscaleToggle'; import GenerateVariationsToggle from 'features/parameters/components/AdvancedParameters/Variations/GenerateVariations'; import VariationsSettings from 'features/parameters/components/AdvancedParameters/Variations/VariationsSettings'; -import MainSettings from 'features/parameters/components/MainParameters/MainParameters'; +import MainSettings from 'features/parameters/components/MainParameters/MainSettings'; import ParametersAccordion from 'features/parameters/components/ParametersAccordion'; import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons'; import NegativePromptInput from 'features/parameters/components/PromptInput/NegativePromptInput'; import PromptInput from 'features/parameters/components/PromptInput/PromptInput'; import InvokeOptionsPanel from 'features/ui/components/InvokeParametersPanel'; import { useTranslation } from 'react-i18next'; -import ImageToImageOptions from './ImageToImageOptions'; +import ImageToImageSettings from './ImageToImageSettings'; export default function ImageToImagePanel() { const { t } = useTranslation(); const imageToImageAccordions = { + general: { + header: `${t('parameters.general')}`, + feature: undefined, + content: , + }, + imageToImage: { + header: `${t('parameters.imageToImage')}`, + feature: undefined, + content: , + }, seed: { header: `${t('parameters.seed')}`, feature: Feature.SEED, @@ -60,13 +70,11 @@ export default function ImageToImagePanel() { return ( - + - - ); diff --git a/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageSettings.tsx b/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageSettings.tsx new file mode 100644 index 0000000000..fb53c7006b --- /dev/null +++ b/invokeai/frontend/web/src/features/ui/components/ImageToImage/ImageToImageSettings.tsx @@ -0,0 +1,15 @@ +import { VStack } from '@chakra-ui/react'; +import ImageFit from 'features/parameters/components/AdvancedParameters/ImageToImage/ImageFit'; +import ImageToImageStrength from 'features/parameters/components/AdvancedParameters/ImageToImage/ImageToImageStrength'; + +import { useTranslation } from 'react-i18next'; + +export default function ImageToImageSettings() { + const { t } = useTranslation(); + return ( + + + + + ); +} diff --git a/invokeai/frontend/web/src/features/ui/components/ImageToImage/InitImagePreview.tsx b/invokeai/frontend/web/src/features/ui/components/ImageToImage/InitImagePreview.tsx index d8242062a6..9eb26129a7 100644 --- a/invokeai/frontend/web/src/features/ui/components/ImageToImage/InitImagePreview.tsx +++ b/invokeai/frontend/web/src/features/ui/components/ImageToImage/InitImagePreview.tsx @@ -1,4 +1,4 @@ -import { Image, useToast } from '@chakra-ui/react'; +import { Flex, Image, Text, useToast } from '@chakra-ui/react'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import ImageUploaderIconButton from 'common/components/ImageUploaderIconButton'; @@ -28,22 +28,49 @@ export default function InitImagePreview() { return ( <> -
-

{t('parameters.initialImage')}

+ + + {t('parameters.initialImage')} + -
+ {initialImage && ( -
+ -
+ )} ); diff --git a/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.css b/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.css new file mode 100644 index 0000000000..f43861edba --- /dev/null +++ b/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.css @@ -0,0 +1,35 @@ +.ltr-parameters-panel-transition-enter { + transform: translateX(-150%); +} + +.ltr-parameters-panel-transition-enter-active { + transform: translateX(0); + transition: all 120ms ease-out; +} + +.ltr-parameters-panel-transition-exit { + transform: translateX(0); +} + +.ltr-parameters-panel-transition-exit-active { + transform: translateX(-150%); + transition: all 120ms ease-out; +} + +.rtl-parameters-panel-transition-enter { + transform: translateX(150%); +} + +.rtl-parameters-panel-transition-enter-active { + transform: translateX(0); + transition: all 120ms ease-out; +} + +.rtl-parameters-panel-transition-exit { + transform: translateX(0); +} + +.rtl-parameters-panel-transition-exit-active { + transform: translateX(150%); + transition: all 120ms ease-out; +} diff --git a/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.scss b/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.scss deleted file mode 100644 index 69b9755ca8..0000000000 --- a/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.scss +++ /dev/null @@ -1,90 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.parameters-panel-wrapper-enter { - transform: translateX(-150%); -} - -.parameters-panel-wrapper-enter-active { - transform: translateX(0); - transition: all 120ms ease-out; -} - -.parameters-panel-wrapper-exit { - transform: translateX(0); -} - -.parameters-panel-wrapper-exit-active { - transform: translateX(-150%); - transition: all 120ms ease-out; -} - -.parameters-panel-wrapper { - background-color: var(--background-color); - height: $app-content-height; - width: $options-bar-max-width; - max-width: $options-bar-max-width; - - flex-shrink: 0; - position: relative; - overflow-y: scroll; - @include HideScrollbar; - - .parameters-panel { - display: flex; - flex-direction: column; - row-gap: 0.5rem; - height: 100%; - @include HideScrollbar; - background-color: var(--background-color); - } - - &[data-pinned='false'] { - z-index: 20; - - position: fixed; - top: 0; - left: 0; - filter: var(--floating-panel-drop-shadow); - width: calc($options-bar-max-width + 2rem); - max-width: calc($options-bar-max-width + 2rem); - height: 100%; - - .parameters-panel-margin { - margin: 1rem; - } - } - - .parameters-panel-pin-button { - position: absolute; - cursor: pointer; - padding: 0.5rem; - top: 1rem; - right: 1rem; - z-index: 20; - - &[data-selected='true'] { - top: 0; - right: 0; - } - svg { - opacity: 0.5; - } - } -} - -.invoke-ai-logo-wrapper { - display: flex; - align-items: center; - column-gap: 0.7rem; - padding-left: 0.5rem; - padding-top: $progress-bar-thickness; - - img { - width: 32px; - height: 32px; - } - - h1 { - font-size: 1.4rem; - } -} diff --git a/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.tsx b/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.tsx index 8dcd4f4a78..e7e610df6c 100644 --- a/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.tsx +++ b/invokeai/frontend/web/src/features/ui/components/InvokeParametersPanel.tsx @@ -1,4 +1,4 @@ -import { Tooltip } from '@chakra-ui/react'; +import { Box, Flex, Tooltip, Icon, useTheme } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import { @@ -15,9 +15,18 @@ import { CSSTransition } from 'react-transition-group'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import { setParametersPanelScrollPosition } from 'features/ui/store/uiSlice'; -import InvokeAILogo from 'assets/images/logo.png'; import { isEqual } from 'lodash'; import { uiSelector } from '../store/uiSelectors'; +import { useTranslation } from 'react-i18next'; +import { + APP_CONTENT_HEIGHT, + OPTIONS_BAR_MAX_WIDTH, + PROGRESS_BAR_THICKNESS, +} from 'theme/util/constants'; +import InvokeAILogoComponent from 'features/system/components/InvokeAILogoComponent'; + +import './InvokeParametersPanel.css'; +import { no_scrollbar } from 'theme/components/scrollbar'; type Props = { children: ReactNode }; @@ -47,6 +56,8 @@ const optionsPanelSelector = createSelector( const InvokeOptionsPanel = (props: Props) => { const dispatch = useAppDispatch(); + const { direction } = useTheme(); + const { shouldShowParametersPanel, shouldHoldParametersPanelOpen, @@ -60,6 +71,8 @@ const InvokeOptionsPanel = (props: Props) => { const { children } = props; + const { t } = useTranslation(); + // Hotkeys useHotkeys( 'o', @@ -145,11 +158,10 @@ const InvokeOptionsPanel = (props: Props) => { } unmountOnExit timeout={200} - classNames="parameters-panel-wrapper" + classNames={`${direction}-parameters-panel-transition`} > -
{ onMouseOver={ !shouldPinParametersPanel ? cancelCloseOptionsPanelTimer : undefined } - style={{ - borderRight: !shouldPinParametersPanel - ? '0.3rem solid var(--tab-list-text-inactive)' - : '', + sx={{ + borderInlineEndWidth: !shouldPinParametersPanel ? 5 : 0, + borderInlineEndStyle: 'solid', + bg: 'base.900', + borderColor: 'base.700', + height: APP_CONTENT_HEIGHT, + width: OPTIONS_BAR_MAX_WIDTH, + maxWidth: OPTIONS_BAR_MAX_WIDTH, + flexShrink: 0, + position: 'relative', + overflowY: 'scroll', + overflowX: 'hidden', + ...no_scrollbar, + ...(!shouldPinParametersPanel && { + zIndex: 20, + position: 'fixed', + top: 0, + insetInlineStart: 0, + width: `calc(${OPTIONS_BAR_MAX_WIDTH} + 2rem)`, + maxWidth: `calc(${OPTIONS_BAR_MAX_WIDTH} + 2rem)`, + height: '100%', + }), }} > -
-
+ ) => { if (e.target !== optionsPanelContainerRef.current) { @@ -175,28 +204,44 @@ const InvokeOptionsPanel = (props: Props) => { !shouldPinParametersPanel && setCloseOptionsPanelTimer(); } }} + sx={{ + display: 'flex', + flexDirection: 'column', + rowGap: 2, + height: '100%', + }} > - -
+ - {shouldPinParametersPanel ? : } -
+ +
{!shouldPinParametersPanel && ( -
- invoke-ai-logo -

- invoke ai -

-
+ + + )} {children} -
-
-
+ + + ); }; diff --git a/invokeai/frontend/web/src/features/ui/components/InvokeTabs.scss b/invokeai/frontend/web/src/features/ui/components/InvokeTabs.scss deleted file mode 100644 index 1a113b4148..0000000000 --- a/invokeai/frontend/web/src/features/ui/components/InvokeTabs.scss +++ /dev/null @@ -1,46 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.app-tabs { - display: grid; - grid-template-columns: min-content auto; - column-gap: 1rem; - // height: 100%; - height: $app-content-height; -} - -.app-tabs-list { - display: grid; - row-gap: 0.3rem; - grid-auto-rows: min-content; - color: var(--tab-list-text-inactive); - - button { - font-size: 0.85rem; - padding: 0.5rem; - - &:hover { - background-color: var(--tab-hover-color); - border-radius: 0.3rem; - } - - svg { - width: 24px; - height: 24px; - } - - &[aria-selected='true'] { - background-color: var(--tab-list-bg); - color: var(--tab-list-text); - font-weight: bold; - border-radius: 0.3rem; - border: none; - } - } -} - -.app-tabs-panels { - .app-tabs-panel { - padding: 0; - height: 100%; - } -} diff --git a/invokeai/frontend/web/src/features/ui/components/InvokeTabs.tsx b/invokeai/frontend/web/src/features/ui/components/InvokeTabs.tsx index f330fbd0ed..fb16969319 100644 --- a/invokeai/frontend/web/src/features/ui/components/InvokeTabs.tsx +++ b/invokeai/frontend/web/src/features/ui/components/InvokeTabs.tsx @@ -1,16 +1,18 @@ -import { Tab, TabPanel, TabPanels, Tabs, Tooltip } from '@chakra-ui/react'; +import { + Icon, + Tab, + TabList, + TabPanel, + TabPanels, + Tabs, + Tooltip, +} from '@chakra-ui/react'; import { RootState } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import NodesWIP from 'common/components/WorkInProgress/NodesWIP'; import { PostProcessingWIP } from 'common/components/WorkInProgress/PostProcessingWIP'; import TrainingWIP from 'common/components/WorkInProgress/Training'; import useUpdateTranslations from 'common/hooks/useUpdateTranslations'; -import ImageToImageIcon from 'common/icons/ImageToImageIcon'; -import NodesIcon from 'common/icons/NodesIcon'; -import PostprocessingIcon from 'common/icons/PostprocessingIcon'; -import TextToImageIcon from 'common/icons/TextToImageIcon'; -import TrainingIcon from 'common/icons/TrainingIcon'; -import UnifiedCanvasIcon from 'common/icons/UnifiedCanvasIcon'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import { setShouldShowGallery } from 'features/gallery/store/gallerySlice'; import Lightbox from 'features/lightbox/components/Lightbox'; @@ -23,6 +25,14 @@ import { import i18n from 'i18n'; import { ReactElement } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; +import { + MdDeviceHub, + MdFlashOn, + MdGridOn, + MdPhotoFilter, + MdPhotoLibrary, + MdTextFields, +} from 'react-icons/md'; import { activeTabIndexSelector } from '../store/uiSelectors'; import { floatingSelector } from './FloatingParametersPanelButtons'; import ImageToImageWorkarea from './ImageToImage'; @@ -37,32 +47,32 @@ export interface InvokeTabInfo { export const tabDict: Record = { txt2img: { - title: , + title: , workarea: , tooltip: 'Text To Image', }, img2img: { - title: , + title: , workarea: , tooltip: 'Image To Image', }, unifiedCanvas: { - title: , + title: , workarea: , tooltip: 'Unified Canvas', }, nodes: { - title: , + title: , workarea: , tooltip: 'Nodes', }, postprocess: { - title: , + title: , workarea: , tooltip: 'Post Processing', }, training: { - title: , + title: , workarea: , tooltip: 'Training', }, @@ -152,7 +162,7 @@ export default function InvokeTabs() { key={key} hasArrow label={tabDict[key as keyof typeof tabDict].tooltip} - placement="right" + placement="end" > {tabDict[key as keyof typeof tabDict].title} @@ -165,7 +175,7 @@ export default function InvokeTabs() { const tabPanelsToRender: ReactElement[] = []; Object.keys(tabDict).forEach((key) => { tabPanelsToRender.push( - + {tabDict[key as keyof typeof tabDict].workarea} ); @@ -176,18 +186,14 @@ export default function InvokeTabs() { return ( { dispatch(setActiveTab(index)); }} > -
{renderTabs()}
- - {isLightBoxOpen ? : renderTabPanels()} - + {renderTabs()} + {isLightBoxOpen ? : renderTabPanels()}
); } diff --git a/invokeai/frontend/web/src/features/ui/components/InvokeWorkarea.scss b/invokeai/frontend/web/src/features/ui/components/InvokeWorkarea.scss deleted file mode 100644 index a3821d9a77..0000000000 --- a/invokeai/frontend/web/src/features/ui/components/InvokeWorkarea.scss +++ /dev/null @@ -1,71 +0,0 @@ -@use '../../../styles/Mixins/' as *; - -.workarea-wrapper { - position: relative; - width: 100%; - height: 100%; - - .workarea-main { - display: flex; - column-gap: 1rem; - height: 100%; - - .workarea-children-wrapper { - position: relative; - width: 100%; - height: 100%; - } - .workarea-split-view { - width: 100%; - height: 100%; - display: grid; - grid-template-columns: 1fr 1fr; - background-color: var(--background-color-secondary); - border-radius: 0.5rem; - .workarea-split-view-left { - padding-right: 0.5rem; - } - .workarea-split-view-right { - padding-left: 0.5rem; - } - } - - .workarea-single-view { - width: 100%; - height: 100%; - background-color: var(--background-color-secondary); - border-radius: 0.5rem; - } - - .workarea-split-view-left, - .workarea-split-view-right { - display: flex; - flex-direction: column; - height: 100%; - width: 100%; - row-gap: 1rem; - background-color: var(--background-color-secondary); - border-radius: 0.5rem; - padding: 1rem; - } - } -} -.workarea-split-button { - position: absolute; - cursor: pointer; - padding: 0.5rem; - top: 0; - right: 0; - // z-index: 20; - - &[data-selected='true'] { - top: 0; - right: 0; - svg { - opacity: 1; - } - } - svg { - opacity: 0.5; - } -} diff --git a/invokeai/frontend/web/src/features/ui/components/InvokeWorkarea.tsx b/invokeai/frontend/web/src/features/ui/components/InvokeWorkarea.tsx index d3aca2dae9..0210d249cf 100644 --- a/invokeai/frontend/web/src/features/ui/components/InvokeWorkarea.tsx +++ b/invokeai/frontend/web/src/features/ui/components/InvokeWorkarea.tsx @@ -1,4 +1,4 @@ -import { Tooltip } from '@chakra-ui/react'; +import { Box, BoxProps, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import ImageGallery from 'features/gallery/components/ImageGallery'; @@ -8,27 +8,20 @@ import { uiSelector, } from 'features/ui/store/uiSelectors'; import { DragEvent, ReactNode } from 'react'; -import { VscSplitHorizontal } from 'react-icons/vsc'; -import { - setDoesCanvasNeedScaling, - setInitialCanvasImage, -} from 'features/canvas/store/canvasSlice'; +import { setInitialCanvasImage } from 'features/canvas/store/canvasSlice'; import useGetImageByUuid from 'features/gallery/hooks/useGetImageByUuid'; import { lightboxSelector } from 'features/lightbox/store/lightboxSelectors'; -import { setShouldShowDualDisplay } from 'features/ui/store/uiSlice'; import { isEqual } from 'lodash'; const workareaSelector = createSelector( [uiSelector, lightboxSelector, activeTabNameSelector], (ui, lightbox, activeTabName) => { - const { shouldShowDualDisplay, shouldPinParametersPanel } = ui; + const { shouldPinParametersPanel } = ui; const { isLightboxOpen } = lightbox; return { - shouldShowDualDisplay, shouldPinParametersPanel, isLightboxOpen, - shouldShowDualDisplayButton: ['inpainting'].includes(activeTabName), activeTabName, }; }, @@ -39,29 +32,18 @@ const workareaSelector = createSelector( } ); -type InvokeWorkareaProps = { +type InvokeWorkareaProps = BoxProps & { optionsPanel: ReactNode; children: ReactNode; - styleClass?: string; }; const InvokeWorkarea = (props: InvokeWorkareaProps) => { const dispatch = useAppDispatch(); - const { optionsPanel, children, styleClass } = props; - const { - activeTabName, - shouldShowDualDisplay, - isLightboxOpen, - shouldShowDualDisplayButton, - } = useAppSelector(workareaSelector); + const { optionsPanel, children, ...rest } = props; + const { activeTabName, isLightboxOpen } = useAppSelector(workareaSelector); const getImageByUuid = useGetImageByUuid(); - const handleDualDisplay = () => { - dispatch(setShouldShowDualDisplay(!shouldShowDualDisplay)); - dispatch(setDoesCanvasNeedScaling(true)); - }; - const handleDrop = (e: DragEvent) => { const uuid = e.dataTransfer.getData('invokeai/imageUuid'); const image = getImageByUuid(uuid); @@ -74,30 +56,15 @@ const InvokeWorkarea = (props: InvokeWorkareaProps) => { }; return ( -
-
+ + {optionsPanel} -
+ {children} - {shouldShowDualDisplayButton && ( - -
- -
-
- )} -
+
{!isLightboxOpen && } -
-
+ + ); }; diff --git a/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImage.scss b/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImage.scss deleted file mode 100644 index 65cfb8a2bc..0000000000 --- a/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImage.scss +++ /dev/null @@ -1,6 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.text-to-image-area { - padding: 1rem; - height: 100%; -} diff --git a/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImageDisplay.tsx b/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImageDisplay.tsx index 36cd60fd36..219b70bc2d 100644 --- a/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImageDisplay.tsx +++ b/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImageDisplay.tsx @@ -1,12 +1,20 @@ +import { Box, Flex } from '@chakra-ui/react'; import CurrentImageDisplay from 'features/gallery/components/CurrentImageDisplay'; const TextToImageDisplay = () => { return ( -
-
+ + -
-
+ + ); }; diff --git a/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImagePanel.tsx b/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImagePanel.tsx index ee9f7ace3f..09b96be20c 100644 --- a/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImagePanel.tsx +++ b/invokeai/frontend/web/src/features/ui/components/TextToImage/TextToImagePanel.tsx @@ -10,7 +10,7 @@ import UpscaleSettings from 'features/parameters/components/AdvancedParameters/U import UpscaleToggle from 'features/parameters/components/AdvancedParameters/Upscale/UpscaleToggle'; import GenerateVariationsToggle from 'features/parameters/components/AdvancedParameters/Variations/GenerateVariations'; import VariationsSettings from 'features/parameters/components/AdvancedParameters/Variations/VariationsSettings'; -import MainSettings from 'features/parameters/components/MainParameters/MainParameters'; +import MainSettings from 'features/parameters/components/MainParameters/MainSettings'; import ParametersAccordion from 'features/parameters/components/ParametersAccordion'; import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons'; import NegativePromptInput from 'features/parameters/components/PromptInput/NegativePromptInput'; @@ -22,6 +22,11 @@ export default function TextToImagePanel() { const { t } = useTranslation(); const textToImageAccordions = { + general: { + header: `${t('parameters.general')}`, + feature: undefined, + content: , + }, seed: { header: `${t('parameters.seed')}`, feature: Feature.SEED, @@ -59,12 +64,11 @@ export default function TextToImagePanel() { return ( - + - ); diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/CanvasWorkarea.scss b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/CanvasWorkarea.scss deleted file mode 100644 index 6a99c38003..0000000000 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/CanvasWorkarea.scss +++ /dev/null @@ -1,103 +0,0 @@ -@use '../../../../styles/Mixins/' as *; - -.inpainting-main-area { - display: flex; - flex-direction: column; - align-items: center; - row-gap: 1rem; - width: 100%; - height: 100%; - - .inpainting-settings { - display: flex; - align-items: center; - column-gap: 0.5rem; - - svg { - transform: scale(0.9); - } - - .inpainting-buttons-group { - display: flex; - align-items: center; - column-gap: 0.5rem; - } - - .inpainting-button-dropdown { - display: flex; - flex-direction: column; - row-gap: 0.5rem; - } - - .inpainting-color-picker { - margin-left: 1rem; - } - - .inpainting-brush-options { - display: flex; - align-items: center; - column-gap: 1rem; - } - } -} - -.inpainting-canvas-area { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - row-gap: 1rem; - width: 100%; - height: 100%; -} - -.inpainting-canvas-spiner { - display: flex; - align-items: center; - width: 100%; - height: 100%; -} - -.inpainting-canvas-container { - display: flex; - position: relative; - height: 100%; - width: 100%; - border-radius: 0.5rem; -} - -.inpainting-canvas-wrapper { - position: relative; -} - -.inpainting-canvas-stage { - outline: none; - border-radius: 0.5rem; - box-shadow: 0px 0px 0px 1px var(--border-color-light); - overflow: hidden; - - canvas { - outline: none; - border-radius: 0.5rem; - } -} - -.inpainting-options-btn { - min-height: 2rem; -} - -.canvas-status-text { - position: absolute; - top: 0; - left: 0; - background-color: var(--background-color); - opacity: 0.65; - display: flex; - flex-direction: column; - font-size: 0.8rem; - padding: 0.25rem; - min-width: 12rem; - border-radius: 0.25rem; - margin: 0.25rem; - pointer-events: none; -} diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasDisplayBeta.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasDisplayBeta.tsx index f06c1ae988..2ca4139ed0 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasDisplayBeta.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasDisplayBeta.tsx @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; // import IAICanvas from 'features/canvas/components/IAICanvas'; -import { Flex } from '@chakra-ui/react'; +import { Box, Flex } from '@chakra-ui/react'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAICanvas from 'features/canvas/components/IAICanvas'; import IAICanvasResizer from 'features/canvas/components/IAICanvasResizer'; @@ -45,21 +45,28 @@ const UnifiedCanvasDisplayBeta = () => { }, [dispatch]); return ( -
+ - + {doesCanvasNeedScaling ? : } -
+ ); }; diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBaseBrushSettings.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBaseBrushSettings.tsx index 44deea45c6..9b9310b197 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBaseBrushSettings.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBaseBrushSettings.tsx @@ -4,7 +4,7 @@ import UnifiedCanvasLimitStrokesToBox from './UnifiedCanvasLimitStrokesToBox'; export default function UnifiedCanvasBaseBrushSettings() { return ( - + diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBrushSettings.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBrushSettings.tsx index 387495598d..1a5e42461b 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBrushSettings.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBrushSettings.tsx @@ -4,7 +4,7 @@ import UnifiedCanvasColorPicker from './UnifiedCanvasColorPicker'; export default function UnifiedCanvasBrushSettings() { return ( - + diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBrushSize.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBrushSize.tsx index f38d274189..0ff57236c2 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBrushSize.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasBrushSize.tsx @@ -49,7 +49,6 @@ export default function UnifiedCanvasBrushSize() { onChange={(newSize) => dispatch(setBrushSize(newSize))} sliderNumberInputProps={{ max: 500 }} inputReadOnly={false} - width="100px" isCompact /> ); diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasColorPicker.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasColorPicker.tsx index e6957a63d7..73db41d0d3 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasColorPicker.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasColorPicker.tsx @@ -80,38 +80,38 @@ export default function UnifiedCanvasColorPicker() { trigger="hover" triggerComponent={ } > - + {layer === 'base' && ( dispatch(setBrushColor(newColor))} /> )} {layer === 'mask' && ( dispatch(setMaskColor(newColor))} /> )} diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasMaskBrushSettings.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasMaskBrushSettings.tsx index 9e24e0acfb..71f41496ed 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasMaskBrushSettings.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasMaskBrushSettings.tsx @@ -6,7 +6,7 @@ import UnifiedCanvasPreserveMask from './UnifiedCanvasPreserveMask'; export default function UnifiedCanvasMaskBrushSettings() { return ( - + diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasMoveSettings.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasMoveSettings.tsx index 2c5a8277db..8881c93bb1 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasMoveSettings.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasMoveSettings.tsx @@ -5,7 +5,7 @@ import UnifiedCanvasSnapToGrid from './UnifiedCanvasSnapToGrid'; export default function UnifiedCanvasMoveSettings() { return ( - + diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasSettings.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasSettings.tsx index 09c6f38812..4dc3778b71 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasSettings.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolSettings/UnifiedCanvasSettings.tsx @@ -68,7 +68,7 @@ const UnifiedCanvasSettings = () => { /> } > - + + {layer == 'base' && ['brush', 'eraser', 'colorPicker'].includes(tool) && ( )} diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasMoveTool.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasMoveTool.tsx index 6c537d8930..4b73d28749 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasMoveTool.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasMoveTool.tsx @@ -32,7 +32,7 @@ export default function UnifiedCanvasMoveTool() { aria-label={`${t('unifiedCanvas.move')} (V)`} tooltip={`${t('unifiedCanvas.move')} (V)`} icon={} - data-selected={tool === 'move' || isStaging} + isChecked={tool === 'move' || isStaging} onClick={handleSelectMoveTool} /> ); diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasProcessingButtons.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasProcessingButtons.tsx index 93a67ad574..5880aa037b 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasProcessingButtons.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasProcessingButtons.tsx @@ -25,7 +25,7 @@ export default function UnifiedCanvasProcessingButtons() { }; return ( - + } onClick={handleResetCanvas} - style={{ backgroundColor: 'var(--btn-delete-image)' }} isDisabled={isStaging} + colorScheme="error" /> ); } diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasToolSelect.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasToolSelect.tsx index 0b941dd706..82b48fe435 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasToolSelect.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbar/UnifiedCanvasToolSelect.tsx @@ -113,13 +113,13 @@ const UnifiedCanvasToolSelect = () => { const handleEraseBoundingBox = () => dispatch(addEraseRect()); return ( - + } - data-selected={tool === 'brush' && !isStaging} + isChecked={tool === 'brush' && !isStaging} onClick={handleSelectBrushTool} isDisabled={isStaging} /> @@ -127,7 +127,7 @@ const UnifiedCanvasToolSelect = () => { aria-label={`${t('unifiedCanvas.eraser')} (E)`} tooltip={`${t('unifiedCanvas.eraser')} (B)`} icon={} - data-selected={tool === 'eraser' && !isStaging} + isChecked={tool === 'eraser' && !isStaging} isDisabled={isStaging} onClick={handleSelectEraserTool} /> @@ -152,7 +152,7 @@ const UnifiedCanvasToolSelect = () => { aria-label={`${t('unifiedCanvas.colorPicker')} (C)`} tooltip={`${t('unifiedCanvas.colorPicker')} (C)`} icon={} - data-selected={tool === 'colorPicker' && !isStaging} + isChecked={tool === 'colorPicker' && !isStaging} isDisabled={isStaging} onClick={handleSelectColorPickerTool} width="max-content" diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbarBeta.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbarBeta.tsx index 9860bd12f7..cf41020cbb 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbarBeta.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasBeta/UnifiedCanvasToolbarBeta.tsx @@ -23,30 +23,30 @@ const UnifiedCanvasToolbarBeta = () => { ); return ( - + - + - + - + - + - + diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx index 37e7e71fdb..ac7f086bea 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasDisplay.tsx @@ -1,9 +1,10 @@ +import { Box, Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; // import IAICanvas from 'features/canvas/components/IAICanvas'; import { useAppDispatch, useAppSelector } from 'app/storeHooks'; import IAICanvas from 'features/canvas/components/IAICanvas'; import IAICanvasResizer from 'features/canvas/components/IAICanvasResizer'; -import IAICanvasOutpaintingControls from 'features/canvas/components/IAICanvasToolbar/IAICanvasToolbar'; +import IAICanvasToolbar from 'features/canvas/components/IAICanvasToolbar/IAICanvasToolbar'; import { canvasSelector } from 'features/canvas/store/canvasSelectors'; import { setDoesCanvasNeedScaling } from 'features/canvas/store/canvasSlice'; import { debounce, isEqual } from 'lodash'; @@ -43,16 +44,39 @@ const UnifiedCanvasDisplay = () => { }, [dispatch]); return ( -
-
-
- -
- {doesCanvasNeedScaling ? : } -
-
-
-
+ + + + + {doesCanvasNeedScaling ? : } + + + ); }; diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasPanel.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasPanel.tsx index 392648075e..97ba3f23ec 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasPanel.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasPanel.tsx @@ -10,7 +10,7 @@ import SymmetryToggle from 'features/parameters/components/AdvancedParameters/Ou import SeedSettings from 'features/parameters/components/AdvancedParameters/Seed/SeedSettings'; import GenerateVariationsToggle from 'features/parameters/components/AdvancedParameters/Variations/GenerateVariations'; import VariationsSettings from 'features/parameters/components/AdvancedParameters/Variations/VariationsSettings'; -import MainSettings from 'features/parameters/components/MainParameters/MainParameters'; +import MainSettings from 'features/parameters/components/MainParameters/MainSettings'; import ParametersAccordion from 'features/parameters/components/ParametersAccordion'; import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons'; import NegativePromptInput from 'features/parameters/components/PromptInput/NegativePromptInput'; @@ -22,6 +22,16 @@ export default function UnifiedCanvasPanel() { const { t } = useTranslation(); const unifiedCanvasAccordions = { + general: { + header: `${t('parameters.general')}`, + feature: undefined, + content: , + }, + unifiedCanvasImg2Img: { + header: `${t('parameters.imageToImage')}`, + feature: undefined, + content: , + }, seed: { header: `${t('parameters.seed')}`, feature: Feature.SEED, @@ -55,28 +65,14 @@ export default function UnifiedCanvasPanel() { }, }; - const unifiedCanvasImg2ImgAccordion = { - unifiedCanvasImg2Img: { - header: `${t('parameters.imageToImage')}`, - feature: undefined, - content: ( - - ), - }, - }; - return ( - + - - + {/* */} ); diff --git a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx index 49db741541..b35504a2ac 100644 --- a/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx +++ b/invokeai/frontend/web/src/features/ui/components/UnifiedCanvas/UnifiedCanvasWorkarea.tsx @@ -10,10 +10,7 @@ export default function UnifiedCanvasWorkarea() { (state: RootState) => state.ui.shouldUseCanvasBetaLayout ); return ( - } - styleClass="inpainting-workarea-overrides" - > + }> {shouldUseCanvasBetaLayout ? ( ) : ( diff --git a/invokeai/frontend/web/src/features/ui/store/uiSlice.ts b/invokeai/frontend/web/src/features/ui/store/uiSlice.ts index 3bbb6c206f..d9abae23d8 100644 --- a/invokeai/frontend/web/src/features/ui/store/uiSlice.ts +++ b/invokeai/frontend/web/src/features/ui/store/uiSlice.ts @@ -10,7 +10,6 @@ const initialtabsState: UIState = { shouldHoldParametersPanelOpen: false, shouldPinParametersPanel: true, shouldShowParametersPanel: true, - shouldShowDualDisplay: true, shouldShowImageDetails: false, shouldUseCanvasBetaLayout: false, shouldShowExistingModelsInSearch: false, @@ -52,9 +51,6 @@ export const uiSlice = createSlice({ ) => { state.shouldHoldParametersPanelOpen = action.payload; }, - setShouldShowDualDisplay: (state, action: PayloadAction) => { - state.shouldShowDualDisplay = action.payload; - }, setShouldShowImageDetails: (state, action: PayloadAction) => { state.shouldShowImageDetails = action.payload; }, @@ -83,7 +79,6 @@ export const { setShouldHoldParametersPanelOpen, setShouldPinParametersPanel, setShouldShowParametersPanel, - setShouldShowDualDisplay, setShouldShowImageDetails, setShouldUseCanvasBetaLayout, setShouldShowExistingModelsInSearch, diff --git a/invokeai/frontend/web/src/features/ui/store/uiTypes.ts b/invokeai/frontend/web/src/features/ui/store/uiTypes.ts index cd9b3817a1..5885bc3ed7 100644 --- a/invokeai/frontend/web/src/features/ui/store/uiTypes.ts +++ b/invokeai/frontend/web/src/features/ui/store/uiTypes.ts @@ -7,7 +7,6 @@ export interface UIState { shouldHoldParametersPanelOpen: boolean; shouldPinParametersPanel: boolean; shouldShowParametersPanel: boolean; - shouldShowDualDisplay: boolean; shouldShowImageDetails: boolean; shouldUseCanvasBetaLayout: boolean; shouldShowExistingModelsInSearch: boolean; diff --git a/invokeai/frontend/web/src/i18.d.ts b/invokeai/frontend/web/src/i18.d.ts index 61878384e6..90cee53385 100644 --- a/invokeai/frontend/web/src/i18.d.ts +++ b/invokeai/frontend/web/src/i18.d.ts @@ -1,11 +1,16 @@ import 'i18next'; +import en from '../public/locales/en.json'; + declare module 'i18next' { // Extend CustomTypeOptions interface CustomTypeOptions { // Setting Default Namespace As English defaultNS: 'en'; // Custom Types For Resources + resources: { + en: typeof en; + }; // Never Return Null returnNull: false; } diff --git a/invokeai/frontend/web/src/main.tsx b/invokeai/frontend/web/src/main.tsx index 09b99d37f6..edbca0c368 100644 --- a/invokeai/frontend/web/src/main.tsx +++ b/invokeai/frontend/web/src/main.tsx @@ -1,38 +1,36 @@ -import { ChakraProvider } from '@chakra-ui/react'; -import createCache from '@emotion/cache'; -import { CacheProvider } from '@emotion/react'; -import React from 'react'; +import React, { lazy } from 'react'; import ReactDOM from 'react-dom/client'; import { Provider } from 'react-redux'; import { PersistGate } from 'redux-persist/integration/react'; import { store } from './app/store'; import { persistor } from './persistor'; +import '@fontsource/inter/100.css'; +import '@fontsource/inter/200.css'; +import '@fontsource/inter/300.css'; +import '@fontsource/inter/400.css'; +import '@fontsource/inter/500.css'; +import '@fontsource/inter/600.css'; +import '@fontsource/inter/700.css'; +import '@fontsource/inter/800.css'; +import '@fontsource/inter/900.css'; -import App from './app/App'; import Loading from './Loading'; -export const emotionCache = createCache({ - key: 'invokeai-style-cache', - prepend: true, -}); - -// Custom Styling -import './styles/index.scss'; - // Localization import './i18n'; +const App = lazy(() => import('./app/App')); +const ThemeLocaleProvider = lazy(() => import('./app/ThemeLocaleProvider')); + ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( } persistor={persistor}> - - - }> - - - - + }> + + + + diff --git a/invokeai/frontend/web/src/styles/Mixins/Buttons.scss b/invokeai/frontend/web/src/styles/Mixins/Buttons.scss index 93772d4ef8..ee3795eae5 100644 --- a/invokeai/frontend/web/src/styles/Mixins/Buttons.scss +++ b/invokeai/frontend/web/src/styles/Mixins/Buttons.scss @@ -5,36 +5,36 @@ $btn-height: 100%, $icon-size: 20px ) { - min-width: $btn-width; - min-height: $btn-height; - background-color: $btn-color !important; + // min-width: $btn-width; + // min-height: $btn-height; + // background-color: $btn-color; - &:hover { - background-color: $btn-color-hover; - } + // &:hover { + // background-color: $btn-color-hover; + // } - &:disabled { - background-color: var(--btn-base-color); - &:hover { - background-color: var(--btn-base-color); - } - } + // &:disabled { + // background-color: var(--btn-base-color); + // &:hover { + // background-color: var(--btn-base-color); + // } + // } - svg { - width: $icon-size; - height: $icon-size; - color: var(--btn-svg-color); - } + // svg { + // width: $icon-size; + // height: $icon-size; + // color: var(--btn-svg-color); + // } } @mixin BaseButton { - background-color: var(--btn-base-color); - &:hover { - background-color: var(--btn-base-color-hover); - } - &:disabled { - &:hover { - background-color: var(--btn-base-color); - } - } + // background-color: var(--btn-base-color); + // &:hover { + // background-color: var(--btn-base-color-hover); + // } + // &:disabled { + // &:hover { + // background-color: var(--btn-base-color); + // } + // } } diff --git a/invokeai/frontend/web/src/styles/Mixins/_Responsive.scss b/invokeai/frontend/web/src/styles/Mixins/_Responsive.scss index 0cf98567be..7f592ffe7c 100644 --- a/invokeai/frontend/web/src/styles/Mixins/_Responsive.scss +++ b/invokeai/frontend/web/src/styles/Mixins/_Responsive.scss @@ -1,159 +1,159 @@ -@media (max-width: 600px) { - #root { - .app-content { - padding: 5px; - .site-header { - position: fixed; - display: flex; - height: 100px; - z-index: 1; - .site-header-left-side { - position: absolute; - display: flex; - min-width: 145px; - float: left; - padding-left: 0; - } - .site-header-right-side { - display: grid; - grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; - grid-template-rows: 25px 25px 25px; - grid-template-areas: - 'logoSpace logoSpace logoSpace sampler sampler sampler' - 'status status status status status status' - 'btn1 btn2 btn3 btn4 btn5 btn6'; - row-gap: 15px; - .chakra-popover__popper { - grid-area: logoSpace; - } - > :nth-child(1).chakra-text { - grid-area: status; - width: 100%; - display: flex; - justify-content: center; - } - > :nth-child(2) { - grid-area: sampler; - display: flex; - justify-content: center; - align-items: center; - select { - width: 185px; - margin-top: 10px; - } - .chakra-select__icon-wrapper { - right: 10px; - svg { - margin-top: 10px; - } - } - } - > :nth-child(3) { - grid-area: btn1; - } - > :nth-child(4) { - grid-area: btn2; - } - > :nth-child(6) { - grid-area: btn3; - } - > :nth-child(7) { - grid-area: btn4; - } - > :nth-child(8) { - grid-area: btn5; - } - > :nth-child(9) { - grid-area: btn6; - } - } - } - .app-tabs { - position: fixed; - display: flex; - flex-direction: column; - row-gap: 15px; - max-width: 100%; - overflow: hidden; - margin-top: 120px; - .app-tabs-list { - display: flex; - justify-content: space-between; - } - .app-tabs-panels { - overflow: hidden; - overflow-y: scroll; - .workarea-main { - display: grid; - grid-template-areas: - 'workarea' - 'options' - 'gallery'; - row-gap: 15px; - .parameters-panel-wrapper { - grid-area: options; - width: 100%; - max-width: 100%; - height: inherit; - overflow: inherit; - padding: 0 10px; - .main-settings-row { - max-width: 100%; - } - .advanced-parameters-item { - max-width: 100%; - } - } - .workarea-children-wrapper { - grid-area: workarea; - .workarea-split-view { - display: flex; - flex-direction: column; - } - .current-image-options { - column-gap: 3px; - } - .text-to-image-area { - padding: 0; - } - .current-image-preview { - height: 430px; - } +// @media (max-width: 600px) { +// #root { +// .app-content { +// padding: 5px; +// .site-header { +// position: fixed; +// display: flex; +// height: 100px; +// z-index: 1; +// .site-header-left-side { +// position: absolute; +// display: flex; +// min-width: 145px; +// float: left; +// padding-left: 0; +// } +// .site-header-right-side { +// display: grid; +// grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; +// grid-template-rows: 25px 25px 25px; +// grid-template-areas: +// 'logoSpace logoSpace logoSpace sampler sampler sampler' +// 'status status status status status status' +// 'btn1 btn2 btn3 btn4 btn5 btn6'; +// row-gap: 15px; +// .chakra-popover__popper { +// grid-area: logoSpace; +// } +// > :nth-child(1).chakra-text { +// grid-area: status; +// width: 100%; +// display: flex; +// justify-content: center; +// } +// > :nth-child(2) { +// grid-area: sampler; +// display: flex; +// justify-content: center; +// align-items: center; +// select { +// width: 185px; +// margin-top: 10px; +// } +// .chakra-select__icon-wrapper { +// right: 10px; +// svg { +// margin-top: 10px; +// } +// } +// } +// > :nth-child(3) { +// grid-area: btn1; +// } +// > :nth-child(4) { +// grid-area: btn2; +// } +// > :nth-child(6) { +// grid-area: btn3; +// } +// > :nth-child(7) { +// grid-area: btn4; +// } +// > :nth-child(8) { +// grid-area: btn5; +// } +// > :nth-child(9) { +// grid-area: btn6; +// } +// } +// } +// .app-tabs { +// position: fixed; +// display: flex; +// flex-direction: column; +// row-gap: 15px; +// max-width: 100%; +// overflow: hidden; +// margin-top: 120px; +// .app-tabs-list { +// display: flex; +// justify-content: space-between; +// } +// .app-tabs-panels { +// overflow: hidden; +// overflow-y: scroll; +// .workarea-main { +// display: grid; +// grid-template-areas: +// 'workarea' +// 'options' +// 'gallery'; +// row-gap: 15px; +// .parameters-panel-wrapper { +// grid-area: options; +// width: 100%; +// max-width: 100%; +// height: inherit; +// overflow: inherit; +// padding: 0 10px; +// .main-settings-row { +// max-width: 100%; +// } +// .advanced-parameters-item { +// max-width: 100%; +// } +// } +// .workarea-children-wrapper { +// grid-area: workarea; +// .workarea-split-view { +// display: flex; +// flex-direction: column; +// } +// .current-image-options { +// column-gap: 3px; +// } +// .text-to-image-area { +// padding: 0; +// } +// .current-image-preview { +// height: 430px; +// } - //image 2 image - .image-upload-button { - row-gap: 10px; - padding: 5px; - svg { - width: 2rem; - height: 2rem; - margin-top: 10px; - } - } +// //image 2 image +// .image-upload-button { +// row-gap: 10px; +// padding: 5px; +// svg { +// width: 2rem; +// height: 2rem; +// margin-top: 10px; +// } +// } - //Cavas Painting - .inpainting-settings { - display: flex; - flex-wrap: wrap; - row-gap: 10px; - } - .inpainting-canvas-area { - .konvajs-content { - height: 400px !important; - } - } - } - .image-gallery-wrapper { - grid-area: gallery; - min-height: 400px; - .image-gallery-popup { - width: 100% !important; - max-width: 100% !important; - } - } - } - } - } - } - } -} +// //Cavas Painting +// .inpainting-settings { +// display: flex; +// flex-wrap: wrap; +// row-gap: 10px; +// } +// .inpainting-canvas-area { +// .konvajs-content { +// height: 400px !important; +// } +// } +// } +// .image-gallery-wrapper { +// grid-area: gallery; +// min-height: 400px; +// .image-gallery-popup { +// width: 100% !important; +// max-width: 100% !important; +// } +// } +// } +// } +// } +// } +// } +// } diff --git a/invokeai/frontend/web/src/styles/Themes/_Colors_Dark.scss b/invokeai/frontend/web/src/styles/Themes/_Colors_Dark.scss index 13c8a507c1..88d2859cb3 100644 --- a/invokeai/frontend/web/src/styles/Themes/_Colors_Dark.scss +++ b/invokeai/frontend/web/src/styles/Themes/_Colors_Dark.scss @@ -1,4 +1,4 @@ -[data-theme='dark'] { +[data-theme='asdf'] { // General Colors --white: rgb(255, 255, 255); diff --git a/invokeai/frontend/web/src/styles/Themes/_Colors_Light.scss b/invokeai/frontend/web/src/styles/Themes/_Colors_Light.scss index 4c4f93dfbf..67efb7e3fa 100644 --- a/invokeai/frontend/web/src/styles/Themes/_Colors_Light.scss +++ b/invokeai/frontend/web/src/styles/Themes/_Colors_Light.scss @@ -1,138 +1,138 @@ -[data-theme='light'] { - // General Colors - --white: rgb(255, 255, 255); +// [data-theme='light'] { +// // General Colors +// --white: rgb(255, 255, 255); - // Accent Colors - --accent-color-dim: rgb(186, 146, 0); - --accent-color: rgb(235, 185, 5); - --accent-color-bright: rgb(255, 200, 0); - --accent-color-hover: var(--accent-color-bright); +// // Accent Colors +// --accent-color-dim: rgb(186, 146, 0); +// --accent-color: rgb(235, 185, 5); +// --accent-color-bright: rgb(255, 200, 0); +// --accent-color-hover: var(--accent-color-bright); - // App Colors - --root-bg-color: rgb(255, 255, 255); - --background-color: rgb(220, 222, 224); - --background-color-light: rgb(250, 252, 254); - --background-color-secondary: rgb(208, 210, 212); +// // App Colors +// --root-bg-color: rgb(255, 255, 255); +// --background-color: rgb(220, 222, 224); +// --background-color-light: rgb(250, 252, 254); +// --background-color-secondary: rgb(208, 210, 212); - --text-color: rgb(0, 0, 0); - --text-color-secondary: rgb(40, 40, 40); - --subtext-color: rgb(24, 24, 34); - --subtext-color-bright: rgb(142, 144, 146); +// --text-color: rgb(0, 0, 0); +// --text-color-secondary: rgb(40, 40, 40); +// --subtext-color: rgb(24, 24, 34); +// --subtext-color-bright: rgb(142, 144, 146); - --border-color: rgb(200, 200, 200); - --border-color-light: rgb(147, 147, 147); +// --border-color: rgb(200, 200, 200); +// --border-color-light: rgb(147, 147, 147); - --svg-color: rgb(50, 50, 50); +// --svg-color: rgb(50, 50, 50); - --invalid: rgb(255, 75, 75); - --invalid-secondary: rgb(120, 5, 5); +// --invalid: rgb(255, 75, 75); +// --invalid-secondary: rgb(120, 5, 5); - --destructive-color: rgb(237, 51, 51); - --destructive-color-hover: rgb(255, 55, 55); +// --destructive-color: rgb(237, 51, 51); +// --destructive-color-hover: rgb(255, 55, 55); - --warning-color: rgb(224, 142, 42); - --warning-color-hover: rgb(255, 167, 60); +// --warning-color: rgb(224, 142, 42); +// --warning-color-hover: rgb(255, 167, 60); - // Error status colors - --border-color-invalid: rgb(255, 80, 50); - --box-shadow-color-invalid: none; +// // Error status colors +// --border-color-invalid: rgb(255, 80, 50); +// --box-shadow-color-invalid: none; - // Tabs - --tab-color: rgb(202, 204, 206); - --tab-hover-color: rgb(196, 198, 200); - --tab-panel-bg: rgb(206, 208, 210); - --tab-list-bg: rgb(235, 185, 5); - --tab-list-text: rgb(0, 0, 0); - --tab-list-text-inactive: rgb(106, 108, 110); +// // Tabs +// --tab-color: rgb(202, 204, 206); +// --tab-hover-color: rgb(196, 198, 200); +// --tab-panel-bg: rgb(206, 208, 210); +// --tab-list-bg: rgb(235, 185, 5); +// --tab-list-text: rgb(0, 0, 0); +// --tab-list-text-inactive: rgb(106, 108, 110); - // Button Colors - --btn-base-color: rgb(184, 186, 188); - --btn-base-color-hover: rgb(230, 232, 234); +// // Button Colors +// --btn-base-color: rgb(184, 186, 188); +// --btn-base-color-hover: rgb(230, 232, 234); - --btn-load-more: rgb(202, 204, 206); - --btn-load-more-hover: rgb(178, 180, 182); - --btn-svg-color: rgb(0, 0, 0); +// --btn-load-more: rgb(202, 204, 206); +// --btn-load-more-hover: rgb(178, 180, 182); +// --btn-svg-color: rgb(0, 0, 0); - --btn-delete-image: rgb(213, 49, 49); +// --btn-delete-image: rgb(213, 49, 49); - // IAI Button Colors - --btn-checkbox-border-hover: rgb(176, 178, 182); - // Progress Bar Color - --progress-bar-color: rgb(235, 185, 5); +// // IAI Button Colors +// --btn-checkbox-border-hover: rgb(176, 178, 182); +// // Progress Bar Color +// --progress-bar-color: rgb(235, 185, 5); - // Prompt Box Colors - --prompt-bg-color: rgb(225, 227, 229); - // Switch - --switch-bg-color: rgb(178, 180, 182); - --switch-bg-active-color: rgb(235, 185, 5); +// // Prompt Box Colors +// --prompt-bg-color: rgb(225, 227, 229); +// // Switch +// --switch-bg-color: rgb(178, 180, 182); +// --switch-bg-active-color: rgb(235, 185, 5); - // Slider - --slider-color: var(--accent-color); - --slider-mark-color: rgb(0, 0, 0); +// // Slider +// --slider-color: var(--accent-color); +// --slider-mark-color: rgb(0, 0, 0); - // Resizable - --resizeable-handle-border-color: rgb(160, 162, 164); +// // Resizable +// --resizeable-handle-border-color: rgb(160, 162, 164); - // Metadata Viewer - --metadata-bg-color: rgba(230, 230, 230, 0.9); - --metadata-json-bg-color: rgba(0, 0, 0, 0.1); +// // Metadata Viewer +// --metadata-bg-color: rgba(230, 230, 230, 0.9); +// --metadata-json-bg-color: rgba(0, 0, 0, 0.1); - // Status Message - --status-good-color: rgb(21, 126, 0); - --status-good-glow: var(--background-color); - --status-working-color: rgb(235, 141, 0); - --status-working-glow: var(--background-color); - --status-bad-color: rgb(202, 0, 0); - --status-bad-glow: var(--background-color); - --notice-color: rgb(255, 71, 90); +// // Status Message +// --status-good-color: rgb(21, 126, 0); +// --status-good-glow: var(--background-color); +// --status-working-color: rgb(235, 141, 0); +// --status-working-glow: var(--background-color); +// --status-bad-color: rgb(202, 0, 0); +// --status-bad-glow: var(--background-color); +// --notice-color: rgb(255, 71, 90); - // Settings Modal - --settings-modal-bg: rgb(202, 204, 206); +// // Settings Modal +// --settings-modal-bg: rgb(202, 204, 206); - // Input - --input-checkbox-bg: rgb(167, 167, 171); - --input-checkbox-checked-bg: rgb(235, 185, 5); - --input-checkbox-checked-tick: rgb(0, 0, 0); - --input-border-color: rgb(0, 0, 0); - --input-box-shadow-color: none; +// // Input +// --input-checkbox-bg: rgb(167, 167, 171); +// --input-checkbox-checked-bg: rgb(235, 185, 5); +// --input-checkbox-checked-tick: rgb(0, 0, 0); +// --input-border-color: rgb(0, 0, 0); +// --input-box-shadow-color: none; - // Console - --error-level-info: rgb(42, 42, 42); - --error-level-warning: rgb(173, 121, 0); - --error-level-error: rgb(145, 14, 0); - --console-bg-color: rgb(220, 224, 230); - --console-icon-button-bg-color: var(--switch-bg-color); - --console-icon-button-bg-color-hover: var(--resizeable-handle-border-color); +// // Console +// --error-level-info: rgb(42, 42, 42); +// --error-level-warning: rgb(173, 121, 0); +// --error-level-error: rgb(145, 14, 0); +// --console-bg-color: rgb(220, 224, 230); +// --console-icon-button-bg-color: var(--switch-bg-color); +// --console-icon-button-bg-color-hover: var(--resizeable-handle-border-color); - // Img2Img - --img2img-img-bg-color: rgb(180, 182, 184); +// // Img2Img +// --img2img-img-bg-color: rgb(180, 182, 184); - // Gallery +// // Gallery - // Context Menus - --context-menu-bg-color: var(--background-color); - --context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, 0.35), - 0px 10px 20px -15px rgba(22, 23, 24, 0.2); - --context-menu-bg-color-hover: var(--background-color-secondary); +// // Context Menus +// --context-menu-bg-color: var(--background-color); +// --context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, 0.35), +// 0px 10px 20px -15px rgba(22, 23, 24, 0.2); +// --context-menu-bg-color-hover: var(--background-color-secondary); - // Shadows - --floating-button-drop-shadow-color: rgba(0, 0, 0, 0.7); +// // Shadows +// --floating-button-drop-shadow-color: rgba(0, 0, 0, 0.7); - // Canvas - --inpainting-alerts-bg: rgba(220, 222, 224, 0.75); - --inpainting-alerts-icon-color: rgb(0, 0, 0); - --inpainting-alerts-bg-active: rgb(255, 200, 0); - --inpainting-alerts-icon-active: rgb(0, 0, 0); - --inpainting-alerts-bg-alert: var(--invalid); - --inpainting-alerts-icon-alert: rgb(0, 0, 0); +// // Canvas +// --inpainting-alerts-bg: rgba(220, 222, 224, 0.75); +// --inpainting-alerts-icon-color: rgb(0, 0, 0); +// --inpainting-alerts-bg-active: rgb(255, 200, 0); +// --inpainting-alerts-icon-active: rgb(0, 0, 0); +// --inpainting-alerts-bg-alert: var(--invalid); +// --inpainting-alerts-icon-alert: rgb(0, 0, 0); - // Checkerboard - --checkboard-dots-color: rgb(160, 160, 172); +// // Checkerboard +// --checkboard-dots-color: rgb(160, 160, 172); - // Scrollbar - --scrollbar-color: rgb(180, 180, 184); - --scrollbar-color-hover: rgb(150, 150, 154); +// // Scrollbar +// --scrollbar-color: rgb(180, 180, 184); +// --scrollbar-color-hover: rgb(150, 150, 154); - // SubHook - --subhook-color: rgb(0, 0, 0); -} +// // SubHook +// --subhook-color: rgb(0, 0, 0); +// } diff --git a/invokeai/frontend/web/src/styles/_Animations.scss b/invokeai/frontend/web/src/styles/_Animations.scss deleted file mode 100644 index 48fbbc8425..0000000000 --- a/invokeai/frontend/web/src/styles/_Animations.scss +++ /dev/null @@ -1,20 +0,0 @@ -@keyframes slideOut { - from { - transform: translateX(10rem); - } - to { - transform: translateX(0); - } -} - -@keyframes pulse { - 0% { - transform: scale(1); - } - 50% { - transform: scale(1.1); - } - 100% { - transform: scale(1); - } -} diff --git a/invokeai/frontend/web/src/styles/_Fonts.scss b/invokeai/frontend/web/src/styles/_Fonts.scss deleted file mode 100644 index fea170026b..0000000000 --- a/invokeai/frontend/web/src/styles/_Fonts.scss +++ /dev/null @@ -1,15 +0,0 @@ -@font-face { - font-family: 'Inter'; - src: url(../assets/fonts/Inter/Inter.ttf); - font-display: swap; - font-weight: 400; - font-style: normal; -} - -@font-face { - font-family: 'Inter'; - src: url(../assets/fonts/Inter/Inter-Bold.ttf); - font-display: swap; - font-weight: 600; - font-style: normal; -} diff --git a/invokeai/frontend/web/src/styles/_Misc.scss b/invokeai/frontend/web/src/styles/_Misc.scss deleted file mode 100644 index 47dec4c061..0000000000 --- a/invokeai/frontend/web/src/styles/_Misc.scss +++ /dev/null @@ -1,45 +0,0 @@ -// .checkerboard { -// background-position: 0px 0px, 10px 10px; -// // background-size: 20px 20px; -// // background-image: linear-gradient( -// // 45deg, -// // #eee 25%, -// // transparent 25%, -// // transparent 75%, -// // #eee 75%, -// // #eee 100% -// // ), -// // linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%); -// background: radial-gradient(var(--checkboard-dots-color) 3px, transparent 1px), -// var(--background-color-secondary); -// background-size: 64px 64px; -// } - -* { - scrollbar-width: thick; /* none | auto */ - scrollbar-color: var(--scrollbar-color) transparent; -} - -*::-webkit-scrollbar { - width: 8px; // Vertical Scrollbar Width - height: 8px; // Horizontal Scrollbar Height -} - -*::-webkit-scrollbar-track { - background: transparent; -} - -*::-webkit-scrollbar-thumb { - background: var(--scrollbar-color); - border-radius: 8px; - border: calc(8px / 4) solid var(--scrollbar-color); -} - -*::-webkit-scrollbar-thumb:hover { - background: var(--scrollbar-color-hover); - border: calc(8px / 4) solid var(--scrollbar-color-hover); -} - -::-webkit-scrollbar-button { - background: transparent; -} diff --git a/invokeai/frontend/web/src/styles/index.scss b/invokeai/frontend/web/src/styles/index.scss deleted file mode 100644 index afafc17181..0000000000 --- a/invokeai/frontend/web/src/styles/index.scss +++ /dev/null @@ -1,93 +0,0 @@ -// General Imports -@use 'Fonts'; -@use 'Animations'; -@use 'Misc'; - -// Themes -@use './Themes/Colors_Dark'; -@use './Themes/Colors_Light'; -@use './Themes/Colors_Green'; - -// Component Styles - -// app -@use '../app/App.scss'; - -// system -@use '../features/system/components/SiteHeader.scss'; -@use '../features/system/components/StatusIndicator.scss'; -@use '../features/system/components/SettingsModal/SettingsModal.scss'; -@use '../features/system/components/ModelManager/AddModel.scss'; -@use '../features/system/components/HotkeysModal/HotkeysModal.scss'; -@use '../features/system/components/Console.scss'; -@use '../features/system/components/ProgressBar.scss'; - -// parameters -@use '../features/parameters/components/PromptInput/PromptInput.scss'; -@use '../features/parameters/components/ProcessButtons/ProcessButtons.scss'; -@use '../features/parameters/components/MainParameters/MainParameters.scss'; -@use '../features/parameters/components/AccordionItems/AdvancedSettings.scss'; -@use '../features/parameters/components/AdvancedParameters/Canvas/BoundingBox/BoundingBoxSettings.scss'; - -// gallery -@use '../features/gallery/components/CurrentImageDisplay.scss'; -@use '../features/gallery/components/CurrentImageButtons.scss'; -@use '../features/gallery/components/ImageGallery.scss'; -@use '../features/gallery/components/HoverableImage.scss'; -@use '../features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.scss'; - -// Lightbox -@use '../features/lightbox/components/Lightbox.scss'; - -// Tabs -@use '../features/ui/components/InvokeTabs.scss'; -@use '../features/ui/components/InvokeWorkarea.scss'; -@use '../features/ui/components/InvokeParametersPanel.scss'; -@use '../features/ui/components/TextToImage/TextToImage.scss'; -@use '../features/ui/components/ImageToImage/ImageToImage.scss'; -@use '../features/ui/components/FloatingButton.scss'; -@use '../features/ui/components/UnifiedCanvas/CanvasWorkarea.scss'; - -// Component Shared -@use '../common/components/IAINumberInput.scss'; -@use '../common/components/IAIInput.scss'; -@use '../common/components/IAIIconButton.scss'; -@use '../common/components/IAIButton.scss'; -@use '../common/components/IAISwitch.scss'; -@use '../common/components/IAISelect.scss'; -@use '../common/components/IAISlider.scss'; -@use '../common/components/IAICheckbox.scss'; -@use '../common/components/IAIPopover.scss'; -@use '../common/components/IAIColorPicker.scss'; -@use '../common/components/ImageUploader.scss'; -@use '../common/components/WorkInProgress/WorkInProgress.scss'; -@use '../common/components/GuidePopover.scss'; - -// Component Shared - Radix UI -// @use 'common/components/radix-ui/IAISlider.scss'; -// @use 'common/components/radix-ui/IAITooltip.scss'; - -// Shared Styles -@use './Mixins/' as *; -@use '../features/system/components/Modal.scss'; - -*, -*::before, -*::after { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -html, -body { - @include HideScrollbar; - background-color: var(--root-bg-color); - overflow: hidden; -} - -#root { - background-color: var(--root-bg-color); - color: var(--text-color); - font-family: 'Inter', Arial, Helvetica, sans-serif; -} diff --git a/invokeai/frontend/web/src/theme/colors/greenTea.ts b/invokeai/frontend/web/src/theme/colors/greenTea.ts new file mode 100644 index 0000000000..6da7fa3b82 --- /dev/null +++ b/invokeai/frontend/web/src/theme/colors/greenTea.ts @@ -0,0 +1,10 @@ +import { generateColorPalette } from '../util/generateColorPalette'; + +export const greenTeaThemeColors = { + base: generateColorPalette(223, 10), + accent: generateColorPalette(155, 80), + working: generateColorPalette(47, 68), + warning: generateColorPalette(28, 75), + ok: generateColorPalette(122, 49), + error: generateColorPalette(0, 50), +}; diff --git a/invokeai/frontend/web/src/theme/colors/invokeAI.ts b/invokeai/frontend/web/src/theme/colors/invokeAI.ts new file mode 100644 index 0000000000..cf5b4221b7 --- /dev/null +++ b/invokeai/frontend/web/src/theme/colors/invokeAI.ts @@ -0,0 +1,10 @@ +import { generateColorPalette } from 'theme/util/generateColorPalette'; + +export const invokeAIThemeColors = { + base: generateColorPalette(225, 15), + accent: generateColorPalette(250, 50), + working: generateColorPalette(47, 67), + warning: generateColorPalette(28, 75), + ok: generateColorPalette(113, 70), + error: generateColorPalette(0, 76), +}; diff --git a/invokeai/frontend/web/src/theme/colors/lightTheme.ts b/invokeai/frontend/web/src/theme/colors/lightTheme.ts new file mode 100644 index 0000000000..3a4d3b8747 --- /dev/null +++ b/invokeai/frontend/web/src/theme/colors/lightTheme.ts @@ -0,0 +1,10 @@ +import { generateColorPalette } from '../util/generateColorPalette'; + +export const lightThemeColors = { + base: generateColorPalette(223, 10, true), + accent: generateColorPalette(40, 80, true), + working: generateColorPalette(47, 68, true), + warning: generateColorPalette(28, 75, true), + ok: generateColorPalette(122, 49, true), + error: generateColorPalette(0, 50, true), +}; diff --git a/invokeai/frontend/web/src/theme/colors/oceanBlue.ts b/invokeai/frontend/web/src/theme/colors/oceanBlue.ts new file mode 100644 index 0000000000..1f29def485 --- /dev/null +++ b/invokeai/frontend/web/src/theme/colors/oceanBlue.ts @@ -0,0 +1,10 @@ +import { generateColorPalette } from '../util/generateColorPalette'; + +export const oceanBlueColors = { + base: generateColorPalette(220, 30), + accent: generateColorPalette(210, 80), + working: generateColorPalette(47, 68), + warning: generateColorPalette(28, 75), + ok: generateColorPalette(122, 49), + error: generateColorPalette(0, 100), +}; diff --git a/invokeai/frontend/web/src/theme/components/accordion.ts b/invokeai/frontend/web/src/theme/components/accordion.ts new file mode 100644 index 0000000000..dfea0aad74 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/accordion.ts @@ -0,0 +1,63 @@ +import { accordionAnatomy as parts } from '@chakra-ui/anatomy'; +import { + createMultiStyleConfigHelpers, + defineStyle, +} from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; + +const { definePartsStyle, defineMultiStyleConfig } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAIContainer = defineStyle({ + border: 'none', + pt: 2, +}); + +const invokeAIButton = defineStyle((props) => { + const { colorScheme: c } = props; + return { + fontWeight: '600', + fontSize: 'sm', + border: 'none', + borderRadius: 'base', + bg: mode(`${c}.250`, `${c}.800`)(props), + color: mode('base.900', 'base.100')(props), + _hover: { + bg: mode(`${c}.300`, `${c}.700`)(props), + }, + _expanded: { + bg: mode(`${c}.250`, `${c}.750`)(props), + borderBottomRadius: 'none', + _hover: { + bg: mode(`${c}.300`, `${c}.700`)(props), + }, + }, + }; +}); + +const invokeAIPanel = defineStyle((props) => { + const { colorScheme: c } = props; + return { + bg: mode(`${c}.200`, `${c}.800`)(props), + borderRadius: 'base', + borderTopRadius: 'none', + p: 4, + }; +}); + +const invokeAIIcon = defineStyle({}); + +const invokeAI = definePartsStyle((props) => ({ + container: invokeAIContainer, + button: invokeAIButton(props), + panel: invokeAIPanel(props), + icon: invokeAIIcon, +})); + +export const accordionTheme = defineMultiStyleConfig({ + variants: { invokeAI }, + defaultProps: { + variant: 'invokeAI', + colorScheme: 'base', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/button.ts b/invokeai/frontend/web/src/theme/components/button.ts new file mode 100644 index 0000000000..a79a3d356f --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/button.ts @@ -0,0 +1,58 @@ +import { defineStyle, defineStyleConfig } from '@chakra-ui/react'; +import { mode } from '@chakra-ui/theme-tools'; + +const invokeAI = defineStyle((props) => { + const { colorScheme: c } = props; + // must specify `_disabled` colors if we override `_hover`, else hover on disabled has no styles + const _disabled = { + bg: mode(`${c}.200`, `${c}.600`)(props), + color: mode(`${c}.700`, `${c}.100`)(props), + svg: { + fill: mode(`${c}.700`, `${c}.100`)(props), + }, + }; + + return { + bg: mode(`${c}.300`, `${c}.700`)(props), + color: mode(`${c}.800`, `${c}.100`)(props), + borderRadius: 'base', + svg: { + fill: mode(`${c}.800`, `${c}.100`)(props), + }, + _disabled, + _hover: { + bg: mode(`${c}.400`, `${c}.650`)(props), + color: mode(`black`, `${c}.50`)(props), + svg: { + fill: mode(`black`, `${c}.50`)(props), + }, + _disabled, + }, + _checked: { + bg: mode('accent.200', 'accent.700')(props), + color: mode('accent.800', 'accent.100')(props), + svg: { + fill: mode('accent.800', 'accent.100')(props), + }, + _disabled, + _hover: { + bg: mode('accent.300', 'accent.600')(props), + color: mode('accent.900', 'accent.50')(props), + svg: { + fill: mode('accent.900', 'accent.50')(props), + }, + _disabled, + }, + }, + }; +}); + +export const buttonTheme = defineStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + variant: 'invokeAI', + colorScheme: 'base', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/checkbox.ts b/invokeai/frontend/web/src/theme/components/checkbox.ts new file mode 100644 index 0000000000..5bdc8a1a66 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/checkbox.ts @@ -0,0 +1,65 @@ +import { checkboxAnatomy as parts } from '@chakra-ui/anatomy'; +import { + createMultiStyleConfigHelpers, + defineStyle, +} from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; + +const { definePartsStyle, defineMultiStyleConfig } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAIControl = defineStyle((props) => { + const { colorScheme: c } = props; + + return { + _checked: { + bg: mode(`${c}.500`, `${c}.200`)(props), + borderColor: mode(`${c}.500`, `${c}.200`)(props), + color: mode('white', 'base.900')(props), + + _hover: { + bg: mode(`${c}.600`, `${c}.300`)(props), + borderColor: mode(`${c}.600`, `${c}.300`)(props), + }, + + _disabled: { + borderColor: mode('base.200', 'transparent')(props), + bg: mode('base.200', 'whiteAlpha.300')(props), + color: mode('base.500', 'whiteAlpha.500')(props), + }, + }, + + _indeterminate: { + bg: mode(`${c}.500`, `${c}.200`)(props), + borderColor: mode(`${c}.500`, `${c}.200`)(props), + color: mode('white', 'base.900')(props), + }, + + _disabled: { + bg: mode('base.100', 'whiteAlpha.100')(props), + borderColor: mode('base.100', 'transparent')(props), + }, + + _focusVisible: { + boxShadow: 'outline', + }, + + _invalid: { + borderColor: mode('red.500', 'red.300')(props), + }, + }; +}); + +const invokeAI = definePartsStyle((props) => ({ + control: invokeAIControl(props), +})); + +export const checkboxTheme = defineMultiStyleConfig({ + variants: { + invokeAI: invokeAI, + }, + defaultProps: { + variant: 'invokeAI', + colorScheme: 'accent', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/formLabel.ts b/invokeai/frontend/web/src/theme/components/formLabel.ts new file mode 100644 index 0000000000..d49fd0a36d --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/formLabel.ts @@ -0,0 +1,27 @@ +import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; + +const invokeAI = defineStyle((props) => { + return { + fontSize: 'sm', + marginEnd: 0, + mb: 1, + fontWeight: '400', + transitionProperty: 'common', + transitionDuration: 'normal', + whiteSpace: 'nowrap', + _disabled: { + opacity: 0.4, + }, + color: mode('base.600', 'base.300')(props), + }; +}); + +export const formLabelTheme = defineStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/input.ts b/invokeai/frontend/web/src/theme/components/input.ts new file mode 100644 index 0000000000..167da7ef28 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/input.ts @@ -0,0 +1,22 @@ +import { inputAnatomy as parts } from '@chakra-ui/anatomy'; +import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'; +import { getInputOutlineStyles } from '../util/getInputOutlineStyles'; + +const { definePartsStyle, defineMultiStyleConfig } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAI = definePartsStyle((props) => { + return { + field: getInputOutlineStyles(props), + }; +}); + +export const inputTheme = defineMultiStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + size: 'sm', + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/menu.ts b/invokeai/frontend/web/src/theme/components/menu.ts new file mode 100644 index 0000000000..597e989953 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/menu.ts @@ -0,0 +1,44 @@ +import { menuAnatomy } from '@chakra-ui/anatomy'; +import { createMultiStyleConfigHelpers } from '@chakra-ui/react'; + +const { definePartsStyle, defineMultiStyleConfig } = + createMultiStyleConfigHelpers(menuAnatomy.keys); + +// define the base component styles +const invokeAI = definePartsStyle({ + // define the part you're going to style + button: { + // this will style the MenuButton component + fontWeight: '600', + bg: 'base.500', + color: 'base.200', + _hover: { + bg: 'base.600', + color: 'white', + }, + }, + list: { + zIndex: 9999, + bg: 'base.800', + }, + item: { + // this will style the MenuItem and MenuItemOption components + fontSize: 'sm', + bg: 'base.800', + _hover: { + bg: 'base.750', + }, + _focus: { + bg: 'base.700', + }, + }, +}); + +export const menuTheme = defineMultiStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/modal.ts b/invokeai/frontend/web/src/theme/components/modal.ts new file mode 100644 index 0000000000..9e422c7704 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/modal.ts @@ -0,0 +1,55 @@ +import { modalAnatomy as parts } from '@chakra-ui/anatomy'; +import { + createMultiStyleConfigHelpers, + defineStyle, +} from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; + +const { defineMultiStyleConfig, definePartsStyle } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAIOverlay = defineStyle({ + bg: 'blackAlpha.600', +}); + +const invokeAIDialogContainer = defineStyle({}); + +const invokeAIDialog = defineStyle((props) => { + return { + bg: mode('base.300', 'base.850')(props), + maxH: '80vh', + }; +}); + +const invokeAIHeader = defineStyle((props) => { + return { + fontWeight: '600', + fontSize: 'lg', + color: mode('base.700', 'base.200')(props), + }; +}); + +const invokeAICloseButton = defineStyle({}); + +const invokeAIBody = defineStyle({ + overflowY: 'scroll', +}); + +const invokeAIFooter = defineStyle({}); + +export const invokeAI = definePartsStyle((props) => ({ + overlay: invokeAIOverlay, + dialogContainer: invokeAIDialogContainer, + dialog: invokeAIDialog(props), + header: invokeAIHeader(props), + closeButton: invokeAICloseButton, + body: invokeAIBody, + footer: invokeAIFooter, +})); + +export const modalTheme = defineMultiStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { variant: 'invokeAI', size: 'lg' }, +}); diff --git a/invokeai/frontend/web/src/theme/components/numberInput.ts b/invokeai/frontend/web/src/theme/components/numberInput.ts new file mode 100644 index 0000000000..9d7e773701 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/numberInput.ts @@ -0,0 +1,71 @@ +import { numberInputAnatomy as parts } from '@chakra-ui/anatomy'; +import { + createMultiStyleConfigHelpers, + defineStyle, +} from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; +import { getInputOutlineStyles } from '../util/getInputOutlineStyles'; + +const { defineMultiStyleConfig, definePartsStyle } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAIRoot = defineStyle((_props) => { + return { + height: 8, + }; +}); + +const invokeAIField = defineStyle((props) => { + return { + border: 'none', + fontWeight: '600', + height: 'auto', + py: 1, + ps: 2, + pe: 6, + ...getInputOutlineStyles(props), + }; +}); + +const invokeAIStepperGroup = defineStyle((_props) => { + return { + display: 'flex', + }; +}); + +const invokeAIStepper = defineStyle((props) => { + return { + border: 'none', + // expand arrow hitbox + px: 2, + py: 0, + mx: -2, + my: 0, + + svg: { + color: mode('base.600', 'base.300')(props), + width: 2.5, + height: 2.5, + _hover: { + color: mode('base.900', 'base.50')(props), + }, + }, + }; +}); + +const invokeAI = definePartsStyle((props) => ({ + root: invokeAIRoot(props), + field: invokeAIField(props), + stepperGroup: invokeAIStepperGroup(props), + stepper: invokeAIStepper(props), +})); + +export const numberInputTheme = defineMultiStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + size: 'sm', + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/popover.ts b/invokeai/frontend/web/src/theme/components/popover.ts new file mode 100644 index 0000000000..d6b5d316ac --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/popover.ts @@ -0,0 +1,42 @@ +import { popoverAnatomy as parts } from '@chakra-ui/anatomy'; +import { + createMultiStyleConfigHelpers, + defineStyle, +} from '@chakra-ui/styled-system'; +import { cssVar } from '@chakra-ui/theme-tools'; +import { mode } from '@chakra-ui/theme-tools'; + +const { defineMultiStyleConfig, definePartsStyle } = + createMultiStyleConfigHelpers(parts.keys); + +const $popperBg = cssVar('popper-bg'); +const $arrowBg = cssVar('popper-arrow-bg'); +const $arrowShadowColor = cssVar('popper-arrow-shadow-color'); + +const invokeAIContent = defineStyle((props) => { + return { + [$arrowBg.variable]: `colors.base.800`, + [$popperBg.variable]: `colors.base.800`, + [$arrowShadowColor.variable]: `colors.base.600`, + minW: 'unset', + width: 'unset', + p: 4, + borderWidth: '2px', + borderStyle: 'solid', + borderColor: mode('base.500', 'base.600')(props), + bg: mode('base.200', 'base.800')(props), + }; +}); + +const invokeAI = definePartsStyle((props) => ({ + content: invokeAIContent(props), +})); + +export const popoverTheme = defineMultiStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/progress.ts b/invokeai/frontend/web/src/theme/components/progress.ts new file mode 100644 index 0000000000..4d48830e06 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/progress.ts @@ -0,0 +1,40 @@ +import { progressAnatomy as parts } from '@chakra-ui/anatomy'; +import { + createMultiStyleConfigHelpers, + defineStyle, +} from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; + +const { defineMultiStyleConfig, definePartsStyle } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAIFilledTrack = defineStyle((props) => ({ + bg: mode('accent.400', 'accent.600')(props), + transition: 'width 0.2s ease-in-out', + _indeterminate: { + bgGradient: `linear(to-r, transparent 0%, ${mode( + 'accent.400', + 'accent.600' + )(props)} 50%, transparent 100%);`, + }, +})); + +const invokeAITrack = defineStyle((props) => { + return { + bg: mode('base.300', 'base.800')(props), + }; +}); + +const invokeAI = definePartsStyle((props) => ({ + filledTrack: invokeAIFilledTrack(props), + track: invokeAITrack(props), +})); + +export const progressTheme = defineMultiStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/scrollbar.ts b/invokeai/frontend/web/src/theme/components/scrollbar.ts new file mode 100644 index 0000000000..5128fb1cb8 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/scrollbar.ts @@ -0,0 +1,31 @@ +export const no_scrollbar = { + '::-webkit-scrollbar': { + display: 'none', + }, + scrollbarWidth: 'none', +}; + +export const scrollbar = { + scrollbarColor: 'accent.600 transparent', + scrollbarWidth: 'thick', + '::-webkit-scrollbar': { + width: '6px', // Vertical Scrollbar Width + height: '6px', // Horizontal Scrollbar Height + }, + '::-webkit-scrollbar-track': { + background: 'transparent', + }, + '::-webkit-scrollbar-thumb': { + background: 'accent.600', + borderRadius: '8px', + borderWidth: '4px', + borderColor: 'accent.600', + }, + '::-webkit-scrollbar-thumb:hover': { + background: 'accent.500', + borderColor: 'accent.500', + }, + '::-webkit-scrollbar-button': { + background: 'transaprent', + }, +}; diff --git a/invokeai/frontend/web/src/theme/components/select.ts b/invokeai/frontend/web/src/theme/components/select.ts new file mode 100644 index 0000000000..bbb438b4d0 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/select.ts @@ -0,0 +1,35 @@ +import { selectAnatomy as parts } from '@chakra-ui/anatomy'; +import { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/react'; +import { getInputOutlineStyles } from '../util/getInputOutlineStyles'; +import { mode } from '@chakra-ui/theme-tools'; + +const { definePartsStyle, defineMultiStyleConfig } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAIIcon = defineStyle((props) => { + return { + color: mode('base.600', 'base.300')(props), + }; +}); + +const invokeAIField = defineStyle((props) => ({ + fontWeight: '600', + ...getInputOutlineStyles(props), +})); + +const invokeAI = definePartsStyle((props) => { + return { + field: invokeAIField(props), + icon: invokeAIIcon(props), + }; +}); + +export const selectTheme = defineMultiStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + size: 'sm', + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/slider.ts b/invokeai/frontend/web/src/theme/components/slider.ts new file mode 100644 index 0000000000..1afb188712 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/slider.ts @@ -0,0 +1,53 @@ +import { sliderAnatomy as parts } from '@chakra-ui/anatomy'; +import { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/react'; +import { mode } from '@chakra-ui/theme-tools'; + +const { definePartsStyle, defineMultiStyleConfig } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAITrack = defineStyle((props) => { + return { + bg: mode('base.300', 'base.400')(props), + h: 1.5, + }; +}); + +const invokeAIFilledTrack = defineStyle((props) => { + const { colorScheme: c } = props; + return { + bg: mode(`${c}.400`, `${c}.600`)(props), + h: 1.5, + }; +}); + +const invokeAIThumb = defineStyle((_props) => { + return { + w: 2, + h: 4, + }; +}); + +const invokeAIMark = defineStyle((props) => { + return { + fontSize: 'xs', + fontWeight: '500', + color: mode('base.800', 'base.200')(props), + mt: 2, + insetInlineStart: 'unset', + }; +}); + +const invokeAI = definePartsStyle((props) => ({ + track: invokeAITrack(props), + filledTrack: invokeAIFilledTrack(props), + thumb: invokeAIThumb(props), + mark: invokeAIMark(props), +})); + +export const sliderTheme = defineMultiStyleConfig({ + variants: { invokeAI }, + defaultProps: { + variant: 'invokeAI', + colorScheme: 'accent', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/switch.ts b/invokeai/frontend/web/src/theme/components/switch.ts new file mode 100644 index 0000000000..e39b4257b2 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/switch.ts @@ -0,0 +1,47 @@ +import { switchAnatomy as parts } from '@chakra-ui/anatomy'; +import { + createMultiStyleConfigHelpers, + defineStyle, +} from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; + +const { defineMultiStyleConfig, definePartsStyle } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAITrack = defineStyle((props) => { + const { colorScheme: c } = props; + + return { + bg: mode(`base.400`, `base.600`)(props), + + _focusVisible: { + boxShadow: 'none', + }, + _checked: { + bg: mode(`${c}.400`, `${c}.600`)(props), + }, + }; +}); + +const invokeAIThumb = defineStyle((props) => { + const { colorScheme: c } = props; + + return { + bg: mode(`${c}.50`, `${c}.50`)(props), + }; +}); + +const invokeAI = definePartsStyle((props) => ({ + container: {}, + track: invokeAITrack(props), + thumb: invokeAIThumb(props), +})); + +export const switchTheme = defineMultiStyleConfig({ + variants: { invokeAI }, + defaultProps: { + size: 'md', + variant: 'invokeAI', + colorScheme: 'accent', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/tabs.ts b/invokeai/frontend/web/src/theme/components/tabs.ts new file mode 100644 index 0000000000..9cd991d8bf --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/tabs.ts @@ -0,0 +1,63 @@ +import { tabsAnatomy as parts } from '@chakra-ui/anatomy'; +import { + createMultiStyleConfigHelpers, + defineStyle, +} from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; + +const { defineMultiStyleConfig, definePartsStyle } = + createMultiStyleConfigHelpers(parts.keys); + +const invokeAIRoot = defineStyle((_props) => { + return { + display: 'flex', + columnGap: 4, + }; +}); + +const invokeAITab = defineStyle((_props) => ({})); + +const invokeAITablist = defineStyle((props) => ({ + display: 'flex', + flexDirection: 'column', + gap: 1, + color: mode('base.500', 'base.700')(props), + button: { + fontSize: 'sm', + padding: 2, + borderRadius: 'base', + _selected: { + bg: mode('accent.200', 'accent.700')(props), + color: mode('accent.800', 'accent.100')(props), + _hover: { + bg: mode('accent.300', 'accent.600')(props), + color: mode('accent.900', 'accent.50')(props), + }, + }, + _hover: { + bg: mode('base.300', 'base.600')(props), + color: mode('base.900', 'base.50')(props), + }, + }, +})); + +const invokeAITabpanel = defineStyle((_props) => ({ + padding: 0, + height: '100%', +})); + +const invokeAI = definePartsStyle((props) => ({ + root: invokeAIRoot(props), + tab: invokeAITab(props), + tablist: invokeAITablist(props), + tabpanel: invokeAITabpanel(props), +})); + +export const tabsTheme = defineMultiStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/text.ts b/invokeai/frontend/web/src/theme/components/text.ts new file mode 100644 index 0000000000..a485289366 --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/text.ts @@ -0,0 +1,12 @@ +import { defineStyle, defineStyleConfig } from '@chakra-ui/react'; +import { mode } from '@chakra-ui/theme-tools'; + +const subtext = defineStyle((props) => ({ + color: mode('base.700', 'base.400')(props), +})); + +export const textTheme = defineStyleConfig({ + variants: { + subtext, + }, +}); diff --git a/invokeai/frontend/web/src/theme/components/textarea.ts b/invokeai/frontend/web/src/theme/components/textarea.ts new file mode 100644 index 0000000000..85e6e37d3f --- /dev/null +++ b/invokeai/frontend/web/src/theme/components/textarea.ts @@ -0,0 +1,14 @@ +import { defineStyle, defineStyleConfig } from '@chakra-ui/react'; +import { getInputOutlineStyles } from '../util/getInputOutlineStyles'; + +const invokeAI = defineStyle((props) => getInputOutlineStyles(props)); + +export const textareaTheme = defineStyleConfig({ + variants: { + invokeAI, + }, + defaultProps: { + size: 'md', + variant: 'invokeAI', + }, +}); diff --git a/invokeai/frontend/web/src/theme/theme.ts b/invokeai/frontend/web/src/theme/theme.ts new file mode 100644 index 0000000000..40df156cdb --- /dev/null +++ b/invokeai/frontend/web/src/theme/theme.ts @@ -0,0 +1,80 @@ +import { ThemeOverride } from '@chakra-ui/react'; +import type { StyleFunctionProps } from '@chakra-ui/styled-system'; +import { mode } from '@chakra-ui/theme-tools'; +import { invokeAIThemeColors } from './colors/invokeAI'; +import { accordionTheme } from './components/accordion'; +import { buttonTheme } from './components/button'; +import { checkboxTheme } from './components/checkbox'; +import { formLabelTheme } from './components/formLabel'; +import { inputTheme } from './components/input'; +import { menuTheme } from './components/menu'; +import { modalTheme } from './components/modal'; +import { numberInputTheme } from './components/numberInput'; +import { popoverTheme } from './components/popover'; +import { progressTheme } from './components/progress'; +import { scrollbar } from './components/scrollbar'; +import { selectTheme } from './components/select'; +import { sliderTheme } from './components/slider'; +import { switchTheme } from './components/switch'; +import { tabsTheme } from './components/tabs'; +import { textTheme } from './components/text'; +import { textareaTheme } from './components/textarea'; + +export const theme: ThemeOverride = { + config: { + initialColorMode: 'dark', + useSystemColorMode: false, + cssVarPrefix: 'invokeai', + }, + styles: { + global: (props: StyleFunctionProps) => ({ + body: { + bg: mode('base.100', 'base.900')(props), + color: mode('base.800', 'base.50')(props), + overflow: 'hidden', + }, + ...scrollbar, + }), + }, + direction: 'ltr', + fonts: { + body: `'Inter', 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)`, + }, + }, + colors: { + ...invokeAIThemeColors, + }, + components: { + Button: buttonTheme, // Button and IconButton + Input: inputTheme, + Textarea: textareaTheme, + Tabs: tabsTheme, + Progress: progressTheme, + Accordion: accordionTheme, + FormLabel: formLabelTheme, + Switch: switchTheme, + NumberInput: numberInputTheme, + Select: selectTheme, + Slider: sliderTheme, + Popover: popoverTheme, + Modal: modalTheme, + Checkbox: checkboxTheme, + Menu: menuTheme, + Text: textTheme, + }, +}; diff --git a/invokeai/frontend/web/src/theme/util/constants.ts b/invokeai/frontend/web/src/theme/util/constants.ts new file mode 100644 index 0000000000..85d9185f31 --- /dev/null +++ b/invokeai/frontend/web/src/theme/util/constants.ts @@ -0,0 +1,19 @@ +// Calc Values +export const APP_CUTOFF = '0px'; +export const APP_CONTENT_HEIGHT_CUTOFF = 'calc(70px + 1rem)'; // default: 7rem +export const APP_PADDING = 4; +export const PROGRESS_BAR_THICKNESS = 1.5; +export const APP_WIDTH = `calc(100vw - ${APP_CUTOFF})`; +export const APP_HEIGHT = `calc(100vh - ${PROGRESS_BAR_THICKNESS * 4}px)`; +export const APP_CONTENT_HEIGHT = `calc(100vh - ${APP_CONTENT_HEIGHT_CUTOFF})`; +export const APP_GALLERY_HEIGHT_PINNED = `calc(100vh - (${APP_CONTENT_HEIGHT_CUTOFF} + 6rem))`; +export const APP_GALLERY_HEIGHT = 'calc(100vw - 0.3rem + 5rem)'; +export const APP_GALLERY_POPOVER_HEIGHT = `calc(100vh - (${APP_CONTENT_HEIGHT_CUTOFF} + 6rem))`; +export const APP_METADATA_HEIGHT = `calc(100vh - (${APP_CONTENT_HEIGHT_CUTOFF} + 4.4rem))`; + +// do not touch ffs +export const APP_TEXT_TO_IMAGE_HEIGHT = + 'calc(100vh - 9.4375rem - 1.925rem - 1.15rem)'; + +// option bar +export const OPTIONS_BAR_MAX_WIDTH = '22.5rem'; diff --git a/invokeai/frontend/web/src/theme/util/generateColorPalette.ts b/invokeai/frontend/web/src/theme/util/generateColorPalette.ts new file mode 100644 index 0000000000..abd7939fa1 --- /dev/null +++ b/invokeai/frontend/web/src/theme/util/generateColorPalette.ts @@ -0,0 +1,80 @@ +type paletteSteps = { + 0: string; + 50: string; + 100: string; + 150: string; + 200: string; + 250: string; + 300: string; + 350: string; + 400: string; + 450: string; + 500: string; + 550: string; + 600: string; + 650: string; + 700: string; + 750: string; + 800: string; + 850: string; + 900: string; + 950: string; + 1000: string; +}; + +/** + * Add two numbers together + * @param {String | Number} hue Hue of the color (0-360) - Reds 0, Greens 120, Blues 240 + * @param {String | Number} saturation Saturation of the color (0-100) + * @param {boolean} light True to generate light color palette + */ +export function generateColorPalette( + hue: string | number, + saturation: string | number, + light = false +) { + hue = String(hue); + saturation = String(saturation); + + const colorSteps = Array.from({ length: 21 }, (_, i) => i * 50); + const lightnessSteps = [ + '0', + '5', + '10', + '15', + '20', + '25', + '30', + '35', + '40', + '45', + '50', + '55', + '59', + '64', + '68', + '73', + '77', + '82', + '86', + '95', + '100', + ]; + + const darkPalette: Partial = {}; + const lightPalette: Partial = {}; + + colorSteps.forEach((colorStep, index) => { + darkPalette[ + colorStep as keyof typeof darkPalette + ] = `hsl(${hue}, ${saturation}%, ${ + lightnessSteps[colorSteps.length - 1 - index] + }%)`; + + lightPalette[ + colorStep as keyof typeof lightPalette + ] = `hsl(${hue}, ${saturation}%, ${lightnessSteps[index]}%)`; + }); + + return light ? lightPalette : darkPalette; +} diff --git a/invokeai/frontend/web/src/theme/util/getInputOutlineStyles.ts b/invokeai/frontend/web/src/theme/util/getInputOutlineStyles.ts new file mode 100644 index 0000000000..9550df5863 --- /dev/null +++ b/invokeai/frontend/web/src/theme/util/getInputOutlineStyles.ts @@ -0,0 +1,40 @@ +import { mode, StyleFunctionProps } from '@chakra-ui/theme-tools'; + +export const getInputOutlineStyles = (props: StyleFunctionProps) => ({ + outline: 'none', + borderWidth: 2, + borderStyle: 'solid', + borderColor: mode('base.300', 'base.800')(props), + bg: mode('base.200', 'base.900')(props), + borderRadius: 'base', + color: mode('base.900', 'base.100')(props), + boxShadow: 'none', + _hover: { + borderColor: mode('base.500', 'base.600')(props), + }, + _focus: { + borderColor: mode('accent.600', 'accent.700')(props), + boxShadow: 'none', + _hover: { + borderColor: mode('accent.700', 'accent.600')(props), + }, + }, + _invalid: { + borderColor: mode('error.300', 'error.700')(props), + boxShadow: 'none', + _hover: { + borderColor: mode('error.500', 'error.600')(props), + }, + }, + _disabled: { + borderColor: mode('base.300', 'base.700')(props), + bg: mode('base.400', 'base.700')(props), + color: mode('base.600', 'base.400')(props), + _hover: { + borderColor: mode('base.300', 'base.700')(props), + }, + }, + _placeholder: { + color: mode('base.600', 'base.400')(props), + }, +}); diff --git a/invokeai/frontend/web/stats.html b/invokeai/frontend/web/stats.html index 1e7823a4ff..10ba44cc34 100644 --- a/invokeai/frontend/web/stats.html +++ b/invokeai/frontend/web/stats.html @@ -6157,7 +6157,7 @@ var drawChart = (function (exports) {